|
|
@@ -77,7 +77,8 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
- <el-button class="border-[#0083FF] color-[#0083FF]" plain @click="agreementSelectionVisible = false">取消</el-button>
|
|
|
+ <el-button class="border-[#0083FF] color-[#0083FF]" plain
|
|
|
+ @click="agreementSelectionVisible = false">取消</el-button>
|
|
|
<el-button type="primary" @click="agreementSelectionConfirm" :disabled="!ruleInfo">
|
|
|
确定
|
|
|
</el-button>
|
|
|
@@ -110,8 +111,8 @@ interface PageInfo {
|
|
|
}
|
|
|
onBeforeMount(async () => {
|
|
|
await loadDicts(['valid_status', 'is_enable', 'audit_status', 'insurance_type']);//获取多个字典
|
|
|
- if(id.value){
|
|
|
- formInline.agreement=id.value;
|
|
|
+ if (id.value) {
|
|
|
+ formInline.agreement = id.value;
|
|
|
}
|
|
|
findpage();//列表数据
|
|
|
getDeptTree();
|
|
|
@@ -160,22 +161,22 @@ const formInline = reactive({
|
|
|
// 保险公司
|
|
|
let companyOption = ref([])
|
|
|
const initCompany = () => {
|
|
|
- // api.projectApi.getCompanyList().then(res => {
|
|
|
- api.insuranceApi.leftList('').then((res: any) => {
|
|
|
- if(res.code == 200) {
|
|
|
- companyOption.value = res.data.map(item => {
|
|
|
- return {
|
|
|
- label: item.name,
|
|
|
- value: item.id
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
+ // api.projectApi.getCompanyList().then(res => {
|
|
|
+ api.insuranceApi.leftList('').then((res: any) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ companyOption.value = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
//表格字段数据
|
|
|
@@ -215,18 +216,18 @@ const fields = ref([
|
|
|
formInline.failureTime = value;
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- label: "保险公司", model: "companyId", type: "select", placeholder: "选择保险公司", options: companyOption, filterable: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "对接人", model: "contactPerson", type: "input", placeholder: "输入对接人",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "修改时间", model: "updateTimeArr", type: "date", dateType: "datetimerange", startplaceholder: "开始时间", endplaceholder: "结束时间",
|
|
|
- onChange: (value: any) => {
|
|
|
- formInline.updateTimeArr = value;
|
|
|
- }
|
|
|
- },
|
|
|
+ {
|
|
|
+ label: "保险公司", model: "companyId", type: "select", placeholder: "选择保险公司", options: companyOption, filterable: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "对接人", model: "contactPerson", type: "input", placeholder: "输入对接人",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改时间", model: "updateTimeArr", type: "date", dateType: "datetimerange", startplaceholder: "开始时间", endplaceholder: "结束时间",
|
|
|
+ onChange: (value: any) => {
|
|
|
+ formInline.updateTimeArr = value;
|
|
|
+ }
|
|
|
+ },
|
|
|
]);
|
|
|
|
|
|
//费用数据查询
|
|
|
@@ -251,7 +252,7 @@ function agreement() {
|
|
|
});
|
|
|
}
|
|
|
const columns = [
|
|
|
- { prop: "companyName", label: "保险公司", width: '120', },
|
|
|
+ { prop: "companyName", label: "保险公司", width: '120', },
|
|
|
{
|
|
|
prop: "agreementAbbreviation", label: "协议信息", width: '300',
|
|
|
formatter: (row: any) => {
|
|
|
@@ -263,10 +264,10 @@ const columns = [
|
|
|
},
|
|
|
{ prop: "productName", label: "险种", width: '120', },
|
|
|
{
|
|
|
- prop: "costRules", label: "费用规则", width: '500',
|
|
|
+ prop: "costRules", label: "费用规则", width: '500',
|
|
|
},
|
|
|
{
|
|
|
- prop: "costDescribe", label: "费用描述", width: '500',
|
|
|
+ prop: "costDescribe", label: "费用描述", width: '500',
|
|
|
},
|
|
|
{
|
|
|
prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
|
|
|
@@ -286,10 +287,10 @@ const columns = [
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- { prop: "dockingPerson", label: "对接人", width: '100' },
|
|
|
- { prop: "effectiveTime", label: "生效时间", width: '200' },
|
|
|
- { prop: "failureTime", label: "失效时间", width: '200' },
|
|
|
- { prop: "updateTime", label: "修改时间", width: '200' },
|
|
|
+ { prop: "dockingPerson", label: "对接人", width: '100' },
|
|
|
+ { prop: "effectiveTime", label: "生效时间", width: '200' },
|
|
|
+ { prop: "failureTime", label: "失效时间", width: '200' },
|
|
|
+ { prop: "updateTime", label: "修改时间", width: '200' },
|
|
|
{
|
|
|
prop: "ruleConditions", label: "交强费用", width: '300', formatter: (row: any) => {
|
|
|
let info = row.ruleConditions.find((val: any) => val.costType == '交强险');
|
|
|
@@ -571,13 +572,14 @@ const AgreementId = ref();//规则id
|
|
|
const ruleId = ref();//规则id
|
|
|
const ruleList = ref();//协议规则列表
|
|
|
const agreementSelection = () => {
|
|
|
+ // AgreementId.value = '';
|
|
|
+ // ruleList.value = []
|
|
|
agreementSelectionVisible.value = true;
|
|
|
}
|
|
|
const ItemClick = (item: any) => {
|
|
|
- console.log(item)
|
|
|
- console.log(ruleInfo.value)
|
|
|
AgreementInfo.value = item;
|
|
|
AgreementId.value = item.id;
|
|
|
+ ruleId.value = '';
|
|
|
api.agreementApi.agreementRulesList(AgreementId.value).then((res: any) => {
|
|
|
if (res.code == '200') {
|
|
|
ruleList.value = res.data;
|
|
|
@@ -590,6 +592,14 @@ const ruleItemclick = (value: string | number | boolean | undefined) => {
|
|
|
ruleInfo.value = info;
|
|
|
}
|
|
|
const agreementSelectionConfirm = () => {
|
|
|
+ if (!AgreementId.value) {
|
|
|
+ ElMessage.error('请选择协议')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!ruleId.value) {
|
|
|
+ ElMessage.error('请选择规则')
|
|
|
+ return
|
|
|
+ }
|
|
|
agreementSelectionVisible.value = false;
|
|
|
ruleFeeVisible.value = true;
|
|
|
}
|
|
|
@@ -605,11 +615,11 @@ const ruleFeeSave = (data: object) => {
|
|
|
ruleFeeVisible.value = false;
|
|
|
findpage();
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- type: 'error',
|
|
|
- message: res.msg,
|
|
|
- plain: true,
|
|
|
- })
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: res.msg,
|
|
|
+ plain: true,
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
}
|