lihongxiao vor 2 Jahren
Ursprung
Commit
63dff17af1
1 geänderte Dateien mit 80 neuen und 103 gelöschten Zeilen
  1. 80 103
      src/views/Letter/Letter.vue

+ 80 - 103
src/views/Letter/Letter.vue

@@ -1413,6 +1413,54 @@
                 </el-table>
               </div>
             </template>
+            <template
+              v-if="reslistitem.namesimple == '华农财险' && reslistitem.checked && reslistitem.agreementId"
+            >
+              <div class="flex f-c Driving-risk">
+                <h3>意外险信息</h3>
+                  <el-form :inline="true" :model="accidentFormHN" class="demo-form-inline" size="small">
+                    <el-form-item label="意外险类型:" style="margin-right:30px;">
+                      <el-select
+                        clearable
+                        v-model="accidentFormHN.accidentType"
+                        placeholder="选择类型"
+                        @clear="clearAccidentFormHN"
+                        @change="huanongInsuranceChange"
+                      >
+                      <el-option
+                          v-for="(item, index) in huanongInsuranceData"
+                          :key="index"
+                          :label="item.planName"
+                          :value="item.planCode"
+                        ></el-option>
+                    </el-select>
+                    </el-form-item>
+                    <el-form-item label="份数:" style="margin-right:30px;">
+                      <el-input-number
+                        v-model="accidentFormHN.allQuantity"
+                        :min="1"
+                      ></el-input-number>
+                    <span style="margin-left: 5px;">份</span>
+                    </el-form-item>                 
+                  </el-form>
+                  <el-table
+                    v-if="accidentFormHN.accidentType"
+                    size="small"
+                    :data="HNInsuranceData"
+                    border
+                    ref="expandTable"
+                    highlight-current-row
+                    :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#ee7000' }"
+                  >
+                    <el-table-column prop="dutyName" label="保险责任" align="center"></el-table-column>
+                    <el-table-column prop="unitAmount" label="保额" align="center">
+                      <template slot-scope="scope">
+                        <el-input v-model="scope.row.unitAmount" placeholder="请输入内容" size="small" disabled></el-input>
+                      </template>
+                    </el-table-column>
+                </el-table>               
+              </div>
+            </template>
             <template
               v-if="reslistitem.namesimple == '太平财险' && reslistitem.checked && reslistitem.agreementId"
             >
@@ -3452,6 +3500,11 @@ export default {
       hengbangInsuranceData:[],//恒邦驾意险
       HBInsuranceData:[],
       hengbangaccidentalDrivingVo:{},//恒邦驾意险
+      insuranceHN:'',//华农
+      huanongInsuranceData:[],//华农驾意险
+      HNInsuranceData:[],
+      huanongaccidentalDrivingVo:{},//华农驾意险
+
       renshouaccidentalDrivingVo:{},//人寿意外险
       renshouInsuranceData: [],//-人寿意外险list
       ziJinInsuranceData: [],//-紫金意外险list
@@ -3477,6 +3530,9 @@ export default {
         fen: "1",
         premium:0
       }, //永诚意外险内容
+      accidentFormHN: {
+        allQuantity: "1",
+      }, //华农意外险内容
       accidentDataList: [], //永诚意外险
       guoRenaccidentDataList: [], //国任意外险
       guoRenaccidenttableData: [],
@@ -5167,9 +5223,16 @@ export default {
         this.HBDrivingChange(this.HBInsuranceData[0])
       }
     },
+    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)
+      );
+    },
     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])
       }
@@ -5283,6 +5346,7 @@ export default {
     numberCopieschange(index) {
       this.accidentForm.premium = Number(this.accidentPremium) * index;
     },
+  
     numberCopieschangeGr(index) {
       this.guoRenaccidentForm.premium = Number(this.accidentPremiumGr) * index;
     },
@@ -5430,6 +5494,7 @@ export default {
           case '恒邦财险':
           case '太平财险':
           case '安盛天平':
+          case '华农财险':
           case '众安财险':
           this.$api.letter.pythongetDriving({ agreementId: val}).then(res => {
             if (res.code == 200) {
@@ -5470,6 +5535,7 @@ export default {
     HBDrivingChange(row){
       this.hengbangaccidentalDrivingVo=row;
     },
+   
     //人寿驾意险选择
     RSDrivingChange(row){
       this.renshouaccidentalDrivingVo=row;
@@ -5619,6 +5685,7 @@ export default {
         case '中国人寿':
         case '恒邦财险':
         case '太平财险':
+        case '华农财险':
         case '众安财险':
           this.$api.letter.pythongetDriving({ agreementId: this.totalCompanyList[index].agreement[0].id}).then(res => {
             if (res.code == 200) {
@@ -5668,6 +5735,9 @@ export default {
       };
 
     },
+    clearAccidentFormHN(){
+      this.huanongaccidentalDrivingVo={};
+    },
     clearAccidentFormHB(){
       this.hengbangaccidentalDrivingVo={};
     },
@@ -6679,59 +6749,9 @@ export default {
         this.totalCompanyList[num].msg = res.msg;
         switch (namesimple) {
           case '安盛天平':
-            if (!!res.data) {
-              if (res.data.warnMessageList && res.data.warnMessageList.length > 0) {
-                this.totalCompanyList[num].lastYearMsg = "";
-                let dat = res.data.warnMessageList;
-                dat.map(ele => {
-                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
-                })
-              }
-              this.totalCompanyList[num].quoteCode = 200;
-              this.totalCompanyList[num].result = res.data;
-              this.QuotationHistory();
-            } else {
-              this.totalCompanyList[num].quoteCode = "3";
-              this.totalCompanyList[num].msg = res.msg;
-              return;
-            }
-            break;
           case '中国人寿':
-           if (!!res.data) {
-              if (res.data.warnMessageList && res.data.warnMessageList.length > 0) {
-                this.totalCompanyList[num].lastYearMsg = "";
-                let dat = res.data.warnMessageList;
-                dat.map(ele => {
-                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
-                })
-              }
-              this.totalCompanyList[num].quoteCode = 200;
-              this.totalCompanyList[num].result = res.data;
-              this.QuotationHistory();
-            } else {
-              this.totalCompanyList[num].quoteCode = "3";
-              this.totalCompanyList[num].msg = res.msg;
-              return;
-            }
-            break;
           case '恒邦财险':
-            if (!!res.data) {
-              if (res.data.warnMessageList && res.data.warnMessageList.length > 0) {
-                this.totalCompanyList[num].lastYearMsg = "";
-                let dat = res.data.warnMessageList;
-                dat.map(ele => {
-                  this.totalCompanyList[num].lastYearMsg += ele + '<br>';
-                })
-              }
-              this.totalCompanyList[num].quoteCode = 200;
-              this.totalCompanyList[num].result = res.data;
-              this.QuotationHistory();
-            } else {
-              this.totalCompanyList[num].quoteCode = "3";
-              this.totalCompanyList[num].msg = res.msg;
-              return;
-            }
-            break;
+          case '华农财险':
           case '太平财险':
             if (!!res.data) {
               if (res.data.warnMessageList && res.data.warnMessageList.length > 0) {
@@ -6807,6 +6827,10 @@ export default {
     //太平
     taiping(num, id, namesimple) {
       this.quoteInsurance(num, id, namesimple, this.totalCompanyList[num].apiType);
+    },
+     //华农
+     huanong(num, id, namesimple) {
+      this.quoteInsurance(num, id, namesimple, this.totalCompanyList[num].apiType);
     },
     // 爬虫对接
     qoutedetail(companyId) {
@@ -7138,57 +7162,6 @@ export default {
                   }
                 });
               break;
-            case "中煤财险":
-              await this.$api.letter
-                .insZhongmeisubmitImage({
-                  companyId: this.companyId
-                })
-                .then(res => {
-                  if (res.code == "200") {
-                    var _this = this;
-                    _this.$api.letter
-                      .Zhongmeiaudit({
-                        companyId: this.companyId,
-                        jqappoint: "",
-                        syappoint: ""
-                      })
-                      .then(res => {
-                        if (res.code == "200") {
-                          loading.close();
-                          _this.$message({
-                            message: "核保成功",
-                            type: "success"
-                          });
-                          this.QuotationHistory();
-                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
-                            _this.orderstatus = res.data.orderstatus; //订单状态
-                            _this.underwritingdialogVisible = true;
-                            let indexid = this.totalCompanyList.findIndex(item => item.namesimple == this.queryOrders.inscompany);
-                            this.totalCompanyList[indexid].orderstatus = res.data.orderstatus;
-                          });
-                        } else {
-                          loading.close();
-                          _this.$message({
-                            showClose: true,
-                            message: this.queryOrders.inscompany + "提核--:" + res.msg,
-                            type: "error",
-                            duration: 0
-                          });
-                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
-                            _this.orderstatus = res.data.orderstatus; //订单状态
-                          });
-                        }
-                      });
-                  } else {
-                    this.$message({
-                      message: this.queryOrders.inscompany + "影像--:" + res.msg,
-                      type: "error",
-                      duration: 7000
-                    });
-                    loading.close();
-                  }
-                });
-              break;
             case "华泰财险":
               await this.$api.letter
                 .insHuataisubmitImage({
@@ -7350,10 +7323,12 @@ export default {
                 });
               break;
             case "恒邦财险":
+            case "华农财险":
             case "太平财险":
             case "安盛天平":
             case "众安财险":
             case "中国人寿":
+            console.log(this.queryOrders.inscompany,11111111111)
               let hengbangapi = "";
               hengbangapi = this.apiType == 2 ? "pythonsubmitImage" : "anshengsubmitImage"
               await this.$api.letter[hengbangapi]({
@@ -8554,6 +8529,7 @@ export default {
       this.insuranceZJ=''
       this.insuranceZA=''
       this.insuranceHB=''
+      this.insuranceHN=''
       this.insuranceRS=''
       this.insuranceDJ=''
       this.accidentForm = {
@@ -8561,6 +8537,7 @@ export default {
         premium:0
       };
       this.hengbangaccidentalDrivingVo={};
+      this.huanongaccidentalDrivingVo={};
       this.taipingaccidentalDrivingVo={};
       this.zhongmeiaccidentalDrivingVo={};
       this.accidentalDrivingVo=[]