|
@@ -1499,61 +1499,29 @@
|
|
|
let res = await this.$http.post('/order/huaTaiApi/getPolicyPrint', {
|
|
|
companyId: this.companyId,
|
|
|
riskCode: "0507",
|
|
|
- type: '2', //2:保单
|
|
|
});
|
|
|
if (res.code == '200') {
|
|
|
+ this.policyList = [];
|
|
|
+ this.policyList1 = [];
|
|
|
this.policyList.push({
|
|
|
fileTitle: "交强电子保单",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data,
|
|
|
+ fileurl: res.data.jqxPolicyUrl,
|
|
|
})
|
|
|
- }
|
|
|
- let res1 = await this.$http.post('/order/huaTaiApi/getPolicyPrint', {
|
|
|
- companyId: this.companyId,
|
|
|
- riskCode: "0507",
|
|
|
- type: '1', //1:标志
|
|
|
- });
|
|
|
- if (res1.code == '200') {
|
|
|
this.policyList1.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res1.data,
|
|
|
+ fileurl: res.data.jqxFlagUrl,
|
|
|
})
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.orderInfo.sypolicyno) {
|
|
|
- let res = await this.$http.post('/order/huaTaiApi/getPolicyPrint', {
|
|
|
- companyId: this.companyId,
|
|
|
- riskCode: "0510",
|
|
|
- type: '2', //2:标志
|
|
|
- });
|
|
|
- if (res.code == '200') {
|
|
|
- this.policyList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data,
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.orderInfo.crossInsurance.length > 0) {
|
|
|
- this.orderInfo.crossInsurance.map(async ele => {
|
|
|
- let res = await this.$http.post(
|
|
|
- '/order/huaTaiApi/getPolicyPrint', {
|
|
|
- companyId: this.companyId,
|
|
|
- policyNumber: ele.policyNumber,
|
|
|
- riskCode: "0513",
|
|
|
- type: '2', //2:保单
|
|
|
- });
|
|
|
- if (res.code == '200') {
|
|
|
+ if (res.data.syxPolicyUrl) {
|
|
|
this.policyList.push({
|
|
|
- fileTitle: "驾意险保单",
|
|
|
- filename: ele.policyNumber,
|
|
|
- fileurl: res.data,
|
|
|
- })
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data.syxPolicyUrl,
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
async guoRengetPolicyPrint() {
|
|
|
this.policyList = [];
|
|
@@ -1623,9 +1591,9 @@
|
|
|
title: '文件下载中'
|
|
|
});
|
|
|
let index = file.lastIndexOf("\/")
|
|
|
- let name = file.substring(index + 1, file.length)
|
|
|
+ let licensename = file.substring(index + 1, file.length)
|
|
|
let dtask = plus.downloader.createDownload(file, {
|
|
|
- filename: "_downloads/" + name
|
|
|
+ filename: "_downloads/" + this.name + '-' + this.insuredPersonInfo.name + '-' + licensename
|
|
|
}, function(d, status) {
|
|
|
if (status == 200) {
|
|
|
uni.hideLoading()
|
|
@@ -1640,31 +1608,6 @@
|
|
|
})
|
|
|
|
|
|
dtask.start();
|
|
|
- // uni.downloadFile({
|
|
|
- // url: file,
|
|
|
- // success(val) {
|
|
|
- // uni.saveFile({
|
|
|
- // tempFilePath: val.tempFilePath, //临时路径
|
|
|
- // success: function(res) {
|
|
|
- // uni.hideLoading();
|
|
|
- // uni.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // mask: true,
|
|
|
- // title: '文件已保存到:' + res.savedFilePath +
|
|
|
- // ',正在打开文件', //保存路径
|
|
|
- // duration: 3000,
|
|
|
- // });
|
|
|
- // setTimeout(() => {
|
|
|
- // //打开文档查看
|
|
|
- // uni.openDocument({
|
|
|
- // filePath: res.savedFilePath,
|
|
|
- // success: function(res) {}
|
|
|
- // });
|
|
|
- // }, 1500)
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
//#endif
|
|
|
//#ifdef H5
|
|
|
var win = window.open();
|