Qchen 1 năm trước cách đây
mục cha
commit
33c39d3eb5
2 tập tin đã thay đổi với 13 bổ sung10 xóa
  1. 2 2
      .env.development
  2. 11 8
      src/views/insurancePolicy/index.vue

+ 2 - 2
.env.development

@@ -4,9 +4,9 @@ VITE_APP_SETTING = true
 VITE_APP_TITLE = 租户平台
 # 接口请求地址,会设置到 axios 的 baseURL 参数上
 # VITE_APP_API_BASEURL = https://test.baoxianzhanggui.com/web-api #默认地址
-VITE_APP_API_BASEURL = http://192.168.0.253:8001  #田智
+# VITE_APP_API_BASEURL = http://192.168.0.253:8001  #田智
 # VITE_APP_API_BASEURL = http://192.168.0.55:8001  #董鑫
-# VITE_APP_API_BASEURL = http://192.168.0.106:8001  #屈晨
+VITE_APP_API_BASEURL = http://192.168.0.106:8001  #屈晨
 # VITE_APP_API_BASEURL = http://192.168.0.59:8001  #徐强
 
 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空

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

@@ -1091,7 +1091,7 @@
                 <div v-if="currentRow.some(a => a.id === scope.row.id)">
                   <el-button link type="primary" @click="handleCount(scope)">优惠测算</el-button>
                   <el-button link type="primary">详情</el-button>
-                  <el-button link type="primary" :loading="loading" @click="handleSubmit(InsurancePolicyRefs)">计算保费</el-button>
+                  <el-button link type="primary" :loading="loading" @click="handleSubmit(InsurancePolicyRefs,scope)">计算保费</el-button>
                   <el-button link type="primary" @click="handleShare(scope)">分享</el-button>
                   <el-button link type="primary" @click="handleUnderwriting(scope)">核保</el-button>
                 </div>
@@ -2120,8 +2120,10 @@ const handleCount = (scope) => {
 // 提交核保
 let underwritingShow = ref(false)
 const handleUnderwriting = (scope) => {
+  console.log(scope.row)
   underwritingShow.value = true
   let data = {
+
     // ordersNo: '1915570359429222400'
     ordersNo: scope.row.quoteResult.ordersNo,
     quoteNo: insurancePolicyForm.value.order.quoteNo
@@ -2234,7 +2236,8 @@ const handleRecognition = () => {
 
 // 提交
 let loading = ref(false)
-const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
+const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope) => {
+  console.log(scope.$index)
   if(!InsurancePolicyRefs) {
     InsurancePolicyRefs?.resetFields()
     return
@@ -2242,7 +2245,7 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
   await InsurancePolicyRefs.validate((valid) => {
     if(valid) {
       loading.value = true
-      quoteData.value[drivingRow.value].loading = true
+      quoteData.value[scope.$index].loading = true
       let arr = [], brr = []
       if(quoteData.value.length>0) {
         let obj = quoteData.value.find(a => a.id === insurancePolicyForm.value.order.insuranceCompanyCode)
@@ -2386,22 +2389,22 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined) => {
                 let d = res.data.niPremium?res.data.niPremium:0
                 res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
               }
-              quoteData.value[drivingRow.value].quoteResult = res.data
+              quoteData.value[scope.$index].quoteResult = res.data
               loading.value = false
-              quoteData.value[drivingRow.value].loading = false
+              quoteData.value[scope.$index].loading = false
             } else {
               ElMessage({
                 message: res.msg,
                 type: 'warning'
               })
-              quoteData.value[drivingRow.value].quoteResult.failMsg = res.msg
+              quoteData.value[scope.$index].quoteResult.failMsg = res.msg
               loading.value = false
-              quoteData.value[drivingRow.value].loading = false
+              quoteData.value[scope.$index].loading = false
             }
             // InsurancePolicyRefs.resetFields()
           }).catch(e => {
             loading.value = false
-            quoteData.value[drivingRow.value].loading = false
+            quoteData.value[scope.$index].loading = false
             quoteData.value.forEach(a => {
               a.loading = false
             })