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

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

@dongkboy 1 месяц назад
Родитель
Сommit
9e2327eb95
2 измененных файлов с 49 добавлено и 23 удалено
  1. 45 19
      src/views/insurancePolicy/index.vue
  2. 4 4
      src/views/insurancePolicy/modules/quotation.vue

+ 45 - 19
src/views/insurancePolicy/index.vue

@@ -949,7 +949,7 @@
                     <el-row :gutter="20">
                       <el-col :span="12">
                         <div class="quoteTitle">方案明细</div>
-                        <el-table :data="scope.row.projectList?.[scope.row.productIndex]?.kinds">
+                        <el-table :data="filterKind(scope.row, 'quote')">
                           <el-table-column width="50" align="center"
                             v-if="scope.row.projectList?.[scope.row.productIndex]?.schemeType != '1'">
                             <template #header>
@@ -983,44 +983,46 @@
                             </template>
                           </el-table-column>
                         </el-table>
-                        <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 class="quoteTitle" v-if="filterKind(scope.row, 'noquote')">
                           增值服务</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-row :gutter="20" v-if="filterKind(scope.row, 'noquote')">
                           <el-col :span="6" class="quoteFlex">
                             救援
-                            <el-select v-model="scope.row.projectList[scope.row.productIndex].rescue"
-                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
+                            <el-select v-model="filterKind(scope.row, 'TY1').amount"
+                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1' || !filterKind(scope.row, 'TY1').kindCode"
                               size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                              <el-option v-for="item in filterKind(scope.row, 'TY1').options" :label="item.label"
+                                :value="item.value"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             检测
-                            <el-select v-model="scope.row.projectList[scope.row.productIndex].detection"
-                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
+                            <el-select v-model="filterKind(scope.row, 'TY2').amount"
+                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1' || !filterKind(scope.row, 'TY2').kindCode"
                               size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                              <el-option v-for="item in filterKind(scope.row, 'TY2').options" :label="item.label"
+                                :value="item.value"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             代驾
-                            <el-select v-model="scope.row.projectList[scope.row.productIndex].driver"
-                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
+                            <el-select v-model="filterKind(scope.row, 'TY3').amount"
+                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1' || !filterKind(scope.row, 'TY3').kindCode"
                               size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                              <el-option v-for="item in filterKind(scope.row, 'TY3').options" :label="item.label"
+                                :value="item.value"></el-option>
                             </el-select>
                           </el-col>
                           <el-col :span="6" class="quoteFlex">
                             送检
-                            <el-select v-model="scope.row.projectList[scope.row.productIndex].inspect"
-                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
+                            <el-select v-model="filterKind(scope.row, 'TY4').amount"
+                              :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1' || !filterKind(scope.row, 'TY4').kindCode"
                               size="small" style="width: 80px; margin: 0 10px">
-                              <el-option label="1" value="1"></el-option>
+                              <el-option v-for="item in filterKind(scope.row, 'TY4').options" :label="item.label"
+                                :value="item.value"></el-option>
                             </el-select>
                           </el-col>
@@ -2969,7 +2971,7 @@ let ordersNo = ref('')
 let shareImageUrl = ref('')
 const handleShare = async (scope: any) => {
   ordersNo.value = scope;
-  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/h5/#/pages/quote/quoteRecordDetail?ordersNo=${scope}&from=share`, {
+  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${scope}&from=share`, {
     width: 150,
     margin: 2
   });
@@ -3018,7 +3020,7 @@ const handleCancelPayment = (scope: any) => {
 const handleCopyLink = async () => {
   shareShow.value = false
   try {
-    await navigator.clipboard.writeText(`https://tennat.baoxianzhanggui.com/h5/#/pages/quote/quoteRecordDetail?ordersNo=${ordersNo.value}&from=share`);
+    await navigator.clipboard.writeText(`https://tennat.baoxianzhanggui.com/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${ordersNo.value}&from=share`);
     ElMessage({
       message: '复制成功!',
       type: 'success'
@@ -3960,10 +3962,34 @@ const ruleFilterCompany = (item: any, obj: any) => {
   })
 }
 
+const filterKind = (row, key) => {
+  const kinds = row.projectList?.[row.productIndex]?.kinds ?? []
+  if (key === 'quote') {
+    return kinds.filter(v => !['TY1', 'TY2', 'TY3', 'TY4'].includes(v.kindCode))
+  }
+  if (key === 'noquote') {
+    return kinds.find(v => ['TY1', 'TY2', 'TY3', 'TY4'].includes(v.kindCode))
+  }
+  if (key === 'TY1') {
+    return kinds.find(v => ['TY1'].includes(v.kindCode)) ?? {}
+  }
+  if (key === 'TY2') {
+    return kinds.find(v => ['TY2'].includes(v.kindCode)) ?? {}
+  }
+  if (key === 'TY3') {
+    return kinds.find(v => ['TY3'].includes(v.kindCode)) ?? {}
+  }
+  if (key === 'TY4') {
+    return kinds.find(v => ['TY4'].includes(v.kindCode)) ?? {}
+  }
+  return []
+}
+
 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
   quotationRef.value.show(obj)
 }
 

+ 4 - 4
src/views/insurancePolicy/modules/quotation.vue

@@ -95,12 +95,12 @@ const descriptionsData = computed(() => {
       { title: '车型名称', value: props.insurancePolicyForm.brandName },
     ], [
       { title: '新车购置价(元)', value: props.insurancePolicyForm.purchasePrice },
-      { title: ' ', value: ' ' },
+      { title: '座位数', value: props.insurancePolicyForm.seatCount },
     ], [
-      { title: '发动机号、VIN码', value: props.insurancePolicyForm.engineNo },
+      { title: '发动机号、VIN码', value: props.insurancePolicyForm.engineNo + '、' + props.insurancePolicyForm.vinNo },
       { title: '初登日期', value: props.insurancePolicyForm.registerDate },
     ], [
-      { title: '使用性质', value: props.insurancePolicyForm.carNatureCode },
+      { title: '使用性质', value: props.insurancePolicyForm.vehicleUseName },
       {
         title: '承保年数、出险次数', value: `商业险:期间内共出险${props.quotationObj.quoteResult?.scoreVo?.biClaims || 0}次<br>
         交强险:期间内共出险${props.quotationObj.quoteResult?.scoreVo?.ciClaims || 0}次`
@@ -151,7 +151,7 @@ const dialogFormVisible = ref(false)
 const shareImageUrl = ref('')
 const show = async (obj) => {
   dialogFormVisible.value = true
-  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/h5/#/pages/quote/quoteRecordDetail?ordersNo=${obj.quoteResult?.ordersNo}&from=share`, {
+  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${obj.quoteResult?.ordersNo}&from=share`, {
     width: 160,
     margin: 2
   });