Kaynağa Gözat

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

lihongxiao 3 yıl önce
ebeveyn
işleme
9d31f7d23c
3 değiştirilmiş dosya ile 260 ekleme ve 187 silme
  1. 9 0
      src/http/moudules/letter.js
  2. 221 125
      src/views/Letter/Letter.vue
  3. 30 62
      src/views/Letter/Orderlist.vue

+ 9 - 0
src/http/moudules/letter.js

@@ -433,6 +433,15 @@ export const zijingetPolicyPrint = (data) => {
       data
   })
 }
+//紫金状态查询
+export const zijinqueryClauseData = (data) => {
+  return axios({
+      url: "/order/zijin/queryClauseData",
+      method: "post",
+      data
+  })
+}
+
 /***
     爬虫统一调用模块
  *

+ 221 - 125
src/views/Letter/Letter.vue

@@ -57,7 +57,6 @@
                 <el-option v-for="(item, index) in continuousCompanyList" :key="index" :label="item.namesimple"
                   :value="item.id"></el-option>
               </el-select>
-
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :span="8"
@@ -87,7 +86,7 @@
       <div class="flex j-c a-c" style="margin-bottom: 20px;">
         <div class="csstool">
           <span>是否已上牌照</span>
-          <el-switch  v-model="licenseplate" active-color="#ee7000"></el-switch>
+          <el-switch v-model="licenseplate" active-color="#ee7000"></el-switch>
         </div>
         <div class="csstool">
           <span>是否过户车</span>
@@ -98,9 +97,10 @@
         size="small " style="margin:15px 30px;">
         <el-row>
 
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :span="8" >
-            <el-form-item label="车牌:" :prop="licenseplate?'licenseNo':''">
-              <el-input v-model="carInfo.licenseNo" placeholder="请输入车牌号" class="widths" :disabled="!licenseplate" ></el-input>
+          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :span="8">
+            <el-form-item label="车牌:" :prop="licenseplate ? 'licenseNo' : ''">
+              <el-input v-model="carInfo.licenseNo" placeholder="请输入车牌号" class="widths"
+                :disabled="!licenseplate"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
@@ -562,7 +562,7 @@
                 </span>
                 <span v-if="reslistitem.quoteCode == '200'" style="color:#ee7000;font-weight:bold;">
                   {{
-                    reslistitem.result.accident ? '¥' + reslistitem.result.accident.sumPremium : '无' }}
+                    reslistitem.result.jyPremium ? '¥' + reslistitem.result.jyPremium : '无' }}
                 </span>
                 <span
                   v-show="(reslistitem.quoteCode != '200') && (reslistitem.quoteCode != '0') && (reslistitem.quoteCode != '1')">
@@ -572,7 +572,7 @@
               </div>
               <div style="width:15%;" class="flex j-start a-c">
                 <el-button v-show="reslistitem.quoteCode == '200'" type="text" style="color:#ee7000"
-                  @click="hbsubmit(reslistitem.result.companyId, reslistitem.apiType)">提核</el-button>
+                  @click="hbsubmitdialog(reslistitem)">下单</el-button>
                 <el-button v-show="reslistitem.quoteCode == '200'" type="text"
                   @click="qoutedetail(reslistitem.result.companyId)">查看详情</el-button>
                 <el-button v-show="reslistitem.quoteCode == '200'" type="text" style="color:rgb(240, 12, 10)"
@@ -600,7 +600,32 @@
                 光博分:{{ reslistitem.result.ilogPreUdwMess?reslistitem.result.ilogPreUdwMess:'无'  }}
                 </span>
             </div>
-            <template></template>
+            <template v-if="reslistitem.namesimple == '紫金财险' && reslistitem.checked && reslistitem.agreementId">
+              <div class="flex f-c Driving-risk accident-style">
+                <h3>意外险信息</h3>
+                <el-table size="small" :data="ziJinInsuranceData" border v-loading="accidentLoading"
+                  @select="CheckboxChange" ref="expandTable" highlight-current-row
+                  :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#ee7000' }">
+                  <el-table-column type="selection" width="55"></el-table-column>
+                  <el-table-column prop="projectName" label="方案名称" align="center"></el-table-column>
+                  <el-table-column prop="sumAmount" label="总保额 (元)/每份" align="center"></el-table-column>
+                  <el-table-column prop="sumPremium" label="保费 (元)/每份" align="center">
+                  </el-table-column>
+                  <el-table-column prop="quantity" label="份数" align="center">
+                    <template slot-scope="scope">
+                      <el-input-number v-model="scope.row.quantity" :min="1" :max="scope.row.maxQuantity" size="small"
+                        controls-position="right"></el-input-number>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="Totalprice" label="总保费 (元)" align="center">
+                    <template slot-scope="scope">
+                      <span v-if="scope.row.quantity">{{ scope.row.sumPremium * scope.row.quantity }}</span>
+                      <span v-else>{{ scope.row.sumPremium }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </div>
+            </template>
             <template v-if="reslistitem.namesimple == '永诚财险' && reslistitem.checked && reslistitem.agreementId">
               <div class="flex f-c Driving-risk accident-style">
                 <h3>意外险信息</h3>
@@ -627,7 +652,7 @@
                   <el-table-column prop="name" label="保险责任" align="center"></el-table-column>
                   <el-table-column prop="seatSum" label="每座保额 (元)/每份" align="center">
                     <template slot-scope="scope">
-                      <el-input v-model="scope.row.seatSum" placeholder="请输入内容" size="small "></el-input>
+                      <el-input v-model="scope.row.seatSum" placeholder="请输入内容" size="small"></el-input>
                     </template>
                   </el-table-column>
                   <el-table-column prop="carSum" label="每车保额 (元)/每份" align="center">
@@ -1040,7 +1065,7 @@
                   <span>保费</span>
                 </div>
               </div>
-              <div v-if="" class="Risk_data dis align jus" v-for="(kindinfoitem, kindinfoindex) in queryOrders.kindinfo"
+              <div class="Risk_data dis align jus" v-for="(kindinfoitem, kindinfoindex) in queryOrders.kindinfo"
                 :key="kindinfoindex">
                 <template>
                   <div>
@@ -1086,7 +1111,9 @@
         <div style="padding:0 20px">
           <div class="ORcode">
             <div style="padding:5px;position: relative;">
-              <div v-show="['永安财险', '人保财险', '永诚财险', '中煤财险', '众安财险','紫金财险'].includes(inscompany)" id="qrcode" ref="qrcode"></div>
+              <div v-show="['永安财险', '人保财险', '永诚财险', '中煤财险', '众安财险', '紫金财险'].includes(inscompany)" id="qrcode"
+                ref="qrcode">
+              </div>
               <img v-show="['恒邦财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
             </div>
           </div>
@@ -1456,6 +1483,21 @@
         <el-button size="small" type="primary" @click="renewalCodeconfirm">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="提交核保" :visible.sync="hbsubmitdialogVisible" width="1200px">
+      <div style="margin-bottom: 20px;font-weight: bold;">特约选择</div>
+      <el-table size="small" :data="zijinengageListData" border v-loading="accidentLoading" @select="zijinengageChange"
+        ref="expandTable" highlight-current-row
+        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#ee7000' }">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column prop="clauseCode" label="特约代码" align="center"></el-table-column>
+        <el-table-column prop="clauseName" label="特约名称" align="center"></el-table-column>
+        <el-table-column prop="clauseContent" label="特约内容"></el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="hbsubmitdialogVisible = false">取 消</el-button>
+        <el-button size="small" type="warning" @click="hbsubmit">提交核保</el-button>
+      </span>
+    </el-dialog>
     <el-image-viewer v-if="showViewer" :on-close="closeViewer" :z-index="2100" :url-list="[ProViewImg]" />
   </div>
 </template>
@@ -1490,11 +1532,17 @@ export default {
       }
     };
     return {
-      licenseplate:true,
+      // ------------紫金意外险
+      ziJinInsuranceData: [],
+      accidentalDrivingVo: [],
+      zijinengageListData: [],
+      zijinengageList: [],
+      // ------------紫金意外险
+      licenseplate: true,
       accidentForm: {
         fen: "1"
       }, //意外险内容
-      accidentDataList: [], //意外险类型下拉内容
+      accidentDataList: [], //永诚意外险
       accidenttableData: [],
       accidentLoading: false,
       accidentPremium: "",
@@ -1521,7 +1569,6 @@ export default {
       renewalCodeJqImg: "", //交强图片
       renewalCodeSyImg: "", //商业图片
       //-----------------
-
       showViewer: false,
       transferDateShow: false, //转移登记日期
       yonganchecked: false, //永安驾意险
@@ -1566,6 +1613,7 @@ export default {
       imageUploaddialogVisible: false, //影像上传     显示/隐藏
       underwritingdialogVisible: false, //核保信息   显示/隐藏
       renewalCodedialogVisible: false, //转保确认码输入
+      hbsubmitdialogVisible: false,//核保弹框
       Carinsurance: {
         jqinsurance: "1", //交强险
         syinsurance: "1" //商业险
@@ -2481,7 +2529,8 @@ export default {
       paycodeimg: "", //展示二维码
       ImageUrldialogVisible: false,
       paramsEdit: "",
-      companyId: "", // 子订单号
+      companyId: "",
+      apiType: "",
       insureMore: true,
       insureLength: 5,
       HistoryList: [], //历史记录数据
@@ -2491,8 +2540,7 @@ export default {
       sumseatCount: "", // 投保险种座位数
       deptName: "",
       isBottom: true,
-      logoImg: "",//保险公司logo图
-
+      logoImg: "",//报价单保险公司logo图
     };
   },
   watch: {
@@ -2501,7 +2549,6 @@ export default {
         if (val) {
           this.carInfo.licenseNo = val.toUpperCase();
         }
-
       },
       deep: true
     },
@@ -2637,6 +2684,7 @@ export default {
     },
   },
   methods: {
+
     open2() {
       this.$notify({
         title: '警告',
@@ -2674,6 +2722,7 @@ export default {
     },
     // 选择意外险类型
     async ywxxxchange(index) {
+      console.log(index)
       this.accidentForm = Object.assign(
         this.accidentForm,
         this.accidentDataList.find(val => val.id == index)
@@ -2771,36 +2820,62 @@ export default {
     Payment(id) {
       this.carcode(id);
     },
-    //选择协议
+    //选择协议  val:协议id  row:协议列表  index:下标  item:保险公司数据集合
     agreementChange(val, row, index, item) {
       let obj = {};
       obj = row.find(item => {
         return item;
       })
-      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 => {
-          if (res.code == 200) {
-            this.accidentDataList = res.data;
-          }
-        });
+      switch (item.namesimple) {
+        case '永诚财险':
+          this.accidentForm.agreementId = item.agreementId
+          this.$api.letter.ycgainAccidentList({ companyCode: item.id, agreementId: item.agreementId }).then(res => {
+            if (res.code == 200) {
+              this.accidentDataList = res.data;
+            }
+          });
+          break;
+        case '紫金财险':
+          this.$api.letter.zijinqueryVehicleProducts({ agreementId: val, seatCount: Number(this.carInfo.seatCount) }).then(res => {
+            if (res.code == 200) {
+              let data = res.data;
+              data.map(ele => {
+                ele.quantity = 1;
+                return ele;
+              })
+              this.ziJinInsuranceData = data;
+            }
+          });
+          break;
+        default:
+          break;
       }
     },
+    CheckboxChange(select, row) {
+      this.accidentalDrivingVo = [];
+      select.map(val => {
+        this.accidentalDrivingVo.push(val)
+        return val;
+      })
+    },
+    zijinengageChange(select, row) {
+      console.log()
+      this.zijinengageList = [];
+      select.map(val => {
+        this.zijinengageList.push({
+          clauseCode: val.clauseCode,
+          clauseName: val.clauseName,
+          clauses: val.clauseContent,
+          riskCode: val.riskCode,
+        })
+        return val;
+      })
+    },
     //勾选保险公司
     initchange(e, code, name, index) {
       this.totalCompanyList[index].agreementId = "";
       this.totalCompanyList[index].checked = e;
-      if (e) {
-        let params = {
-          companyCode: code,
-          seatNum: this.carInfo.seatCount,
-        };
-        this.$api.letter.getAccidentalDriving(params).then(res => {
-          this[name + "Drivinglist"] = res.data;
-        });
-      }
-
     },
     clearAccidentForm() {
       this.accidentForm = {
@@ -3152,7 +3227,6 @@ export default {
       };
       this.$api.letter.yonganquote(params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
-
         if (res.msg == "重复投保" && res.code == "501") {
           if (!!res.data.jqStartDate && !res.data.syStartDate) {
             this.jqstartDate = res.data.jqStartDate;
@@ -3259,17 +3333,17 @@ export default {
           let time =
             res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
           this.jqstartDate = time;
-          this.jqendDate = this.oneYearPast(time);
+          this.jqendDate = this.oneYearPast1(time);
           this.systartDate = time;
-          this.syendDate = this.oneYearPast(time);
+          this.syendDate = this.oneYearPast1(time);
           if (this.riskList.length > 0) {
             for (let i = 0; i < this.riskList.length; i++) {
               if (this.riskList[i].riskCode == "0507") {
                 this.riskList[i].startDate = time;
-                this.riskList[i].endDate = this.oneYearPast(time);
+                this.riskList[i].endDate = this.oneYearPast1(time);
               } else if (this.riskList[i].riskCode == "0510") {
                 this.riskList[i].startDate = time;
-                this.riskList[i].endDate = this.oneYearPast(time);
+                this.riskList[i].endDate = this.oneYearPast1(time);
               }
             }
           }
@@ -3301,7 +3375,7 @@ export default {
     //紫金报价
     zijin(num, id) {
       let params = {
-        accidentalDrivingVo: [],
+        accidentalDrivingVo: this.accidentalDrivingVo,
         orderNo: this.orderno,
         companyId: id,
         agreementId: this.totalCompanyList[num].agreementId,
@@ -3320,17 +3394,17 @@ export default {
           let time =
             res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
           this.jqstartDate = time;
-          this.jqendDate = this.oneYearPast(time);
+          this.jqendDate = this.oneYearPast1(time);
           this.systartDate = time;
-          this.syendDate = this.oneYearPast(time);
+          this.syendDate = this.oneYearPast1(time);
           if (this.riskList.length > 0) {
             for (let i = 0; i < this.riskList.length; i++) {
               if (this.riskList[i].riskCode == "0507") {
                 this.riskList[i].startDate = time;
-                this.riskList[i].endDate = this.oneYearPast(time);
+                this.riskList[i].endDate = this.oneYearPast1(time);
               } else if (this.riskList[i].riskCode == "0510") {
                 this.riskList[i].startDate = time;
-                this.riskList[i].endDate = this.oneYearPast(time);
+                this.riskList[i].endDate = this.oneYearPast1(time);
               }
             }
           }
@@ -3395,19 +3469,18 @@ export default {
         ) {
           let time =
             res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
-          let Aortime = this.transformTime2(time); //终保日期的后一天
-          this.jqstartDate = Aortime;
-          this.jqendDate = this.oneYearPast(Aortime);
-          this.systartDate = Aortime;
-          this.syendDate = this.oneYearPast(Aortime);
+          this.jqstartDate = time;
+          this.jqendDate = this.oneYearPast1(time);
+          this.systartDate = time;
+          this.syendDate = this.oneYearPast1(time);
           if (this.riskList.length > 0) {
             for (let i = 0; i < this.riskList.length; i++) {
               if (this.riskList[i].riskCode == "0507") {
-                this.riskList[i].startDate = Aortime;
-                this.riskList[i].endDate = this.oneYearPast(Aortime);
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
               } else if (this.riskList[i].riskCode == "0510") {
-                this.riskList[i].startDate = Aortime;
-                this.riskList[i].endDate = this.oneYearPast(Aortime);
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
               }
             }
           }
@@ -3485,19 +3558,18 @@ export default {
         ) {
           let time =
             res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
-          let Aortime = this.transformTime2(time); //终保日期的后一天
-          this.jqstartDate = Aortime;
-          this.jqendDate = this.oneYearPast(Aortime);
-          this.systartDate = Aortime;
-          this.syendDate = this.oneYearPast(Aortime);
+          this.jqstartDate = time;
+          this.jqendDate = this.oneYearPast1(time);
+          this.systartDate = time;
+          this.syendDate = this.oneYearPast1(time);
           if (this.riskList.length > 0) {
             for (let i = 0; i < this.riskList.length; i++) {
               if (this.riskList[i].riskCode == "0507") {
-                this.riskList[i].startDate = Aortime;
-                this.riskList[i].endDate = this.oneYearPast(Aortime);
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
               } else if (this.riskList[i].riskCode == "0510") {
-                this.riskList[i].startDate = Aortime;
-                this.riskList[i].endDate = this.oneYearPast(Aortime);
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
               }
             }
           }
@@ -3539,6 +3611,7 @@ export default {
         }
       });
     },
+
     // 爬虫对接
     quoteInsurance(num, id, apiType) {
       let api = apiType === 2 ? "pythonquote" : "anshengquote";
@@ -3547,7 +3620,6 @@ export default {
         companyId: id,
         agreementId: this.totalCompanyList[num].agreementId,
       };
-
       this.$api.letter[api](params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
 
@@ -3560,12 +3632,21 @@ export default {
           res.msg.indexOf(";终保日期") > -1
         ) {
           let time = res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
-          let Aortime = this.transformTime2(time);
-          this.jqstartDate = Aortime;
-          this.jqendDate = this.oneYearPast(Aortime);
-          this.systartDate = Aortime;
-          this.syendDate = this.oneYearPast(Aortime);
-          // ... 更新日期和列表
+          this.jqstartDate =time;
+          this.jqendDate = this.oneYearPast1(time);
+          this.systartDate = time;
+          this.syendDate = this.oneYearPast1(time);
+          if (this.riskList.length > 0) {
+            for (let i = 0; i < this.riskList.length; i++) {
+              if (this.riskList[i].riskCode == "0507") {
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
+              } else if (this.riskList[i].riskCode == "0510") {
+                this.riskList[i].startDate = time;
+                this.riskList[i].endDate = this.oneYearPast1(time);
+              }
+            }
+          }
           let param = {
             userId: this.userId,
             quoteno: this.quoteno,
@@ -3577,7 +3658,6 @@ export default {
             kindList: this.kindList,
             riskList: this.riskList
           };
-
           return this.$api.letter.generateOrder(param).then(res => {
             this.quoteInsurance(num, id, apiType);
           });
@@ -3689,12 +3769,26 @@ export default {
         });
 
     },
-    hbsubmit(companyId, apiType) {
-      this.companyId = companyId;
-      let params = {
-        companyId: companyId
-      };
-      this.$api.letter.getByCompanyId(params).then(async res => {
+    hbsubmitdialog(data) {
+      console.log(data)
+      this.companyId = data.result.companyId;
+      this.apiType = data.apiType;
+      this.hbsubmitdialogVisible = true;
+      switch (data.namesimple) {
+        case "紫金财险":
+          this.$api.letter.zijinqueryClauseData({ companyId: this.companyId }).then(res => {
+            this.zijinengageListData = res.data;
+          });
+          break;
+        default:
+
+          break;
+      }
+
+    },
+    hbsubmit() {
+      this.hbsubmitdialogVisible = false;
+      this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(async res => {
         if (res.code == 200) {
           var data = res.data;
           this.queryOrders = data;
@@ -3707,19 +3801,17 @@ export default {
           switch (this.queryOrders.inscompany) {
             case "永安财险":
               let api = "";
-              api = apiType == 2 ? "pythonsubmitImage" : "insyongansubmitImage"
+              api = this.apiType == 2 ? "pythonsubmitImage" : "insyongansubmitImage"
               await this.$api.letter[api]({
-                companyId: companyId
+                companyId: this.companyId
               })
                 .then(res => {
                   if (res.code == "200") {
                     var _this = this;
                     let api1 = "";
-                    api1 = apiType == 2 ? "pythonaudit" : "yonganaudit"
+                    api1 = this.apiType == 2 ? "pythonaudit" : "yonganaudit"
                     this.$api.letter[api1]({
-                      companyId: companyId,
-                      jqappoint: "",
-                      syappoint: ""
+                      companyId: this.companyId,
                     })
                       .then(res => {
                         var _this = this;
@@ -3729,10 +3821,7 @@ export default {
                             message: "核保成功",
                             type: "success"
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                             _this.underwritingdialogVisible = true;
                           });
@@ -3760,14 +3849,14 @@ export default {
             case "中煤财险":
               await this.$api.letter
                 .insZhongmeisubmitImage({
-                  companyId: companyId
+                  companyId: this.companyId
                 })
                 .then(res => {
                   if (res.code == "200") {
                     var _this = this;
                     _this.$api.letter
                       .Zhongmeiaudit({
-                        companyId: companyId,
+                        companyId: this.companyId,
                         jqappoint: "",
                         syappoint: ""
                       })
@@ -3778,10 +3867,7 @@ export default {
                             message: "核保成功",
                             type: "success"
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                             _this.underwritingdialogVisible = true;
                           });
@@ -3793,10 +3879,7 @@ export default {
                             type: "error",
                             duration: 0
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                           });
                         }
@@ -3814,16 +3897,15 @@ export default {
             case "紫金财险":
               await this.$api.letter
                 .zijinsubmitImage({
-                  companyId: companyId
+                  companyId: this.companyId
                 })
                 .then(res => {
                   if (res.code == "200") {
                     var _this = this;
                     _this.$api.letter
                       .zijinaudit({
-                        companyId: companyId,
-                        jqappoint: "",
-                        syappoint: ""
+                        companyId: this.companyId,
+                        engageList: this.zijinengageList,
                       })
                       .then(res => {
                         if (res.code == "200") {
@@ -3832,10 +3914,7 @@ export default {
                             message: "核保成功",
                             type: "success"
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                             _this.underwritingdialogVisible = true;
                           });
@@ -3847,10 +3926,7 @@ export default {
                             type: "error",
                             duration: 0
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                           });
                         }
@@ -3870,18 +3946,18 @@ export default {
             case "众安财险":
             case "中国人寿":
               let hengbangapi = "";
-              hengbangapi = apiType == 2 ? "pythonsubmitImage" : "anshengsubmitImage"
+              hengbangapi = this.apiType == 2 ? "pythonsubmitImage" : "anshengsubmitImage"
               await this.$api.letter[hengbangapi]({
-                subOrderNo: companyId
+                subOrderNo: this.companyId
               })
                 .then(res => {
                   if (res.code == "200") {
                     var _this = this;
                     let hengbangapi1 = "";
-                    hengbangapi1 = apiType == 2 ? "pythonaudit" : "anshengaudit"
+                    hengbangapi1 = this.apiType == 2 ? "pythonaudit" : "anshengaudit"
                     _this.$api.letter
                     [hengbangapi1]({
-                      subOrderNo: companyId,
+                      subOrderNo: this.companyId,
                     })
                       .then(res => {
                         if (res.code == "200") {
@@ -3890,10 +3966,7 @@ export default {
                             message: "核保成功",
                             type: "success"
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                             _this.underwritingdialogVisible = true;
                           });
@@ -3920,14 +3993,14 @@ export default {
             case "永诚财险":
               await this.$api.letter
                 .insyongchengsubmitImage({
-                  companyId: companyId
+                  companyId: this.companyId
                 })
                 .then(res => {
                   if (res.code == "200") {
                     var _this = this;
                     _this.$api.letter
                       .yongchengaudit({
-                        companyId: companyId
+                        companyId: this.companyId
                       })
                       .then(res => {
                         if (res.code == "200") {
@@ -3940,10 +4013,7 @@ export default {
                             message: "核保成功",
                             type: "success"
                           });
-                          let params = {
-                            companyId: companyId
-                          };
-                          _this.$api.letter.getByCompanyId(params).then(res => {
+                          _this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(res => {
                             _this.orderstatus = res.data.orderstatus; //订单状态
                             _this.underwritingdialogVisible = true;
                           });
@@ -4073,6 +4143,31 @@ export default {
         strYear + "-" + strMonth + "-" + strDay + " " + hh + ":00:00";
       return datastr;
     },
+    oneYearPast1(time) {
+      var date = new Date(time);
+      date.setFullYear(date.getFullYear() + 1); //一年后
+      date.setTime(date.getTime()); //一年后的前一天
+      var strYear = date.getFullYear();
+      var strDay = date.getDate();
+      var strMonth = date.getMonth() + 1;
+      var hh = date.getHours();
+      var minutes = date.getMinutes(); // 分
+      if (hh < 10) {
+        hh = "0" + hh;
+      }
+      if (minutes < 10) {
+        minutes = "0" + minutes;
+      }
+      if (strMonth < 10) {
+        strMonth = "0" + strMonth;
+      }
+      if (strDay < 10) {
+        strDay = "0" + strDay;
+      }
+      var datastr =
+        strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":00";
+      return datastr;
+    },
     tbczcarShowChange() {
       //投保人同车主
       switch (this.tbczcarShow) {
@@ -4741,7 +4836,8 @@ export default {
   color: #606266;
   font-size: 14px;
   margin: 0 20px;
-  span{
+
+  span {
     margin-right: 5px;
   }
 }

+ 30 - 62
src/views/Letter/Orderlist.vue

@@ -1165,29 +1165,31 @@ export default {
             this.$message({ message: res.msg, type: "error" })
           }
         })
+      } else {
+        this.$api.letter.pychonverifyPayment({ subOrderNo: item.id }).then(res => {
+          if (res.code == '200') {
+            this.$message({ message: "订单支付成功,正在更改状态", type: "success" })
+            this.loading = true;
+            this.$api.letter.queryOrders(this.pageRequest).then((res) => {
+              if (res.code == "200") {
+                this.loading = false;
+                this.pageResult = res.data.content;
+                this.pageNum = res.data.pageNum;
+                this.totalSize = res.data.totalSize;
+                this.pageResult.forEach(val => {
+                  this.$set(val, "expanded", false);
+                });
+              } else {
+                this.loading = false;
+              }
+            })
+          } else {
+            this.$message({ message: res.msg, type: "error" })
+
+          }
+        })
       }
-      this.$api.letter.pychonverifyPayment({ subOrderNo: item.id }).then(res => {
-        if (res.code == '200') {
-          this.$message({ message: "订单支付成功,正在更改状态", type: "success" })
-          this.loading = true;
-          this.$api.letter.queryOrders(this.pageRequest).then((res) => {
-            if (res.code == "200") {
-              this.loading = false;
-              this.pageResult = res.data.content;
-              this.pageNum = res.data.pageNum;
-              this.totalSize = res.data.totalSize;
-              this.pageResult.forEach(val => {
-                this.$set(val, "expanded", false);
-              });
-            } else {
-              this.loading = false;
-            }
-          })
-        } else {
-          this.$message({ message: res.msg, type: "error" })
 
-        }
-      })
     },
     //二维码
     carcode(row, item) {
@@ -1496,7 +1498,7 @@ export default {
                   }
                 })
               }
-              if(this.orderInfo.sypolicyno){
+              if (this.orderInfo.sypolicyno) {
                 this.$api.letter.zijingetPolicyPrint({
                   companyId: item.id,
                   riskCode: "0510",
@@ -1516,11 +1518,6 @@ export default {
             case "安盛天平":
             case "中国人寿":
             case "众安财险":
-              // this.$api.letter.pychonverifyPayment({
-              //   subOrderNo: item.id,
-              // }).then(res => {
-              //   console.log(res)
-              // })
               if (this.orderInfo.jqpolicyno) {
                 this.$api.letter.pythongetPolicyPrint({
                   subOrderNo: item.id,
@@ -1573,10 +1570,6 @@ export default {
           duration: 2000,
         });
       }
-      // if (!isLt2M) {
-      //   this.$message.error('上传图片大小不能超过 200KB!');
-      // }
-      // return isJPG && isLt2M;
       return isJPG;
     },
     handleClose(done) {
@@ -1614,37 +1607,12 @@ export default {
     },
     //预览文件
     viewfile(index) {
-      if (this.inscompany == '永安财险') {
-        fetch(index.fileurl).then(res => res.blob()).then(blob => { // 将链接地址字符内容转变成blob地址
-          const a = document.createElement('a')
-          a.href = URL.createObjectURL(blob)
-          a.target = '_ blank';
-          a.download = this.licenseNo + '-' + index.filename + '-' + index.fileTitle;  // 下载文件的名字
-          document.body.appendChild(a)
-          a.click()
-        })
-      } else if (this.inscompany == '中煤财险') {
-        const a = document.createElement('a')
-        a.href = index.fileurl
-        a.download = this.licenseNo + '-' + index.filename + '-' + index.fileTitle;  // 下载文件的名字
-        document.body.appendChild(a)
-        a.click()
-      } else if (this.inscompany == '永诚财险') {
-        const a = document.createElement('a')
-        a.href = index.fileurl
-        a.target = '_ blank';
-        a.download = this.licenseNo + '-' + index.filename + '-' + index.fileTitle;  // 下载文件的名字
-        document.body.appendChild(a)
-        a.click()
-      }
-      else if (this.inscompany == '恒邦财险') {
-        const a = document.createElement('a')
-        a.href = index.fileurl
-        a.target = '_ blank';
-        a.download = this.licenseNo + '-' + index.filename + '-' + index.fileTitle;  // 下载文件的名字
-        document.body.appendChild(a)
-        a.click()
-      }
+      const a = document.createElement('a')
+      a.href = index.fileurl
+      a.target = '_ blank';
+      a.download = this.licenseNo + '-' + index.filename + '-' + index.fileTitle;  // 下载文件的名字
+      document.body.appendChild(a)
+      a.click()
     },
     //锚链接
     jump(obj) {