Explorar o código

Merge branch 'master' into new_version

lihongxiao %!s(int64=2) %!d(string=hai) anos
pai
achega
3c3ca3c989
Modificáronse 2 ficheiros con 23 adicións e 10 borrados
  1. 5 8
      src/views/Letter/Letter.vue
  2. 18 2
      src/views/Letter/Orderlist.vue

+ 5 - 8
src/views/Letter/Letter.vue

@@ -1490,7 +1490,6 @@
                   :data="TPInsuranceData"
                   border
                   v-if="insuranceTP"
-                  @row-click="TPDrivingChange"
                   ref="RsTable"
                   highlight-current-row
                   :header-cell-style="{ background: '#F7F7F9 ', fontWeight: '700', color: '#333333' }"
@@ -5311,7 +5310,6 @@ else{
     },
     huanongInsuranceChange(index){
       this.HNInsuranceData=(this.huanongInsuranceData).find(val=>val.planCode==index).planSubInfo[0].riskInfo
-
       this.huanongaccidentalDrivingVo= Object.assign(
         this.accidentFormHN,
         this.huanongInsuranceData.find(val=>val.planCode==index)
@@ -5319,8 +5317,8 @@ else{
     },
     taipingInsuranceChange(index){
       this.TPInsuranceData=[(this.taipingInsuranceData).find(val=>val.rationType==index)]
-      if(this.TPInsuranceData.length){
-        this.TPDrivingChange(this.TPInsuranceData[0])
+      if(this.TPInsuranceData && this.TPInsuranceData.length){
+          this.taipingaccidentalDrivingVo=this.TPInsuranceData[0];
       }
     },
     zijinInsuranceChange(index){
@@ -5656,10 +5654,7 @@ else{
       })
     },
 
-    //太平驾意险选择
-      TPDrivingChange(row){
-      this.taipingaccidentalDrivingVo=row;
-    },
+   
     //恒邦驾意险选择
     HBDrivingChange(row){
       this.hengbangaccidentalDrivingVo=row;
@@ -5844,6 +5839,7 @@ else{
 
     },
     clearAccidentForm() {
+      this.accidentForm={}
       this.accidentForm.fen=1
       this.accidentForm.premium=0
     },
@@ -6658,6 +6654,7 @@ else{
         let data = this.accidentDataList.find(
           val => val.code == this.accidentForm.accidentType
         );
+
         accidentalDrivingVo = {
           rideRiskCode: data.code ? data.code : "",
           rideRiskName: data.name ? data.name : "",

+ 18 - 2
src/views/Letter/Orderlist.vue

@@ -664,7 +664,7 @@
             orderInfo.carinfo.purchasePrice
           }}</el-descriptions-item>
           <el-descriptions-item label="使用性质">
-            {{ orderInfo.carinfo.carnature == "8A" ? "家庭自用" : "" }}
+            {{orderInfo.carinfo.carnature  }}
           </el-descriptions-item>
           <el-descriptions-item label="注册日期">{{
             orderInfo.carinfo.registerDate
@@ -1516,9 +1516,11 @@ export default {
       querystatusLoaing: false,
       quotationhistorydialogVisible: false, //报价历史显示状态
       HistoryList: [], //报价历史数据
+      natureOfVehicleUseoptions:[],
     };
   },
   created() {
+    this.getDicType("natureOfVehicleUse");//车辆使用性质
     this.$api.letter.gainTopList().then((res) => {
       this.companyList = res.data;
     });
@@ -1551,6 +1553,7 @@ export default {
         return item.dictValue === ele;
       }).dictTag;
     },
+  
   },
   unmounted() {
     window.removeEventListener("resize", this.getDimensions);
@@ -1606,6 +1609,14 @@ export default {
         this.HistoryList = res.data;
       });
     },
+    getDicType(type) {
+      this.$api.insCompany.dicType(type).then(res => {
+        if (res.code == 200) {
+            this[type + 'options'] = res.data.ddList;
+        }
+      })
+
+    },
     capType(val) {
       if (val == "0") {
         return "success";
@@ -2075,6 +2086,11 @@ export default {
         }
       });
     },
+    natureOfVehicleUseCap(ele) {
+      return this.natureOfVehicleUseoptions.find((item) => {
+        return item.dictValue === ele;
+      }).dictTag;
+    },
     //应用详情
     OrderDetails(dy, item) {
       this.carImageList = [];
@@ -2087,7 +2103,6 @@ export default {
       this.pic2Control = false;
       this.pic3Control = false;
       this.pic4Control = false;
-
       this.pic5Control = false;
 
       for (let i = 0; i < this.global.insureList.length; i++) {
@@ -2101,6 +2116,7 @@ export default {
         if (res.code == 200) {
           this.licenseNo = res.data.licenseno; //车牌号
           this.inscompany = res.data.inscompany; //保险公司
+          res.data.carinfo.carnature= this.natureOfVehicleUseCap(res.data.carinfo.carnature)
           if (res.data.accidentInfo) {
             res.data.accidentInfo.constructor === Object
               ? [res.data.accidentInfo]