Parcourir la source

核保之后重新请求详情

祁鹏飞 il y a 2 mois
Parent
commit
05c67e92d4

+ 9 - 8
src/views/insurancePolicy/index.vue

@@ -976,7 +976,7 @@
                                     :value="item.value"></el-option>
                                 </el-select>
                                 <span v-if="props.row.kindName == '乘客责任险'">*{{ insurancePolicyForm.seatCount - 1
-                                }}/座</span>
+                                  }}/座</span>
                               </div>
                             </template>
                           </el-table-column>
@@ -1046,7 +1046,7 @@
                           <el-table-column label="产品名称" prop="productName" align="center">
                             <template #default="props">
                               <el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
-                              }}</el-button>
+                                }}</el-button>
                             </template>
                           </el-table-column>
                           <el-table-column label="数量" align="center">
@@ -1099,12 +1099,12 @@
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">交强续保</span>
                               <span>{{ ['', '新保', '续保', '转保'][Number(scope.row.quoteResult?.scoreVo?.jqRenewal)] || '--'
-                                }}</span>
+                              }}</span>
                             </div>
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">商业续保</span>
                               <span>{{ ['', '新保', '续保', '转保'][Number(scope.row.quoteResult?.scoreVo?.syRenewal)] || '--'
-                                }}</span>
+                              }}</span>
                             </div>
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">总折扣率</span>
@@ -1433,7 +1433,7 @@
     <el-dialog :close-on-click-modal="false" title="提交核保" width="1100" v-model="underwritingShow">
       <underwriting v-if="underwritingShow" ref="UnderwritingRefs" :insOrderRightsInfoDto="insOrderRightsInfoDto"
         :availableAmount="availableAmount" :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
-        @close="handleUnderwritingClose"></underwriting>
+        @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>
@@ -1602,6 +1602,8 @@ const inParkingDataFocus = (e: string, data: any) => {
  * 从路由参数获取订单号,请求订单详情并填充表单
  */
 const initDetail = () => {
+  if (!myRoute.query.orderNo) return
+
   // 请求订单详情
   api.insurancePolicyApi.getOrderDetail(myRoute.query.orderNo).then((res: any) => {
     if (res.code == 200) {
@@ -3924,9 +3926,8 @@ onMounted(() => {
   getAreaList()    // 获取地区列表
   initDept()       // 初始化部门数据
   initOption()     // 初始化下拉选项
-  if (myRoute.query.orderNo) {
-    initDetail()   // 如果有订单号,初始化详情
-  }
+  initDetail()   // 如果有订单号,初始化详情
+
 })
 
 </script>

+ 3 - 3
src/views/insurancePolicy/modules/underwriting.vue

@@ -160,7 +160,7 @@ const usedMoney = ref(0)//已使用金额
 const lastMoney = ref(0)//剩余金额
 const ImageTypeSelect = ref()
 const loading = ref(false)//提交loading
-const emit = defineEmits(['close'])
+const emit = defineEmits(['close','initDetail'])
 let images = ref([])
 watch(() => props.insOrderRightsInfoDto, (newVal) => {
   console.log('权益信息', newVal)
@@ -364,9 +364,9 @@ const handleSubmit = (bool) => {
             equitiesData: equitiesData.value.length,
             totalPriceCount: totalPriceCount.value
           })
-        }).finally(()=>loading.value = false)
+        }).finally(()=>(loading.value = false,emit('initDetail')))
       }
-    }).finally(()=>loading.value = false)
+    }).catch(()=>loading.value = false)
   } else {
     emit('close', false)
   }

+ 1 - 1
src/views/insurancePolicy/order.vue

@@ -123,7 +123,7 @@
           <el-button link type="primary"
             v-if="scope.row.orderStatus != '7' && scope.row.orderStatus != '7' && scope.row.orderStatus != '8'"
             @click="toEdit(scope.row)">编辑</el-button>
-          <el-button link type="primary" v-if="scope.row.orderStatus === '7' || scope.row.orderStatus === '1'"
+          <el-button link type="primary" v-if="scope.row.orderStatus === '1'"
             @click="toEdit(scope.row)">提交核保</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '3'">取消核保</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '7' || scope.row.orderStatus === '4'"