Просмотр исходного кода

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy 1 месяц назад
Родитель
Сommit
37b03e49ff

+ 2 - 1
src/components/complexTable/index.vue

@@ -55,7 +55,8 @@
         </el-table-column>
         <el-table-column v-if="showIndex" type="index" label="序号" width="55" />
         <el-table-column v-for="column in columns" :key="column.prop" :prop="column.prop" :label="column.label"
-          :sortable="column.sortable ?'custom' : false" :width="column.width"
+          :sortable="column.sortable ?'custom' : false" :width="column.width" :filters="column.filters"
+          :filter-method="column.filters?(value, row) =>  row[column.prop] === value:undefined"
           :align="column.align ? column.align : 'center'" show-overflow-tooltip>
           <template #header>
             <slot name="search" :slotData="column"></slot>

+ 28 - 14
src/views/insurancePolicy/index.vue

@@ -1441,8 +1441,8 @@
     </el-dialog>
     <el-dialog :close-on-click-modal="false" title="提交核保" width="1100" v-model="underwritingShow">
       <underwriting v-if="underwritingShow" ref="UnderwritingRefs" :insOrderRightsInfoDto="insOrderRightsInfoDto"
-         :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
-        @close="handleUnderwritingClose" @initDetail="initDetail"></underwriting>
+        :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]" @close="handleUnderwritingClose"
+        @initDetail="initDetail"></underwriting>
     </el-dialog>
     <el-dialog :close-on-click-modal="false" title="证件识别" width="800" v-model="imageShow">
       <recognition ref="RecognitionRefs" :option="optionObj.car_type_code" @close="handleImageClose"></recognition>
@@ -1509,9 +1509,8 @@
         <el-button size="small" type="primary" @click="handlePayCodeClose">关闭</el-button>
       </template>
     </el-dialog>
-    <Equities v-model:show="equitiesShow"
-      :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]" :EquitiesInfo="EquitiesInfo"
-      @save="handleEquitiesSave"></Equities>
+    <Equities v-model:show="equitiesShow" :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
+      :EquitiesInfo="EquitiesInfo" @save="handleEquitiesSave"></Equities>
   </div>
   <quotation ref="quotationRef" :quotationObj="quotationObj" :insurancePolicyForm="insurancePolicyForm" />
 </template>
@@ -1626,6 +1625,7 @@ const initDetail = () => {
       // 设置业务员信息
       insurancePolicyForm.value.salesman = obj?.salesmanInfo?.name
       insurancePolicyForm.value.mobile = obj?.salesmanInfo?.mobile
+      insurancePolicyForm.value.schemeId = obj?.schemeId
       insurancePolicyForm.value.deptId = obj?.salesmanInfo?.deptId
       // 设置车辆信息
       insurancePolicyForm.value.isRegistered = obj?.carInfoVo?.isRegistered || '1'
@@ -2765,8 +2765,8 @@ const getSchemeResult = () => {
     // 方案信息
     quoteData.value.forEach((item: any) => {
       if (item.id === insurancePolicyForm.value.order.insuranceCompanyCode) {
-        item.productIndex = 0;
         if (myRoute.query.orderNo) {
+          item.productIndex = list.findIndex(v => v.id === insurancePolicyForm.value.schemeId)
           list.forEach((item2: any) => {
             if (item2.schemeType === "1") {
               item2.kinds = item2.kinds.map((v: any) => {
@@ -2780,15 +2780,25 @@ const getSchemeResult = () => {
                   premium: obj?.premium
                 }
               })
+            } else {
+              item2.kinds = item2.kinds.map((v: any) => {
+                let obj = item.insurancePlanInfo?.kinds?.find((kind: any) => kind.kindCode === v.kindCode && kind.amount === v.amount)
+                return {
+                  ...v,
+                  premium: obj?.premium
+                }
+              })
             }
           })
-        }
-        item.insurancePlanInfo = {
-          ...list[0],
-          rescue: [],
-          detection: [],
-          driver: [],
-          inspect: []
+        } else {
+          item.productIndex = 0;
+          item.insurancePlanInfo = {
+            ...list[0],
+            rescue: [],
+            detection: [],
+            driver: [],
+            inspect: []
+          }
         }
         item.projectList = list.map((item1: any) => {
           return {
@@ -3594,6 +3604,7 @@ const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
   // 构建提交数据
   let data = {
     systemType: '2',
+    schemeId: product.id,
     order: {
       realQuoteUserId: insurancePolicyForm.value.mobile,
       insuranceCompanyCode: companyId,  // 保险公司代码
@@ -3950,11 +3961,14 @@ const ruleFilterCompany = (item: any, obj: any) => {
                 item.quoteCode = 500
                 item.failMsg = obj.errorMessage
               }
+              insurancePolicyForm.value.order.insuranceCompanyCode = a.id
+              getSchemeResult()
             }
             return a
           })
           return item
         })
+
       }
     } else {
       quoteData.value = []
@@ -3989,7 +4003,7 @@ const quotationRef = ref(null)
 const quotationObj = ref({})
 const handleQuotationView = (obj) => {
   quotationObj.value = obj
-  insurancePolicyForm.value.vehicleUseName=optionObj.value.vehicle_use_code.find(a=>a.value===insurancePolicyForm.value.vehicleUseCode)?.label
+  insurancePolicyForm.value.vehicleUseName = optionObj.value.vehicle_use_code.find(a => a.value === insurancePolicyForm.value.vehicleUseCode)?.label
   quotationRef.value.show(obj)
 }
 

+ 4 - 5
src/views/quoteConfig/agreement/agreementDetails.vue

@@ -779,7 +779,7 @@ const ruleFeeEditVisible = ref(false);//编辑弹窗
 const ruleFeeHeaderTitle = ref();//编辑弹窗title
 const costitemEditInfo = ref();
 const RulesInfo = ref({});
-const columns = [
+const columns = computed(() => [
   { prop: "costRules", label: "费用规则", width: '200', },
   { prop: "priorityLevel", label: "优先级", width: '100', },
   { prop: "costDescribe", label: "费用规则", width: '200', },
@@ -830,7 +830,7 @@ const columns = [
     }
   },
   {
-    prop: "isEnabled", label: "费用状态", width: '200', component: "Tag",
+    prop: "isEnabled", label: "费用状态", width: '200', component: "Tag", filters: getDict('is_enable').map(v => ({ text: v.label, value: Number(v.value) })),
     formatter: (row: any) => {
       let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
       if (name) {
@@ -850,7 +850,7 @@ const columns = [
     }
   },
   {
-    prop: "isValid", label: "有效状态", width: '200',
+    prop: "isValid", label: "有效状态", width: '200', filters: getDict('valid_status').map(v => ({ text: v.label, value: Number(v.value) })),
     component: "Tag",
     formatter: (row: any) => {
       let name = getDict('valid_status').find(val => val.value == row.isValid).label
@@ -859,14 +859,13 @@ const columns = [
       }
     }
   },
-];
+]);
 const ruleFeeAdd = (item: any) => {
   RulesInfo.value = item;
   ruleFeeVisible.value = true;
 }
 //费用提交
 const ruleFeeSave = (data: object) => {
-
   api.agreementApi.ptlAgreementCostsave(data).then((res: any) => {
     if (res.code == '200') {
       ElMessage({