Explorar el Código

Merge branch 'master' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc

lihongxiao hace 3 años
padre
commit
8161e134a5

+ 62 - 49
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -1126,8 +1126,7 @@
                     <h4>配置参数</h4>
                   </div>
                 </el-col>
-                <el-col  :span="10"
-                  v-for="(domain, index) in  attributionform.fields" :key="domain.index">
+                <el-col :span="10" v-for="(domain, index) in  attributionform.fields" :key="domain.index">
                   <el-form-item :label="domain.label + ':'" :prop="'fields.' + index + '.value'" :rules="{
                     required: true, message: domain.label + '不能为空', trigger: 'blur'
                   }">
@@ -1900,7 +1899,7 @@ export default {
         children: "children",
       },
       options: [], //保险公司下拉列表
-      activeTabs: "scheme",
+      activeTabs: "first",
       operType: "ADD", //'ADD','EDIT'
       dialogTitle: "新增协议",
       attributionformRules: {
@@ -1933,14 +1932,14 @@ export default {
         cooperationChannels: [
           { required: true, message: "请选择合作渠道", trigger: "blur" },
         ],
-        dockingPhone: [{ required: true, message: "请添加对接人", trigger: "blur" }],
+        dockingPerson: [{ required: true, message: "请添加对接人", trigger: "blur" }],
         withTax: [
           { required: true, message: "请选择含增值税结算", trigger: "blur" },
         ],
-        startdate: [
+        startDate: [
           { required: true, message: "请输入协议生效日期", trigger: "blur" },
         ],
-        enddate: [
+        endDate: [
           { required: true, message: "请输入协议失效日期", trigger: "blur" },
         ],
         matchType: [
@@ -1949,9 +1948,12 @@ export default {
         moneytype: [
           { required: true, message: "请选择佣金发放方式", trigger: "blur" },
         ],
-        moneytime: [
+        moneyTime: [
           { required: true, message: "请选择结算周期", trigger: "blur" },
         ],
+        validStatus: [
+          { required: true, message: "请选择", trigger: "blur" },
+        ],
       },
 
       //------------协议下拉框数据   begin-----------------
@@ -2144,7 +2146,7 @@ export default {
         if (res.code == '200') {
           console.log(res)
           let scheme = res.data.scheme;
-          this.agreement = res.data.agreement;
+          this.agreement = res.data.agreement;//协议信息
           this.costform.scheme = scheme;
           this.UnderwritingRules = res.data.underwritingRules;
           this.attributionform = res.data.ptlAgreementAttribution;
@@ -2155,6 +2157,7 @@ export default {
               return ele;
             })
           }
+          this.roductList1 = [];
           scheme.map(ele => {
             this.roductList1.push(ele.productId)
             return ele;
@@ -2244,13 +2247,17 @@ export default {
     VehicleFactor(lineindex, outindex, id) {
       if (this.operType == "EDIT") {
         let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
+
         item.map(ele => {
-          if (ele.factorType == '1') {
+          if (ele.factorType == '1' && ele.factor.length != 0) {
+            console.log(ele)
             this.productVehicleFactorForm = ele.factor[0];
             return ele;
           }
         })
         this.VehicleFactorVisible = true;
+        console.log(this.productVehicleFactorForm)
+
       } else {
         this.VehicleFactorlineindex = lineindex,
           this.VehicleFactoroutindex = outindex,
@@ -2275,7 +2282,7 @@ export default {
       if (this.operType == "EDIT") {
         let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
         item.map(ele => {
-          if (ele.factorType == '2') {
+          if (ele.factorType == '2' && ele.factor.length != 0) {
             console.log(ele)
             this.personFactorForm = ele.factor[0];
             return ele;
@@ -2307,7 +2314,7 @@ export default {
       if (this.operType == "EDIT") {
         let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
         item.map(ele => {
-          if (ele.factorType == '3') {
+          if (ele.factorType == '3' && ele.factor.length != 0) {
             this.insuranceFactorForm = ele.factor[0];
             return ele;
           }
@@ -2330,7 +2337,7 @@ export default {
       if (this.operType == "EDIT") {
         let item = this.costform.scheme[lineindex].productCosts[outindex].factor;
         item.map(ele => {
-          if (ele.factorType == '4') {
+          if (ele.factorType == '4' && ele.factor.length != 0) {
             this.otherFactorForm = ele.factor[0];
             return ele;
           }
@@ -2698,45 +2705,51 @@ export default {
       this.UnderwritingRules[1].rulesFactor[1].factor[0].OwnerId.parameter = OwnerId3;
       this.UnderwritingRules[1].rulesFactor[1].factor[0].ApplicantId.parameter = ApplicantId3;
       this.UnderwritingRules[1].rulesFactor[1].factor[0].InsureId.parameter = InsureId3;
-      if (this.operType == 'ADD') {
-        let params = {
-          agreement: this.agreement,
-          scheme: this.costform.scheme,
-          underwritingRules: this.UnderwritingRules,
-          attribution: this.attributionform,
-          dept: this.dept
-        }
-        console.log(params)
-        this.$api.insCompany.addagreement(params).then(res => {
-          if (res.code == '200') {
-            this.$message({
-              message: res.msg,
-              type: 'success'
-            });
-            this.agreementdialogVisible = false;
-            this.findPage();
+      this.$refs["addAgreementRef"].validate(valid => {
+        if (valid) {
+          if (this.operType == 'ADD') {
+
+            let params = {
+              agreement: this.agreement,
+              scheme: this.costform.scheme,
+              underwritingRules: this.UnderwritingRules,
+              attribution: this.attributionform,
+              dept: this.dept
+            }
+            console.log(params)
+            this.$api.insCompany.addagreement(params).then(res => {
+              if (res.code == '200') {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.agreementdialogVisible = false;
+                this.findPage();
+              }
+            })
+          } else {
+            let upparams = {
+              agreement: this.agreement,
+              scheme: this.costform.scheme,
+              underwritingRules: this.UnderwritingRules,
+              attribution: this.attributionform,
+              dept: this.dept
+            }
+            console.log(upparams)
+            this.$api.insCompany.updateagreement(this.agreementId, upparams).then(res => {
+              if (res.code == '200') {
+                this.$message({
+                  message: res.msg,
+                  type: 'success'
+                });
+                this.agreementdialogVisible = false;
+                this.findPage();
+              }
+            })
           }
-        })
-      } else {
-        let upparams = {
-          agreement: this.agreement,
-          scheme: this.costform.scheme,
-          underwritingRules: this.UnderwritingRules,
-          attribution: this.attributionform,
-          dept: this.dept
         }
-        console.log(upparams)
-        this.$api.insCompany.updateagreement(this.agreementId, upparams).then(res => {
-          if (res.code == '200') {
-            this.$message({
-              message: res.msg,
-              type: 'success'
-            });
-            this.agreementdialogVisible = false;
-            this.findPage();
-          }
-        })
-      }
+      })
+
     },
     //分页条数
     handleSizeChange(val) {

+ 164 - 265
src/views/Letter/Letter.vue

@@ -577,7 +577,7 @@
             <div v-if="reslistitem.checked" class="dis a-c Driving-risk" style="margin-top: 10px;">
               <h4>报价协议选择:</h4>
               <el-select size="small" v-model="reslistitem.agreementId" placeholder="请选择协议" :clearable="true"
-                @change="val => agreementChange(val, reslistitem.agreement, reslistindex,reslistitem)">
+                @change="val => agreementChange(val, reslistitem.agreement, reslistindex, reslistitem)">
                 <div v-for="(agreementitem, agreementindex ) in reslistitem.agreement" :key="agreementindex">
                   <div
                     v-if="agreementitem.licenseNo.length > 0 ? agreementitem.licenseNo.includes(carInfo.licenseNo.slice(0, 2)) : 'true'">
@@ -1284,7 +1284,7 @@
                   <div slot="file" slot-scope="{file}">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt />
                     <span class="el-upload-list__item-actions">
-                      <span class="el-upload-list__item-delete" @click="handleRemove1(file)">
+                      <span class="el-upload-list__item-delete" @click="handleRemove1(file, 'imageIdList1', 'imgList1')">
                         <i class="el-icon-delete"></i>
                       </span>
                     </span>
@@ -1308,7 +1308,7 @@
                   <div slot="file" slot-scope="{file}">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt />
                     <span class="el-upload-list__item-actions">
-                      <span class="el-upload-list__item-delete" @click="handleRemove2(file)">
+                      <span class="el-upload-list__item-delete" @click="handleRemove1(file, 'imageIdList2', 'imgList2')">
                         <i class="el-icon-delete"></i>
                       </span>
                     </span>
@@ -1334,7 +1334,7 @@
                   <div slot="file" slot-scope="{file}">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt />
                     <span class="el-upload-list__item-actions">
-                      <span class="el-upload-list__item-delete" @click="handleRemove3(file)">
+                      <span class="el-upload-list__item-delete" @click="handleRemove1(file, 'imageIdList3', 'imgList3')">
                         <i class="el-icon-delete"></i>
                       </span>
                     </span>
@@ -1358,7 +1358,7 @@
                   <div slot="file" slot-scope="{file}">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt />
                     <span class="el-upload-list__item-actions">
-                      <span class="el-upload-list__item-delete" @click="handleRemove4(file)">
+                      <span class="el-upload-list__item-delete" @click="handleRemove1(file, 'imageIdList4', 'imgList4')">
                         <i class="el-icon-delete"></i>
                       </span>
                     </span>
@@ -1383,7 +1383,7 @@
                 <div slot="file" slot-scope="{file}">
                   <img class="el-upload-list__item-thumbnail" :src="file.url" alt />
                   <span class="el-upload-list__item-actions">
-                    <span class="el-upload-list__item-delete" @click="handleRemove5(file)">
+                    <span class="el-upload-list__item-delete" @click="handleRemove1(file, 'imageIdList5', 'imgList5')">
                       <i class="el-icon-delete"></i>
                     </span>
                   </span>
@@ -2396,12 +2396,14 @@ export default {
       this.tbczcarShow = false;
       this.bbtbcarShow = false;
       this.bbczcarShow = false;
-      _this.carInfo = _this.paramsEdit.carinfo;
-      _this.ownerInfo = _this.paramsEdit.ownerinfo;
-      _this.policyHolderInfo = _this.paramsEdit.applyinfo;
-      _this.insuredPersonInfo = _this.paramsEdit.insureinfo;
-      _this.quoteno = _this.paramsEdit.quoteno;
-      _this.orderno = _this.paramsEdit.orderno;
+      const { carinfo, ownerinfo, applyinfo, insureinfo, quoteno, orderno } = _this.paramsEdit;
+      _this.carInfo = carinfo;
+      _this.ownerInfo = ownerinfo;
+      _this.policyHolderInfo = applyinfo;
+      _this.insuredPersonInfo = insureinfo;
+      _this.quoteno = quoteno;
+      _this.orderno = orderno;
+
       if (_this.paramsEdit.carinfo.transferFlag) {
         this.transferDateShow = true;
       }
@@ -2538,15 +2540,15 @@ export default {
       this.carcode(id);
     },
     //选择协议
-    agreementChange(val, row, index,item) {
+    agreementChange(val, row, index, item) {
       let obj = {};
       obj = row.find(item => {
         return item;
       })
-      this.accidentForm.agreementId =item.agreementId
+      this.accidentForm.agreementId = item.agreementId
       this.totalCompanyList[index].apiType = obj.apiType;
       if (item.agreementId) {
-        this.$api.letter.ycgainAccidentList({ companyCode: item.id,agreementId:item.agreementId }).then(res => {
+        this.$api.letter.ycgainAccidentList({ companyCode: item.id, agreementId: item.agreementId }).then(res => {
           if (res.code == 200) {
             this.accidentDataList = res.data;
           }
@@ -2554,7 +2556,7 @@ export default {
       }
     },
     initchange(e, code, name, index) {
-      this.totalCompanyList[index].agreementId="";
+      this.totalCompanyList[index].agreementId = "";
       this.totalCompanyList[index].checked = e;
       if (e) {
         let params = {
@@ -2565,7 +2567,7 @@ export default {
           this[name + "Drivinglist"] = res.data;
         });
       }
-    
+
     },
     clearAccidentForm() {
       this.accidentForm = {
@@ -2854,61 +2856,53 @@ export default {
     },
     //订单生成前数据处理事件
     OrderStageProcessing() {
-      if (this.tbczcarShow) {
-        //投保人同车主
-        this.imageIdList3 = this.imageIdList2;
-      }
-      if (this.bbczcarShow) {
-        //被保人同车主
-        this.imageIdList4 = this.imageIdList2;
-      }
-      if (this.bbtbcarShow) {
-        //被保人同投保人
-        this.imageIdList4 = this.imageIdList3;
-      }
+      this.imageIdList3 = this.tbczcarShow ? this.imageIdList2 : this.imageIdList3;//投保人同车主
+      this.imageIdList4 = this.bbczcarShow ? this.imageIdList2 : this.imageIdList4;//被保人同车主
+      this.imageIdList4 = this.bbtbcarShow ? this.imageIdList3 : this.imageIdList4; //被保人同投保人
       //上传图片
-      this.$api.letter
-        .uploadImages({
+      Promise.all([
+        this.$api.letter.uploadImages({
           imageIdList: this.imageIdList1,
           imageType: "C01",
           quoteNo: this.quoteno
-        })
-        .then(res => { });
-      this.$api.letter
-        .uploadImages({
+        }),
+        this.$api.letter.uploadImages({
           imageIdList: this.imageIdList2,
           imageType: "C02",
           quoteNo: this.quoteno
-        })
-        .then(res => { });
-      this.$api.letter
-        .uploadImages({
+        }),
+        this.$api.letter.uploadImages({
           imageIdList: this.imageIdList3,
           imageType: "C03",
           quoteNo: this.quoteno
-        })
-        .then(res => { });
-      this.$api.letter
-        .uploadImages({
+        }),
+        this.$api.letter.uploadImages({
           imageIdList: this.imageIdList4,
           imageType: "C04",
           quoteNo: this.quoteno
         })
-        .then(res => {
-          this.imageEcho(this.quoteno); //获取图片
+      ])
+        .then(responses => {
+          this.imageEcho(this.quoteno); // 获取图片
         });
+      // 上传图片
+      //日期长度<10处理
+      const formatDate = (date) => {
+        if (date.length < 10) {
+          return this.timeformat(date);
+        }
+        return date;
+      };
       if (this.carInfo.registerDate.length < 10) {
-        this.carInfo.registerDate = this.timeformat(this.carInfo.registerDate);
+        this.carInfo.registerDate = formatDate(this.carInfo.registerDate);
       }
       if (this.carInfo.issueDate.length < 10) {
-        this.carInfo.issueDate = this.timeformat(this.carInfo.issueDate);
+        this.carInfo.issueDate = formatDate(this.carInfo.issueDate);
       }
-      if (
-        this.carInfo.transferDate.length < 10 &&
-        this.carInfo.transferDate != ""
-      ) {
-        this.carInfo.transferDate = this.timeformat(this.carInfo.transferDate);
+      if (this.carInfo.transferDate.length < 10 && this.carInfo.transferDate !== "") {
+        this.carInfo.transferDate = formatDate(this.carInfo.transferDate);
       }
+      //日期长度<10处理
       //提交身份证/驾驶证  ——————————————————
       let param = {
         userId: this.userId,
@@ -2951,14 +2945,7 @@ export default {
           if (!!res.data.jqStartDate && !res.data.syStartDate) {
             this.jqstartDate = res.data.jqStartDate;
             this.jqendDate = res.data.jqEndDate;
-            if (this.riskList.length > 0) {
-              for (let i = 0; i < this.riskList.length; i++) {
-                if (this.riskList[i].riskCode == "0507") {
-                  this.riskList[i].startDate = res.data.jqStartDate;
-                  this.riskList[i].endDate = res.data.jqEndDate;
-                }
-              }
-            }
+            this.updateRiskDates("0507", res.data.jqStartDate, res.data.jqEndDate);
             let param = {
               userId: this.userId,
               quoteno: this.quoteno,
@@ -2976,14 +2963,7 @@ export default {
           } else if (!!res.data.syStartDate && !res.data.jqStartDate) {
             this.systartDate = res.data.syStartDate;
             this.syendDate = res.data.syEndDate;
-            if (this.riskList.length > 0) {
-              for (let i = 0; i < this.riskList.length; i++) {
-                if (this.riskList[i].riskCode == "0510") {
-                  this.riskList[i].startDate = res.data.syStartDate;
-                  this.riskList[i].endDate = res.data.syEndDate;
-                }
-              }
-            }
+            this.updateRiskDates("0510", res.data.syStartDate, res.data.syEndDate);
             let param = {
               userId: this.userId,
               quoteno: this.quoteno,
@@ -3003,17 +2983,8 @@ export default {
             this.jqendDate = res.data.jqEndDate;
             this.systartDate = res.data.syStartDate;
             this.syendDate = res.data.syEndDate;
-            if (this.riskList.length > 0) {
-              for (let i = 0; i < this.riskList.length; i++) {
-                if (this.riskList[i].riskCode == "0507") {
-                  this.riskList[i].startDate = res.data.jqStartDate;
-                  this.riskList[i].endDate = res.data.jqEndDate;
-                } else if (this.riskList[i].riskCode == "0510") {
-                  this.riskList[i].startDate = res.data.syStartDate;
-                  this.riskList[i].endDate = res.data.syEndDate;
-                }
-              }
-            }
+            this.updateRiskDates("0507", res.data.jqStartDate, res.data.jqEndDate);
+            this.updateRiskDates("0510", res.data.syStartDate, res.data.syEndDate);
             let param = {
               userId: this.userId,
               quoteno: this.quoteno,
@@ -3046,6 +3017,14 @@ export default {
         }
       });
     },
+    updateRiskDates(riskCode, startDate, endDate) {
+      for (let i = 0; i < this.riskList.length; i++) {
+        if (this.riskList[i].riskCode == riskCode) {
+          this.riskList[i].startDate = startDate;
+          this.riskList[i].endDate = endDate;
+        }
+      }
+    },
     //人保报价
     renbao(num) {
       let params = {
@@ -3250,7 +3229,7 @@ export default {
         cqryCdeSy: this.cqryCdeSy,
         renewalCodeJq: this.renewalCodeJq,
         renewalCodeSy: this.renewalCodeSy,
-        agreementId:this.accidentForm.agreementId
+        agreementId: this.accidentForm.agreementId
       };
       this.$api.letter.yongchengquote(params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
@@ -3413,46 +3392,50 @@ export default {
     },
     imageEcho(quotenos) {
       //影像查询
-      this.$api.letter.findByQuoteNo(quotenos).then(res => {
-        if (res.code == "200") {
-          this.imageIdList1 = [];
-          this.imageIdList2 = [];
-          this.imageIdList3 = [];
-          this.imageIdList4 = [];
-          this.imageIdList5 = [];
-          for (let keys in res.data) {
-            res.data[keys].map(ele => {
-              ele.url = process.env.BASE_URL + ele.url;
-              switch (keys) {
-                case "C01":
-                  this.imageIdList1.push(ele.imageId);
-                  break;
-                case "C02":
-                  this.imageIdList2.push(ele.imageId);
-                  break;
-                case "C03":
-                  this.imageIdList3.push(ele.imageId);
-                  break;
-                case "C04":
-                  this.imageIdList4.push(ele.imageId);
-                  break;
-                case "C05":
-                  this.imageIdList5.push(ele.imageId);
-                  break;
-                default:
-              }
-
-              return ele;
+      this.$api.letter.findByQuoteNo(quotenos)
+        .then(res => {
+          if (res.code == "200") {
+            this.imageIdList1 = [];
+            this.imageIdList2 = [];
+            this.imageIdList3 = [];
+            this.imageIdList4 = [];
+            this.imageIdList5 = [];
+
+            Object.keys(res.data).forEach((keys) => {
+              res.data[keys].forEach((ele) => {
+                ele.url = process.env.BASE_URL + ele.url;
+
+                switch (keys) {
+                  case "C01":
+                    this.imageIdList1.push(ele.imageId);
+                    break;
+                  case "C02":
+                    this.imageIdList2.push(ele.imageId);
+                    break;
+                  case "C03":
+                    this.imageIdList3.push(ele.imageId);
+                    break;
+                  case "C04":
+                    this.imageIdList4.push(ele.imageId);
+                    break;
+                  case "C05":
+                    this.imageIdList5.push(ele.imageId);
+                    break;
+                  default:
+                }
+                return ele;
+              });
             });
+
+            this.imgList1 = res.data.C01;
+            this.imgList2 = res.data.C02;
+            this.imgList3 = res.data.C03;
+            this.imgList4 = res.data.C04;
+          } else {
+            this.$message({ message: res.msg, type: "info" });
           }
-          this.imgList1 = res.data.C01;
-          this.imgList2 = res.data.C02;
-          this.imgList3 = res.data.C03;
-          this.imgList4 = res.data.C04;
-        } else {
-          this.$message({ message: res.msg, type: "info" });
-        }
-      });
+        });
+
     },
     hbsubmit(companyId, apiType) {
       this.companyId = companyId;
@@ -4027,127 +4010,42 @@ export default {
       }
     },
     //影像上传
-    drivingupload1(file) {
+    drivingupload(file, imageIdList) {
       var file = file.raw;
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file);
       params.append("type", "image");
       this.$api.letter.uploadFile(params).then(res => {
         if (res.code == "200") {
-          this.imageIdList1.push(res.data.id);
+          imageIdList.push(res.data.id);
         }
       });
     },
+    drivingupload1(file) {
+      this.drivingupload(file, this.imageIdList1);
+    },
     drivingupload2(file) {
-      var file = file.raw;
-      const params = new FormData(); // 声明formData数据类型
-      params.append("multipartFile", file);
-      params.append("type", "image");
-      this.$api.letter.uploadFile(params).then(res => {
-        if (res.code == "200") {
-          this.imageIdList2.push(res.data.id);
-        }
-      });
+      this.drivingupload(file, this.imageIdList2);
     },
     drivingupload3(file) {
-      var file = file.raw;
-      const params = new FormData(); // 声明formData数据类型
-      params.append("multipartFile", file);
-      params.append("type", "image");
-      this.$api.letter.uploadFile(params).then(res => {
-        if (res.code == "200") {
-          this.imageIdList3.push(res.data.id);
-        }
-      });
+      this.drivingupload(file, this.imageIdList3);
     },
     drivingupload4(file) {
-      var file = file.raw;
-      const params = new FormData(); // 声明formData数据类型
-      params.append("multipartFile", file);
-      params.append("type", "image");
-      this.$api.letter.uploadFile(params).then(res => {
-        if (res.code == "200") {
-          this.imageIdList4.push(res.data.id);
-        }
-      });
+      this.drivingupload(file, this.imageIdList4);
     },
     drivingupload5(file) {
-      var file = file.raw;
-      const params = new FormData(); // 声明formData数据类型
-      params.append("multipartFile", file);
-      params.append("type", "image");
-      this.$api.letter.uploadFile(params).then(res => {
-        if (res.code == "200") {
-          this.imageIdList5.push(res.data.id);
-        }
-      });
-    },
-    handleRemove1(file) {
-      this.imageIdList1.map((ele, index) => {
-        if (file.imageId === ele) {
-          this.imageIdList1.splice(index, 1);
-        }
-        return ele;
-      });
-      this.imgList1.map((ele, index) => {
-        if (file.imageId === ele.imageId) {
-          this.imgList1.splice(index, 1);
-        }
-        return ele;
-      });
-    },
-    handleRemove2(file) {
-      this.imageIdList2.map((ele, index) => {
-        if (file.imageId === ele) {
-          this.imageIdList2.splice(index, 1);
-        }
-        return ele;
-      });
-      this.imgList2.map((ele, index) => {
-        if (file.imageId === ele.imageId) {
-          this.imgList2.splice(index, 1);
-        }
-        return ele;
-      });
+      this.drivingupload(file, this.imageIdList5);
     },
-    handleRemove3(file) {
-      this.imageIdList3.map((ele, index) => {
+    handleRemove1(file, imageIdList, imgList) {
+      imageIdList.map((ele, index) => {
         if (file.imageId === ele) {
-          this.imageIdList3.splice(index, 1);
+          imageIdList.splice(index, 1);
         }
         return ele;
       });
-      this.imgList3.map((ele, index) => {
+      imgList.map((ele, index) => {
         if (file.imageId === ele.imageId) {
-          this.imgList3.splice(index, 1);
-        }
-        return ele;
-      });
-    },
-    handleRemove4(file) {
-      this.imageIdList4.map((ele, index) => {
-        if (file.imageId === ele) {
-          this.imageIdList4.splice(index, 1);
-        }
-        return ele;
-      });
-      this.imgList4.map((ele, index) => {
-        if (file.imageId === ele.imageId) {
-          this.imgList4.splice(index, 1);
-        }
-        return ele;
-      });
-    },
-    handleRemove5(file) {
-      this.imageIdList5.map((ele, index) => {
-        if (file.imageId === ele) {
-          this.imageIdList5.splice(index, 1);
-        }
-        return ele;
-      });
-      this.imgList5.map((ele, index) => {
-        if (file.imageId === ele.imageId) {
-          this.imgList5.splice(index, 1);
+          imgList.splice(index, 1);
         }
         return ele;
       });
@@ -4403,45 +4301,47 @@ export default {
       //  0:车辆  1:车主  2:投保人  3:被保人
       switch (index) {
         case 0:
-          this.carfrontImg = "";
-          this.carbackImg = "";
-          this.CarFrontFile = ""; // 行驶证正面base64
-          this.CarBackFile = ""; // 行驶证背面base64
-          for (let key in this.carform) {
-            this.carform[key] = "";
-          }
+          this.carfrontImg = '';
+          this.carbackImg = '';
+          this.CarFrontFile = ''; // 行驶证正面base64
+          this.CarBackFile = ''; // 行驶证背面base64
+          Object.keys(this.carform).forEach((key) => {
+            this.carform[key] = '';
+          });
           break;
         case 1:
-          this.userfrontImg = "";
-          this.userbackImg = "";
-          this.OwnerFrontFile = ""; //车主正面base64
-          this.OwnerBackFile = ""; //车主背面base64
-          for (let key in this.ownerInfoform) {
-            this.ownerInfoform[key] = "";
-          }
+          this.userfrontImg = '';
+          this.userbackImg = '';
+          this.OwnerFrontFile = ''; // 车主正面base64
+          this.OwnerBackFile = '';  // 车主背面base64
+          Object.keys(this.ownerInfoform).forEach((key) => {
+            this.ownerInfoform[key] = '';
+          });
           break;
 
         case 2:
-          this.userfrontImg = "";
-          this.userbackImg = "";
-          this.PolicyFrontFile = ""; //投保人正面base64
-          this.PolicyBackFile = ""; //投保人背面base64
-          for (let key in this.ownerInfoform) {
-            this.ownerInfoform[key] = "";
-          }
+          this.userfrontImg = '';
+          this.userbackImg = '';
+          this.PolicyFrontFile = ''; // 投保人正面base64
+          this.PolicyBackFile = '';  // 投保人背面base64
+          Object.keys(this.ownerInfoform).forEach((key) => {
+            this.ownerInfoform[key] = '';
+          });
           break;
 
         case 3:
-          this.userfrontImg = "";
-          this.userbackImg = "";
-          this.InsuredFrontFile = ""; //被保人正面base64
-          this.InsuredBackFile = ""; //被保人背面base64
-          for (let key in this.ownerInfoform) {
-            this.ownerInfoform[key] = "";
-          }
+          this.userfrontImg = '';
+          this.userbackImg = '';
+          this.InsuredFrontFile = ''; // 被保人正面base64
+          this.InsuredBackFile = '';  // 被保人背面base64
+          Object.keys(this.ownerInfoform).forEach((key) => {
+            this.ownerInfoform[key] = '';
+          });
           break;
+
         default:
       }
+
     },
     bjdpreview(companyId) {
       let params = {
@@ -4463,16 +4363,18 @@ export default {
       };
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
-          this.inscompany = res.data.inscompany; //保险公司
-          this.sumpremium = res.data.sumpremium; //总价
-          this.licenseNo = res.data.carinfo.licenseNo; //车牌号
-          this.applyName = res.data.insuredname; //车主
-          this.jqpremium = res.data.jqpremium; //交强
-          this.sypremium = res.data.sypremium; //商业
-          this.taxamount = res.data.taxamount; //车船税
-          this.jqstartdate = res.data.jqstartdate; //交强起保日期
-          this.systartdate = res.data.systartdate; //商业起保日期
-          this.mobile = res.data.applyinfo.mobile; //投保人手机号
+          const { inscompany, sumpremium, carinfo, insuredname, jqpremium, sypremium, taxamount, jqstartdate, systartdate, applyinfo } = res.data;
+          this.inscompany = inscompany; // 保险公司
+          this.sumpremium = sumpremium; // 总价
+          this.licenseNo = carinfo.licenseNo; // 车牌号
+          this.applyName = insuredname; // 车主
+          this.jqpremium = jqpremium; // 交强
+          this.sypremium = sypremium; // 商业
+          this.taxamount = taxamount; // 车船税
+          this.jqstartdate = jqstartdate; // 交强起保日期
+          this.systartdate = systartdate; // 商业起保日期
+          this.mobile = applyinfo.mobile; // 投保人手机号
+
           switch (this.inscompany) {
             case "永安财险":
               let url =
@@ -4521,15 +4423,11 @@ export default {
       this.syendDate = this.jqendDate;
     },
     add() {
-      this.carInfo = JSON.parse(JSON.stringify(this.defaultcarInfo));
-      this.ownerInfo = JSON.parse(JSON.stringify(this.defaultownerInfo));
-      this.policyHolderInfo = JSON.parse(
-        JSON.stringify(this.defaultpolicyHolderInfo)
-      );
-      this.insuredPersonInfo = JSON.parse(
-        JSON.stringify(this.defaultinsuredPersonInfo)
-      );
-      this.insureList = JSON.parse(JSON.stringify(this.defaultinsureList));
+      this.carInfo = { ...this.defaultcarInfo };
+      this.ownerInfo = { ...this.defaultownerInfo };
+      this.policyHolderInfo = { ...this.defaultpolicyHolderInfo };
+      this.insuredPersonInfo = { ...this.defaultinsuredPersonInfo };
+      this.insureList = [...this.defaultinsureList];
       this.sychecked = false;
       this.yonganchecked = false;
       this.zhongmeichecked = false;
@@ -4544,7 +4442,8 @@ export default {
       this.jqendDate = this.oneYearPast(this.jqstartDate);
       this.systartDate = this.transformTime1();
       this.syendDate = this.oneYearPast(this.jqstartDate);
-      this.commpanyList(); //获取保险公司
+      this.commpanyList(); // 获取保险公司
+
     },
     toChinesNum(num) {
       let changeNum = [

+ 18 - 3
src/views/Sys/Continuousconfiguration.vue

@@ -49,11 +49,22 @@
                             <el-input v-model="attributionform.namesimple" class="widths1" placeholder="填写公司简称"></el-input>
                         </el-form-item>
                     </el-col>
+                    <el-col :span="10">
+                        <el-form-item label="账号:">
+                            <el-input v-model="attributionform.username" class="widths1" placeholder="填写公司简称"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="10">
+                        <el-form-item label="密码:">
+                            <el-input v-model="attributionform.password"  class="widths1" placeholder="填写续保链接"></el-input>
+                        </el-form-item>
+                    </el-col>
                     <el-col :span="10">
                         <el-form-item label="续保请求url:">
-                            <el-input v-model="attributionform.url" style="width: 100%;" placeholder="填写续保链接"></el-input>
+                            <el-input v-model="attributionform.url" class="widths1" placeholder="填写续保链接"></el-input>
                         </el-form-item>
                     </el-col>
+
                     <el-col :span="10">
                         <el-form-item label="是否开启:">
                             <el-switch v-model="switchvalue" @change="isOpenchange" class="widths1"></el-switch>
@@ -135,6 +146,8 @@ export default {
                 isOpen: 0,//是/否开启
                 namesimple: "",//保险公司简称
                 url: "",//续保请求url
+                username:"",//用户名
+                password:"",//密码
             },
             pageRequest: {
                 "pageNum": 1,
@@ -181,6 +194,8 @@ export default {
                 isOpen: 0,//是/否开启
                 namesimple: "",//保险公司简称
                 url: "",//续保请求url
+                username:"",//用户名
+                password:"",//密码
             }
             this.id='';
             this.attributionform = params;
@@ -299,7 +314,7 @@ export default {
             })
 
         },
-        //编辑操作 
+        //编辑操作
         CloseEdit(index, row) {
             this.show = false,
                 this.attributionform = row;
@@ -340,4 +355,4 @@ export default {
     height: 400px;
     overflow-y: scroll;
 }
-</style>
+</style>