|
|
@@ -1,7 +1,23 @@
|
|
|
-<template>
|
|
|
+ · <template>
|
|
|
<div class="container" style="width: 99%; margin-top: 0px">
|
|
|
- <templateTable :searchData.sync="queryFrom" :tableConfig="tableConfig" :data="pageResult" @getList="findPage"
|
|
|
- :pagination="pageData">
|
|
|
+ <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :data="pageResult" @getList="findPage"
|
|
|
+ :pagination="pageData" @handleSearchList="handleSearchList">
|
|
|
+ <template slot="pcStart" slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :style="{ background: scope.row.pcStart == '1' ? 'linear-gradient( 180deg, #66CDBB 0%, #33A08D 100%)' : '#A6A6A6', borderRadius: '4px', padding: '4px 10px', color: '#fff' }">{{
|
|
|
+ scope.row.pcStart == 1 ? "启用" : "禁用" }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="appStart" slot-scope="scope">
|
|
|
+ <span
|
|
|
+ :style="{ background: scope.row.appStart == '1' ? 'linear-gradient( 180deg, #66CDBB 0%, #33A08D 100%)' : '#A6A6A6', borderRadius: '4px', padding: '4px 10px', color: '#fff' }">{{
|
|
|
+ scope.row.appStart == 1 ? "启用" : "禁用" }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="productsCode" slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ {{ statMaps(scope.row.productsCode) }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+
|
|
|
</templateTable>
|
|
|
<el-dialog title="协议调度" :visible.sync="dispatchdialogVisible" width="50%" top="8vh" fullscreen>
|
|
|
<el-button size="small" type="success" @click="add" style="margin: 10px;">添加</el-button>
|
|
|
@@ -105,6 +121,48 @@
|
|
|
<el-button size="small" type="primary" @click="dispatchAdd">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="配置" :visible.sync="configdialogVisible" width="30%">
|
|
|
+ <el-form :model="configurationForm" label-width="120px" size="small">
|
|
|
+ <el-form-item label="保险公司编码">
|
|
|
+ <el-input disabled style="width:215px" v-model="configurationForm.companyId" placeholder="输入保险公司编码"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="保险公司名称">
|
|
|
+ <el-input disabled style="width:215px" v-model="configurationForm.companyName" placeholder="输入保险公司名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="pc是否启用">
|
|
|
+ <el-switch
|
|
|
+ v-model="configurationForm.pcStart"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ active-color="#D42426"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="app是否启用">
|
|
|
+ <el-switch
|
|
|
+ v-model="configurationForm.appStart"
|
|
|
+ active-value="1"
|
|
|
+ inactive-value="0"
|
|
|
+ active-color="#D42426"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="险种">
|
|
|
+ <el-select v-model="configurationForm.productsCode" clearable multiple placeholder="选择险种" size="small" >
|
|
|
+ <el-option v-for="item in insuranceRepertoire" :key="item.dictValue" :label="item.dictTag"
|
|
|
+ :value="item.dictValue"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer" >
|
|
|
+ <el-button size="small" @click="configdialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="configAdd">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -124,6 +182,12 @@ export default {
|
|
|
defaultFlag: "",
|
|
|
attrLinks: [],
|
|
|
},
|
|
|
+ configdialogVisible:false,
|
|
|
+ configurationForm:{
|
|
|
+ appStart:0,
|
|
|
+ pcStart:0,
|
|
|
+ },
|
|
|
+ riskcodeList: [],
|
|
|
//操作符字典
|
|
|
operator: { "pageNum": 1, "pageSize": 10, "columnFilters": { "label": { "name": "label", "value": "agreement_operator" } } },
|
|
|
operatorlist: [],
|
|
|
@@ -158,20 +222,26 @@ export default {
|
|
|
{ prop: "defaultFlag", label: "是否默认", minWidth: 120, formatter: this.defaultFlagFormatter },
|
|
|
{ prop: "priority", label: "优先级", minWidth: 120 },
|
|
|
],
|
|
|
+ formList:[
|
|
|
+ {
|
|
|
+ prop: 'id',
|
|
|
+ label: '保险公司名称',
|
|
|
+ type: 'company',
|
|
|
+ },
|
|
|
+ ],
|
|
|
tableConfig: {
|
|
|
columns: [
|
|
|
// 数据列
|
|
|
+ { prop: "id", label: "保险公司编号", type: "text" },
|
|
|
{ prop: "name", label: "保险公司名称", type: "text" },
|
|
|
- {
|
|
|
- prop: "id",
|
|
|
- label: "id",
|
|
|
- type: "text",
|
|
|
- },
|
|
|
+ { name: "pcStart", label: "pc是否启用", type: "slot" },
|
|
|
+ { name: "appStart", label: "app是否启用", type: "slot" },
|
|
|
+ { name: "productsCode", label: "险种", type: "slot", },
|
|
|
],
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
isShowIndex: true,
|
|
|
- operationWidth: "30",
|
|
|
+ operationWidth: "80",
|
|
|
optBtns: [
|
|
|
{
|
|
|
type: "primary",
|
|
|
@@ -191,6 +261,13 @@ export default {
|
|
|
return this.excludeDepartment(row);
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "配置",
|
|
|
+ type: "text",
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.configuration(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
pageData: {
|
|
|
@@ -217,6 +294,11 @@ export default {
|
|
|
//获取产品代码列表
|
|
|
this.$api.insCompany.dicType("productsType").then((rescode) => {
|
|
|
if (rescode.code == 200) {
|
|
|
+ // this.tableConfig.columns.forEach(e=>{
|
|
|
+ // if(e.prop=='productsCode'){
|
|
|
+ // e.options=rescode.data.ddList
|
|
|
+ // }
|
|
|
+ // })
|
|
|
this.insuranceRepertoire = rescode.data.ddList;
|
|
|
}
|
|
|
});
|
|
|
@@ -238,6 +320,45 @@ export default {
|
|
|
this.findPage();
|
|
|
},
|
|
|
methods: {
|
|
|
+ configuration(row){
|
|
|
+ this.$api.insCompany.schedulingId(row.id).then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.configdialogVisible=true
|
|
|
+ res.data.pcStart= res.data.pcStart+''
|
|
|
+ res.data.appStart= res.data.appStart+''
|
|
|
+ this.configurationForm=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ statMaps(val) {
|
|
|
+ if (!val) return '-';
|
|
|
+ let arr = [];
|
|
|
+ val.forEach(item1=>{
|
|
|
+ this.insuranceRepertoire.forEach((item) => {
|
|
|
+ if(item.dictValue==item1){
|
|
|
+ arr.push(item.dictTag)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ return arr.join(',')
|
|
|
+
|
|
|
+ },
|
|
|
+ configAdd(){
|
|
|
+ // let productsCode=this.configurationForm.productsCode?this.configurationForm.productsCode.join(','):''
|
|
|
+ this.$api.insCompany.scheduling(this.configurationForm).then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.configdialogVisible=false
|
|
|
+ this.findPage()
|
|
|
+ this.$message({
|
|
|
+ message: res.msg ||'操作成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg );
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//选择部门提交
|
|
|
excludeSubmit() {
|
|
|
this.$api.insCompany.saveOrUpdateExcludeDepts(this.taxSourceVo).then((res) => {
|
|
|
@@ -430,6 +551,7 @@ export default {
|
|
|
this.$api.insCompany
|
|
|
.dispatchQueryPage(this.dispatchRequest)
|
|
|
.then((res) => {
|
|
|
+
|
|
|
this.dispatchResult = res.data;
|
|
|
});
|
|
|
},
|
|
|
@@ -462,11 +584,17 @@ export default {
|
|
|
return "否"
|
|
|
}
|
|
|
},
|
|
|
+ handleSearchList(val){
|
|
|
+ this.findPage(val)
|
|
|
+ },
|
|
|
//获取列表
|
|
|
- findPage() {
|
|
|
+ findPage(data) {
|
|
|
this.tableConfig.loading = true;
|
|
|
- this.$api.dept.insureCompany({ ...this.pageData }).then((res) => {
|
|
|
+ this.$api.dept.insureCompany({ ...this.pageData,...data }).then((res) => {
|
|
|
this.tableConfig.loading = false;
|
|
|
+ res.data.content.forEach(val=>{
|
|
|
+ val.productsCode= val.productsCode?val.productsCode.split(","):''
|
|
|
+ })
|
|
|
this.pageResult = res.data.content;
|
|
|
this.pageData.pageNum = res.data.pageNum;
|
|
|
this.pageData.pageSize = res.data.pageSize;
|