소스 검색

中煤爬虫,国任的特约

yaoyao 1 년 전
부모
커밋
c8d797522f
3개의 변경된 파일229개의 추가작업 그리고 93개의 파일을 삭제
  1. 9 9
      src/http/moudules/letter.js
  2. 41 17
      src/views/Task/daikeComponents/KtLetter1.vue
  3. 179 67
      src/views/Task/daikeComponents/KtOrder.vue

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

@@ -90,7 +90,7 @@ export const getRevokeQrCode = (data) => {
 //永安报价
 export const yonganquote = (data) => {
   return axios({
-    url: '/order/yongAn/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -98,7 +98,7 @@ export const yonganquote = (data) => {
 //人保报价
 export const renbaoquote = (data) => {
   return axios({
-    url: "/order/renBao/quote",
+    url: "/quote/quote",
     method: "post",
     data
   })
@@ -106,7 +106,7 @@ export const renbaoquote = (data) => {
 //中煤报价
 export const zhongmeiquote = (data) => {
   return axios({
-    url: '/order/zhongMeiApi/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -114,7 +114,7 @@ export const zhongmeiquote = (data) => {
 //华泰报价
 export const huataiquote = (data) => {
   return axios({
-    url: '/order/huaTaiApi/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -122,7 +122,7 @@ export const huataiquote = (data) => {
 //永诚报价
 export const yongchengquote = (data) => {
   return axios({
-    url: '/api/yongCheng/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -130,7 +130,7 @@ export const yongchengquote = (data) => {
 //安盛天平报价
 export const anshengquote = (data) => {
   return axios({
-    url: '/order/anSheng/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -138,7 +138,7 @@ export const anshengquote = (data) => {
 //恒邦报价
 export const hengbangquote = (data) => {
   return axios({
-    url: '/order/hengBang/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -146,7 +146,7 @@ export const hengbangquote = (data) => {
 //大家报价
 export const dajiaquote = (data) => {
   return axios({
-    url: '/api/dajia/quote',
+    url: '/quote/quote',
     method: 'post',
     data
   })
@@ -540,7 +540,7 @@ export const zijinquote = (data) => {
 //国任报价
 export const guorenquote = (data) => {
   return axios({
-    url: "/api/guoRen/quote",
+    url: "/quote/quote",
     method: "post",
     data
   })

+ 41 - 17
src/views/Task/daikeComponents/KtLetter1.vue

@@ -1069,11 +1069,13 @@
                         <div class="table-list-content" v-if="!reslistitem.programme.drivingList.length">暂无</div>
                       </div>
                     </div>
-                    <div class="card-table" v-show="reslistitem.checkedProgramme == 99 && reslistitem.cnName == 'guoRen'">
+                    <div class="card-table" v-show="reslistitem.cnName == 'guoRen'">
+                      <!-- reslistitem.checkedProgramme == 99 &&  -->
                       <div class="table-title">其他</div>
-                      <div class="table-list" v-if="reslistitem.programme.kinds">
+                      <div class="table-list">
+                        <!--  v-if="reslistitem.programme.kinds" -->
                         <div style="color: #FD9A25;" @click="contributingGuoRen(reslistitem.agreementId, reslistindex)">选择特约</div>
-                        <div class="table-list-title">
+                        <div class="table-list-title" v-show="reslistitem.programme && reslistitem.programme.teyue && reslistitem.programme.teyue.length">
                           <div class="flex-1">特约名称</div>
                         </div>
                         <div class="table-list-content" v-for="(teyueitem, teyueindex) in reslistitem.programme.teyue" :key="teyueindex">
@@ -1082,7 +1084,7 @@
                             {{ teyueitem.clauseName }}
                           </div>
                         </div>
-                        <div class="table-list-content" v-if="!reslistitem.programme.kinds.main.length">暂无</div>
+                        <!-- <div class="table-list-content" v-if="!reslistitem.programme.teyue.length">暂无</div> -->
                       </div>
                     </div>
                     <div class="card-table" v-show="reslistitem.cnName == 'zijin'">
@@ -2506,7 +2508,7 @@
         </div>
         <div class="ORcode">
           <div style="padding: 13px; position: relative">
-            <div v-if="['大家财险', '华泰财险'].includes(inscompany)">
+            <div v-if="['大家财险', '中煤财险', '华泰财险'].includes(inscompany)">
               <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
               <img v-else :src="paycodeimg" alt style="width: 100%" />
             </div>
@@ -2596,7 +2598,7 @@
           <div>商业险:{{ sypremium }}</div>
           <div>驾意险:{{ jypremium }}</div>
         </div>
-        <div v-if="['大家财险', '华泰财险'].includes(inscompany)">
+        <div v-if="['大家财险', '中煤财险', '华泰财险'].includes(inscompany)">
           <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
           <img v-else :src="paycodeimg" alt style="width: 100%" />
         </div>
@@ -9229,6 +9231,9 @@ export default {
     zhongmei(num, id) {
       let accidentalDrivingVo = {};
       let isTaxSource = this.totalCompanyList[num].isTaxSource;
+      let type = this.totalCompanyList[num].apiType;
+      let api = type == 2 ? "pythonquote" : "zhongmeiquote";
+
       // if (this.accidentFormZM.projectCode) {
       //   accidentalDrivingVo = {
       //     projectCode: this.accidentFormZM.projectCode,
@@ -9259,7 +9264,8 @@ export default {
         risks: this.riskList,
         productId: this.productId,
       };
-      this.$api.letter.pythonquote(params).then((res) => {
+      this.$api.letter.zhongmeiquote(params).then((res) => {
+      // this.$api.letter[api](params).then((res) => {
         this.totalCompanyList[num].msg = res.msg;
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
           this.totalCompanyList[num].quoteCode = "4";
@@ -10461,7 +10467,7 @@ export default {
         return;
       }
       this.companyId = data.result.companyId;
-      this.apiType = data.apiType;
+      this.apiType = data.result.apiType;
       this.hbsubmitdialogVisible = true;
       this.contributingState = false;
       if (data.namesimple == "紫金财险") {
@@ -10581,16 +10587,33 @@ export default {
 
                 break;
               case "中煤财险":
-                await this.$api.letter
-                  .insZhongmeisubmitImage({
-                    companyId: this.companyId,
-                  })
-                  .then((res) => {
+              let ZMApiImage = "";
+                ZMApiImage =
+                  this.apiType == 2
+                    ? "pythonsubmitImage"
+                    : "insZhongmeisubmitImage";
+                await this.$api.letter[ZMApiImage]({
+                  [this.apiType == 2 ? "subOrderNo" : "companyId"]:
+                    this.companyId,
+                }).then((res) => {
+
+                // await this.$api.letter
+                //   .insZhongmeisubmitImage({
+                //     companyId: this.companyId,
+                //   })
+                //   .then((res) => {
                     if (res.code == "200") {
                       var _this = this;
-                      _this.$api.letter
-                        .Zhongmeiaudit({
-                          companyId: this.companyId,
+
+                      let ZMApiaudit = "";
+                    ZMApiaudit =
+                    this.apiType == 2 ? "pythonaudit" : "Zhongmeiaudit";
+                    _this.$api.letter[ZMApiaudit]({
+                    
+                      // _this.$api.letter
+                      //   .Zhongmeiaudit({
+                          [this.apiType == 2 ? "subOrderNo" : "companyId"]: this.companyId,
+                          // companyId: this.companyId,
                           jqappoint: "",
                           syappoint: "",
                         })
@@ -10658,7 +10681,7 @@ export default {
                     var _this = this;
                     let HtApiaudit = "";
                     HtApiaudit =
-                      this.apiType == 2 ? "pythonaudit" : "huataiaudit";
+                    this.apiType == 2 ? "pythonaudit" : "huataiaudit";
                     let engageList = [];
                     this.zijinengageList.forEach((val) => {
                       engageList.push({
@@ -12307,6 +12330,7 @@ export default {
                     }
                     break;
                   case "大家财险":
+                  case "中煤财险":
                     switch (item.apiType) {
                       case 1:
                         this.creatQrCode(qrCodeUrl);

+ 179 - 67
src/views/Task/daikeComponents/KtOrder.vue

@@ -290,7 +290,7 @@
         </div>
         <div class="ORcode">
           <div style="padding: 13px; position: relative">
-            <div v-if="['大家财险', '华泰财险'].includes(inscompany)">
+            <div v-if="['大家财险', '中煤财险', '华泰财险'].includes(inscompany)">
               <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
               <img v-else :src="paycodeimg" alt style="width: 100%" />
             </div>
@@ -373,7 +373,7 @@
           <div>商业险:{{ sypremium }}</div>
           <div>驾意险:{{ jypremium }}</div>
         </div>
-        <div v-if="['大家财险', '华泰财险'].includes(inscompany)">
+        <div v-if="['大家财险', '中煤财险', '华泰财险'].includes(inscompany)">
           <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
           <img v-else :src="paycodeimg" alt style="width: 100%" />
         </div>
@@ -1457,7 +1457,6 @@ export default {
     refreshStatus(item) {
       let inscompany = {
         国任财险: "updateOrderInfoGuoren",
-        中煤财险: "orderStatuszhongmei",
         太平财险: "auditStatusQuery",
         泰康财险: "auditStatusQuery",
         华农财险: "auditStatusQuery",
@@ -1554,6 +1553,28 @@ export default {
           }
         });
       }
+      // 中煤财险: "orderStatuszhongmei",
+      if (item.inscompany == "中煤财险") {
+        let ZMApiType =
+          item.apiType == 2 ? "auditStatusQuery" : "orderStatuszhongmei";
+        this.$api.letter[ZMApiType]({ companyId: item.id }).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              message: res.msg ? res.msg : "已刷新状态",
+              type: "success",
+            });
+            this.findPage();
+          } else {
+            this.$message({
+              showClose: true,
+              dangerouslyUseHTMLString: true,
+              message: res.msg.replace(/\n/g, "<br><br>"),
+              type: "error",
+              duration: 7000,
+            });
+          }
+        });
+      }
     },
     //华泰刷新核保状态
     updateStatusHuatai(item) {
@@ -1584,7 +1605,6 @@ export default {
         国任财险: "updateOrderInfoGuoren",
         大家财险: "updateOrderInfoDajia",
         紫金财险: "getOrderDetail",
-        中煤财险: "paymentEnquiry",
         渤海财险: "getOrderDetailboHai",
         平安财险: "getDocumentStatusList",
       };
@@ -1668,6 +1688,30 @@ export default {
           }
         });
       }
+      
+      if (item.inscompany == "中煤财险") {
+        // 中煤财险: "paymentEnquiry",
+        let ZMApiType =
+          item.apiType == 2 ? "pychonverifyPayment" : "paymentEnquiry";
+
+        this.$api.letter[ZMApiType]({
+          [item.apiType == 2 ? "subOrderNo" : "companyId"]: item.id,
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$message({
+              message: res.msg ? res.msg : "已刷新状态",
+              type: "success",
+            });
+            this.quotationhistorydialogVisible ? this.RadioHistoryChange() : "";
+            this.findPage();
+            this.querystatusLoaing = false;
+          } else {
+            this.querystatusLoaing = false;
+            this.$message({ message: res.msg, type: "error" });
+          }
+        });
+      }
+
       if (
         item.inscompany == "诚泰财险" ||
         item.inscompany == "恒邦财险" ||
@@ -1769,6 +1813,19 @@ export default {
                       });
                       break;
                   }
+                } else if (item.inscompany == "中煤财险") {
+                  switch (item.apiType) {
+                    case 1:
+                      this.creatQrCode(qrCodeUrl);
+                      break;
+                    case 2:
+                      let anresult = qrCodeUrl.replace(/[\r\n]/g, "");
+                      let animgBase64 = `data:image/png;base64,${anresult}`;
+                      base64ToPath(animgBase64).then((path) => {
+                        this.paycodeimg = path;
+                      });
+                      break;
+                  }
                 } else {
                   this.creatQrCode(qrCodeUrl);
                 }
@@ -2273,74 +2330,55 @@ export default {
 
                   break;
                 case "中煤财险":
-                  if (this.orderInfo.jqpolicyno) {
-                    this.$api.letter
-                      .ZhongmeigetPolicyPrint({
-                        companyId: item.id,
-                        riskCode: "0507",
-                        type: "2", //2:保单
-                      })
-                      .then((res) => {
-                        if (res.data && res.data[0]) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子保单",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data[0],
-                          });
-                        } else {
-                          this.$message.error(res.msg);
-                        }
-                      });
-                    this.$api.letter
-                      .ZhongmeigetPolicyPrint({
-                        companyId: item.id,
-                        riskCode: "0507",
-                        type: "1", // 1:标志
-                      })
-                      .then((res) => {
-                        if (res.data && res.data[0]) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子标志",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data[0],
-                          });
-                        } else {
-                          this.$message.error(res.msg);
-                        }
-                      });
-                  }
-                  if (this.orderInfo.sypolicyno) {
-                    this.$api.letter
-                      .ZhongmeigetPolicyPrint({
-                        companyId: item.id,
-                        riskCode: "0510",
-                        type: "2", //2:保单
-                      })
-                      .then((res) => {
-                        if (res.data && res.data[0]) {
-                          businessList.push({
-                            fileTitle: "商业电子保单",
-                            filename: this.orderInfo.sypolicyno,
-                            fileurl: res.data[0],
-                          });
-                        } else {
-                          this.$message.error(res.msg);
-                        }
-                      });
-                  }
-                  if (this.orderInfo.crossInsurance.length > 0) {
-                    this.orderInfo.crossInsurance.map((ele) => {
+                  switch (item.apiType) {
+                    case 1:
+                    if (this.orderInfo.jqpolicyno) {
                       this.$api.letter
                         .ZhongmeigetPolicyPrint({
-                          ridePolicyNo: ele.ridePolicyNo,
                           companyId: item.id,
-                          riskCode: "0513",
+                          riskCode: "0507",
                           type: "2", //2:保单
                         })
                         .then((res) => {
-                          if (res.code == 200 && res.data) {
-                            accidentList.push({
-                              fileTitle: "驾意险保单",
+                          if (res.data && res.data[0]) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子保单",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: res.data[0],
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
+                      this.$api.letter
+                        .ZhongmeigetPolicyPrint({
+                          companyId: item.id,
+                          riskCode: "0507",
+                          type: "1", // 1:标志
+                        })
+                        .then((res) => {
+                          if (res.data && res.data[0]) {
+                            this.oldfileList.push({
+                              fileTitle: "交强电子标志",
+                              filename: this.orderInfo.jqpolicyno,
+                              fileurl: res.data[0],
+                            });
+                          } else {
+                            this.$message.error(res.msg);
+                          }
+                        });
+                    }
+                    if (this.orderInfo.sypolicyno) {
+                      this.$api.letter
+                        .ZhongmeigetPolicyPrint({
+                          companyId: item.id,
+                          riskCode: "0510",
+                          type: "2", //2:保单
+                        })
+                        .then((res) => {
+                          if (res.data && res.data[0]) {
+                            businessList.push({
+                              fileTitle: "商业电子保单",
                               filename: this.orderInfo.sypolicyno,
                               fileurl: res.data[0],
                             });
@@ -2348,8 +2386,82 @@ export default {
                             this.$message.error(res.msg);
                           }
                         });
-                    });
+                    }
+                    if (this.orderInfo.crossInsurance.length > 0) {
+                      this.orderInfo.crossInsurance.map((ele) => {
+                        this.$api.letter
+                          .ZhongmeigetPolicyPrint({
+                            ridePolicyNo: ele.ridePolicyNo,
+                            companyId: item.id,
+                            riskCode: "0513",
+                            type: "2", //2:保单
+                          })
+                          .then((res) => {
+                            if (res.code == 200 && res.data) {
+                              accidentList.push({
+                                fileTitle: "驾意险保单",
+                                filename: this.orderInfo.sypolicyno,
+                                fileurl: res.data[0],
+                              });
+                            } else {
+                              this.$message.error(res.msg);
+                            }
+                          });
+                      });
+                    }
+                    break;
+                    case 2:
+                      if (
+                        this.orderInfo.jqpolicyno ||
+                        this.orderInfo.sypolicyno
+                      ) {
+                        this.$api.letter
+                          .pythongetPolicyPrint({
+                            subOrderNo: item.id,
+                          })
+                          .then((res) => {
+                            if (res.code == 200 && res.data) {
+                              if (res.data.jqxPolicyUrl) {
+                                this.oldfileList.push({
+                                  fileTitle: "交强电子保单",
+                                  filename: this.orderInfo.jqpolicyno,
+                                  fileurl: res.data.jqxPolicyUrl,
+                                });
+                              }
+                              if (res.data.jqxFlagUrl) {
+                                this.oldfileList.push({
+                                  fileTitle: "交强电子标志",
+                                  filename: this.orderInfo.jqpolicyno,
+                                  fileurl: res.data.jqxFlagUrl,
+                                });
+                              }
+                              if (res.data.syxPolicyUrl) {
+                                businessList.push({
+                                  fileTitle: "商业电子保单",
+                                  filename: this.orderInfo.sypolicyno,
+                                  fileurl: res.data.syxPolicyUrl,
+                                });
+                              }
+                              if (
+                                res.data.jyxInfoList &&
+                                res.data.jyxInfoList.length > 0
+                              ) {
+                                res.data.jyxInfoList.forEach((val) => {
+                                  accidentList.push({
+                                    fileTitle: "驾意险保单",
+                                    filename: "驾意险保单",
+                                    fileurl: val.jyx_policy_url,
+                                  });
+                                });
+                              }
+                            } else {
+                              this.$message.error(res.msg);
+                            }
+                          });
+                      }
+                      break;
                   }
+
                   break;
                 case "永诚财险":
                   if (this.orderInfo.jqpolicyno) {