Przeglądaj źródła

新增阳光财险API接口

@dongkboy 1 rok temu
rodzic
commit
ae1468eeff

+ 130 - 76
src/http/moudules/letter.js

@@ -1337,94 +1337,94 @@ export const weComManageEdit = (data) => {
 
 // 获取险别
 export const getProductInfo = (data) => {
-   return axios({
+  return axios({
     url: '/plt/scheme/getProductInfo',
     method: 'get',
     data
-   })
-  }
-  
-  // 获取方案信息
-  export const getAllSchemeList = (data) => {
-   return axios({
+  })
+}
+
+// 获取方案信息
+export const getAllSchemeList = (data) => {
+  return axios({
     url: '/plt/scheme/getAllSchemeList',
     method: 'post',
     data
-   })
-  }
-  
-  // 获取驾意险详情
-  export const getDrivingSon = (params) => {
-   return axios({
+  })
+}
+
+// 获取驾意险详情
+export const getDrivingSon = (params) => {
+  return axios({
     url: '/plt/scheme/getDrivingSon',
     method: 'get',
     params
-   })
-  }
-  
-  
-  // 获取添加驾意险弹窗详情
-  export const getDriving = (params) => {
-   return axios({
+  })
+}
+
+
+// 获取添加驾意险弹窗详情
+export const getDriving = (params) => {
+  return axios({
     // url: '/plt/scheme/getDriving',
     url: '/plt/scheme/optionalSchemeDriving',
     method: 'get',
     params
-   })
-  }
-  
-  
-  // 过滤获取公司列表
-  export const ruleFilterCompany = (data) => {
-   return axios({
+  })
+}
+
+
+// 过滤获取公司列表
+export const ruleFilterCompany = (data) => {
+  return axios({
     url: '/plt/scheme/ruleFilterCompany',
     method: 'post',
     data
-   })
-  }
-  //商业险别列表
-  export const getBusinessInsurance = () => {
-   return axios({
+  })
+}
+//商业险别列表
+export const getBusinessInsurance = () => {
+  return axios({
     url: '/plt/scheme/getBusinessInsurance',
     method: 'post',
-   })
-  }
-  
-  // 获取驾意险详情
-  export const licenseSearch = (params) => {
-    return axios({
-     url: '/order/carModel/licenseSearch',
-     method: 'get',
-     params
-    })
-   }
-   // 获取统一的pdf路径
-   export const readPdfUrlList = (params) => {
-    return axios({
-     url: '/subOrder/readPdfUrlList?subOrderId=' + params,
-     method: 'get',
-    })
-   }
+  })
+}
+
+// 获取驾意险详情
+export const licenseSearch = (params) => {
+  return axios({
+    url: '/order/carModel/licenseSearch',
+    method: 'get',
+    params
+  })
+}
+// 获取统一的pdf路径
+export const readPdfUrlList = (params) => {
+  return axios({
+    url: '/subOrder/readPdfUrlList?subOrderId=' + params,
+    method: 'get',
+  })
+}
 
-  //  补传影像
-  export const allSubmitImage = (data) => {
-    return axios({
-     url: '/quote/submitImage',
-     method: 'post',
-     data
-    })
-   }
-   
-  // 获取交强出口费用  商业出口费用  非车出口费用  
-  export const externalOrderFee = (data) => {
-    return axios({
-     url: '/api/externalOrder/externalOrderFee',
-     method: 'post',
-     data
-    })
-   }
+//  补传影像
+export const allSubmitImage = (data) => {
+  return axios({
+    url: '/quote/submitImage',
+    method: 'post',
+    data
+  })
+}
 
-   //子订单轨迹查询
+// 获取交强出口费用  商业出口费用  非车出口费用
+export const externalOrderFee = (data) => {
+  return axios({
+    url: '/api/externalOrder/externalOrderFee',
+    method: 'post',
+    data
+  })
+}
+
+//子订单轨迹查询
 export const queryBySuborderDetails = (suborder) => {
   return axios({
     url: "/insurance/track/queryBySuborderDetails?suborder=" + suborder,
@@ -1432,11 +1432,65 @@ export const queryBySuborderDetails = (suborder) => {
   })
 }
 
-  // 新获取特约 
-  export const getClauseByCompanyId = (data) => {
-    return axios({
-     url: '/clause/getClauseByCompanyId',
-     method: 'post',
-     data
-    })
-   }
+// 新获取特约
+export const getClauseByCompanyId = (data) => {
+  return axios({
+    url: '/clause/getClauseByCompanyId',
+    method: 'post',
+    data
+  })
+}
+
+/**
+ * 阳光api接口
+ *
+ */
+//上传影像
+export const yangGuangImage = (data) => {
+  return axios({
+    url: '/order/yangGuangApi/upload',
+    method: 'post',
+    data
+  })
+}
+//报价
+export const yangGuangquote = (data) => {
+  return axios({
+    url: '/quote/quote',
+    method: 'post',
+    data
+  })
+}
+//提交核保
+export const yangGuangSubmit = (data) => {
+  return axios({
+    url: '/order/yangGuangApi/submit',
+    method: 'post',
+    data
+  })
+}
+//更新订单状态
+export const yangGuangproposalStatusQuery = (data) => {
+  return axios({
+    url: '/order/yangGuangApi/proposalStatusQuery',
+    method: 'post',
+    data
+  })
+}
+//查询缴费
+export const yangGuangpaymentCallback = (data) => {
+  return axios({
+    url: '/order/yangGuangApi/paymentCallback',
+    method: 'post',
+    data
+  })
+}
+//撤单
+export const yangGuangautoWriteOff = (data) => {
+  return axios({
+    url: '/order/yangGuangApi/autoWriteOff',
+    method: 'post',
+    data
+  })
+}
+

+ 5 - 2
src/views/PeopleManage/Agent/AgentManage.vue

@@ -569,6 +569,9 @@ export default {
             label: "编辑",
             perm: "sys:agent:edit",
             icon: "fa fa-edit",
+            hide: (row) => {
+              return row.status == "在职";
+            },
             click: (row, index) => {
               return this.handleTableEdit(row);
             },
@@ -1153,7 +1156,7 @@ export default {
     handlePictureCardPreview(img) {
       if(!img){
         this.$message.error('暂无照片')
-        return 
+        return
       }
       this.ProViewImg = img;
       this.showViewer = true;
@@ -1585,4 +1588,4 @@ export default {
     padding-bottom: 10px;
   }
 }
-</style>
+</style>

+ 157 - 1
src/views/Task/daikeComponents/KtLetter1.vue

@@ -7826,6 +7826,7 @@ export default {
         this.getCompanyProgramme(e, code, name, index)
         this.kindListFun();
         let ins = this.totalCompanyList[index].namesimple;
+        console.log(ins)
         this.totalCompanyList[index].underwritingDescription =
           this.totalCompanyList[index].agreement[0].underwritingDescription;
         if (this.$route.path != "/task/external/externalOrders")
@@ -9676,6 +9677,104 @@ export default {
         }
       });
     },
+    yangguang(num, id){
+      let accidentalDrivingVo = {};
+      let isTaxSource = this.totalCompanyList[num].isTaxSource;
+      accidentalDrivingVo = this.totalCompanyList[num].programme.drivingList[0] || {}
+      let params = {
+        accidentalDrivingVo,
+        orderNo: this.orderno,
+        companyId: id,
+        cqryCdeJq: this.cqryCdeJq,
+        cqryCdeSy: this.cqryCdeSy,
+        renewalCodeJq: this.renewalCodeJq,
+        renewalCodeSy: this.renewalCodeSy,
+        agreementId: this.totalCompanyList[num].agreementId,
+        isTaxSource: isTaxSource == 1 ? isTaxSource : null,
+        kinds: this.totalCompanyList[num].kindList,
+        risks: this.riskList
+      };
+      this.$api.letter.yangGuangquote(params).then((res) => {
+        this.totalCompanyList[num].msg = res.msg;
+        if (
+          res.data == null &&
+          res.msg.indexOf("车险平台返回") > -1 &&
+          res.msg.indexOf(";终保日期") > -1
+        ) {
+          let time =
+            res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
+          this.jqstartDate = time;
+          this.jqendDate = 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);
+              }
+            }
+          }
+          let param = {
+            userId: this.userId,
+            quoteno: this.quoteno,
+            orderNo: this.orderno,
+            carInfo: this.carInfo,
+            insuredPersonInfo: this.insuredPersonInfo,
+            ownerInfo: this.ownerInfo,
+            policyHolderInfo: this.policyHolderInfo,
+            kindList: this.totalCompanyList[num].kindList,
+            riskList: this.riskList,
+            vehicleAndVesselTax: this.vehicleAndVesselTaxForm,
+          };
+
+          return this.$api.letter[this.apiInterfaceName](param).then((res) => {
+            this.yangguang(num, id);
+          });
+        } else if (res.code == "200") {
+          if (res.data.warnMessageList && res.data.warnMessageList.length > 0) {
+            this.totalCompanyList[num].lastYearMsg = "";
+            let dat = res.data.warnMessageList;
+            dat.map((ele) => {
+              this.totalCompanyList[num].lastYearMsg += ele + "<br>";
+            });
+          }
+          this.totalCompanyList[num].quoteCode = 200;
+          this.totalCompanyList[num].result = res.data;
+          this.jqstartDate = res.data.startDateJq
+          this.jqendDate = res.data.endDateJq
+          this.systartDate = res.data.startDateSy
+          this.syendDate = res.data.endDateSy
+          this.QuotationHistory();
+        } else if (res.code == "101") {
+          this.totalCompanyList[num].quoteCode = "101";
+          this.totalCompanyList[num].msg = res.msg;
+          this.cqryCdeJq = res.data.cqryCdeJq;
+          this.cqryCdeSy = res.data.cqryCdeSy;
+          let jq = res.data.renewalCodeJq.replace(/[\r\n]/g, "");
+          let jqBase64 = `data:image/png;base64,${jq}`;
+          this.renewalCodeJqImg = jqBase64;
+          if (res.data.renewalCodeSy) {
+            let sy = res.data.renewalCodeSy.replace(/[\r\n]/g, "");
+            let syBase64 = `data:image/png;base64,${sy}`;
+            this.renewalCodeSyImg = syBase64;
+          }
+          this.renewalCodedialogVisible = true;
+        } else if (res.code == "500") {
+          // this.iscCrownerShow=res.msg.indexOf("车主地区自动解析失败")!=-1?true:false
+          // this.isInsuredShow=res.msg.indexOf("被保人地区自动解析失败")!=-1?true:false
+          // this.isApplicantShow=res.msg.indexOf("投保人地区自动解析失败")!=-1?true:false
+          // this.ownerInfo.provinceData= this.iscCrownerShow?[]: this.ownerInfo.provinceData
+          // this.insuredPersonInfo.provinceData= this.isInsuredShow?[]: this.insuredPersonInfo.provinceData
+          // this.policyHolderInfo.provinceData= this.isApplicantShow?[]: this.policyHolderInfo.provinceData
+          this.totalCompanyList[num].quoteCode = "3";
+          this.totalCompanyList[num].msg = res.msg;
+        } else {
+          this.totalCompanyList[num].quoteCode = "3";
+          this.totalCompanyList[num].msg = res.msg;
+          return;
+        }
+      });
+    },
     //永诚报价
     yongcheng(num, id) {
       this.iscCrownerShow = false;
@@ -10879,7 +10978,7 @@ export default {
                   }
                 });
                 break;
-              
+
               case "华泰财险":
                 let HtApiImage = "";
                 HtApiImage =
@@ -11134,6 +11233,63 @@ export default {
                     }
                   });
                 break;
+                case "阳光财险":
+                await this.$api.letter
+                  .yangGuangImage({
+                    companyId: this.companyId,
+                  })
+                  .then((res) => {
+                    if (res.code == "200") {
+                      var _this = this;
+                      _this.$api.letter
+                        .yangGuangSubmit({
+                          companyId: this.companyId,
+                        })
+                        .then((res) => {
+                          if (res.code == "200") {
+                            loading.close();
+                            _this.cqryCdeJq = "";
+                            _this.cqryCdeSy = "";
+                            _this.renewalCodeJq = "";
+                            _this.renewalCodeSy = "";
+                            this.$message({
+                              message: "核保成功",
+                              type: "success",
+                            });
+                        this.QuotationHistory();
+                            _this.$api.letter
+                              .getByCompanyId({ companyId: this.companyId })
+                              .then((res) => {
+                                _this.orderstatus = res.data.orderstatus; //订单状态
+                                _this.underwritingdialogVisible = true;
+                                let indexid = this.totalCompanyList.findIndex(
+                                  (item) =>
+                                    item.namesimple ==
+                                    this.queryOrders.inscompany
+                                );
+                                this.totalCompanyList[indexid].orderstatus =
+                                  res.data.orderstatus;
+                              });
+                          } else {
+                            loading.close();
+                            this.$message({
+                              showClose: true,
+                              message: res.msg,
+                              type: "error",
+                              duration: 0,
+                            });
+                          }
+                        });
+                    } else {
+                      loading.close();
+                      this.$message({
+                        message: res.msg,
+                        type: "error",
+                        duration: 7000,
+                      });
+                    }
+                  });
+                break;
               case "恒邦财险":
               case "华农财险":
               case "太平财险":

+ 9 - 4
src/views/Task/daikeComponents/KtOrder.vue

@@ -150,6 +150,7 @@
                   '泰康财险',
                   '华泰财险',
                   '太平洋财险',
+                  '阳光财险',
                 ].includes(item.inscompany)
                 " @click="refreshStatus(item)" class="red_color">更新订单</el-button>
               <el-button size="mini" type="text" v-if="item.orderstatus == '4' && item.inscompany == '华泰财险'"
@@ -183,6 +184,7 @@
                   '泰康财险',
                   '平安财险',
                   '太平洋财险',
+                  '阳光财险',
                 ].includes(item.inscompany)
                 " class="blue_color" @click="querystatus(item, index)">状态更新</el-button>
               <el-button v-if="item.orderstatus !== '2'" size="mini" type="text" class="blue_color"
@@ -491,6 +493,7 @@
                   '泰康财险',
                   '平安财险',
                   '太平洋财险',
+                  '阳光财险',
                 ].includes(scope.row.inscompany)
                 " @click="querystatus(scope.row, 'history')">状态更新</el-button>
             </template>
@@ -1467,6 +1470,7 @@ export default {
         安盛天平: "auditStatusQuery",
         紫金财险: "auditStatusQueryZijin",
         渤海财险: "orderStatusbohai",
+        阳光财险: "yangGuangproposalStatusQuery",
       };
       Object.keys(inscompany).forEach((val) => {
         if (val == item.inscompany) {
@@ -1553,7 +1557,7 @@ export default {
           }
         });
       }
-      
+
       // 诚泰财险: "auditStatusQuery",
       if (item.inscompany == "诚泰财险") {
         let ZMApiType =
@@ -1631,6 +1635,7 @@ export default {
         紫金财险: "getOrderDetail",
         渤海财险: "getOrderDetailboHai",
         平安财险: "getDocumentStatusList",
+        阳光财险: "yangGuangproposalStatusQuery",
       };
       Object.keys(inscompany).forEach((val) => {
         if (val == item.inscompany) {
@@ -1810,7 +1815,7 @@ export default {
           }
         });
       }
-      
+
     },
     //二维码
     carcode(item) {
@@ -3004,8 +3009,8 @@ export default {
                 this.$refs.detailsDialog.warrantyFun(res.data);
               } else{
                 this.$message.error(res.msg);
-              } 
-            }); 
+              }
+            });
           }
           console.log(this.orderInfo)
           this.showInsureList = false;