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

报价成功显示按钮+核保取消按钮

祁鹏飞 4 месяцев назад
Родитель
Сommit
0cd5b2a5c6
1 измененных файлов с 5 добавлено и 23 удалено
  1. 5 23
      src/views/insurancePolicy/index.vue

+ 5 - 23
src/views/insurancePolicy/index.vue

@@ -1185,15 +1185,15 @@
             <el-table-column label="操作" align="center" width="360">
               <template #default="scope">
                 <div v-if="currentRow.some((a: any) => a.id === scope.row.id)">
-                  <el-button v-if="scope.row.quoteResult" link type="primary"
+                  <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
                     @click="handleCount(scope)">优惠测算</el-button>
-                  <el-button v-if="scope.row.quoteResult" link type="primary"
+                  <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
                     @click="toDetail(scope.row.quoteResult.ordersNo)">详情</el-button>
                   <el-button link type="primary" :loading="scope.row.loading"
                     @click="handleSubmit(InsurancePolicyRefs, scope)">计算保费</el-button>
-                  <el-button v-if="scope.row.quoteResult" link type="primary"
+                  <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
                     @click="handleShare(scope.row.quoteResult.ordersNo)">分享</el-button>
-                  <el-button v-if="scope.row.quoteResult" link type="primary"
+                  <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
                     @click="handleUnderwriting(scope)">核保</el-button>
                 </div>
               </template>
@@ -2928,25 +2928,7 @@ const historyhandleUnderwriting = (scope: any) => {
 let underwritingMsgShow = ref(false)
 
 const handleUnderwritingClose = (bool: any, dataObj: any) => {
-  insOrderRightsInfoDto.value.length = dataObj.equitiesData;
-  insOrderRightsInfoDto.value.totalPriceCount = dataObj.totalPriceCount;
   underwritingShow.value = false
-  if (bool.code == 200) {
-    ElMessage({
-      message: bool.msg,
-      type: 'success'
-    })
-    quoteData.value[underwritingIndex.value].underwritingMsg = "";
-
-    underwritingMsgShow.value = true
-  } else {
-    ElMessage({
-      message: bool.msg,
-      type: 'error'
-    })
-    quoteData.value[underwritingIndex.value].underwritingMsg = bool.msg
-
-  }
 }
 
 let payCodeShow = ref(false)
@@ -3405,6 +3387,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
               ]
               // 保存报价结果
               quoteData.value[scope.$index].quoteResult = res.data
+              quoteData.value[scope.$index].quoteResult.code = res.code
               console.log(res.data)
               loading.value = false
               quoteData.value[scope.$index].loading = false
@@ -3416,7 +3399,6 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
               })
               quoteData.value[scope.$index].quoteResult = res.data
               quoteData.value[scope.$index].quoteResult.failMsg = res.msg
-              console.log(quoteData.value[scope.$index].quoteResult)
               loading.value = false
               quoteData.value[scope.$index].loading = false
             }