Explorar o código

fix: 修改bug

wuguojie hai 7 meses
pai
achega
e16067d472

+ 1 - 1
src/layouts/components/InsuranceType/index.vue

@@ -140,7 +140,7 @@ const initEditData = (data, index, type, productId) => {
         if(data && data.length > 0) {
           data.forEach(item => {
             item.checked = true
-            item.options.forEach(sub => {
+            item?.options?.forEach(sub => {
                 sub.checked = false
                 if(type === 1) {
                     if(item.optionId === sub.id) {

+ 3 - 3
src/views/finance/index.vue

@@ -255,10 +255,10 @@
                     <el-table-column prop="jqPremium" label="交强险" width="120"></el-table-column>
                     <el-table-column prop="syPremium" label="商业险" width="120"></el-table-column>
                     <el-table-column prop="jyPremium" label="驾意险" width="120"></el-table-column>
-                    <el-table-column label="操作" fixed="right" width="200">
+                    <el-table-column label="操作" fixed="right" width="100">
                         <template #default="scope">
-                            <el-button link type="primary" size="small" @click="auditReceive(scope.row)">领取</el-button>
-                            <el-button link type="primary" size="small" @click="updateSigningTime(scope.row)">更新签单时间</el-button>
+<!--                            <el-button link type="primary" size="small" @click="auditReceive(scope.row)">领取</el-button>
+                            <el-button link type="primary" size="small" @click="updateSigningTime(scope.row)">更新签单时间</el-button>-->
                             <el-button link type="primary" size="small" @click="handleToDetail(scope)">详情</el-button>
                         </template>
                     </el-table-column>

+ 32 - 29
src/views/insurancePolicy/index.vue

@@ -888,15 +888,15 @@
                   <p class="expandTitle">车险方案</p>
                   <div style="width: calc(100% - 50px); overflow-x: hidden">
                     <div class="product">
-                      <span class="productItem" :class="{'productActive': productIndex === index}" v-for="(item, index) in scope.row.projectList" @click.stop="handleProduct(item, index)">{{ item.schemeName }}</span>
+                      <span class="productItem" :class="{'productActive': scope.row.productIndex === index}" v-for="(item, index) in scope.row.projectList" @click.stop="handleProduct(scope, item, index)">{{ item.schemeName }}</span>
                     </div>
                     <el-row :gutter="20">
                       <el-col :span="12">
                         <div class="quoteTitle">方案明细</div>
                         <el-table
-                          :data="scope.row.projectList?.[productIndex]?.kinds"
+                          :data="scope.row.projectList?.[scope.row.productIndex]?.kinds"
                         >
-                          <el-table-column width="50" align="center" v-if="scope.row.projectList?.[productIndex]?.schemeType !='1'">
+                          <el-table-column width="50" align="center" v-if="scope.row.projectList?.[scope.row.productIndex]?.schemeType !='1'">
                             <template #header>
                               <el-icon style="cursor: pointer;" @click="handlePopover(scope)"><CirclePlus /></el-icon>
                             </template>
@@ -907,39 +907,39 @@
                           <el-table-column label="险种" prop="kindName" align="center"></el-table-column>
                           <el-table-column label="保额" align="center">
                             <template #default="props">
-                              <el-select v-model="props.row.amount" :disabled="scope.row.projectList?.[productIndex]?.schemeType == '1'">
+                              <el-select v-model="props.row.amount" :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'">
                                 <el-option v-for="item in props.row.options" :label="item.label" :value="item.value"></el-option>
                               </el-select>
                             </template>
                           </el-table-column>
                           <el-table-column label="保费" prop="unitAmount" align="center"></el-table-column>
                         </el-table>
-                        <div class="quoteTitle" v-if="scope.row.projectList?.[productIndex]?.rescue && scope.row.projectList?.[productIndex]?.detection && scope.row.projectList?.[productIndex]?.driver && scope.row.projectList?.[productIndex]?.inspect ">增值服务</div>
-                        <el-row :gutter="20" v-if="scope.row.projectList?.[productIndex]?.rescue && scope.row.projectList?.[productIndex]?.detection && scope.row.projectList?.[productIndex]?.driver && scope.row.projectList?.[productIndex]?.inspect ">
+                        <div class="quoteTitle" v-if="scope.row.projectList?.[scope.row.productIndex]?.rescue && scope.row.projectList?.[scope.row.productIndex]?.detection && scope.row.projectList?.[scope.row.productIndex]?.driver && scope.row.projectList?.[scope.row.productIndex]?.inspect ">增值服务</div>
+                        <el-row :gutter="20" v-if="scope.row.projectList?.[scope.row.productIndex]?.rescue && scope.row.projectList?.[scope.row.productIndex]?.detection && scope.row.projectList?.[scope.row.productIndex]?.driver && scope.row.projectList?.[scope.row.productIndex]?.inspect ">
                           <el-col :span="6" class="quoteFlex">
                             救援
-                            <el-select v-model="scope.row.projectList[productIndex].rescue" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                            <el-select v-model="scope.row.projectList[scope.row.productIndex].rescue" :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
                                 <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             检测
-                            <el-select v-model="scope.row.projectList[productIndex].detection" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                            <el-select v-model="scope.row.projectList[scope.row.productIndex].detection" :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
                                 <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             代驾
-                            <el-select v-model="scope.row.projectList[productIndex].driver" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                            <el-select v-model="scope.row.projectList[scope.row.productIndex].driver" :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
                                 <el-option label="1" value="1"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             送检
-                            <el-select v-model="scope.row.projectList[productIndex].inspect" :disabled="scope.row.projectList?.[productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
+                            <el-select v-model="scope.row.projectList[scope.row.productIndex].inspect" :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType =='1'" size="small" style="width: 80px; margin: 0 10px">
                                 <el-option label="1" value="1"></el-option>
                             </el-select>
@@ -947,9 +947,9 @@
                         </el-row>
                         <div class="quoteTitle">驾意险</div>
                         <el-table
-                          :data="scope.row.projectList?.[productIndex]?.drivings"
+                          :data="scope.row.projectList?.[scope.row.productIndex]?.drivings"
                         >
-                          <el-table-column width="50" align="center" v-if="scope.row.projectList?.[productIndex]?.schemeType !='1'">
+                          <el-table-column width="50" align="center" v-if="scope.row.projectList?.[scope.row.productIndex]?.schemeType !='1'">
                             <template #header>
                               <el-icon @click="handleDriving(scope)"><CirclePlus /></el-icon>
                             </template>
@@ -964,7 +964,7 @@
                           </el-table-column>
                           <el-table-column label="数量" align="center">
                             <template #default="props">
-                              <el-input :disabled="scope.row.projectList?.[productIndex]?.schemeType === '1'" v-model="props.row.quantity" style="width: 140px">
+                              <el-input :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType === '1'" v-model="props.row.quantity" style="width: 140px">
                                 <template #append>
                                   <span>份</span>
                                 </template>
@@ -1044,7 +1044,8 @@
                                         </template>
                                       </el-radio>
                                     </el-radio-group>
-                                  </div>
+                                  </div>`
+
                                   <template #reference>
                                     <el-icon style="font-size: 14px; color:#0083FF "><Edit /></el-icon>
                                   </template>
@@ -1510,9 +1511,9 @@ const initDetail = () => {
             insurancePolicyForm.value.address1 = obj?.ownersInfo?.address
             insurancePolicyForm.value.registeredCapital1 = obj?.ownersInfo?.registeredCapital
             insurancePolicyForm.value.email1 = obj?.ownersInfo?.email
-            insurancePolicyForm.value.taxpayerName = obj?.ownersInfo?.name
-            insurancePolicyForm.value.taxpayerIdentifier = obj?.ownersInfo?.identifyType
-            insurancePolicyForm.value.identifyNumber = obj?.ownersInfo?.identifyNumber
+            insurancePolicyForm.value.taxpayerName = obj?.vehicleAndVesselTaxVo?.taxpayerName || obj?.ownersInfo?.name
+            insurancePolicyForm.value.taxpayerIdentifier = obj?.vehicleAndVesselTaxVo?.taxpayerIdentifier || obj?.ownersInfo?.identifyType
+            insurancePolicyForm.value.identifyNumber = obj?.vehicleAndVesselTaxVo?.identifyNumber || obj?.ownersInfo?.identifyNumber
             // 投保人信息
             insurancePolicyForm.value.name2 = obj?.policyHolderInfo?.name
             insurancePolicyForm.value.mobile2 = obj?.policyHolderInfo?.mobile
@@ -2428,6 +2429,7 @@ const handelSelectRow = (a, b) => {
           })
         }
         quoteData.value.forEach(item => {
+            item.productIndex = 0
           if(item.id === b.id) {
             item.projectList = list.map(item => {
                 return {
@@ -2464,6 +2466,7 @@ const handelExpend = (e) => {
                 })
             }
             quoteData.value.forEach(item => {
+                item.productIndex = 0
                 if(item.id === e .id) {
                     item.projectList = list.map(item => {
                         return {
@@ -2490,15 +2493,15 @@ let insuranceShow = ref(false)
 const handlePopover = (scope) => {
   insuranceShow.value = true
   nextTick(() => {
-    InsuranceTypeRef.value.initEditData(scope.row.projectList[productIndex.value].kinds)
+    InsuranceTypeRef.value.initEditData(scope.row.projectList[scope.row.productIndex].kinds)
   })
 }
 // 删除险种
 const handleInsuranceDel = (scope, props) => {
-  let obj = scope.row.projectList[productIndex.value].kinds.filter(a => a.id != props.row.id)
+  let obj = scope.row.projectList[scope.row.productIndex].kinds.filter(a => a.id != props.row.id)
   quoteData.value.forEach(a => {
     if(a.id === scope.row.id) {
-      a.projectList[productIndex.value].kinds = obj
+      a.projectList[scope.row.productIndex].kinds = obj
     }
   })
 }
@@ -2513,7 +2516,7 @@ const handleClose = (data) => {
   }
   quoteData.value.forEach(a => {
     if(insurancePolicyForm.value.order.insuranceCompanyCode === a.id) {
-      a.projectList[productIndex.value].kinds = data.list
+      a.projectList[a.productIndex].kinds = data.list
     }
   })
 }
@@ -2526,15 +2529,15 @@ const handleDriving = (scope) => {
   drivingRow.value = scope.$index
   drivingShow.value = true
   nextTick(() => {
-    DrivingTypeRef.value.initEditData(scope.row.projectList[productIndex.value].drivings, 0, insurancePolicyForm.value.order.insuranceCompanyCode)
+    DrivingTypeRef.value.initEditData(scope.row.projectList[scope.row.productIndex].drivings, 0, insurancePolicyForm.value.order.insuranceCompanyCode)
   })
 }
 // 删除驾意险
 const handleDrivingDel = (scope, props) => {
-  let obj = scope.row.projectList[productIndex.value].drivings.filter(a => a.id != props.row.id)
+  let obj = scope.row.projectList[scope.row.productIndex].drivings.filter(a => a.id != props.row.id)
   quoteData.value.forEach(a => {
     if(a.id === scope.row.id) {
-      a.projectList[productIndex.value].drivings = obj
+      a.projectList[scope.row.productIndex].drivings = obj
     }
   })
 }
@@ -2550,7 +2553,7 @@ const handleDrivingClose = (data) => {
     data.list.forEach(a => {
       a.quantity = 1
     })
-    quoteData.value[drivingRow.value].projectList[productIndex.value].drivings = [...data.list]
+    quoteData.value[drivingRow.value].projectList[quoteData.value[drivingRow.value].productIndex].drivings = [...data.list]
   }
   drivingShow.value = false
 }
@@ -2600,8 +2603,8 @@ const handleSpecialTableDataSubmit = () => {
 let discounts = ref([])
 
 let productIndex = ref(0)
-const handleProduct = (e, index) => {
-  productIndex.value = index
+const handleProduct = (scope, e, index) => {
+  scope.row.productIndex = index
 }
 
 // 报价历史
@@ -2938,10 +2941,10 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
       let arr = [], brr = [], crr = []
       if(quoteData.value.length>0) {
         let obj = quoteData.value.find(a => a.id === insurancePolicyForm.value.order.insuranceCompanyCode)
-        obj.projectList[productIndex.value].kinds?.forEach(a => {
+        obj.projectList[obj.productIndex].kinds?.forEach(a => {
           arr.push(a)
         })
-        obj.projectList[productIndex.value].drivings?.forEach(a => {
+        obj.projectList[obj.productIndex].drivings?.forEach(a => {
           brr.push(a)
         })
         if(obj.specialSelectedList?.length > 0) {

+ 0 - 1
src/views/insurancePolicy/modules/underwriting.vue

@@ -169,7 +169,6 @@ const queryClauseData = () => {
             nextTick(() => {
                 tableData.value?.forEach(item => {
                     if(item.clientStatus != '3') {
-                        console.log(123123123123213123123213)
                         ClauseRefs.value.toggleRowSelection(item, true)
                     }
                 })

+ 2 - 1
src/views/quoteConfig/agreement/agreementDetails.vue

@@ -578,7 +578,8 @@ const ruleFeeHeaderTitle = ref();//编辑弹窗title
 const costitemEditInfo = ref();
 const RulesInfo = ref({});
 const columns = [
-  { prop: "costRules", label: "费用规则", width: '200', },
+    { prop: "costRules", label: "费用规则", width: '200', },
+    { prop: "costDescribe", label: "费用规则", width: '200', },
   {
     prop: "ptlAgreementCostTypeList", label: "交强险费用", width: '300', formatter: (row: any) => {
       let info = row.ptlAgreementCostTypeList.find((val: any) => val.costType == '交强险');

+ 1 - 1
src/views/quoteConfig/agreement/components/ruleFeeDialogEdit.vue

@@ -1,7 +1,7 @@
 <!-- 模板区域 -->
 <template>
   <div>
-    <el-drawer v-model="props.ruleFeeVisible" :direction="direction" :close-on-click-modal="false" size="57%" @close="close">
+    <el-drawer v-model="props.ruleFeeVisible" :direction="direction" :close-on-click-modal="true" size="57%" @close="close">
       <template #header>
         <h4>{{ props.headerTitle }}费用编辑</h4>
       </template>

+ 2 - 1
src/views/quoteConfig/costManagement.vue

@@ -328,8 +328,9 @@ function getList(item: PageInfo) {
 };
 
 const agreemenUpdate = async (item: any) => {
+  let obj = agreementList.value.find(sub => sub.agreementCode === item.agreementCode)
   ruleFeeHeaderTitle.value = item.productName;
-  AgreementInfo.value = { agreementCode: item.agreementCode, agreementTitle: item.agreementAbbreviation };
+  AgreementInfo.value = { agreementCode: item.agreementCode, agreementTitle: item.agreementAbbreviation, companyId: obj?.companyId };
   ruleInfo.value = { ruleDescription: item.ruleDescription };
   await regionLicenseRegion('0');//车牌地区
   await regionLicenseNumber('14');//车牌号

+ 2 - 2
src/views/quoteConfig/project/modules/projectAdd.vue

@@ -662,12 +662,12 @@ const initEdit = () => {
         res.data.schemeList.forEach(item => {
           item.drivingList = item.drivingIntentionList
           item.tableData = item.schemeInsuranceList.map(sub => {
-            let obj = insuranceTypeList.value.find(a => a.id === sub.insuranceId)
+            let obj = insuranceTypeList.value.find(a => a.id == sub.insuranceId)
             return {
               ...sub,
               optionId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
               moneyId: res.data.schemeType===1?`${sub.optionId[0]}`:sub.optionId,
-              options: obj.options
+              options: obj?.options
             }
           })
         })

+ 19 - 21
src/views/representative/quoteApproval.vue

@@ -174,31 +174,11 @@ const columns = [
   { prop: "effectiveTime", label: "生效时间", width: '200' },
   { prop: "failureTime", label: "失效时间", width: '200' },
   {
-    prop: "ruleDescription", label: "承保规则", width: '500',
-  },
+    prop: "ruleDescription", label: "承保规则", width: '500'},
   { prop: "productName", label: "险种", width: '120', },
   {
     prop: "costRules", label: "费用规则", width: '500',
   },
-  {
-    prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
-    formatter: (row: any) => {
-      let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
-      if (name) {
-        return { type: 'primary', text: name };
-      }
-    }
-  },
-  {
-    prop: "approved", label: "审核状态", width: '120', component: "Tag",
-    formatter: (row: any) => {
-      let name = getDict('audit_status').find(val => val.value == row.approved).label
-      if (name) {
-        return { type: 'warning', text: name };
-      }
-    }
-  },
-
   {
     prop: "ruleConditions", label: "交强费用", width: '300', formatter: (row: any) => {
       let info = row.ruleConditions.find((val: any) => val.costType == '交强险');
@@ -229,6 +209,24 @@ const columns = [
       }
     }
   },
+    {
+        prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
+        formatter: (row: any) => {
+            let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
+            if (name) {
+                return { type: 'primary', text: name };
+            }
+        }
+    },
+    {
+        prop: "approved", label: "审核状态", width: '120', component: "Tag",
+        formatter: (row: any) => {
+            let name = getDict('audit_status').find(val => val.value == row.approved).label
+            if (name) {
+                return { type: 'warning', text: name };
+            }
+        }
+    },
 ];
 //分页事件
 function getList(item: PageInfo) {