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

1 添加太平保险的非车险
2 调整太平的二维码展示
3 优化状态更新按钮代码

lihongxiao 2 лет назад
Родитель
Сommit
793b7c9e10
2 измененных файлов с 78 добавлено и 8 удалено
  1. 2 2
      config/dev.env.js
  2. 76 6
      src/views/Letter/Letter.vue

+ 2 - 2
config/dev.env.js

@@ -5,10 +5,10 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
-  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
-  // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
+  BASE_URL: '"http:///192.168.0.253:8082/"',//田智
 })
 
 

+ 76 - 6
src/views/Letter/Letter.vue

@@ -1357,7 +1357,7 @@
                   :key="agreementindex"
                 >
                   <div
-                    v-if="agreementitem.licenseNo.length > 0 ? agreementitem.licenseNo.includes(carInfo.licenseNo.slice(0, 2)) : 'true'"
+                    v-if="agreementitem.licenseNo && agreementitem.licenseNo.length > 0 ? agreementitem.licenseNo.includes(carInfo.licenseNo.slice(0, 2)) : 'true'"
                   >
                     <el-option :label="agreementitem.agreementName" :value="agreementitem.id"></el-option>
                   </div>
@@ -1410,6 +1410,53 @@
                 </el-table>
               </div>
             </template>
+            <template
+              v-if="reslistitem.namesimple == '太平财险' && reslistitem.checked && reslistitem.agreementId"
+            >
+              <div class="flex f-c Driving-risk">
+                <h3>意外险信息</h3>
+                <div class="dis a-c" style="margin-bottom:15px">
+                  <span style="margin-right:15px;color:#606266;">选择意外险:</span>
+                  <el-select
+                    style="width: 250px;"
+                    filterable
+                    size="small"
+                    clearable
+                    v-model="insuranceTP"
+                    placeholder="选择类型"
+                    @clear="clearAccidentFormTP"
+                    @change="taipingInsuranceChange"
+                  >
+                    <el-option
+                      v-for="(item, index) in taipingInsuranceData"
+                      :key="index"
+                      :label="item.rationName"
+                      :value="item.rationType"
+                    ></el-option>
+                  </el-select>
+                </div>
+                <el-table
+                  size="small"
+                  :data="TPInsuranceData"
+                  border
+                  v-if="insuranceTP"
+                  @row-click="TPDrivingChange"
+                  ref="RsTable"
+                  highlight-current-row
+                  :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#ee7000' }"
+                >
+                  <el-table-column prop="rationName" label="投保产品" align="center"></el-table-column>
+                  <el-table-column label="投保份数" align="center"  prop="quantity">
+                    <template >
+                      <span>1</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="price" label="每份价税合计" align="center"></el-table-column>
+                  <el-table-column prop="endSeatNum" label="最大座位数" align="center"></el-table-column>
+
+                </el-table>
+              </div>
+            </template>
             <template
               v-if="reslistitem.namesimple == '安盛天平' && reslistitem.checked && reslistitem.agreementId"
             >
@@ -3417,6 +3464,10 @@ export default {
       RSInsuranceData:[],
       insuranceZA:'', //众安
       ZRInsuranceData:[],
+      insuranceTP:'',//太平
+      taipingInsuranceData:[],//太平驾意险
+      TPDrivingChangeInsuranceData:[],
+      taipingaccidentalDrivingVo:{},//太平驾意险
       licenseplate: true,
       calculateLoading:false,   //保费计算按钮 节流
       accidentForm: {
@@ -5114,6 +5165,13 @@ export default {
         this.HBDrivingChange(this.HBInsuranceData[0])
       }
     },
+    taipingInsuranceChange(index){
+      this.TPInsuranceData=[(this.taipingInsuranceData).find(val=>val.rationType==index)]
+      console.log(this.TPInsuranceData,111111111111)
+      if(this.TPInsuranceData.length){
+        this.TPDrivingChange(this.TPInsuranceData[0])
+      }
+    },
     zijinInsuranceChange(index){
       this.ZJInsuranceData=[]
       this.$refs.expandTable[0].clearSelection()
@@ -5345,6 +5403,9 @@ export default {
             if (res.code == 200) {
               this.guoRenaccidentDataList = res.data;
             }
+            else{
+              this.guoRenaccidentDataList = [];
+            }
           });
           break;
         case '紫金财险':
@@ -5394,6 +5455,11 @@ export default {
         return val;
       })
     },
+    
+    //太平驾意险选择
+      TPDrivingChange(row){
+      this.taipingaccidentalDrivingVo=row;
+    },
     //恒邦驾意险选择
     HBDrivingChange(row){
       this.hengbangaccidentalDrivingVo=row;
@@ -5528,7 +5594,7 @@ export default {
             }
           });
           break;
-          case '安盛天平':
+        case '安盛天平':
           this.$api.letter.pythongetDriving({ agreementId: this.totalCompanyList[index].agreement[0].id}).then(res => {
             if (res.code == 200) {
               let data = res.data;
@@ -5543,10 +5609,10 @@ export default {
             }
           });
           break;
-          case '中国人寿':
-          case '恒邦财险':
-          case '太平财险':
-          case '众安财险':
+        case '中国人寿':
+        case '恒邦财险':
+        case '太平财险':
+        case '众安财险':
           this.$api.letter.pythongetDriving({ agreementId: this.totalCompanyList[index].agreement[0].id}).then(res => {
             if (res.code == 200) {
               let data = res.data;
@@ -5598,6 +5664,9 @@ export default {
     clearAccidentFormHB(){
       this.hengbangaccidentalDrivingVo={};
     },
+    clearAccidentFormTP(){
+      this.taipingaccidentalDrivingVo={};
+    },
     clearAccidentFormDJ(){
       this.dajiaaccidentalDrivingVo={};
     },
@@ -8485,6 +8554,7 @@ export default {
         premium:0
       };
       this.hengbangaccidentalDrivingVo={};
+      this.taipingaccidentalDrivingVo={};
       this.zhongmeiaccidentalDrivingVo={};
       this.accidentalDrivingVo=[]
       this.zhonganaccidentalDrivingVo={};