瀏覽代碼

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

@dongkboy 1 月之前
父節點
當前提交
91067e1ec6

+ 2 - 2
src/views/insurancePolicy/index.vue

@@ -2971,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/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${scope}&from=share`, {
+  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/test_h5/#/pages/quote/quoteRecordDetail?ordersNo=${scope}&from=share`, {
     width: 150,
     margin: 2
   });
@@ -3020,7 +3020,7 @@ const handleCancelPayment = (scope: any) => {
 const handleCopyLink = async () => {
   shareShow.value = false
   try {
-    await navigator.clipboard.writeText(`https://tennat.baoxianzhanggui.com/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${ordersNo.value}&from=share`);
+    await navigator.clipboard.writeText(`https://tennat.baoxianzhanggui.com/test_h5/#/pages/quote/quoteRecordDetail?ordersNo=${ordersNo.value}&from=share`);
     ElMessage({
       message: '复制成功!',
       type: 'success'

+ 3 - 2
src/views/insurancePolicy/modules/quotation.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="quotation">
 
-    <el-dialog v-model="dialogFormVisible" :show-close="false" width="1200" top="40px">
+    <el-dialog v-model="dialogFormVisible" :close-on-click-modal="false" :show-close="false" width="1200" top="40px">
       <template #header="{ titleId, titleClass }">
       </template>
       <div class="max-h-[calc(100vh-140px)] overflow-y-auto">
@@ -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/text_h5/#/pages/quote/quoteRecordDetail?ordersNo=${obj.quoteResult?.ordersNo}&from=share`, {
+  shareImageUrl.value = await QRCode.toDataURL(`https://tennat.baoxianzhanggui.com/test_h5/#/pages/quote/quoteRecordDetail?ordersNo=${obj.quoteResult?.ordersNo}&from=share`, {
     width: 160,
     margin: 2
   });
@@ -197,5 +197,6 @@ defineExpose({
 
 :deep(.el-dialog__body) {
   padding: unset;
+  max-height: unset !important;
 }
 </style>

+ 43 - 22
src/views/insurancePolicy/order.vue

@@ -142,6 +142,8 @@
           <el-button link type="primary" @click="viewElectronicPolicy(scope.row)"
             v-if="scope.row.orderStatus === '5'">查看电子保单</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '4'" @click="payCode(scope)">支付码</el-button>
+          <el-button link type="primary" :loading="scope.row.loading" @click="handleQuotationView(scope.row)"
+            v-if="['1', '3', '4'].includes(scope.row.orderStatus)">报价单预览</el-button>
           <el-button link type="danger" @click="deleteOrder(scope.row.orderNo)"
             v-if="scope.row.orderStatus === '6' || scope.row.orderStatus === '8'">删除订单</el-button>
           <!--          <el-dropdown trigger="click" class="ml-[12px] align-middle" v-if="scope.row.orderStatus === '5'">
@@ -256,6 +258,7 @@
     <DialogInsuranceEdit v-model="isEditVisible" :data="formData" />
     <DialogInsuranceCancel v-model="isCancelVisible" :data="formData" />
   </PageMain>
+  <quotation ref="quotationRef" :quotationObj="quotationObj" :insurancePolicyForm="insurancePolicyForm" />
 
 </template>
 
@@ -267,6 +270,7 @@ import { dictData } from '@/views/localDict/index';
 import { ElMessage } from "element-plus";
 import { useRouter } from 'vue-router';
 import { FormInstance } from 'element-plus';
+import quotation from './modules/quotation.vue' // 报价单
 import QRCode from 'qrcode'
 
 const router = useRouter()
@@ -732,31 +736,48 @@ const uploadStatus = (row: any) => {
   })
 }
 
-// 订单批改
-const onClick = (type: any, row: any) => {
-  api.insurancePolicyApi.adjustAdd({
-    type: type,
-    orderNo: row.orderNo,
-  }).then((res: any) => {
+let optionObj = ref({
+  vehicle_use_code: [], // 车辆用途
+})
+const initOption = () => {
+  api.additionalApi.dictDetails('vehicle_use_code').then((res: any) => {
     if (res.code == 200) {
-      formData.value = {
-        ...row,
-        adjustId: res.data.id,
-        tableList: type === 1 ? res.data.changeInfoVosList : res.data.infoVosList
-      };
-      if (type === 1) {
-        isEditVisible.value = true;
-      }
-      if (type === 0) {
-        isCancelVisible.value = true;
+      if (res.data) {
+        optionObj.value['vehicle_use_code'] = res.data
       }
-    } else {
-      ElMessage({
-        message: res.msg,
-        type: 'warning'
-      })
     }
-  });
+  })
+}
+initOption()
+const quotationObj = ref({})
+const insurancePolicyForm = ref({})
+const quotationRef = ref(null)
+// 订单批改
+const handleQuotationView = async (row: any) => {
+  row.loading = true
+  const { data } = await api.insurancePolicyApi.getOrderDetail(row.orderNo)
+  row.loading = false
+
+  quotationObj.value = {
+    ...data,
+    logo: data.insCompanyVo[0]?.logo,
+    nameSimple: data.insCompanyVo[0]?.nameSimple,
+    quoteResult: data
+  }
+  const { carInfoVo, ownersInfo, policyHolderInfo, insuredPersonInfo,biRiskInfoVo,ciRiskInfoVo } = data
+  insurancePolicyForm.value = {
+    ...data,
+    name1: ownersInfo?.name,
+    name2: policyHolderInfo?.name,
+    name3: insuredPersonInfo?.name,
+    ...carInfoVo,
+    SYStartDate: biRiskInfoVo?.startDate,
+    SYEndDate: biRiskInfoVo?.endDate,
+    JQStartDate: ciRiskInfoVo?.startDate,
+    JQEndDate: ciRiskInfoVo?.endDate,
+  }
+  insurancePolicyForm.value.vehicleUseName = optionObj.value.vehicle_use_code.find(a => a.value === insurancePolicyForm.value.vehicleUseCode)?.label
+  quotationRef.value.show(quotationObj.value)
 }
 
 const getStateText = (d: any, v: any) => {