|
|
@@ -1618,513 +1618,516 @@ export default {
|
|
|
this.pic4Control = false;
|
|
|
this.pic5Control = false;
|
|
|
this.oldfileList = [];
|
|
|
- switch (res.data.inscompany) {
|
|
|
- case "永安财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.getPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- policytype: "jq"
|
|
|
- }).then((res) => {//交强保单
|
|
|
- if (res.data) {
|
|
|
- let result = res.data.replace(/[\r\n]/g, "");
|
|
|
- let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
- base64ToPath(pdfBase64).then((path) => {
|
|
|
- if(path){
|
|
|
+ if(res.data.orderstatus=='3'){
|
|
|
+ switch (res.data.inscompany) {
|
|
|
+ case "永安财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter.getPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policytype: "jq"
|
|
|
+ }).then((res) => {//交强保单
|
|
|
+ if (res.data) {
|
|
|
+ let result = res.data.replace(/[\r\n]/g, "");
|
|
|
+ let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
+ base64ToPath(pdfBase64).then((path) => {
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$api.letter.getPolicyPrint2({
|
|
|
+ companyId: item.id,
|
|
|
+ policytype: "jq"
|
|
|
+ }).then((res) => {//交强保单
|
|
|
+ if (res.data) {
|
|
|
+ let result = res.data.replace(/[\r\n]/g, "");
|
|
|
+ let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
+ base64ToPath(pdfBase64).then((path) => {
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.getPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policytype: "sy"
|
|
|
+ }).then((res) => {//商业保单
|
|
|
+ if (res.data) {
|
|
|
+ let result = res.data.replace(/[\r\n]/g, "");
|
|
|
+ let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
+ base64ToPath(pdfBase64).then((path) => {
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "华泰财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter.HuataigetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ if(res.data.jqxPolicyUrl){
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子保单",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- this.$api.letter.getPolicyPrint2({
|
|
|
- companyId: item.id,
|
|
|
- policytype: "jq"
|
|
|
- }).then((res) => {//交强保单
|
|
|
- if (res.data) {
|
|
|
- let result = res.data.replace(/[\r\n]/g, "");
|
|
|
- let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
- base64ToPath(pdfBase64).then((path) => {
|
|
|
- if(path){
|
|
|
+ if (res.data.jqxFlagUrl) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
+ fileurl: res.data.jqxFlagUrl,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.getPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- policytype: "sy"
|
|
|
- }).then((res) => {//商业保单
|
|
|
- if (res.data) {
|
|
|
- let result = res.data.replace(/[\r\n]/g, "");
|
|
|
- let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
- base64ToPath(pdfBase64).then((path) => {
|
|
|
- if(path){
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
}
|
|
|
-
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- break;
|
|
|
- case "华泰财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.HuataigetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- if(res.data.jqxPolicyUrl){
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.HuataigetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0510",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data && res.data.syxPolicyUrl) {
|
|
|
this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data.syxPolicyUrl,
|
|
|
});
|
|
|
}
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ 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: "交强电子标志",
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxFlagUrl,
|
|
|
+ fileurl: res.data[0],
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.HuataigetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data && res.data.syxPolicyUrl) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data.syxPolicyUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- 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]) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data[0],
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- case "永诚财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.yongchenggetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.code==200 && res.data) {
|
|
|
- if(res.data.jqUrl){
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqUrl,
|
|
|
- });
|
|
|
- }
|
|
|
- if (res.data.jqFlagUrl) {
|
|
|
+ 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.jqFlagUrl,
|
|
|
+ fileurl: res.data[0],
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.yongchenggetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data && res.data.syUrl) {
|
|
|
+ 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]) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "商业电子保单",
|
|
|
filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data.syUrl,
|
|
|
+ fileurl: res.data[0],
|
|
|
});
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
- this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "永诚财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
this.$api.letter.yongchenggetPolicyPrint({
|
|
|
companyId: item.id,
|
|
|
- policyNumber: ele.policyNumber,
|
|
|
- riskCode: "0513",
|
|
|
+ riskCode: "0507",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.code==200 && res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: ele.policyNumber,
|
|
|
- fileurl: res.data.jyUrl,
|
|
|
- });
|
|
|
+ if(res.data.jqUrl){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jqFlagUrl) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqFlagUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
else{
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- case "国任财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.guoRengetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- this.$api.letter.guoRengetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '1',//1:标志
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.yongchenggetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0510",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data && res.data.syUrl) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data.syUrl,
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.guoRengetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
+ else{
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
- this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
+ this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ this.$api.letter.yongchenggetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policyNumber: ele.policyNumber,
|
|
|
+ riskCode: "0513",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code==200 && res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: ele.policyNumber,
|
|
|
+ fileurl: res.data.jyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "国任财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
this.$api.letter.guoRengetPolicyPrint({
|
|
|
companyId: item.id,
|
|
|
- policyNumber: ele.policyNumber,
|
|
|
-
|
|
|
- riskCode: "0513",
|
|
|
+ riskCode: "0507",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: ele.policyNumber,
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
})
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- case "紫金财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.zijingetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- this.$api.letter.zijingetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '1',//1:标志
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.zijingetPolicyPrint({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
+ this.$api.letter.guoRengetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: '1',//1:标志
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
- this.orderInfo.crossInsurance.map(ele => {
|
|
|
- this.$api.letter.zijingetPolicyPrint({
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.guoRengetPolicyPrint({
|
|
|
companyId: item.id,
|
|
|
- policyNumber: ele.policyNumber,
|
|
|
- riskCode: "0513",
|
|
|
+ riskCode: "0510",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: ele.policyNumber,
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
})
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- case "恒邦财险":
|
|
|
- case "安盛天平":
|
|
|
- case "中国人寿":
|
|
|
- case "众安财险":
|
|
|
- if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.pythongetPolicyPrint({
|
|
|
- subOrderNo: item.id,
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- if (res.data.jqxPolicyUrl) {
|
|
|
+ }
|
|
|
+ if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
+ this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ this.$api.letter.guoRengetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policyNumber: ele.policyNumber,
|
|
|
+
|
|
|
+ riskCode: "0513",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: ele.policyNumber,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "紫金财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter.zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子保单",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxPolicyUrl,
|
|
|
+ fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
- if (res.data.jqxFlagUrl) {
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$api.letter.zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: '1',//1:标志
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqxFlagUrl,
|
|
|
+ fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
- if (res.data.syxPolicyUrl) {
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0510",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "商业电子保单",
|
|
|
filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data.syxPolicyUrl,
|
|
|
+ fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
- if (res.data.jyxInfoList && res.data.jyxInfoList.length>0) {
|
|
|
- res.data.jyxInfoList.forEach(val=>{
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
+ this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ this.$api.letter.zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policyNumber: ele.policyNumber,
|
|
|
+ riskCode: "0513",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: 'xxxxxxxxxxxxxxxxxxxxxx',
|
|
|
- fileurl: val.jyx_policy_url,
|
|
|
- });
|
|
|
- })
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: ele.policyNumber,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "恒邦财险":
|
|
|
+ case "安盛天平":
|
|
|
+ case "中国人寿":
|
|
|
+ case "众安财险":
|
|
|
+ if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.pythongetPolicyPrint({
|
|
|
+ subOrderNo: item.id,
|
|
|
+ }).then(res => {
|
|
|
+ if (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) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data.syxPolicyUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.data.jyxInfoList && res.data.jyxInfoList.length>0) {
|
|
|
+ res.data.jyxInfoList.forEach(val=>{
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: 'xxxxxxxxxxxxxxxxxxxxxx',
|
|
|
+ fileurl: val.jyx_policy_url,
|
|
|
+ });
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- case "大家财险":
|
|
|
- if (this.orderInfo.jqpolicyno) {
|
|
|
- this.$api.letter.obtainWarranty({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- this.$api.letter.obtainWarranty({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0507",
|
|
|
- type: '1',//1:标志
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- this.$api.letter.obtainWarranty({
|
|
|
- companyId: item.id,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2',//2:保单
|
|
|
- }).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
- this.orderInfo.crossInsurance.map(ele => {
|
|
|
- this.$api.letter.zijingetPolicyPrint({
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "大家财险":
|
|
|
+ if (this.orderInfo.jqpolicyno) {
|
|
|
+ this.$api.letter.obtainWarranty({
|
|
|
companyId: item.id,
|
|
|
- policyNumber: ele.policyNumber,
|
|
|
- riskCode: "0513",
|
|
|
+ riskCode: "0507",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
this.oldfileList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: ele.policyNumber,
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
fileurl: res.data,
|
|
|
});
|
|
|
}
|
|
|
else{
|
|
|
- this.$message.error(res.msg);
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$api.letter.obtainWarranty({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0507",
|
|
|
+ type: '1',//1:标志
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
}
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
})
|
|
|
- })
|
|
|
- }
|
|
|
- break;
|
|
|
- default:
|
|
|
+ }
|
|
|
+ if (this.orderInfo.sypolicyno) {
|
|
|
+ this.$api.letter.obtainWarranty({
|
|
|
+ companyId: item.id,
|
|
|
+ riskCode: "0510",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
+ this.orderInfo.crossInsurance.map(ele => {
|
|
|
+ this.$api.letter.zijingetPolicyPrint({
|
|
|
+ companyId: item.id,
|
|
|
+ policyNumber: ele.policyNumber,
|
|
|
+ riskCode: "0513",
|
|
|
+ type: '2',//2:保单
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "驾意险保单",
|
|
|
+ filename: ele.policyNumber,
|
|
|
+ fileurl: res.data,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.showInsureList = false;
|
|
|
this.quotedetailsdialogVisible = true; //在页面上显示订单
|
|
|
} else {
|