|
|
@@ -1327,7 +1327,7 @@ import {
|
|
|
pathToBase64,
|
|
|
base64ToPath
|
|
|
} from '@/common/image-tools-base64.js';
|
|
|
-import rawCitiesData from '../../assets/js/citydata';
|
|
|
+import yongchengData from '../../assets/js/yongchengData';
|
|
|
import Cookies from "js-cookie";
|
|
|
import QRCode from "qrcodejs2";
|
|
|
export default {
|
|
|
@@ -1401,6 +1401,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ // let a= this.uniqueArr(yongchengData.data)
|
|
|
+
|
|
|
+ // console.log(a,11111111)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.$api.insCompany.dicType('insOrderStatus').then(res=>{
|
|
|
this.optionsStatus=res.data.ddList
|
|
|
})
|
|
|
@@ -1450,6 +1458,17 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ uniqueArr(arr) {
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ for (let j = i + 1; j < arr.length; j++) {
|
|
|
+ if (arr[i] == arr[j]) {
|
|
|
+ arr.splice(j, 1)
|
|
|
+ j--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ },
|
|
|
getRowClass(scope, rowIndex) {
|
|
|
if (scope.row.insAreaCompanyList.length == 0) { //判断当前行是否有子数据或者根据实际情况设置
|
|
|
return 'row-expand-cover'
|
|
|
@@ -1752,11 +1771,14 @@ export default {
|
|
|
let result = res.data.replace(/[\r\n]/g, "");
|
|
|
let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
base64ToPath(pdfBase64).then((path) => {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -1768,11 +1790,14 @@ export default {
|
|
|
let result = res.data.replace(/[\r\n]/g, "");
|
|
|
let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
base64ToPath(pdfBase64).then((path) => {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子标志",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子标志",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -1786,11 +1811,14 @@ export default {
|
|
|
let result = res.data.replace(/[\r\n]/g, "");
|
|
|
let pdfBase64 = `data:application/pdf;base64,${result}`;
|
|
|
base64ToPath(pdfBase64).then((path) => {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: path,
|
|
|
- });
|
|
|
+ if(path){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: path,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
@@ -1803,7 +1831,8 @@ export default {
|
|
|
riskCode: "0507",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
+ if (res.data && res.data[0]
|
|
|
+ ) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子保单",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
@@ -1816,7 +1845,7 @@ export default {
|
|
|
riskCode: "0507",
|
|
|
type: '1',// 1:标志
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
+ if (res.data && res.data[0]) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
filename: this.orderInfo.jqpolicyno,
|
|
|
@@ -1831,7 +1860,7 @@ export default {
|
|
|
riskCode: "0510",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
+ if (res.data && res.data[0]) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "商业电子保单",
|
|
|
filename: this.orderInfo.sypolicyno,
|
|
|
@@ -1849,11 +1878,13 @@ export default {
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqUrl,
|
|
|
- });
|
|
|
+ if(res.data.jqUrl){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
if (res.data.jqFlagUrl) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
@@ -1870,12 +1901,12 @@ export default {
|
|
|
riskCode: "0510",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "商业电子保单",
|
|
|
- filename: this.orderInfo.sypolicyno,
|
|
|
- fileurl: res.data.syUrl,
|
|
|
- });
|
|
|
+ if (res.data && res.data.syUrl) {
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "商业电子保单",
|
|
|
+ filename: this.orderInfo.sypolicyno,
|
|
|
+ fileurl: res.data.syUrl,
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -1888,11 +1919,13 @@ export default {
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
- this.oldfileList.push({
|
|
|
- fileTitle: "交强电子保单",
|
|
|
- filename: this.orderInfo.jqpolicyno,
|
|
|
- fileurl: res.data.jqUrl,
|
|
|
- });
|
|
|
+ if(res.data.jqUrl){
|
|
|
+ this.oldfileList.push({
|
|
|
+ fileTitle: "交强电子保单",
|
|
|
+ filename: this.orderInfo.jqpolicyno,
|
|
|
+ fileurl: res.data.jqUrl,
|
|
|
+ });
|
|
|
+ }
|
|
|
if (res.data.jqFlagUrl) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "交强电子标志",
|
|
|
@@ -1909,7 +1942,7 @@ export default {
|
|
|
riskCode: "0510",
|
|
|
type: '2',//2:保单
|
|
|
}).then(res => {
|
|
|
- if (res.data) {
|
|
|
+ if (res.data && res.data.syUrl) {
|
|
|
this.oldfileList.push({
|
|
|
fileTitle: "商业电子保单",
|
|
|
filename: this.orderInfo.sypolicyno,
|
|
|
@@ -1992,17 +2025,21 @@ export default {
|
|
|
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: "商业电子保单",
|