|
|
@@ -1,25 +1,26 @@
|
|
|
<template>
|
|
|
- <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 -->
|
|
|
-
|
|
|
- <!-- 右侧列表页面Start -->
|
|
|
- <SplitArea :size="rightSplitWidth">
|
|
|
- <!-- 工具区域Start -->
|
|
|
+ <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 -->
|
|
|
+
|
|
|
+ <!-- 右侧列表页面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">
|
|
|
@@ -34,55 +35,62 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="display: flex;align-items: center;justify-content: center;">
|
|
|
<el-form-item>
|
|
|
- <el-button size="small" @click="queryEsmInfo">查询</el-button>
|
|
|
+ <kt-button label="查询" perms="agreement:audit:query" @click="queryEsmInfo" />
|
|
|
</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>
|
|
|
+ </el-form>
|
|
|
|
|
|
- </SplitArea>
|
|
|
- </Split>
|
|
|
- </el-main>
|
|
|
+ <kt-common-table permsEdit="agreement:audit:review" :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-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 =='2'">
|
|
|
+ <el-row style="margin-bottom: 10px;" v-if="addAgreementForm.agreestatus == '2'">
|
|
|
<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}}
|
|
|
+ {{ 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" :rules="addAgreementRules" ref="addAgreementRef" label-width="130px">
|
|
|
+ <el-form disabled size="mini" :model="addAgreementForm" :rules="addAgreementRules" ref="addAgreementRef"
|
|
|
+ label-width="130px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议代码" prop="agreementcode">
|
|
|
- <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="协议名称" prop="agreementname">
|
|
|
- <el-input v-model="addAgreementForm.agreementname" placeholder="请输入协议名称" style="width: 100%;"></el-input>
|
|
|
+ <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="协议简称" prop="agreementshort">
|
|
|
- <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="协议类型" prop="agreementtype">
|
|
|
<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-option v-for="item in agreementtypeoptions" :key="item.label" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -90,7 +98,8 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作公司" prop="insure1">
|
|
|
- <el-cascader style="width: 100%;" v-model="addAgreementForm.insure1" :show-all-levels="false" :options="options" :props="optionProps" @change="handleChange" clearable></el-cascader>
|
|
|
+ <el-cascader style="width: 100%;" v-model="addAgreementForm.insure1" :show-all-levels="false"
|
|
|
+ :options="options" :props="optionProps" @change="handleChange" clearable></el-cascader>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -103,7 +112,8 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合作渠道" prop="channel">
|
|
|
<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-option v-for="item in channeloptions" :key="item.label" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -125,7 +135,8 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="保单日期类型" prop="matchtype">
|
|
|
<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-option v-for="item in matchtypeoptions" :key="item.label" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -133,8 +144,8 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="协议生效日期" prop="startdate">
|
|
|
- <el-date-picker style="width: 100%;" v-model="addAgreementForm.startdate" type="date" placeholder="选择协议生效日期"
|
|
|
- format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
|
|
+ <el-date-picker style="width: 100%;" v-model="addAgreementForm.startdate" type="date"
|
|
|
+ placeholder="选择协议生效日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -150,27 +161,30 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="佣金发放方式" prop="moneytype">
|
|
|
<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-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="结算周期" prop="moneytime">
|
|
|
<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-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" :rules="agreementProdsRules" ref="rulesForm" label-width="120px">
|
|
|
+ <el-tab-pane label="承保规则" name="second">
|
|
|
+ <el-form disabled size="mini" :model="rulesForm" :rules="agreementProdsRules" ref="rulesForm"
|
|
|
+ label-width="120px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="费率类型" prop="feetype">
|
|
|
<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-option v-for="item in feetypeoptions" :key="item.label" :label="item.label"
|
|
|
+ :value="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -188,99 +202,108 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="使用性质" prop="canusenature">
|
|
|
<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-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="车辆种类" prop="cancarkind">
|
|
|
<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-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 || operType=='ADD'">
|
|
|
+ <el-col :span="24" v-if="carareaoptions.length > 0 || operType == 'ADD'">
|
|
|
<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-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 disabled size="mini" :model="item" :rules="agreementProdsRules" ref="productRef" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="产品佣金比例" prop="productrate">
|
|
|
- <el-input v-model="item.productrate" placeholder="请输入产品佣金比例" style="width: 100%;"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="费用形式" prop="feestyle">
|
|
|
- <el-select 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 disabled size="mini" :model="item" :rules="agreementProdsRules" ref="productRef" label-width="120px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="产品佣金比例" prop="productrate">
|
|
|
+ <el-input v-model="item.productrate" placeholder="请输入产品佣金比例" style="width: 100%;"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="费用形式" prop="feestyle">
|
|
|
+ <el-select 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>
|
|
|
- <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-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-col :span="4">
|
|
|
- <label>{{prodfeesItem.comlevel}}</label>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-input disabled 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 size="mini" type="number" style="width:60%" @change="changeProdFee(index)" v-model="prodfeesItem.addrate"></el-input>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </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>
|
|
|
- <!-- 费用授权 -->
|
|
|
- <el-row style="border-top: 1px solid #eee;margin-top: 20px;padding: 10px 0px;" v-if="operType=='EDIT'">
|
|
|
- <el-row style="margin-bottom: 10px;">
|
|
|
- <label style="margin-right: 15px;font-size: 16px;">管理费用授权</label>
|
|
|
+ <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-col :span="4">机构等级</el-col>
|
|
|
+ <el-col :span="8">管理费用</el-col>
|
|
|
+ <el-col :span="8">追加费用</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
- <el-tree disabled :ref="item.id" :data="companyListTree" :props="companyProps" show-checkbox node-key="id" :accordion="true" :default-checked-keys="item.authcomcode" ></el-tree>
|
|
|
+ <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>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-input disabled 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 size="mini" type="number" style="width:60%" @change="changeProdFee(index)"
|
|
|
+ v-model="prodfeesItem.addrate"></el-input>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-row>
|
|
|
-
|
|
|
- </el-form>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="审核意见" name="last" v-if="addAgreementForm.agreestatus == '0'">
|
|
|
- <el-row style="margin: 20px 0px;">
|
|
|
- <el-col :span="2" style="text-align: right"><label style="margin-right: 10px;">备注:</label></el-col>
|
|
|
- <el-col :span="22">
|
|
|
- <el-input v-model="remarks" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="请输入内容" prop="agreementForm.remark" maxlength="200" show-word-limit ></el-input>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
- <el-row style="text-align: center;margin-top: 30px;">
|
|
|
- <el-button size="mini" type="primary" @click="submitForm(1)" >通过审核</el-button>
|
|
|
- <el-button size="mini" type="danger" @click="submitForm(2)" >退回修改</el-button>
|
|
|
+ <!-- 费用授权 -->
|
|
|
+ <el-row style="border-top: 1px solid #eee;margin-top: 20px;padding: 10px 0px;" v-if="operType == 'EDIT'">
|
|
|
+ <el-row style="margin-bottom: 10px;">
|
|
|
+ <label style="margin-right: 15px;font-size: 16px;">管理费用授权</label>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-tree disabled :ref="item.id" :data="companyListTree" :props="companyProps" show-checkbox node-key="id"
|
|
|
+ :accordion="true" :default-checked-keys="item.authcomcode"></el-tree>
|
|
|
+ </el-row>
|
|
|
</el-row>
|
|
|
- </el-tab-pane>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="审核意见" name="last" v-if="addAgreementForm.agreestatus == '0'">
|
|
|
+ <el-row style="margin: 20px 0px;">
|
|
|
+ <el-col :span="2" style="text-align: right"><label style="margin-right: 10px;">备注:</label></el-col>
|
|
|
+ <el-col :span="22">
|
|
|
+ <el-input v-model="remarks" type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" placeholder="请输入内容"
|
|
|
+ prop="agreementForm.remark" maxlength="200" show-word-limit></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="text-align: center;margin-top: 30px;">
|
|
|
+ <el-button size="mini" type="primary" @click="submitForm(1)">通过审核</el-button>
|
|
|
+ <el-button size="mini" type="danger" @click="submitForm(2)">退回修改</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
|
|
|
<!-- 底部区域 -->
|
|
|
@@ -289,590 +312,589 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import Cookies from "js-cookie"
|
|
|
- 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 {
|
|
|
- peopleid:"",
|
|
|
- peopledeptid:"",
|
|
|
-
|
|
|
- // 授权公司列表Start
|
|
|
- companyList:[],
|
|
|
- companyProps: {
|
|
|
- label: 'name',
|
|
|
- children: 'children'
|
|
|
- },
|
|
|
- companyDefKeys:[],// 默认选中的节点id值
|
|
|
- // 授权公司列表End
|
|
|
-
|
|
|
- remarks:"",
|
|
|
- /**Split 开始 */
|
|
|
- leftSplitWidth: 20,
|
|
|
- rightSplitWidth: 80,
|
|
|
- /**Split 结束 */
|
|
|
-
|
|
|
- //----ztree begin---------
|
|
|
- ztreeObj: null,
|
|
|
- ztreeSetting: {
|
|
|
- check: {
|
|
|
- enable: false
|
|
|
- },
|
|
|
- data: {
|
|
|
- simpleData: {
|
|
|
- enable: true,
|
|
|
- pIdKey: "parentId"
|
|
|
- }
|
|
|
- },
|
|
|
- view: {
|
|
|
- showIcon: false
|
|
|
- }
|
|
|
- },
|
|
|
- ztreeNodes: [],
|
|
|
- currentTreeNode: null,
|
|
|
- //----ztree end---------
|
|
|
+import Cookies from "js-cookie"
|
|
|
+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 {
|
|
|
+ peopleid: "",
|
|
|
+ peopledeptid: "",
|
|
|
+
|
|
|
+ // 授权公司列表Start
|
|
|
+ companyList: [],
|
|
|
+ companyProps: {
|
|
|
+ label: 'name',
|
|
|
+ children: 'children'
|
|
|
+ },
|
|
|
+ companyDefKeys: [],// 默认选中的节点id值
|
|
|
+ // 授权公司列表End
|
|
|
|
|
|
- // 右侧列表查询数据Start
|
|
|
- queryForm:{
|
|
|
- "status":"0"
|
|
|
- },
|
|
|
- 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": "0"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- 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: "agreestatus",label: "状态",minWidth: 110,formatter: this.agreestatusFormatter },
|
|
|
- {prop: "updatetime",label: "修改时间",minWidth: 150,formatter: this.updatetimeFormatter},
|
|
|
- {prop: "updateby",label: "修改人",minWidth: 120},
|
|
|
- ],
|
|
|
- // 右侧列表查询数据End
|
|
|
-
|
|
|
- optionProps: { //公司下拉列表配置
|
|
|
- checkStrictly: true,
|
|
|
- value: "id",
|
|
|
- label: "name",
|
|
|
- children: "children"
|
|
|
- },
|
|
|
- options:[], //保险公司下拉列表
|
|
|
-
|
|
|
- activeTabs:'first',
|
|
|
- operType: "ADD", //'ADD','EDIT'
|
|
|
- dialogTitle: "新增协议",
|
|
|
- dialogVisible: false, //控制对话框显示
|
|
|
-
|
|
|
- addAgreementForm: { //新增协议的表单数据
|
|
|
- id: "", //主键(用来标识是新增还是修改)
|
|
|
- checkid:"",//checkid,id为空是新增 checkid 为空,id不为空是修改 checkid,id都不为空是退回修改
|
|
|
- agreementcode: "", //协议代码
|
|
|
- agreementname: "", //协议名称
|
|
|
- agreementshort: "", //协议简称
|
|
|
- agreementtype: "", //协议类型
|
|
|
- insure1: "", //保险公司
|
|
|
- insureshort: "", //合作保险简称
|
|
|
- isvalid: "", //是否上线
|
|
|
- channel: "", //投保渠道
|
|
|
- withtax: "", //含增值税结算
|
|
|
- startdate: "", //协议生效日期
|
|
|
- enddate: "", //协议失效日期
|
|
|
- matchtype: "", //保单匹配协议日期类型
|
|
|
- moneytype: "", //佣金发放方式
|
|
|
- cmpprice: "", //支持比价
|
|
|
- moneytime: "", //结算周期
|
|
|
- account:"",
|
|
|
- password:"",
|
|
|
- agreestatus: "1", //协议状态(1表示审核中)
|
|
|
- comcode: "", //所属机构
|
|
|
- agreementProds: [], //协议产品
|
|
|
- remark:"" //备注
|
|
|
- },
|
|
|
- addAgreementRules: { //新增协议的表单验证规则对象
|
|
|
- agreementcode: [{ required: true, message: '请输入协议代码', trigger: 'blur' }],
|
|
|
- agreementname: [{required: true,message: '请输入协议名称',trigger: 'blur'}],
|
|
|
- agreementshort: [{required: true,message: '请输入协议简称',trigger: 'blur'}],
|
|
|
- agreementtype: [{required: true,message: '请选择协议类型',trigger: 'blur'}],
|
|
|
- insure1: [{required: true,message: '请选择合作公司',trigger: 'blur'}],
|
|
|
- channel: [{required: true,message: '请选择合作渠道',trigger: 'blur'}],
|
|
|
- account: [{required: true,message: '请添加负责人',trigger: 'blur'}],
|
|
|
- withtax: [{required: true,message: '请选择含增值税结算',trigger: 'blur'}],
|
|
|
- startdate: [{required: true,message: '请输入协议生效日期',trigger: 'blur'}],
|
|
|
- enddate: [{required: true,message: '请输入协议失效日期',trigger: 'blur'}],
|
|
|
- matchtype: [{required: true,message: '请输入保单日期类型',trigger: 'blur'}],
|
|
|
- moneytype: [{required: true,message: '请选择佣金发放方式',trigger: 'blur'}],
|
|
|
- moneytime: [{required: true,message: '请选择结算周期',trigger: 'blur'}]
|
|
|
- },
|
|
|
+ remarks: "",
|
|
|
+ /**Split 开始 */
|
|
|
+ leftSplitWidth: 20,
|
|
|
+ rightSplitWidth: 80,
|
|
|
+ /**Split 结束 */
|
|
|
|
|
|
- //------------协议下拉框数据 begin-----------------
|
|
|
- agreementtypeoptions: [], //协议类型
|
|
|
- channeloptions: [], //合作渠道
|
|
|
- matchtypeoptions: [], //保单匹配协议日期类型
|
|
|
- moneytypeoptions: [], //佣金发放方式
|
|
|
- feetypeoptions: [], //费率类型
|
|
|
- cancarkindoptions:[],//可承保车辆种类
|
|
|
- canusenatureoptions:[],//可承保使用性质
|
|
|
- carareaoptions:[],//可承保地区
|
|
|
- //------------协议下拉框数据 end-----------------
|
|
|
-
|
|
|
- statusalloptions:[
|
|
|
- {value:'0',label:"待审核"},
|
|
|
- {value:'1',label:"审核通过"},
|
|
|
- {value:'2',label:"退回修改"},
|
|
|
- {value:'99',label:"已失效"},
|
|
|
- ],
|
|
|
-
|
|
|
- //承保规则表单
|
|
|
- rulesForm:{
|
|
|
- feetype: "", //费率类型
|
|
|
- cancity: "", //可承保市
|
|
|
- cancarkind: "", //车辆种类
|
|
|
- canusenature: "", //使用性质
|
|
|
+ //----ztree begin---------
|
|
|
+ ztreeObj: null,
|
|
|
+ ztreeSetting: {
|
|
|
+ check: {
|
|
|
+ enable: false
|
|
|
},
|
|
|
-
|
|
|
- // 第二个弹框的数据Start
|
|
|
- addProductId:"",
|
|
|
- addProductName:"",
|
|
|
- // 第二个弹框的数据End
|
|
|
-
|
|
|
- productDialogVisible: false,
|
|
|
- productTabsValue: '2',
|
|
|
- productTabs:[],
|
|
|
-
|
|
|
- agreementProdsRules: {
|
|
|
- feetype: [{required: true,message: '请选择费率类型',trigger: 'blur'}],
|
|
|
- productrate: [{required: true,message: '请选择产品佣金比例',trigger: 'blur'}],
|
|
|
- feestyle: [{required: true,message: '请选择费用形式',trigger: 'blur'}],
|
|
|
- cancity: [{required: true,message: '请选择可承保市',trigger: 'blur'}],
|
|
|
- cancarkind: [{required: true,message: '请选择车辆种类',trigger: 'blur'}],
|
|
|
- canusenature: [{required: true,message: '请选择使用性质',trigger: 'blur'}]
|
|
|
+ data: {
|
|
|
+ simpleData: {
|
|
|
+ enable: true,
|
|
|
+ pIdKey: "parentId"
|
|
|
+ }
|
|
|
},
|
|
|
- prodInsurance:[],
|
|
|
-
|
|
|
- };
|
|
|
- },
|
|
|
- watch:{
|
|
|
- containsSubChecked(val){
|
|
|
- if(val){
|
|
|
- this.pageRequest.columnFilters.inscode.value = '';
|
|
|
- this.findPage();
|
|
|
- }else{
|
|
|
- this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
- this.findPage();
|
|
|
+ view: {
|
|
|
+ showIcon: false
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- // 机构列表转属性数据
|
|
|
- companyListTree(){
|
|
|
- let cloneData = JSON.parse(JSON.stringify(this.companyList)); // 对源数据深度克隆
|
|
|
- return cloneData.filter(father => {
|
|
|
- // 循环所有项,并添加children属性
|
|
|
- let branchArr = cloneData.filter(child => father.id == child.parentId); // 返回每一项的子级数组
|
|
|
- branchArr.length > 0 ? (father.children = branchArr) : ""; //给父级添加一个children属性,并赋值
|
|
|
- if((this.peopleid == 'admin') ||(this.peopledeptid =='99') ){
|
|
|
- return father.parentId == 0; //返回第一层
|
|
|
- }else{
|
|
|
- return father.id == this.peopledeptid; //返回第一层
|
|
|
- }
|
|
|
+ },
|
|
|
+ ztreeNodes: [],
|
|
|
+ currentTreeNode: null,
|
|
|
+ //----ztree end---------
|
|
|
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.peopleid = Cookies.get('user');
|
|
|
- if(this.peopleid!='admin'){
|
|
|
- this.peopledeptid = Cookies.get('user').split('D')[0];
|
|
|
- }else{
|
|
|
- this.peopledeptid = '9';
|
|
|
- }
|
|
|
- //获取所有下拉框数据
|
|
|
- this.getDictItems("agreementtype");
|
|
|
- this.getDictItems("channel");
|
|
|
- this.getDictItems("matchtype");
|
|
|
- this.getDictItems("moneytype");
|
|
|
- this.getDictItems("feetype");
|
|
|
- this.getDictItems("cancarkind");
|
|
|
- this.getDictItems("canusenature");
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.findLeftTreeData();
|
|
|
- this.getAllCompany();
|
|
|
- //用像素初始化左边的split的宽度
|
|
|
- this.changeTreeWidth(200);// 初始化树的宽度
|
|
|
-
|
|
|
- },
|
|
|
- methods: {
|
|
|
-
|
|
|
- //获取所有机构列表Start
|
|
|
- getAllCompany(){
|
|
|
- this.companyList = [];
|
|
|
- this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
|
|
|
- for(let i=0;i<res.data.length;i++){
|
|
|
- if((res.data[i].id.indexOf('D') < 0) ||((res.data[i].id.indexOf('D') > 0) && (res.data[i].id.indexOf('M') > 0) )){
|
|
|
- this.companyList.push(res.data[i]);
|
|
|
- }
|
|
|
+ // 右侧列表查询数据Start
|
|
|
+ queryForm: {
|
|
|
+ "status": "0"
|
|
|
+ },
|
|
|
+ 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": "0"
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
- //获取所有机构列表End
|
|
|
-
|
|
|
- /**Split 开始 */
|
|
|
- changeTreeWidth(widthVal){
|
|
|
- // 初始化树的宽度
|
|
|
- this.leftSplitWidth = Math.ceil(widthVal/this.$refs.elMain.$el.clientWidth*100);
|
|
|
- this.rightSplitWidth = 100-(this.leftSplitWidth)
|
|
|
+ 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: "agreestatus", label: "状态", minWidth: 110, formatter: this.agreestatusFormatter },
|
|
|
+ { prop: "updatetime", label: "修改时间", minWidth: 150, formatter: this.updatetimeFormatter },
|
|
|
+ { prop: "updateby", label: "修改人", minWidth: 120 },
|
|
|
+ ],
|
|
|
+ // 右侧列表查询数据End
|
|
|
+
|
|
|
+ optionProps: { //公司下拉列表配置
|
|
|
+ checkStrictly: true,
|
|
|
+ value: "id",
|
|
|
+ label: "name",
|
|
|
+ children: "children"
|
|
|
},
|
|
|
- /**Split 结束 */
|
|
|
-
|
|
|
- //--tree begin-------
|
|
|
- // 获取树数据
|
|
|
- findLeftTreeData: function() {
|
|
|
- this.$api.insCompany.findLeftInsTree().then(res => {
|
|
|
- this.ztreeNodes = res.data;
|
|
|
- });
|
|
|
+ options: [], //保险公司下拉列表
|
|
|
+
|
|
|
+ activeTabs: 'first',
|
|
|
+ operType: "ADD", //'ADD','EDIT'
|
|
|
+ dialogTitle: "新增协议",
|
|
|
+ dialogVisible: false, //控制对话框显示
|
|
|
+
|
|
|
+ addAgreementForm: { //新增协议的表单数据
|
|
|
+ id: "", //主键(用来标识是新增还是修改)
|
|
|
+ checkid: "",//checkid,id为空是新增 checkid 为空,id不为空是修改 checkid,id都不为空是退回修改
|
|
|
+ agreementcode: "", //协议代码
|
|
|
+ agreementname: "", //协议名称
|
|
|
+ agreementshort: "", //协议简称
|
|
|
+ agreementtype: "", //协议类型
|
|
|
+ insure1: "", //保险公司
|
|
|
+ insureshort: "", //合作保险简称
|
|
|
+ isvalid: "", //是否上线
|
|
|
+ channel: "", //投保渠道
|
|
|
+ withtax: "", //含增值税结算
|
|
|
+ startdate: "", //协议生效日期
|
|
|
+ enddate: "", //协议失效日期
|
|
|
+ matchtype: "", //保单匹配协议日期类型
|
|
|
+ moneytype: "", //佣金发放方式
|
|
|
+ cmpprice: "", //支持比价
|
|
|
+ moneytime: "", //结算周期
|
|
|
+ account: "",
|
|
|
+ password: "",
|
|
|
+ agreestatus: "1", //协议状态(1表示审核中)
|
|
|
+ comcode: "", //所属机构
|
|
|
+ agreementProds: [], //协议产品
|
|
|
+ remark: "" //备注
|
|
|
},
|
|
|
- onZTreeClick: function(evt, treeId, treeNode) {
|
|
|
- // 点击事件
|
|
|
- this.containsSubChecked=false;
|
|
|
- this.currentTreeNode = treeNode;
|
|
|
- this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
- this.findPage();
|
|
|
+ addAgreementRules: { //新增协议的表单验证规则对象
|
|
|
+ agreementcode: [{ required: true, message: '请输入协议代码', trigger: 'blur' }],
|
|
|
+ agreementname: [{ required: true, message: '请输入协议名称', trigger: 'blur' }],
|
|
|
+ agreementshort: [{ required: true, message: '请输入协议简称', trigger: 'blur' }],
|
|
|
+ agreementtype: [{ required: true, message: '请选择协议类型', trigger: 'blur' }],
|
|
|
+ insure1: [{ required: true, message: '请选择合作公司', trigger: 'blur' }],
|
|
|
+ channel: [{ required: true, message: '请选择合作渠道', trigger: 'blur' }],
|
|
|
+ account: [{ required: true, message: '请添加负责人', trigger: 'blur' }],
|
|
|
+ withtax: [{ required: true, message: '请选择含增值税结算', trigger: 'blur' }],
|
|
|
+ startdate: [{ required: true, message: '请输入协议生效日期', trigger: 'blur' }],
|
|
|
+ enddate: [{ required: true, message: '请输入协议失效日期', trigger: 'blur' }],
|
|
|
+ matchtype: [{ required: true, message: '请输入保单日期类型', trigger: 'blur' }],
|
|
|
+ moneytype: [{ required: true, message: '请选择佣金发放方式', trigger: 'blur' }],
|
|
|
+ moneytime: [{ required: true, message: '请选择结算周期', trigger: 'blur' }]
|
|
|
},
|
|
|
- onZTreeCreated: function(ztreeObj) {
|
|
|
- this.ztreeObj = ztreeObj;
|
|
|
- // onCreated 中操作ztreeObj对象展开第一个节点
|
|
|
- ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
|
|
|
- this.currentTreeNode=ztreeObj.getNodes()[0];
|
|
|
|
|
|
- this.options=ztreeObj.getNodes();
|
|
|
+ //------------协议下拉框数据 begin-----------------
|
|
|
+ agreementtypeoptions: [], //协议类型
|
|
|
+ channeloptions: [], //合作渠道
|
|
|
+ matchtypeoptions: [], //保单匹配协议日期类型
|
|
|
+ moneytypeoptions: [], //佣金发放方式
|
|
|
+ feetypeoptions: [], //费率类型
|
|
|
+ cancarkindoptions: [],//可承保车辆种类
|
|
|
+ canusenatureoptions: [],//可承保使用性质
|
|
|
+ carareaoptions: [],//可承保地区
|
|
|
+ //------------协议下拉框数据 end-----------------
|
|
|
+
|
|
|
+ statusalloptions: [
|
|
|
+ { value: '0', label: "待审核" },
|
|
|
+ { value: '1', label: "审核通过" },
|
|
|
+ { value: '2', label: "退回修改" },
|
|
|
+ { value: '99', label: "已失效" },
|
|
|
+ ],
|
|
|
+
|
|
|
+ //承保规则表单
|
|
|
+ rulesForm: {
|
|
|
+ feetype: "", //费率类型
|
|
|
+ cancity: "", //可承保市
|
|
|
+ cancarkind: "", //车辆种类
|
|
|
+ canusenature: "", //使用性质
|
|
|
},
|
|
|
- //-- tree 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"] = [];
|
|
|
- });
|
|
|
+
|
|
|
+ // 第二个弹框的数据Start
|
|
|
+ addProductId: "",
|
|
|
+ addProductName: "",
|
|
|
+ // 第二个弹框的数据End
|
|
|
+
|
|
|
+ productDialogVisible: false,
|
|
|
+ productTabsValue: '2',
|
|
|
+ productTabs: [],
|
|
|
+
|
|
|
+ agreementProdsRules: {
|
|
|
+ feetype: [{ required: true, message: '请选择费率类型', trigger: 'blur' }],
|
|
|
+ productrate: [{ required: true, message: '请选择产品佣金比例', trigger: 'blur' }],
|
|
|
+ feestyle: [{ required: true, message: '请选择费用形式', trigger: 'blur' }],
|
|
|
+ cancity: [{ required: true, message: '请选择可承保市', trigger: 'blur' }],
|
|
|
+ cancarkind: [{ required: true, message: '请选择车辆种类', trigger: 'blur' }],
|
|
|
+ canusenature: [{ required: true, message: '请选择使用性质', trigger: 'blur' }]
|
|
|
},
|
|
|
- //--数据字典 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;
|
|
|
+ prodInsurance: [],
|
|
|
+
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ containsSubChecked(val) {
|
|
|
+ if (val) {
|
|
|
+ this.pageRequest.columnFilters.inscode.value = '';
|
|
|
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'){
|
|
|
- that.$api.esmagreement.findPage(that.pageRequest).then(res => {
|
|
|
- console.log(res.data)
|
|
|
- that.pageResult = res.data;
|
|
|
- })
|
|
|
- .then(data != null ? data.callback : "");
|
|
|
- }else{
|
|
|
- this.$api.esmagreement.findCheckPage(this.pageRequest).then((res) => {
|
|
|
- this.pageResult = res.data;
|
|
|
- console.log(res.data)
|
|
|
- }).then(data != null ? data.callback : '')
|
|
|
+ } else {
|
|
|
+ this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
|
|
|
+ this.findPage();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 机构列表转属性数据
|
|
|
+ companyListTree() {
|
|
|
+ let cloneData = JSON.parse(JSON.stringify(this.companyList)); // 对源数据深度克隆
|
|
|
+ return cloneData.filter(father => {
|
|
|
+ // 循环所有项,并添加children属性
|
|
|
+ let branchArr = cloneData.filter(child => father.id == child.parentId); // 返回每一项的子级数组
|
|
|
+ branchArr.length > 0 ? (father.children = branchArr) : ""; //给父级添加一个children属性,并赋值
|
|
|
+ if ((this.peopleid == 'admin') || (this.peopledeptid == '99')) {
|
|
|
+ return father.parentId == 0; //返回第一层
|
|
|
+ } else {
|
|
|
+ return father.id == this.peopledeptid; //返回第一层
|
|
|
}
|
|
|
- },
|
|
|
- // 右侧列表的方法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) { //状态
|
|
|
- let endTime = new Date(row.enddate +' 23:59:59').getTime();
|
|
|
- let currentTime = new Date().getTime();
|
|
|
- if(currentTime>endTime){
|
|
|
- return "已失效"
|
|
|
- }else{
|
|
|
- let agreestatus = row.agreestatus;
|
|
|
- return CommonUtil.getDataName({dataList: this.statusalloptions, value: 'value', label: 'label', data: agreestatus})
|
|
|
- }
|
|
|
- },
|
|
|
- updatetimeFormatter(row,column){
|
|
|
- let updatetime = row.updatetime;
|
|
|
- return format(updatetime);
|
|
|
- },
|
|
|
- //-- formatter end--
|
|
|
-
|
|
|
- // 选择合作公司Start
|
|
|
- handleChange(value) {
|
|
|
- this.addAgreementForm.insure1 = value[(value.length-1)];
|
|
|
- this.carareaoptions=[];
|
|
|
- this.rulesForm.cancity=[];
|
|
|
- if(value.length==0 || value.length==1){
|
|
|
-
|
|
|
- }else{
|
|
|
- for(let i=0;i<citydata.rawCitiesData.length;i++){
|
|
|
- if(citydata.rawCitiesData[i].code.substring(0,2) == this.addAgreementForm.insure1.substring(6,8)){
|
|
|
- this.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
- }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.peopleid = Cookies.get('user');
|
|
|
+ if (this.peopleid != 'admin') {
|
|
|
+ this.peopledeptid = Cookies.get('user').split('D')[0];
|
|
|
+ } else {
|
|
|
+ this.peopledeptid = '9';
|
|
|
+ }
|
|
|
+ //获取所有下拉框数据
|
|
|
+ this.getDictItems("agreementtype");
|
|
|
+ this.getDictItems("channel");
|
|
|
+ this.getDictItems("matchtype");
|
|
|
+ this.getDictItems("moneytype");
|
|
|
+ this.getDictItems("feetype");
|
|
|
+ this.getDictItems("cancarkind");
|
|
|
+ this.getDictItems("canusenature");
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.findLeftTreeData();
|
|
|
+ this.getAllCompany();
|
|
|
+ //用像素初始化左边的split的宽度
|
|
|
+ this.changeTreeWidth(200);// 初始化树的宽度
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ //获取所有机构列表Start
|
|
|
+ getAllCompany() {
|
|
|
+ this.companyList = [];
|
|
|
+ this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ if ((res.data[i].id.indexOf('D') < 0) || ((res.data[i].id.indexOf('D') > 0) && (res.data[i].id.indexOf('M') > 0))) {
|
|
|
+ this.companyList.push(res.data[i]);
|
|
|
}
|
|
|
}
|
|
|
- // 查找合作保险简称
|
|
|
- this.$api.insCompany.getInsCompanyById(value[(value.length-1)]).then((res)=>{
|
|
|
- this.addAgreementForm.insureshort = res.data.namesimple;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取所有机构列表End
|
|
|
+
|
|
|
+ /**Split 开始 */
|
|
|
+ changeTreeWidth(widthVal) {
|
|
|
+ // 初始化树的宽度
|
|
|
+ this.leftSplitWidth = Math.ceil(widthVal / this.$refs.elMain.$el.clientWidth * 100);
|
|
|
+ this.rightSplitWidth = 100 - (this.leftSplitWidth)
|
|
|
+ },
|
|
|
+ /**Split 结束 */
|
|
|
+
|
|
|
+ //--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];
|
|
|
+
|
|
|
+ this.options = ztreeObj.getNodes();
|
|
|
+ },
|
|
|
+ //-- tree end-------
|
|
|
+
|
|
|
+ //--数据字典 begin --
|
|
|
+ getDictItems: function (typeName) {
|
|
|
+ let that = this;
|
|
|
+ that.$api.dict.findByLableName(typeName)
|
|
|
+ .then(function (res) {
|
|
|
+ that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
|
|
|
})
|
|
|
- },
|
|
|
- // 选择合作公司end
|
|
|
-
|
|
|
- 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] = "";
|
|
|
+ .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
|
|
|
+ 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') {
|
|
|
+ that.$api.esmagreement.findPage(that.pageRequest).then(res => {
|
|
|
+ console.log(res.data)
|
|
|
+ that.pageResult = res.data;
|
|
|
+ })
|
|
|
+ .then(data != null ? data.callback : "");
|
|
|
+ } else {
|
|
|
+ this.$api.esmagreement.findCheckPage(this.pageRequest).then((res) => {
|
|
|
+ this.pageResult = res.data;
|
|
|
+ console.log(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) { //状态
|
|
|
+ let endTime = new Date(row.enddate + ' 23:59:59').getTime();
|
|
|
+ let currentTime = new Date().getTime();
|
|
|
+ if (currentTime > endTime) {
|
|
|
+ return "已失效"
|
|
|
+ } else {
|
|
|
+ let agreestatus = row.agreestatus;
|
|
|
+ return CommonUtil.getDataName({ dataList: this.statusalloptions, value: 'value', label: 'label', data: agreestatus })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updatetimeFormatter(row, column) {
|
|
|
+ let updatetime = row.updatetime;
|
|
|
+ return format(updatetime);
|
|
|
+ },
|
|
|
+ //-- formatter end--
|
|
|
+
|
|
|
+ // 选择合作公司Start
|
|
|
+ handleChange(value) {
|
|
|
+ this.addAgreementForm.insure1 = value[(value.length - 1)];
|
|
|
+ this.carareaoptions = [];
|
|
|
+ this.rulesForm.cancity = [];
|
|
|
+ if (value.length == 0 || value.length == 1) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < citydata.rawCitiesData.length; i++) {
|
|
|
+ if (citydata.rawCitiesData[i].code.substring(0, 2) == this.addAgreementForm.insure1.substring(6, 8)) {
|
|
|
+ this.carareaoptions = citydata.rawCitiesData[i].sub;
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+ // 查找合作保险简称
|
|
|
+ this.$api.insCompany.getInsCompanyById(value[(value.length - 1)]).then((res) => {
|
|
|
+ this.addAgreementForm.insureshort = res.data.namesimple;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 选择合作公司end
|
|
|
|
|
|
- //编辑协议
|
|
|
- handleTableEdit(data){
|
|
|
- let that = this;
|
|
|
- this.activeTabs='first';
|
|
|
- this.operType='EDIT';
|
|
|
- this.dialogTitle= "协议信息";
|
|
|
-
|
|
|
- if(this.pageRequest.columnFilters.status.value == '1'){
|
|
|
- this.$api.esmagreement.findById(data.row.id).then(res => {
|
|
|
- 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;
|
|
|
- }
|
|
|
+ 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.pageRequest.columnFilters.status.value == '1') {
|
|
|
+ this.$api.esmagreement.findById(data.row.id).then(res => {
|
|
|
+ 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(",");
|
|
|
- that.productTabs = res.data.agreementProds;
|
|
|
- Object.assign(that.productTabs,res.data.agreementProds)
|
|
|
- for(let m=0;m<that.productTabs.length;m++){
|
|
|
- let prodFeeParam = [];
|
|
|
- if(!!that.productTabs[m].authcomcode){
|
|
|
- that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
|
|
|
- }else{
|
|
|
- that.productTabs[m].authcomcode = [];
|
|
|
- }
|
|
|
- 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])
|
|
|
- prodFeeParam.push(mm);
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(that.productTabs[m], 'prodfees', [])
|
|
|
- for(let n=0;n<that.productTabs[m].prodfees.length;n++){
|
|
|
- console.log()
|
|
|
- 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(",");
|
|
|
+ that.productTabs = res.data.agreementProds;
|
|
|
+ Object.assign(that.productTabs, res.data.agreementProds)
|
|
|
+ for (let m = 0; m < that.productTabs.length; m++) {
|
|
|
+ let prodFeeParam = [];
|
|
|
+ if (!!that.productTabs[m].authcomcode) {
|
|
|
+ that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
|
|
|
+ } else {
|
|
|
+ that.productTabs[m].authcomcode = [];
|
|
|
+ }
|
|
|
+ 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])
|
|
|
+ prodFeeParam.push(mm);
|
|
|
}
|
|
|
- that.productTabs[m].prodfees=prodFeeParam;
|
|
|
}
|
|
|
- }
|
|
|
- that.dialogVisible = true;
|
|
|
- });
|
|
|
- }else{
|
|
|
- this.$api.esmagreement.findCheckById(data.row.checkid).then(res => {
|
|
|
- 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++) {
|
|
|
+ console.log()
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
|
|
|
}
|
|
|
+ that.productTabs[m].prodfees = prodFeeParam;
|
|
|
}
|
|
|
- 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(",");
|
|
|
- that.productTabs = res.data.agreementProds;
|
|
|
- Object.assign(that.productTabs,res.data.agreementProds)
|
|
|
- for(let m=0;m<that.productTabs.length;m++){
|
|
|
- let prodFeeParam = [];
|
|
|
- if(!!that.productTabs[m].authcomcode){
|
|
|
- that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
|
|
|
- }else{
|
|
|
- that.productTabs[m].authcomcode = [];
|
|
|
- }
|
|
|
- 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])
|
|
|
- prodFeeParam.push(mm);
|
|
|
- }
|
|
|
- }
|
|
|
- this.$set(that.productTabs[m], 'prodfees', [])
|
|
|
- for(let n=0;n<that.productTabs[m].prodfees.length;n++){
|
|
|
- console.log()
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
|
|
|
- this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
|
|
|
+ }
|
|
|
+ that.dialogVisible = true;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$api.esmagreement.findCheckById(data.row.checkid).then(res => {
|
|
|
+ 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(",");
|
|
|
+ that.productTabs = res.data.agreementProds;
|
|
|
+ Object.assign(that.productTabs, res.data.agreementProds)
|
|
|
+ for (let m = 0; m < that.productTabs.length; m++) {
|
|
|
+ let prodFeeParam = [];
|
|
|
+ if (!!that.productTabs[m].authcomcode) {
|
|
|
+ that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
|
|
|
+ } else {
|
|
|
+ that.productTabs[m].authcomcode = [];
|
|
|
+ }
|
|
|
+ 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])
|
|
|
+ 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++) {
|
|
|
+ console.log()
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
|
|
|
+ this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
|
|
|
+ }
|
|
|
+ that.productTabs[m].prodfees = prodFeeParam;
|
|
|
}
|
|
|
- that.dialogVisible = true;
|
|
|
- });
|
|
|
- }
|
|
|
+ }
|
|
|
+ that.dialogVisible = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
- //提交
|
|
|
- submitForm(statusType) {
|
|
|
- if((this.remarks=="") && (statusType == 2)){
|
|
|
- return this.$message({type: 'info',message: '请备注原因'});
|
|
|
- }
|
|
|
+ //提交
|
|
|
+ submitForm(statusType) {
|
|
|
+ if ((this.remarks == "") && (statusType == 2)) {
|
|
|
+ return this.$message({ type: 'info', message: '请备注原因' });
|
|
|
+ }
|
|
|
|
|
|
- this.$confirm('是否确认提交?', '提示', {}).then(() => {
|
|
|
- var data={
|
|
|
- checkid:this.addAgreementForm.checkid,
|
|
|
- remark:this.remarks,
|
|
|
- status:statusType
|
|
|
- }
|
|
|
- this.$api.esmagreement.checkAgreement(data).then(res => {
|
|
|
- this.dialogVisible = false
|
|
|
- this.findPage(null);
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '已提交'
|
|
|
- });
|
|
|
- });
|
|
|
- }).catch(() => {
|
|
|
+ this.$confirm('是否确认提交?', '提示', {}).then(() => {
|
|
|
+ var data = {
|
|
|
+ checkid: this.addAgreementForm.checkid,
|
|
|
+ remark: this.remarks,
|
|
|
+ status: statusType
|
|
|
+ }
|
|
|
+ this.$api.esmagreement.checkAgreement(data).then(res => {
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.findPage(null);
|
|
|
this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消审核'
|
|
|
+ type: 'success',
|
|
|
+ message: '已提交'
|
|
|
});
|
|
|
});
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消审核'
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
- },
|
|
|
+ },
|
|
|
|
|
|
|
|
|
- // // 获取所有产品列表Start
|
|
|
- // getAllProduct(){
|
|
|
- // this.$api.product.productTree('ZG').then(res => {
|
|
|
- // this.prodInsurance = res.data.splice(1);
|
|
|
- // console.log(this.prodInsurance)
|
|
|
- // });
|
|
|
- // },
|
|
|
- // //获取所有产品列表End
|
|
|
- // 获取协议产品
|
|
|
- findProductById(){
|
|
|
- if(!this.addProductId){
|
|
|
- return this.$message.error("请输入协议产品编码查询产品")
|
|
|
- }
|
|
|
- this.$api.product.productTree(this.addProductId).then(res => {
|
|
|
- if(res.data.length>0){
|
|
|
- this.addProductName = res.data[0].name;
|
|
|
- }else{
|
|
|
- this.addProductName = "";
|
|
|
- return this.$message.error("请输入正确的产品编码")
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ // // 获取所有产品列表Start
|
|
|
+ // getAllProduct(){
|
|
|
+ // this.$api.product.productTree('ZG').then(res => {
|
|
|
+ // this.prodInsurance = res.data.splice(1);
|
|
|
+ // console.log(this.prodInsurance)
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // //获取所有产品列表End
|
|
|
+ // 获取协议产品
|
|
|
+ findProductById() {
|
|
|
+ if (!this.addProductId) {
|
|
|
+ return this.$message.error("请输入协议产品编码查询产品")
|
|
|
+ }
|
|
|
+ this.$api.product.productTree(this.addProductId).then(res => {
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ this.addProductName = res.data[0].name;
|
|
|
+ } else {
|
|
|
+ this.addProductName = "";
|
|
|
+ return this.$message.error("请输入正确的产品编码")
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
|
|
|
-<style scoped>
|
|
|
- .el-divider{
|
|
|
- margin: 10px 0px 15px!important;
|
|
|
- }
|
|
|
- .queryForm .el-row {
|
|
|
- margin:0px;
|
|
|
- }
|
|
|
+<style scoped>.el-divider {
|
|
|
+ margin: 10px 0px 15px !important;
|
|
|
+}
|
|
|
|
|
|
- .queryForm .el-form-item {
|
|
|
- margin-bottom: 0px;
|
|
|
- }
|
|
|
-</style>
|
|
|
+.queryForm .el-row {
|
|
|
+ margin: 0px;
|
|
|
+}
|
|
|
+
|
|
|
+.queryForm .el-form-item {
|
|
|
+ margin-bottom: 0px;
|
|
|
+}</style>
|