|
|
@@ -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 = [
|