|
|
@@ -3333,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);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -3394,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);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -3611,96 +3611,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- //国任报价
|
|
|
- guoRen(num, id) {
|
|
|
- let accidentalDrivingVo = {};
|
|
|
- if (this.accidentForm.id) {
|
|
|
- let data = this.accidentDataList.find(
|
|
|
- val => val.id == this.accidentForm.accidentType
|
|
|
- );
|
|
|
- accidentalDrivingVo = {
|
|
|
- rideRiskCode: data.code ? data.code : "",
|
|
|
- rideRiskName: data.name ? data.name : "",
|
|
|
- quantity: this.accidentForm.fen ? this.accidentForm.fen : ""
|
|
|
- };
|
|
|
- }
|
|
|
- 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,
|
|
|
- };
|
|
|
- this.$api.letter.guorenquote(params).then(res => {
|
|
|
- this.totalCompanyList[num].msg = res.msg;
|
|
|
- if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
|
|
|
- this.totalCompanyList[num].quoteCode = "4";
|
|
|
- this.totalCompanyList[num].msg = res.msg;
|
|
|
- return;
|
|
|
- } else if (
|
|
|
- res.data == null &&
|
|
|
- res.msg.indexOf("车险平台返回") > -1 &&
|
|
|
- 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);
|
|
|
- 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);
|
|
|
- } else if (this.riskList[i].riskCode == "0510") {
|
|
|
- this.riskList[i].startDate = Aortime;
|
|
|
- this.riskList[i].endDate = this.oneYearPast(Aortime);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- 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.kindList,
|
|
|
- riskList: this.riskList
|
|
|
- };
|
|
|
- return this.$api.letter.generateOrder(param).then(res => {
|
|
|
- this.guoRen(num, id);
|
|
|
- });
|
|
|
- } else if (res.code == "200") {
|
|
|
- this.totalCompanyList[num].quoteCode = 200;
|
|
|
- this.totalCompanyList[num].result = res.data;
|
|
|
- } 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 {
|
|
|
- this.totalCompanyList[num].quoteCode = "3";
|
|
|
- this.totalCompanyList[num].msg = res.msg;
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
// 爬虫对接
|
|
|
quoteInsurance(num, id, apiType) {
|
|
|
let api = apiType === 2 ? "pythonquote" : "anshengquote";
|
|
|
@@ -3721,20 +3632,18 @@ export default {
|
|
|
res.msg.indexOf(";终保日期") > -1
|
|
|
) {
|
|
|
let time = res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
|
|
|
- console.log(time)
|
|
|
- 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);
|
|
|
}
|
|
|
}
|
|
|
}
|