|
|
@@ -1,29 +1,54 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
+ <div>
|
|
|
+ <el-main ref="elMain" style="padding: 0px">
|
|
|
+ <Split :gutterSize="2" style="height: calc(100vh - 120px)">
|
|
|
+ <!-- 左侧树Start -->
|
|
|
+ <SplitArea :size="leftSplitWidth" :minSize="200">
|
|
|
+ <el-checkbox v-model="containsSubChecked">显示全部协议</el-checkbox>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <tree
|
|
|
+ :setting="ztreeSetting"
|
|
|
+ :nodes="ztreeNodes"
|
|
|
+ @onClick="onZTreeClick"
|
|
|
+ @onCreated="onZTreeCreated"
|
|
|
+ />
|
|
|
+ </SplitArea>
|
|
|
+ <!-- 左侧树End -->
|
|
|
|
|
|
- <el-main ref="elMain" style="padding: 0px;">
|
|
|
- <Split :gutterSize="2" style="height: calc(100vh - 120px);">
|
|
|
- <!-- 左侧树Start -->
|
|
|
- <SplitArea :size="leftSplitWidth" :minSize="200">
|
|
|
- <el-checkbox v-model="containsSubChecked">显示全部协议</el-checkbox>
|
|
|
- <el-divider></el-divider>
|
|
|
- <tree :setting="ztreeSetting" :nodes="ztreeNodes" @onClick="onZTreeClick" @onCreated="onZTreeCreated"/>
|
|
|
- </SplitArea>
|
|
|
- <!-- 左侧树End -->
|
|
|
-
|
|
|
- <!-- 右侧列表页面Start -->
|
|
|
- <SplitArea :size="rightSplitWidth">
|
|
|
- <!-- 工具区域Start -->
|
|
|
- <el-form class="queryForm" ref="queryFormRef" :model="queryForm" label-width="80px">
|
|
|
- <el-row style="margin-bottom: 15px;">
|
|
|
+ <!-- 右侧列表页面Start -->
|
|
|
+ <SplitArea :size="rightSplitWidth">
|
|
|
+ <!-- 工具区域Start -->
|
|
|
+ <el-form
|
|
|
+ class="queryForm"
|
|
|
+ ref="queryFormRef"
|
|
|
+ :model="queryForm"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
+ <el-row style="margin-bottom: 15px">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="录入时间">
|
|
|
- <el-date-picker v-model="queryForm.date" style="margin-left: 20px;width:90%" size="small" type="daterange" align="left" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryForm.date"
|
|
|
+ style="margin-left: 20px; width: 90%"
|
|
|
+ size="small"
|
|
|
+ type="daterange"
|
|
|
+ align="left"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-form-item label="协议状态">
|
|
|
- <el-select size="small" v-model="queryForm.status" placeholder="请选择协议状态" clearable style="width: 100%;">
|
|
|
+ <el-select
|
|
|
+ size="small"
|
|
|
+ v-model="queryForm.status"
|
|
|
+ placeholder="请选择协议状态"
|
|
|
+ clearable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option label="待审核" value="0"></el-option>
|
|
|
<el-option label="审核通过" value="1"></el-option>
|
|
|
<el-option label="退回修改" value="2"></el-option>
|
|
|
@@ -31,56 +56,113 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="4" style="display: flex;align-items: center;justify-content: center;">
|
|
|
+ <el-col
|
|
|
+ :span="4"
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-form-item>
|
|
|
<el-button size="small" @click="queryEsmInfo">查询</el-button>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
- <kt-common-table permsEdit="sys:user:edit" :data="pageResult" :columns="columns" :editButtonName="(pageRequest.columnFilters.status.value == '0')?'查看':'费用设置'" :showBatchDelete="false" @findPage="findPage" @handleEdit="handleTableEdit" >
|
|
|
- </kt-common-table>
|
|
|
- </SplitArea>
|
|
|
- </Split>
|
|
|
- </el-main>
|
|
|
+ </el-form>
|
|
|
+ <kt-common-table
|
|
|
+ permsEdit="sys:user:edit"
|
|
|
+ :data="pageResult"
|
|
|
+ :columns="columns"
|
|
|
+ :editButtonName="
|
|
|
+ pageRequest.columnFilters.status.value == '0'
|
|
|
+ ? '查看'
|
|
|
+ : '费用设置'
|
|
|
+ "
|
|
|
+ :showBatchDelete="false"
|
|
|
+ @findPage="findPage"
|
|
|
+ @handleEdit="handleTableEdit"
|
|
|
+ >
|
|
|
+ </kt-common-table>
|
|
|
+ </SplitArea>
|
|
|
+ </Split>
|
|
|
+ </el-main>
|
|
|
|
|
|
<!-- 新增协议的对话框 -->
|
|
|
- <el-dialog :title="dialogTitle" v-dialogDrag :visible.sync="dialogVisible" width="840px" :before-close="handleClose" @close="closeVisible">
|
|
|
-
|
|
|
- <el-row style="margin-bottom: 10px;" v-if="addAgreementForm.agreestatus =='3'">
|
|
|
- <el-col :span="4" style="text-align: right"><label style="margin-right: 10px;">退回修改原因:</label></el-col>
|
|
|
- <el-col :span="20" style="color: red;">
|
|
|
- {{addAgreementForm.remark}}
|
|
|
+ <el-dialog
|
|
|
+ :title="dialogTitle"
|
|
|
+ v-dialogDrag
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="840px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ @close="closeVisible"
|
|
|
+ >
|
|
|
+ <el-row
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ v-if="addAgreementForm.agreestatus == '3'"
|
|
|
+ >
|
|
|
+ <el-col :span="4" style="text-align: right"
|
|
|
+ ><label style="margin-right: 10px">退回修改原因:</label></el-col
|
|
|
+ >
|
|
|
+ <el-col :span="20" style="color: red">
|
|
|
+ {{ addAgreementForm.remark }}
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 内容主体区域 -->
|
|
|
- <el-tabs v-model="activeTabs" type="card">
|
|
|
+ <el-tabs v-model="activeTabs" type="card">
|
|
|
<!-- 协议基本信息 -->
|
|
|
<el-tab-pane label="协议信息" name="first">
|
|
|
- <el-form disabled size="mini" :model="addAgreementForm" ref="addAgreementRef" label-width="130px">
|
|
|
+ <el-form
|
|
|
+ disabled
|
|
|
+ size="mini"
|
|
|
+ :model="addAgreementForm"
|
|
|
+ ref="addAgreementRef"
|
|
|
+ label-width="130px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议代码">
|
|
|
- <el-input v-model="addAgreementForm.agreementcode" placeholder="请输入协议代码" style="width: 100%;"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="addAgreementForm.agreementcode"
|
|
|
+ placeholder="请输入协议代码"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="协议名称" >
|
|
|
- <el-input v-model="addAgreementForm.agreementname" placeholder="请输入协议名称" style="width: 100%;"></el-input>
|
|
|
+ <el-form-item label="协议名称">
|
|
|
+ <el-input
|
|
|
+ v-model="addAgreementForm.agreementname"
|
|
|
+ placeholder="请输入协议名称"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议简称">
|
|
|
- <el-input v-model="addAgreementForm.agreementshort" placeholder="请输入协议简称" style="width: 100%;"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="addAgreementForm.agreementshort"
|
|
|
+ placeholder="请输入协议简称"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议类型">
|
|
|
- <el-select v-model="addAgreementForm.agreementtype" placeholder="请选择协议类型" style="width: 100%;">
|
|
|
- <el-option v-for="item in agreementtypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.agreementtype"
|
|
|
+ placeholder="请选择协议类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in agreementtypeoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -88,33 +170,61 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作公司">
|
|
|
- <el-cascader style="width: 100%;" v-model="addAgreementForm.insure1" :show-all-levels="false" :options="options" :props="optionProps" clearable></el-cascader>
|
|
|
+ <el-cascader
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="addAgreementForm.insure1"
|
|
|
+ :show-all-levels="false"
|
|
|
+ :options="options"
|
|
|
+ :props="optionProps"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作保险简称">
|
|
|
- <el-input v-model="addAgreementForm.insureshort" style="width: 100%;" disabled></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="addAgreementForm.insureshort"
|
|
|
+ style="width: 100%"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作渠道">
|
|
|
- <el-select v-model="addAgreementForm.channel" placeholder="请选择投保渠道" style="width: 100%;">
|
|
|
- <el-option v-for="item in channeloptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.channel"
|
|
|
+ placeholder="请选择投保渠道"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in channeloptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="对接人">
|
|
|
- <el-input v-model="addAgreementForm.account" placeholder="请添加负责人" style="width: 100%;"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="addAgreementForm.account"
|
|
|
+ placeholder="请添加负责人"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="含增值税结算">
|
|
|
- <el-select v-model="addAgreementForm.withtax" placeholder="请选择是否含增值税结算" style="width: 100%;">
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.withtax"
|
|
|
+ placeholder="请选择是否含增值税结算"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option label="是" value="是"></el-option>
|
|
|
<el-option label="否" value="否"></el-option>
|
|
|
</el-select>
|
|
|
@@ -122,8 +232,17 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="保单日期类型">
|
|
|
- <el-select v-model="addAgreementForm.matchtype" placeholder="请选择保单日期类型" style="width: 100%;">
|
|
|
- <el-option v-for="item in matchtypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.matchtype"
|
|
|
+ placeholder="请选择保单日期类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in matchtypeoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -131,15 +250,27 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议生效日期">
|
|
|
- <el-date-picker style="width: 100%;" v-model="addAgreementForm.startdate" type="date" placeholder="选择协议生效日期"
|
|
|
- format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="addAgreementForm.startdate"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择协议生效日期"
|
|
|
+ format="yyyy-MM-dd HH:mm"
|
|
|
+ value-format="yyyy-MM-dd HH:mm"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议失效日期">
|
|
|
- <el-date-picker style="width: 100%;" v-model="addAgreementForm.enddate" type="date" placeholder="选择失效日期"
|
|
|
- format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="addAgreementForm.enddate"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择失效日期"
|
|
|
+ format="yyyy-MM-dd HH:mm"
|
|
|
+ value-format="yyyy-MM-dd HH:mm"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -147,34 +278,71 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="佣金发放方式">
|
|
|
- <el-select v-model="addAgreementForm.moneytype" placeholder="请选择佣金发放方式" style="width: 100%;">
|
|
|
- <el-option v-for="item in moneytypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.moneytype"
|
|
|
+ placeholder="请选择佣金发放方式"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in moneytypeoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="结算周期">
|
|
|
- <el-select v-model="addAgreementForm.moneytime" placeholder="请选择结算周期" style="width: 100%;">
|
|
|
- <el-option :label="'T+'+item" :value="item" v-for="item of 60" :key="item"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="addAgreementForm.moneytime"
|
|
|
+ placeholder="请选择结算周期"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ :label="'T+' + item"
|
|
|
+ :value="item"
|
|
|
+ v-for="item of 60"
|
|
|
+ :key="item"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="承保规则" name="second">
|
|
|
- <el-form disabled size="mini" :model="rulesForm" ref="rulesForm" label-width="120px">
|
|
|
+ <el-tab-pane label="承保规则" name="second">
|
|
|
+ <el-form
|
|
|
+ disabled
|
|
|
+ size="mini"
|
|
|
+ :model="rulesForm"
|
|
|
+ ref="rulesForm"
|
|
|
+ label-width="120px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="费率类型" >
|
|
|
- <el-select v-model="rulesForm.feetype" placeholder="请选择费率类型" style="width: 100%;">
|
|
|
- <el-option v-for="item in feetypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-form-item label="费率类型">
|
|
|
+ <el-select
|
|
|
+ v-model="rulesForm.feetype"
|
|
|
+ placeholder="请选择费率类型"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in feetypeoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="所属性质" >
|
|
|
- <el-select v-model="rulesForm.feetype" placeholder="请选择所属性质" style="width: 100%;">
|
|
|
+ <el-form-item label="所属性质">
|
|
|
+ <el-select
|
|
|
+ v-model="rulesForm.feetype"
|
|
|
+ placeholder="请选择所属性质"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option label="个人" value="个人"></el-option>
|
|
|
<el-option label="企业" value="企业"></el-option>
|
|
|
<el-option label="机关" value="机关"></el-option>
|
|
|
@@ -185,639 +353,805 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="使用性质">
|
|
|
- <el-select v-model="rulesForm.canusenature" placeholder="请选择使用性质" style="width: 100%;">
|
|
|
- <el-option v-for="item in canusenatureoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="rulesForm.canusenature"
|
|
|
+ placeholder="请选择使用性质"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in canusenatureoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="车辆种类">
|
|
|
- <el-select v-model="rulesForm.cancarkind" placeholder="请选择车辆种类" style="width: 100%;">
|
|
|
- <el-option v-for="item in cancarkindoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
|
|
|
+ <el-select
|
|
|
+ v-model="rulesForm.cancarkind"
|
|
|
+ placeholder="请选择车辆种类"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in cancarkindoptions"
|
|
|
+ :key="item.label"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="24" v-if="carareaoptions.length>0">
|
|
|
+ <el-col :span="24" v-if="carareaoptions.length > 0">
|
|
|
<el-form-item label="可承保地区" prop="cancity">
|
|
|
- <el-select style="width: 100%;" v-model="rulesForm.cancity" multiple clearable placeholder="请选择可承保地区">
|
|
|
- <el-option v-for="item in carareaoptions" :key="item.code" :label="item.name" :value="item.code"></el-option>
|
|
|
+ <el-select
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="rulesForm.cancity"
|
|
|
+ multiple
|
|
|
+ clearable
|
|
|
+ placeholder="请选择可承保地区"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in carareaoptions"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :key="item.productid" v-for="(item, index) in productTabs" :label="item.product" :name="item.productid" >
|
|
|
- <el-form size="mini" :model="item" ref="productRef" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="产品佣金比例">
|
|
|
- <el-input disabled v-model="item.productrate" placeholder="请输入产品佣金比例" style="width: 100%;"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="费用形式">
|
|
|
- <el-select disabled v-model="item.feestyle" placeholder="请选择费用形式" style="width: 100%;">
|
|
|
- <el-option label="百分比" value="百分比"></el-option>
|
|
|
- <el-option label="差价" value="差价"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-
|
|
|
+ <el-tab-pane
|
|
|
+ :key="item.productid"
|
|
|
+ v-for="(item, index) in productTabs"
|
|
|
+ :label="item.product"
|
|
|
+ :name="item.productid"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ size="mini"
|
|
|
+ :model="item"
|
|
|
+ ref="productRef"
|
|
|
+ label-width="120px"
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="产品佣金比例">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="item.productrate"
|
|
|
+ placeholder="请输入产品佣金比例"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="费用形式">
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="item.feestyle"
|
|
|
+ placeholder="请选择费用形式"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option label="百分比" value="百分比"></el-option>
|
|
|
+ <el-option label="差价" value="差价"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
- <el-row style="border-top: 1px solid #eee;margin-top: 0px;padding: 10px 0px;">
|
|
|
- <el-row style="margin-bottom: 10px;">
|
|
|
- <label style="margin-right: 15px;font-size: 16px;">管理费用设置</label>
|
|
|
+ <el-row
|
|
|
+ style="
|
|
|
+ border-top: 1px solid #eee;
|
|
|
+ margin-top: 0px;
|
|
|
+ padding: 10px 0px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-row style="margin-bottom: 10px">
|
|
|
+ <label style="margin-right: 15px; font-size: 16px"
|
|
|
+ >管理费用设置</label
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- <el-row style="margin: 10px 0px;background-color: #E4E7ED;padding: 8px 0;">
|
|
|
- <el-col :span="8" class="u-f-ajc">佣金入口:{{item.productrate}}</el-col>
|
|
|
- <el-col :span="8" class="u-f-ajc">公司预留佣金:{{item.keeprate}}</el-col>
|
|
|
- <el-col :span="8" class="u-f-ajc">佣金出口:{{item.feerate}}</el-col>
|
|
|
+ <el-row
|
|
|
+ style="
|
|
|
+ margin: 10px 0px;
|
|
|
+ background-color: #e4e7ed;
|
|
|
+ padding: 8px 0;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-col :span="8" class="u-f-ajc"
|
|
|
+ >佣金入口:{{ item.productrate }}</el-col
|
|
|
+ >
|
|
|
+ <el-col :span="8" class="u-f-ajc"
|
|
|
+ >公司预留佣金:{{ item.keeprate }}</el-col
|
|
|
+ >
|
|
|
+ <el-col :span="8" class="u-f-ajc"
|
|
|
+ >佣金出口:{{ item.feerate }}</el-col
|
|
|
+ >
|
|
|
</el-row>
|
|
|
- <el-row >
|
|
|
- <el-row style="margin: 5px 0px;" type="flex" justify="center">
|
|
|
+ <el-row>
|
|
|
+ <el-row style="margin: 5px 0px" type="flex" justify="center">
|
|
|
<el-col :span="4">机构等级</el-col>
|
|
|
<el-col :span="8">管理费用</el-col>
|
|
|
<el-col :span="8">追加费用</el-col>
|
|
|
</el-row>
|
|
|
- <el-row style="margin: 5px 0px;" type="flex" justify="center" v-for="prodfeesItem in item.prodfees" :key="prodfeesItem.comlevel">
|
|
|
+ <el-row
|
|
|
+ style="margin: 5px 0px"
|
|
|
+ type="flex"
|
|
|
+ justify="center"
|
|
|
+ v-for="prodfeesItem in item.prodfees"
|
|
|
+ :key="prodfeesItem.comlevel"
|
|
|
+ >
|
|
|
<el-col :span="4">
|
|
|
- <label>{{prodfeesItem.comlevel}}</label>
|
|
|
+ <label>{{ prodfeesItem.comlevel }}</label>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-input :disabled="pageRequest.columnFilters.status.value == '0'" size="mini" style="width:60%" type="number" @change="changeProdFee(index)" v-model="prodfeesItem.keeprate" ></el-input>
|
|
|
+ <el-input
|
|
|
+ :disabled="pageRequest.columnFilters.status.value == '0'"
|
|
|
+ size="mini"
|
|
|
+ style="width: 60%"
|
|
|
+ type="number"
|
|
|
+ @change="changeProdFee(index)"
|
|
|
+ v-model="prodfeesItem.keeprate"
|
|
|
+ ></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-input :disabled="pageRequest.columnFilters.status.value == '0'" size="mini" type="number" style="width:60%" @change="changeProdFee(index)" v-model="prodfeesItem.addrate"></el-input>
|
|
|
+ <el-input
|
|
|
+ :disabled="pageRequest.columnFilters.status.value == '0'"
|
|
|
+ size="mini"
|
|
|
+ type="number"
|
|
|
+ style="width: 60%"
|
|
|
+ @change="changeProdFee(index)"
|
|
|
+ v-model="prodfeesItem.addrate"
|
|
|
+ ></el-input>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- </el-tab-pane>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
<!-- 底部区域 -->
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="submitForm" v-if="feestatus!='0'" >提交</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="submitForm"
|
|
|
+ v-if="feestatus != '0'"
|
|
|
+ >提交</el-button
|
|
|
+ >
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
-
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import tree from "@/components/ztree.vue";
|
|
|
- import KtCommonTable from "@/views/Core/KtCommonTable.vue";//表格组件
|
|
|
- import KtButton from "@/views/Core/KtButton";
|
|
|
- import CommonUtil from "@/utils/comutil.js";
|
|
|
- import citydata from "@/assets/js/citydata.js";
|
|
|
- import { formatWithSeperator,format } from "@/utils/datetime.js";
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- tree,
|
|
|
- KtCommonTable,
|
|
|
- KtButton
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- /**Split 开始 */
|
|
|
- leftSplitWidth: 20,
|
|
|
- rightSplitWidth: 80,
|
|
|
- /**Split 结束 */
|
|
|
+import tree from "@/components/ztree.vue";
|
|
|
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
|
|
|
+import KtButton from "@/views/Core/KtButton";
|
|
|
+import CommonUtil from "@/utils/comutil.js";
|
|
|
+import citydata from "@/assets/js/citydata.js";
|
|
|
+import { formatWithSeperator, format } from "@/utils/datetime.js";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ tree,
|
|
|
+ KtCommonTable,
|
|
|
+ KtButton,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ /**Split 开始 */
|
|
|
+ leftSplitWidth: 20,
|
|
|
+ rightSplitWidth: 80,
|
|
|
+ /**Split 结束 */
|
|
|
|
|
|
- //----ztree begin---------
|
|
|
- ztreeObj: null,
|
|
|
- ztreeSetting: {
|
|
|
- check: {
|
|
|
- enable: false
|
|
|
- },
|
|
|
- data: {
|
|
|
- simpleData: {
|
|
|
- enable: true,
|
|
|
- pIdKey: "parentId"
|
|
|
- }
|
|
|
+ //----ztree begin---------
|
|
|
+ ztreeObj: null,
|
|
|
+ ztreeSetting: {
|
|
|
+ check: {
|
|
|
+ enable: false,
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ simpleData: {
|
|
|
+ enable: true,
|
|
|
+ pIdKey: "parentId",
|
|
|
},
|
|
|
- view: {
|
|
|
- showIcon: false
|
|
|
- }
|
|
|
},
|
|
|
- ztreeNodes: [],
|
|
|
- currentTreeNode: null,
|
|
|
- //----ztree end---------
|
|
|
+ view: {
|
|
|
+ showIcon: false,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ztreeNodes: [],
|
|
|
+ currentTreeNode: null,
|
|
|
+ //----ztree end---------
|
|
|
|
|
|
- // 右侧列表查询数据Start
|
|
|
- queryForm:{
|
|
|
- "status":"3"
|
|
|
+ // 右侧列表查询数据Start
|
|
|
+ queryForm: {
|
|
|
+ status: "3",
|
|
|
+ },
|
|
|
+ containsSubChecked: true,
|
|
|
+ pageResult: {},
|
|
|
+ pageRequest: {
|
|
|
+ //查询的默认条件
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ columnFilters: {
|
|
|
+ inscode: {
|
|
|
+ name: "inscode",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ startdate: {
|
|
|
+ name: "startdate",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ enddate: {
|
|
|
+ name: "enddate",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
+ status: {
|
|
|
+ name: "status",
|
|
|
+ value: "3",
|
|
|
+ },
|
|
|
+ feestatus: {
|
|
|
+ name: "feestatus",
|
|
|
+ value: "",
|
|
|
+ },
|
|
|
},
|
|
|
- containsSubChecked:true,
|
|
|
- pageResult: {},
|
|
|
- pageRequest: { //查询的默认条件
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 20,
|
|
|
- columnFilters: {
|
|
|
- "inscode": {
|
|
|
- "name": "inscode",
|
|
|
- "value": ""
|
|
|
- },
|
|
|
- "startdate": {
|
|
|
- "name": "startdate",
|
|
|
- "value": ""
|
|
|
- },
|
|
|
- "enddate": {
|
|
|
- "name": "enddate",
|
|
|
- "value": ""
|
|
|
- },
|
|
|
- "status": {
|
|
|
- "name": "status",
|
|
|
- "value": "3"
|
|
|
- },
|
|
|
- "feestatus":{
|
|
|
- "name":"feestatus",
|
|
|
- "value":""
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ //数据列
|
|
|
+ { prop: "id", label: "编号", minWidth: 180 },
|
|
|
+ { prop: "agreementcode", label: "协议代码", minWidth: 130 },
|
|
|
+ { prop: "agreementname", label: "协议名称", minWidth: 200 },
|
|
|
+ {
|
|
|
+ prop: "agreementtype",
|
|
|
+ label: "协议类型",
|
|
|
+ minWidth: 160,
|
|
|
+ formatter: this.agreementtypeFormatter,
|
|
|
},
|
|
|
- columns:[ //数据列
|
|
|
- {prop: "id",label: "编号",minWidth: 180},
|
|
|
- {prop: "agreementcode",label: "协议代码",minWidth: 130},
|
|
|
- {prop: "agreementname",label: "协议名称",minWidth: 200},
|
|
|
- {prop: "agreementtype",label: "协议类型",minWidth: 160,formatter: this.agreementtypeFormatter},
|
|
|
- {prop: "startdate",label: "协议生效日期",minWidth: 130},
|
|
|
- {prop: "enddate",label: "协议失效日期",minWidth: 130},
|
|
|
- {prop: "matchtype",label: "匹配日期类型",minWidth: 130,formatter: this.matchtypeFormatter},
|
|
|
- {prop: "moneytime",label: "结算周期",minWidth: 100,formatter: this.moneytimeFormatter},
|
|
|
- {prop: "status",label: "状态",minWidth: 110,formatter: this.agreestatusFormatter },
|
|
|
- {prop: "updatetime",label: "修改时间",minWidth: 150,formatter: this.updatetimeFormatter},
|
|
|
- {prop: "updateby",label: "修改人",minWidth: 120},
|
|
|
- ],
|
|
|
- feestatus:0,
|
|
|
- // 右侧列表查询数据End
|
|
|
-
|
|
|
- optionProps: { //公司下拉列表配置
|
|
|
- checkStrictly: true,
|
|
|
- value: "id",
|
|
|
- label: "name",
|
|
|
- children: "children"
|
|
|
+ { prop: "startdate", label: "协议生效日期", minWidth: 130 },
|
|
|
+ { prop: "enddate", label: "协议失效日期", minWidth: 130 },
|
|
|
+ {
|
|
|
+ prop: "matchtype",
|
|
|
+ label: "匹配日期类型",
|
|
|
+ minWidth: 130,
|
|
|
+ formatter: this.matchtypeFormatter,
|
|
|
},
|
|
|
- options:[], //保险公司下拉列表
|
|
|
-
|
|
|
- activeTabs:'first',
|
|
|
- operType: "ADD", //'ADD','EDIT'
|
|
|
- dialogTitle: "设置协议费用",
|
|
|
- dialogVisible: false, //控制对话框显示
|
|
|
-
|
|
|
- addAgreementForm: { //新增协议的表单数据
|
|
|
- id: "", //主键(用来标识是新增还是修改)
|
|
|
- checkid:"",
|
|
|
- agreementcode: "", //协议代码
|
|
|
- agreementname: "", //协议名称
|
|
|
- agreementshort: "", //协议简称
|
|
|
- agreementtype: "", //协议类型
|
|
|
- insure1: "", //保险公司
|
|
|
- insureshort: "", //合作保险简称
|
|
|
- isvalid: "", //是否上线
|
|
|
- channel: "", //投保渠道
|
|
|
- withtax: "", //含增值税结算
|
|
|
- startdate: "", //协议生效日期
|
|
|
- enddate: "", //协议失效日期
|
|
|
- matchtype: "", //保单匹配协议日期类型
|
|
|
- moneytype: "", //佣金发放方式
|
|
|
- cmpprice: "", //支持比价
|
|
|
- moneytime: "", //结算周期
|
|
|
- account:"",
|
|
|
- password:"",
|
|
|
- agreestatus: "1", //协议状态(1表示审核中)
|
|
|
- comcode: "", //所属机构
|
|
|
- agreementProds: [], //协议产品
|
|
|
- remark:"" //备注
|
|
|
+ {
|
|
|
+ prop: "moneytime",
|
|
|
+ label: "结算周期",
|
|
|
+ minWidth: 100,
|
|
|
+ formatter: this.moneytimeFormatter,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "status",
|
|
|
+ label: "状态",
|
|
|
+ minWidth: 110,
|
|
|
+ formatter: this.agreestatusFormatter,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: "updatetime",
|
|
|
+ label: "修改时间",
|
|
|
+ minWidth: 150,
|
|
|
+ formatter: this.updatetimeFormatter,
|
|
|
},
|
|
|
+ { prop: "updateby", label: "修改人", minWidth: 120 },
|
|
|
+ ],
|
|
|
+ feestatus: 0,
|
|
|
+ // 右侧列表查询数据End
|
|
|
|
|
|
+ optionProps: {
|
|
|
+ //公司下拉列表配置
|
|
|
+ checkStrictly: true,
|
|
|
+ value: "id",
|
|
|
+ label: "name",
|
|
|
+ children: "children",
|
|
|
+ },
|
|
|
+ options: [], //保险公司下拉列表
|
|
|
|
|
|
- //------------协议下拉框数据 begin-----------------
|
|
|
- agreementtypeoptions: [], //协议类型
|
|
|
- channeloptions: [], //合作渠道
|
|
|
- matchtypeoptions: [], //保单匹配协议日期类型
|
|
|
- moneytypeoptions: [], //佣金发放方式
|
|
|
- feetypeoptions: [], //费率类型
|
|
|
- cancarkindoptions:[],//可承保车辆种类
|
|
|
- canusenatureoptions:[],//可承保使用性质
|
|
|
- carareaoptions:[],//可承保地区
|
|
|
- //------------协议下拉框数据 end-----------------
|
|
|
+ activeTabs: "first",
|
|
|
+ operType: "ADD", //'ADD','EDIT'
|
|
|
+ dialogTitle: "设置协议费用",
|
|
|
+ dialogVisible: false, //控制对话框显示
|
|
|
|
|
|
- statusalloptions:[
|
|
|
- {value:'0',label:"待审核"},
|
|
|
- {value:'1',label:"审核通过"},
|
|
|
- {value:'2',label:"退回修改"},
|
|
|
- {value:'3',label:"费用待设置"},
|
|
|
- ],
|
|
|
+ addAgreementForm: {
|
|
|
+ //新增协议的表单数据
|
|
|
+ id: "", //主键(用来标识是新增还是修改)
|
|
|
+ checkid: "",
|
|
|
+ agreementcode: "", //协议代码
|
|
|
+ agreementname: "", //协议名称
|
|
|
+ agreementshort: "", //协议简称
|
|
|
+ agreementtype: "", //协议类型
|
|
|
+ insure1: "", //保险公司
|
|
|
+ insureshort: "", //合作保险简称
|
|
|
+ isvalid: "", //是否上线
|
|
|
+ channel: "", //投保渠道
|
|
|
+ withtax: "", //含增值税结算
|
|
|
+ startdate: "", //协议生效日期
|
|
|
+ enddate: "", //协议失效日期
|
|
|
+ matchtype: "", //保单匹配协议日期类型
|
|
|
+ moneytype: "", //佣金发放方式
|
|
|
+ cmpprice: "", //支持比价
|
|
|
+ moneytime: "", //结算周期
|
|
|
+ account: "",
|
|
|
+ password: "",
|
|
|
+ agreestatus: "1", //协议状态(1表示审核中)
|
|
|
+ comcode: "", //所属机构
|
|
|
+ agreementProds: [], //协议产品
|
|
|
+ remark: "", //备注
|
|
|
+ },
|
|
|
|
|
|
- //承保规则表单
|
|
|
- rulesForm:{
|
|
|
- feetype: "", //费率类型
|
|
|
- cancity: "", //可承保市
|
|
|
- cancarkind: "", //车辆种类
|
|
|
- canusenature: "", //使用性质
|
|
|
- },
|
|
|
+ //------------协议下拉框数据 begin-----------------
|
|
|
+ agreementtypeoptions: [], //协议类型
|
|
|
+ channeloptions: [], //合作渠道
|
|
|
+ matchtypeoptions: [], //保单匹配协议日期类型
|
|
|
+ moneytypeoptions: [], //佣金发放方式
|
|
|
+ feetypeoptions: [], //费率类型
|
|
|
+ cancarkindoptions: [], //可承保车辆种类
|
|
|
+ canusenatureoptions: [], //可承保使用性质
|
|
|
+ carareaoptions: [], //可承保地区
|
|
|
+ //------------协议下拉框数据 end-----------------
|
|
|
|
|
|
- productTabs:[],
|
|
|
+ statusalloptions: [
|
|
|
+ { value: "0", label: "待审核" },
|
|
|
+ { value: "1", label: "审核通过" },
|
|
|
+ { value: "2", label: "退回修改" },
|
|
|
+ { value: "3", label: "费用待设置" },
|
|
|
+ ],
|
|
|
|
|
|
+ //承保规则表单
|
|
|
+ rulesForm: {
|
|
|
+ feetype: "", //费率类型
|
|
|
+ cancity: "", //可承保市
|
|
|
+ cancarkind: "", //车辆种类
|
|
|
+ canusenature: "", //使用性质
|
|
|
+ },
|
|
|
|
|
|
- // 协议产品费用
|
|
|
- prodfees:[
|
|
|
- {
|
|
|
- agreeprodid: "",
|
|
|
- comlevel: "一级",
|
|
|
- addrate: 0,//追加费用比例
|
|
|
- agreementcode: "",
|
|
|
- feestatus: "",
|
|
|
- id: "",
|
|
|
- checkid:"",
|
|
|
- keeprate: 0,//管理费用比例
|
|
|
- producname: "",
|
|
|
- },
|
|
|
- {
|
|
|
- agreeprodid: "",
|
|
|
- comlevel: "二级",
|
|
|
- addrate: 0,//追加费用比例
|
|
|
- agreementcode: "",
|
|
|
- feestatus: "",
|
|
|
- id: "",
|
|
|
- checkid:"",
|
|
|
- keeprate: 0,//管理费用比例
|
|
|
- producname: "",
|
|
|
- },
|
|
|
- {
|
|
|
- agreeprodid: "",
|
|
|
- comlevel: "三级",
|
|
|
- addrate: 0,//追加费用比例
|
|
|
- agreementcode: "",
|
|
|
- feestatus: "",
|
|
|
- id: "",
|
|
|
- checkid:"",
|
|
|
- keeprate: 0,//管理费用比例
|
|
|
- producname: "",
|
|
|
- },
|
|
|
- {
|
|
|
- agreeprodid: "",
|
|
|
- comlevel: "四级",
|
|
|
- addrate: 0,//追加费用比例
|
|
|
- agreementcode: "",
|
|
|
- feestatus: "",
|
|
|
- id: "",
|
|
|
- checkid:"",
|
|
|
- keeprate: 0,//管理费用比例
|
|
|
- producname: "",
|
|
|
- },
|
|
|
- {
|
|
|
- agreeprodid: "",
|
|
|
- comlevel: "五级",
|
|
|
- addrate: 0,//追加费用比例
|
|
|
- agreementcode: "",
|
|
|
- feestatus: "",
|
|
|
- id: "",
|
|
|
- checkid:"",
|
|
|
- keeprate: 0,//管理费用比例
|
|
|
- producname: '',
|
|
|
- }
|
|
|
- ]
|
|
|
+ productTabs: [],
|
|
|
|
|
|
- };
|
|
|
- },
|
|
|
- watch:{
|
|
|
- containsSubChecked(val){
|
|
|
- if(val){
|
|
|
- this.pageRequest.columnFilters.inscode.value = '';
|
|
|
- this.findPage();
|
|
|
- }else{
|
|
|
- this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
- this.findPage();
|
|
|
- }
|
|
|
+ // 协议产品费用
|
|
|
+ prodfees: [
|
|
|
+ {
|
|
|
+ agreeprodid: "",
|
|
|
+ comlevel: "一级",
|
|
|
+ addrate: 0, //追加费用比例
|
|
|
+ agreementcode: "",
|
|
|
+ feestatus: "",
|
|
|
+ id: "",
|
|
|
+ checkid: "",
|
|
|
+ keeprate: 0, //管理费用比例
|
|
|
+ producname: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ agreeprodid: "",
|
|
|
+ comlevel: "二级",
|
|
|
+ addrate: 0, //追加费用比例
|
|
|
+ agreementcode: "",
|
|
|
+ feestatus: "",
|
|
|
+ id: "",
|
|
|
+ checkid: "",
|
|
|
+ keeprate: 0, //管理费用比例
|
|
|
+ producname: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ agreeprodid: "",
|
|
|
+ comlevel: "三级",
|
|
|
+ addrate: 0, //追加费用比例
|
|
|
+ agreementcode: "",
|
|
|
+ feestatus: "",
|
|
|
+ id: "",
|
|
|
+ checkid: "",
|
|
|
+ keeprate: 0, //管理费用比例
|
|
|
+ producname: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ agreeprodid: "",
|
|
|
+ comlevel: "四级",
|
|
|
+ addrate: 0, //追加费用比例
|
|
|
+ agreementcode: "",
|
|
|
+ feestatus: "",
|
|
|
+ id: "",
|
|
|
+ checkid: "",
|
|
|
+ keeprate: 0, //管理费用比例
|
|
|
+ producname: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ agreeprodid: "",
|
|
|
+ comlevel: "五级",
|
|
|
+ addrate: 0, //追加费用比例
|
|
|
+ agreementcode: "",
|
|
|
+ feestatus: "",
|
|
|
+ id: "",
|
|
|
+ checkid: "",
|
|
|
+ keeprate: 0, //管理费用比例
|
|
|
+ producname: "",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ containsSubChecked(val) {
|
|
|
+ if (val) {
|
|
|
+ this.pageRequest.columnFilters.inscode.value = "";
|
|
|
+ this.findPage();
|
|
|
+ } else {
|
|
|
+ this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
+ this.findPage();
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- //获取所有下拉框数据
|
|
|
- this.getDictItems("agreementtype");
|
|
|
- this.getDictItems("channel");
|
|
|
- this.getDictItems("matchtype");
|
|
|
- this.getDictItems("moneytype");
|
|
|
- this.getDictItems("feetype");
|
|
|
- this.getDictItems("cancarkind");
|
|
|
- this.getDictItems("canusenature");
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.findLeftTreeData();
|
|
|
- //用像素初始化左边的split的宽度
|
|
|
- this.changeTreeWidth(200);// 初始化树的宽度
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ //获取所有下拉框数据
|
|
|
+ this.getDictItems("agreementtype");
|
|
|
+ this.getDictItems("channel");
|
|
|
+ this.getDictItems("matchtype");
|
|
|
+ this.getDictItems("moneytype");
|
|
|
+ this.getDictItems("feetype");
|
|
|
+ this.getDictItems("cancarkind");
|
|
|
+ this.getDictItems("canusenature");
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.findLeftTreeData();
|
|
|
+ //用像素初始化左边的split的宽度
|
|
|
+ this.changeTreeWidth(200); // 初始化树的宽度
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /**Split 开始 */
|
|
|
+ changeTreeWidth(widthVal) {
|
|
|
+ // 初始化树的宽度
|
|
|
+ this.leftSplitWidth = Math.ceil(
|
|
|
+ (widthVal / this.$refs.elMain.$el.clientWidth) * 100
|
|
|
+ );
|
|
|
+ this.rightSplitWidth = 100 - this.leftSplitWidth;
|
|
|
+ },
|
|
|
+ /**Split 结束 */
|
|
|
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ //--tree begin-------
|
|
|
+ // 获取树数据
|
|
|
+ findLeftTreeData: function () {
|
|
|
+ this.$api.insCompany.findLeftInsTree().then((res) => {
|
|
|
+ this.ztreeNodes = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onZTreeClick: function (evt, treeId, treeNode) {
|
|
|
+ // 点击事件
|
|
|
+ this.containsSubChecked = false;
|
|
|
+ this.currentTreeNode = treeNode;
|
|
|
+ this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
+ this.findPage();
|
|
|
+ },
|
|
|
+ onZTreeCreated: function (ztreeObj) {
|
|
|
+ this.ztreeObj = ztreeObj;
|
|
|
+ // onCreated 中操作ztreeObj对象展开第一个节点
|
|
|
+ ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
|
|
|
+ this.currentTreeNode = ztreeObj.getNodes()[0];
|
|
|
|
|
|
- /**Split 开始 */
|
|
|
- changeTreeWidth(widthVal){
|
|
|
- // 初始化树的宽度
|
|
|
- this.leftSplitWidth = Math.ceil(widthVal/this.$refs.elMain.$el.clientWidth*100);
|
|
|
- this.rightSplitWidth = 100-(this.leftSplitWidth)
|
|
|
- },
|
|
|
- /**Split 结束 */
|
|
|
+ this.options = ztreeObj.getNodes();
|
|
|
+ },
|
|
|
+ //-- tree end-------
|
|
|
|
|
|
- //--tree begin-------
|
|
|
- // 获取树数据
|
|
|
- findLeftTreeData: function() {
|
|
|
- this.$api.insCompany.findLeftInsTree().then(res => {
|
|
|
- this.ztreeNodes = res.data;
|
|
|
+ //--数据字典 begin --
|
|
|
+ getDictItems: function (typeName) {
|
|
|
+ let that = this;
|
|
|
+ that.$api.dict
|
|
|
+ .findByLableName(typeName)
|
|
|
+ .then(function (res) {
|
|
|
+ that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ that[typeName + "options"] = [];
|
|
|
});
|
|
|
- },
|
|
|
- onZTreeClick: function(evt, treeId, treeNode) {
|
|
|
- // 点击事件
|
|
|
- this.containsSubChecked=false;
|
|
|
- this.currentTreeNode = treeNode;
|
|
|
- this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
- this.findPage();
|
|
|
- },
|
|
|
- onZTreeCreated: function(ztreeObj) {
|
|
|
- this.ztreeObj = ztreeObj;
|
|
|
- // onCreated 中操作ztreeObj对象展开第一个节点
|
|
|
- ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
|
|
|
- this.currentTreeNode=ztreeObj.getNodes()[0];
|
|
|
-
|
|
|
- this.options=ztreeObj.getNodes();
|
|
|
- },
|
|
|
- //-- tree end-------
|
|
|
+ },
|
|
|
+ //--数据字典 end --
|
|
|
|
|
|
- //--数据字典 begin --
|
|
|
- getDictItems: function(typeName) {
|
|
|
- let that = this;
|
|
|
- that.$api.dict.findByLableName(typeName)
|
|
|
- .then(function(res) {
|
|
|
- that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
|
|
|
- })
|
|
|
- .catch(function(error) {
|
|
|
- that[typeName + "options"] = [];
|
|
|
- });
|
|
|
- },
|
|
|
- //--数据字典 end --
|
|
|
+ //通过查询条件查询分页数据Start
|
|
|
+ queryEsmInfo() {
|
|
|
+ if (this.queryForm.date != null) {
|
|
|
+ var startdate = formatWithSeperator(
|
|
|
+ this.queryForm.date[0],
|
|
|
+ "-",
|
|
|
+ ":"
|
|
|
+ ).split(" ")[0];
|
|
|
+ var enddate = formatWithSeperator(
|
|
|
+ this.queryForm.date[1],
|
|
|
+ "-",
|
|
|
+ ":"
|
|
|
+ ).split(" ")[0];
|
|
|
+ this.pageRequest.columnFilters.startdate.value = startdate;
|
|
|
+ this.pageRequest.columnFilters.enddate.value = enddate;
|
|
|
+ } else {
|
|
|
+ this.pageRequest.columnFilters.startdate.value = "";
|
|
|
+ this.pageRequest.columnFilters.enddate.value = "";
|
|
|
+ }
|
|
|
+ this.pageRequest.columnFilters.status.value = this.queryForm.status;
|
|
|
+ this.pageRequest.pageNum = 1;
|
|
|
+ this.findPage();
|
|
|
+ },
|
|
|
+ //通过查询条件查询分页数据End
|
|
|
|
|
|
- //通过查询条件查询分页数据Start
|
|
|
- queryEsmInfo(){
|
|
|
- if(this.queryForm.date != null ){
|
|
|
- var startdate =formatWithSeperator(this.queryForm.date[0],'-',':').split(' ')[0];
|
|
|
- var enddate = formatWithSeperator(this.queryForm.date[1],'-',':').split(' ')[0];
|
|
|
- this.pageRequest.columnFilters.startdate.value = startdate;
|
|
|
- this.pageRequest.columnFilters.enddate.value = enddate;
|
|
|
- }else{
|
|
|
- this.pageRequest.columnFilters.startdate.value = '';
|
|
|
- this.pageRequest.columnFilters.enddate.value = '';
|
|
|
+ // 右侧列表的方法Start
|
|
|
+ findPage(data) {
|
|
|
+ // 获取分页数据
|
|
|
+ let that = this;
|
|
|
+ if (data && data.pageRequest) {
|
|
|
+ this.pageRequest.pageNum = data.pageRequest.pageNum;
|
|
|
+ this.pageRequest.pageSize = data.pageRequest.pageSize;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.pageRequest.columnFilters.status.value == "1" ||
|
|
|
+ this.pageRequest.columnFilters.status.value == "3"
|
|
|
+ ) {
|
|
|
+ let param = {};
|
|
|
+ Object.assign(param, this.pageRequest);
|
|
|
+ if (this.pageRequest.columnFilters.status.value == "1") {
|
|
|
+ param.columnFilters.status.value = "1";
|
|
|
+ param.columnFilters.feestatus.value = "1";
|
|
|
}
|
|
|
- this.pageRequest.columnFilters.status.value = this.queryForm.status;
|
|
|
- this.pageRequest.pageNum = 1;
|
|
|
- this.findPage();
|
|
|
- },
|
|
|
- //通过查询条件查询分页数据End
|
|
|
-
|
|
|
- // 右侧列表的方法Start
|
|
|
- findPage(data) {
|
|
|
- // 获取分页数据
|
|
|
- let that = this;
|
|
|
- if(data && data.pageRequest){
|
|
|
- this.pageRequest.pageNum = data.pageRequest.pageNum;
|
|
|
- this.pageRequest.pageSize = data.pageRequest.pageSize;
|
|
|
- }
|
|
|
- if((this.pageRequest.columnFilters.status.value == '1')||(this.pageRequest.columnFilters.status.value == '3')){
|
|
|
- let param = {};
|
|
|
- Object.assign(param,this.pageRequest);
|
|
|
- if(this.pageRequest.columnFilters.status.value == '1'){
|
|
|
- param.columnFilters.status.value = '1';
|
|
|
- param.columnFilters.feestatus.value = '1';
|
|
|
- }
|
|
|
- if(this.pageRequest.columnFilters.status.value == '3'){
|
|
|
- param.columnFilters.status.value = '1';
|
|
|
- // param.columnFilters.feestatus.value = '1';
|
|
|
- param.columnFilters.feestatus.value = '';
|
|
|
- }
|
|
|
- that.$api.esmagreement.findPage(param).then(res => {
|
|
|
- that.pageResult = res.data;
|
|
|
- })
|
|
|
- .then(data != null ? data.callback : "");
|
|
|
- }else{
|
|
|
- that.$api.esmagreement.prodfeePage(that.pageRequest).then(res => {
|
|
|
- console.log(res.data)
|
|
|
- that.pageResult = res.data;
|
|
|
- })
|
|
|
- .then(data != null ? data.callback : "");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- // 右侧列表的方法End
|
|
|
-
|
|
|
- //-- formatter begin--
|
|
|
- agreementtypeFormatter(row, column) { //协议类型
|
|
|
- let agreementtype = row.agreementtype;
|
|
|
- return CommonUtil.getDataName({dataList: this.agreementtypeoptions, value: 'value', label: 'label', data: agreementtype})
|
|
|
- },
|
|
|
- matchtypeFormatter(row, column) { //匹配日期类型
|
|
|
- let matchtype = row.matchtype;
|
|
|
- return CommonUtil.getDataName({dataList: this.matchtypeoptions, value: 'value', label: 'label', data: matchtype})
|
|
|
- },
|
|
|
- moneytimeFormatter(row, column) { //结算周期
|
|
|
- return 'T+'+row.moneytime;
|
|
|
- },
|
|
|
- agreestatusFormatter(row, column) { //状态
|
|
|
- if(row.prodfees.length>0){
|
|
|
- let status = row.prodfees[0].feestatus;
|
|
|
- return CommonUtil.getDataName({dataList: this.statusalloptions, value: 'value', label: 'label', data: status})
|
|
|
- }else{
|
|
|
- return "费用待设置";
|
|
|
- }
|
|
|
- },
|
|
|
- updatetimeFormatter(row,column){
|
|
|
- let updatetime = row.updatetime;
|
|
|
- return format(updatetime);
|
|
|
- },
|
|
|
- //-- formatter end--
|
|
|
-
|
|
|
- changeProdFee(index){
|
|
|
- for(let i=0;i<this.productTabs[index].prodfees.length;i++){
|
|
|
- if(this.productTabs[index].prodfees[i].keeprate==""){
|
|
|
- this.productTabs[index].prodfees[i].keeprate=0;
|
|
|
- }
|
|
|
- if(this.productTabs[index].prodfees[i].addrate==""){
|
|
|
- this.productTabs[index].prodfees[i].addrate=0;
|
|
|
- }
|
|
|
+ if (this.pageRequest.columnFilters.status.value == "3") {
|
|
|
+ param.columnFilters.status.value = "1";
|
|
|
+ // param.columnFilters.feestatus.value = '1';
|
|
|
+ param.columnFilters.feestatus.value = "";
|
|
|
}
|
|
|
+ that.$api.esmagreement
|
|
|
+ .findPage(param)
|
|
|
+ .then((res) => {
|
|
|
+ that.pageResult = res.data;
|
|
|
+ })
|
|
|
+ .then(data != null ? data.callback : "");
|
|
|
+ } else {
|
|
|
+ that.$api.esmagreement
|
|
|
+ .prodfeePage(that.pageRequest)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res.data);
|
|
|
+ that.pageResult = res.data;
|
|
|
+ })
|
|
|
+ .then(data != null ? data.callback : "");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 右侧列表的方法End
|
|
|
+
|
|
|
+ //-- formatter begin--
|
|
|
+ agreementtypeFormatter(row, column) {
|
|
|
+ //协议类型
|
|
|
+ let agreementtype = row.agreementtype;
|
|
|
+ return CommonUtil.getDataName({
|
|
|
+ dataList: this.agreementtypeoptions,
|
|
|
+ value: "value",
|
|
|
+ label: "label",
|
|
|
+ data: agreementtype,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ matchtypeFormatter(row, column) {
|
|
|
+ //匹配日期类型
|
|
|
+ let matchtype = row.matchtype;
|
|
|
+ return CommonUtil.getDataName({
|
|
|
+ dataList: this.matchtypeoptions,
|
|
|
+ value: "value",
|
|
|
+ label: "label",
|
|
|
+ data: matchtype,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ moneytimeFormatter(row, column) {
|
|
|
+ //结算周期
|
|
|
+ return "T+" + row.moneytime;
|
|
|
+ },
|
|
|
+ agreestatusFormatter(row, column) {
|
|
|
+ //状态
|
|
|
+ if (row.prodfees.length > 0) {
|
|
|
+ let status = row.prodfees[0].feestatus;
|
|
|
+ return CommonUtil.getDataName({
|
|
|
+ dataList: this.statusalloptions,
|
|
|
+ value: "value",
|
|
|
+ label: "label",
|
|
|
+ data: status,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return "费用待设置";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updatetimeFormatter(row, column) {
|
|
|
+ let updatetime = row.updatetime;
|
|
|
+ return format(updatetime);
|
|
|
+ },
|
|
|
+ //-- formatter end--
|
|
|
|
|
|
- let mm= this.productTabs[index].productrate;
|
|
|
- for(let i=0;i<this.productTabs[index].prodfees.length;i++){
|
|
|
- mm = mm- this.productTabs[index].prodfees[i].keeprate-this.productTabs[index].prodfees[i].addrate;
|
|
|
+ changeProdFee(index) {
|
|
|
+ for (let i = 0; i < this.productTabs[index].prodfees.length; i++) {
|
|
|
+ if (this.productTabs[index].prodfees[i].keeprate == "") {
|
|
|
+ this.productTabs[index].prodfees[i].keeprate = 0;
|
|
|
}
|
|
|
- this.productTabs[index].feerate = mm.toFixed(2); //佣金出口
|
|
|
- this.productTabs[index].keeprate =(this.productTabs[index].productrate - mm).toFixed(2); //公司预留佣金
|
|
|
- if(this.productTabs[index].feerate<0){
|
|
|
- this.$message.error("费用分配不能超出产品佣金总额");
|
|
|
+ if (this.productTabs[index].prodfees[i].addrate == "") {
|
|
|
+ this.productTabs[index].prodfees[i].addrate = 0;
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
|
|
|
- handleClose(done) {
|
|
|
- this.$confirm('确认关闭?')
|
|
|
- .then(_ => {
|
|
|
- done();
|
|
|
- })
|
|
|
- .catch(_ => {});
|
|
|
- },
|
|
|
- closeVisible(){
|
|
|
- this.carareaoptions=[];
|
|
|
- this.$refs.addAgreementRef.resetFields();
|
|
|
- this.$refs.rulesForm.resetFields();
|
|
|
- this.productTabs=[];
|
|
|
- for (let key in this.rulesForm) {
|
|
|
- this.rulesForm[key]="";
|
|
|
- }
|
|
|
- for (let key in this.addAgreementForm) {
|
|
|
- if(key =='agreementProds'){
|
|
|
- this.addAgreementForm[key] = [];
|
|
|
- }else if(key =='prodfees'){
|
|
|
- this.addAgreementForm[key] = [];
|
|
|
- }else{
|
|
|
- this.addAgreementForm[key] = "";
|
|
|
- }
|
|
|
+ let mm = this.productTabs[index].productrate;
|
|
|
+ for (let i = 0; i < this.productTabs[index].prodfees.length; i++) {
|
|
|
+ mm =
|
|
|
+ mm -
|
|
|
+ this.productTabs[index].prodfees[i].keeprate -
|
|
|
+ this.productTabs[index].prodfees[i].addrate;
|
|
|
+ }
|
|
|
+ this.productTabs[index].feerate = mm.toFixed(2); //佣金出口
|
|
|
+ this.productTabs[index].keeprate = (
|
|
|
+ this.productTabs[index].productrate - mm
|
|
|
+ ).toFixed(2); //公司预留佣金
|
|
|
+ if (this.productTabs[index].feerate < 0) {
|
|
|
+ this.$message.error("费用分配不能超出产品佣金总额");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ handleClose(done) {
|
|
|
+ this.$confirm("确认关闭?")
|
|
|
+ .then((_) => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch((_) => {});
|
|
|
+ },
|
|
|
+ closeVisible() {
|
|
|
+ this.carareaoptions = [];
|
|
|
+ this.$refs.addAgreementRef.resetFields();
|
|
|
+ this.$refs.rulesForm.resetFields();
|
|
|
+ this.productTabs = [];
|
|
|
+ for (let key in this.rulesForm) {
|
|
|
+ this.rulesForm[key] = "";
|
|
|
+ }
|
|
|
+ for (let key in this.addAgreementForm) {
|
|
|
+ if (key == "agreementProds") {
|
|
|
+ this.addAgreementForm[key] = [];
|
|
|
+ } else if (key == "prodfees") {
|
|
|
+ this.addAgreementForm[key] = [];
|
|
|
+ } else {
|
|
|
+ this.addAgreementForm[key] = "";
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- //编辑协议
|
|
|
- handleTableEdit(data){
|
|
|
- let that = this;
|
|
|
- this.activeTabs='first';
|
|
|
- this.operType='EDIT';
|
|
|
- this.dialogTitle= "费用设置";
|
|
|
- if((this.queryForm.status == '3') || (this.queryForm.status == '1')){
|
|
|
- this.$api.esmagreement.findById(data.row.id).then(res => {
|
|
|
- console.log(res.data)
|
|
|
- this.feestatus = 3;
|
|
|
- Object.assign(that.addAgreementForm, res.data);
|
|
|
- for(let i=0;i<citydata.rawCitiesData.length;i++){
|
|
|
- if(citydata.rawCitiesData[i].code.substring(0,2) == that.addAgreementForm.insure1.substring(6,8)){
|
|
|
- that.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
- }
|
|
|
+ //编辑协议
|
|
|
+ handleTableEdit(data) {
|
|
|
+ let that = this;
|
|
|
+ this.activeTabs = "first";
|
|
|
+ this.operType = "EDIT";
|
|
|
+ this.dialogTitle = "费用设置";
|
|
|
+ if (this.queryForm.status == "3" || this.queryForm.status == "1") {
|
|
|
+ this.$api.esmagreement.findById(data.row.id).then((res) => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.feestatus = 3;
|
|
|
+ Object.assign(that.addAgreementForm, res.data);
|
|
|
+ for (let i = 0; i < citydata.rawCitiesData.length; i++) {
|
|
|
+ if (
|
|
|
+ citydata.rawCitiesData[i].code.substring(0, 2) ==
|
|
|
+ that.addAgreementForm.insure1.substring(6, 8)
|
|
|
+ ) {
|
|
|
+ that.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if(res.data.agreementProds.length>0){
|
|
|
- that.rulesForm.feetype = res.data.agreementProds[0].feetype;
|
|
|
- that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
|
|
|
- that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
|
|
|
- that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
|
|
|
- Object.assign(that.productTabs,res.data.agreementProds)
|
|
|
- for(let m=0;m<that.productTabs.length;m++){
|
|
|
- let prodFeeParam = [];
|
|
|
- for(let n=0;n<res.data.prodfees.length;n++){
|
|
|
- if(that.productTabs[m].id == res.data.prodfees[n].agreeprodid){
|
|
|
- let mm = {};
|
|
|
- Object.assign(mm,res.data.prodfees[n])
|
|
|
- // res.data.prodfees[n].feestatus='4';
|
|
|
- prodFeeParam.push(mm);
|
|
|
- }
|
|
|
- }
|
|
|
- if(prodFeeParam.length==0){
|
|
|
- for(let o=0;o<that.prodfees.length;o++){
|
|
|
- let mm = {};
|
|
|
- Object.assign(mm,that.prodfees[o])
|
|
|
- mm.agreementcode=this.addAgreementForm.id;
|
|
|
- mm.agreeprodid=this.productTabs[m].id;
|
|
|
- mm.producname=this.addAgreementForm.product;
|
|
|
- prodFeeParam.push(mm);
|
|
|
- }
|
|
|
+ if (res.data.agreementProds.length > 0) {
|
|
|
+ that.rulesForm.feetype = res.data.agreementProds[0].feetype;
|
|
|
+ that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
|
|
|
+ that.rulesForm.canusenature =
|
|
|
+ res.data.agreementProds[0].canusenature;
|
|
|
+ that.rulesForm.cancity =
|
|
|
+ res.data.agreementProds[0].cancity.split(",");
|
|
|
+ Object.assign(that.productTabs, res.data.agreementProds);
|
|
|
+ for (let m = 0; m < that.productTabs.length; m++) {
|
|
|
+ let prodFeeParam = [];
|
|
|
+ for (let n = 0; n < res.data.prodfees.length; n++) {
|
|
|
+ if (
|
|
|
+ that.productTabs[m].id == res.data.prodfees[n].agreeprodid
|
|
|
+ ) {
|
|
|
+ let mm = {};
|
|
|
+ Object.assign(mm, res.data.prodfees[n]);
|
|
|
+ // res.data.prodfees[n].feestatus='4';
|
|
|
+ prodFeeParam.push(mm);
|
|
|
}
|
|
|
- this.$set(that.productTabs[m], 'prodfees', [])
|
|
|
- for(let n=0;n<that.productTabs[m].prodfees.length;n++){
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
|
|
|
+ }
|
|
|
+ if (prodFeeParam.length == 0) {
|
|
|
+ for (let o = 0; o < that.prodfees.length; o++) {
|
|
|
+ let mm = {};
|
|
|
+ Object.assign(mm, that.prodfees[o]);
|
|
|
+ mm.agreementcode = this.addAgreementForm.id;
|
|
|
+ mm.agreeprodid = this.productTabs[m].id;
|
|
|
+ mm.producname = this.addAgreementForm.product;
|
|
|
+ prodFeeParam.push(mm);
|
|
|
}
|
|
|
- that.productTabs[m].prodfees=prodFeeParam;
|
|
|
- // Object.assign(that.productTabs[m].prodfees,prodFeeParam)
|
|
|
}
|
|
|
- }
|
|
|
- that.dialogVisible = true;
|
|
|
- });
|
|
|
- }else{
|
|
|
- this.$api.esmagreement.findFeeById(data.row.checkid).then(res => {
|
|
|
- console.log(res.data)
|
|
|
- this.feestatus = res.data.prodfees[0].feestatus;
|
|
|
- Object.assign(that.addAgreementForm, res.data);
|
|
|
- for(let i=0;i<citydata.rawCitiesData.length;i++){
|
|
|
- if(citydata.rawCitiesData[i].code.substring(0,2) == that.addAgreementForm.insure1.substring(6,8)){
|
|
|
- that.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
+ this.$set(that.productTabs[m], "prodfees", []);
|
|
|
+ for (let n = 0; n < that.productTabs[m].prodfees.length; n++) {
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], "keeprate", "");
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], "addrate", "");
|
|
|
}
|
|
|
+ that.productTabs[m].prodfees = prodFeeParam;
|
|
|
+ // Object.assign(that.productTabs[m].prodfees,prodFeeParam)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.dialogVisible = true;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$api.esmagreement.findFeeById(data.row.checkid).then((res) => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.feestatus = res.data.prodfees[0].feestatus;
|
|
|
+ Object.assign(that.addAgreementForm, res.data);
|
|
|
+ for (let i = 0; i < citydata.rawCitiesData.length; i++) {
|
|
|
+ if (
|
|
|
+ citydata.rawCitiesData[i].code.substring(0, 2) ==
|
|
|
+ that.addAgreementForm.insure1.substring(6, 8)
|
|
|
+ ) {
|
|
|
+ that.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- if(res.data.agreementProds.length>0){
|
|
|
- that.rulesForm.feetype = res.data.agreementProds[0].feetype;
|
|
|
- that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
|
|
|
- that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
|
|
|
- that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
|
|
|
- Object.assign(that.productTabs,res.data.agreementProds)
|
|
|
- for(let m=0;m<that.productTabs.length;m++){
|
|
|
- let prodFeeParam = [];
|
|
|
- for(let n=0;n<res.data.prodfees.length;n++){
|
|
|
- if(that.productTabs[m].id == res.data.prodfees[n].agreeprodid){
|
|
|
- let mm = {};
|
|
|
- Object.assign(mm,res.data.prodfees[n])
|
|
|
- // res.data.prodfees[n].feestatus='4';
|
|
|
- prodFeeParam.push(mm);
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(that.productTabs[m], 'prodfees', [])
|
|
|
- for(let n=0;n<that.productTabs[m].prodfees.length;n++){
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
|
|
|
+ if (res.data.agreementProds.length > 0) {
|
|
|
+ that.rulesForm.feetype = res.data.agreementProds[0].feetype;
|
|
|
+ that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
|
|
|
+ that.rulesForm.canusenature =
|
|
|
+ res.data.agreementProds[0].canusenature;
|
|
|
+ that.rulesForm.cancity =
|
|
|
+ res.data.agreementProds[0].cancity.split(",");
|
|
|
+ Object.assign(that.productTabs, res.data.agreementProds);
|
|
|
+ for (let m = 0; m < that.productTabs.length; m++) {
|
|
|
+ let prodFeeParam = [];
|
|
|
+ for (let n = 0; n < res.data.prodfees.length; n++) {
|
|
|
+ if (
|
|
|
+ that.productTabs[m].id == res.data.prodfees[n].agreeprodid
|
|
|
+ ) {
|
|
|
+ let mm = {};
|
|
|
+ Object.assign(mm, res.data.prodfees[n]);
|
|
|
+ // res.data.prodfees[n].feestatus='4';
|
|
|
+ prodFeeParam.push(mm);
|
|
|
}
|
|
|
- that.productTabs[m].prodfees=prodFeeParam;
|
|
|
}
|
|
|
+ this.$set(that.productTabs[m], "prodfees", []);
|
|
|
+ for (let n = 0; n < that.productTabs[m].prodfees.length; n++) {
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], "keeprate", "");
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], "addrate", "");
|
|
|
+ }
|
|
|
+ that.productTabs[m].prodfees = prodFeeParam;
|
|
|
}
|
|
|
- that.dialogVisible = true;
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- //提交
|
|
|
- submitForm(status) {
|
|
|
- let list = [];
|
|
|
- for(let i=0;i<this.productTabs.length;i++){
|
|
|
- list = list.concat(this.productTabs[i].prodfees)
|
|
|
- }
|
|
|
- this.addAgreementForm.prodfees = list;
|
|
|
- console.log(this.addAgreementForm)
|
|
|
- this.$api.esmagreement.saveProdFee(this.addAgreementForm).then(res => {
|
|
|
- console.log(res)
|
|
|
- if(res.code == 200){
|
|
|
- this.$message({type: 'success',message: '已提交',duration:2000});
|
|
|
- this.dialogVisible=false;
|
|
|
- }else{
|
|
|
- this.$message({type: 'error',message: '提交失败',duration:2000});
|
|
|
- }
|
|
|
+ }
|
|
|
+ that.dialogVisible = true;
|
|
|
});
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- }
|
|
|
- };
|
|
|
+ //提交
|
|
|
+ submitForm(status) {
|
|
|
+ let list = [];
|
|
|
+ for (let i = 0; i < this.productTabs.length; i++) {
|
|
|
+ list = list.concat(this.productTabs[i].prodfees);
|
|
|
+ }
|
|
|
+ this.addAgreementForm.prodfees = list;
|
|
|
+ console.log(this.addAgreementForm);
|
|
|
+ this.$api.esmagreement.saveProdFee(this.addAgreementForm).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({ type: "success", message: "已提交", duration: 2000 });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message({ type: "error", message: "提交失败", duration: 2000 });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
- .el-divider{
|
|
|
- margin: 10px 0px 15px!important;
|
|
|
- }
|
|
|
- .queryForm .el-row {
|
|
|
- margin:0px;
|
|
|
- }
|
|
|
+.el-divider {
|
|
|
+ margin: 10px 0px 15px !important;
|
|
|
+}
|
|
|
+.queryForm .el-row {
|
|
|
+ margin: 0px;
|
|
|
+}
|
|
|
|
|
|
- .queryForm .el-form-item {
|
|
|
- margin-bottom: 0px;
|
|
|
- }
|
|
|
+.queryForm .el-form-item {
|
|
|
+ margin-bottom: 0px;
|
|
|
+}
|
|
|
</style>
|