|
@ -392,6 +392,7 @@ import Lockr from "lockr"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import Detail from "./detail.vue"; |
|
|
import Detail from "./detail.vue"; |
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
|
|
import qs from 'qs' |
|
|
|
|
|
|
|
|
//组件计量单位 |
|
|
//组件计量单位 |
|
|
const bomUnit = [ |
|
|
const bomUnit = [ |
|
@ -520,6 +521,9 @@ export default { |
|
|
beginVin: undefined, |
|
|
beginVin: undefined, |
|
|
endVin: undefined |
|
|
endVin: undefined |
|
|
}, |
|
|
}, |
|
|
|
|
|
fileQuery:{ |
|
|
|
|
|
dataname:undefined, |
|
|
|
|
|
}, |
|
|
form:{ |
|
|
form:{ |
|
|
details:[] |
|
|
details:[] |
|
|
}, |
|
|
}, |
|
@ -691,25 +695,25 @@ export default { |
|
|
/** 重置按钮操作 */ |
|
|
/** 重置按钮操作 */ |
|
|
resetQuery(refName) { |
|
|
resetQuery(refName) { |
|
|
//this.$refs[refName].resetFields(); |
|
|
//this.$refs[refName].resetFields(); |
|
|
this.listQuery.billType = ""; |
|
|
this.listQuery.billType = undefined; |
|
|
this.listQuery.productLine = ""; |
|
|
this.listQuery.productLine = undefined; |
|
|
this.listQuery.Version = ""; |
|
|
this.listQuery.Version = undefined; |
|
|
this.listQuery.serialNumBegin = ""; |
|
|
this.listQuery.serialNumBegin = undefined; |
|
|
this.listQuery.serialNumEnd = ""; |
|
|
this.listQuery.serialNumEnd = undefined; |
|
|
this.listQuery.HostSNBegin = ""; |
|
|
this.listQuery.HostSNBegin = undefined; |
|
|
this.listQuery.HostSNEnd = ""; |
|
|
this.listQuery.HostSNEnd = undefined; |
|
|
this.listQuery.KNRBegin = ""; |
|
|
this.listQuery.KNRBegin = undefined; |
|
|
this.listQuery.KNREnd = ""; |
|
|
this.listQuery.KNREnd = undefined; |
|
|
this.listQuery.VINBegin = ""; |
|
|
this.listQuery.VINBegin = undefined; |
|
|
this.listQuery.VINEnd = ""; |
|
|
this.listQuery.VINEnd = undefined; |
|
|
this.listQuery.OnlineTimeValue = []; |
|
|
this.listQuery.OnlineTimeValue = []; |
|
|
this.listQuery.OnlineTimeBegin = ""; |
|
|
this.listQuery.OnlineTimeBegin = undefined; |
|
|
this.listQuery.OnlineTimeEnd = ""; |
|
|
this.listQuery.OnlineTimeEnd = undefined; |
|
|
this.listQuery.ReceiveTimeValue = []; |
|
|
this.listQuery.ReceiveTimeValue = []; |
|
|
this.listQuery.ReceiveTimeBegin = ""; |
|
|
this.listQuery.ReceiveTimeBegin = undefined; |
|
|
this.listQuery.ReceiveTimeEnd = ""; |
|
|
this.listQuery.ReceiveTimeEnd = undefined; |
|
|
this.listQuery.state = []; |
|
|
this.listQuery.state = []; |
|
|
this.listQuery.billStatus = ""; |
|
|
this.listQuery.billStatus = undefined; |
|
|
this.handleQuery(); |
|
|
this.handleQuery(); |
|
|
this.getProductLine(); |
|
|
this.getProductLine(); |
|
|
}, |
|
|
}, |
|
@ -1087,6 +1091,7 @@ export default { |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
console.log("打印门板装箱单"); |
|
|
console.log("打印门板装箱单"); |
|
|
console.log(response); |
|
|
console.log(response); |
|
|
|
|
|
console.log(response.status); |
|
|
if(response.status === false) |
|
|
if(response.status === false) |
|
|
{ |
|
|
{ |
|
|
this.$message({ |
|
|
this.$message({ |
|
@ -1097,8 +1102,119 @@ export default { |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
//传给grid++接口json数据,得到返回的文件流pdfstream |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
this.printpdf(pdfstream);//打印我文件流 |
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
this.fileQuery.dataname = `[{ |
|
|
|
|
|
"masters": [{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"billSerialNum": "04", |
|
|
|
|
|
"billLocation": "左", |
|
|
|
|
|
"providerCode": "0709FAW-VW7XH", |
|
|
|
|
|
"partType": "C8 DP", |
|
|
|
|
|
"capacity": "12", |
|
|
|
|
|
"printDate": "2021-11-27 10:12:04", |
|
|
|
|
|
"printType": 0, |
|
|
|
|
|
"productLine": "01", |
|
|
|
|
|
"beginVin": "LFV2A24K2M3303677", |
|
|
|
|
|
"endVin": "LFV2A24K2M3303792" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"billSerialNum": "04", |
|
|
|
|
|
"billLocation": "右", |
|
|
|
|
|
"providerCode": "0709FAW-VW7XH", |
|
|
|
|
|
"partType": "C8 DP", |
|
|
|
|
|
"capacity": "12", |
|
|
|
|
|
"printDate": "2021-11-27 10:12:04", |
|
|
|
|
|
"printType": 0, |
|
|
|
|
|
"productLine": "01", |
|
|
|
|
|
"beginVin": "LFV2A24K2M3303677", |
|
|
|
|
|
"endVin": "LFV2A24K2M3303792" |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
"details": [{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303677", |
|
|
|
|
|
"hostSN": 85, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "01", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303680", |
|
|
|
|
|
"hostSN": 86, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "02", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303694", |
|
|
|
|
|
"hostSN": 87, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "03", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303713", |
|
|
|
|
|
"hostSN": 88, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "04", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"knr": " 21321502851001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303727", |
|
|
|
|
|
"hostSN": 89, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "05", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
}]` |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=menban",qs.stringify(this.fileQuery)) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response);//打印我文件流 |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
@ -1132,7 +1248,7 @@ export default { |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
else |
|
|
else//无断号 |
|
|
{ |
|
|
{ |
|
|
//判断productType类型 |
|
|
//判断productType类型 |
|
|
if(this.listQuery.productType === 1)//门板 |
|
|
if(this.listQuery.productType === 1)//门板 |
|
@ -1155,8 +1271,119 @@ export default { |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
//传给grid++接口json数据,得到返回的文件流pdfstream |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
this.printpdf(pdfstream);//打印我文件流 |
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
this.fileQuery.dataname = `[{ |
|
|
|
|
|
"masters": [{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"billSerialNum": "04", |
|
|
|
|
|
"billLocation": "左", |
|
|
|
|
|
"providerCode": "0709FAW-VW7XH", |
|
|
|
|
|
"partType": "C8 DP", |
|
|
|
|
|
"capacity": "12", |
|
|
|
|
|
"printDate": "2021-11-27 10:12:04", |
|
|
|
|
|
"printType": 0, |
|
|
|
|
|
"productLine": "01", |
|
|
|
|
|
"beginVin": "LFV2A24K2M3303677", |
|
|
|
|
|
"endVin": "LFV2A24K2M3303792" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"billSerialNum": "04", |
|
|
|
|
|
"billLocation": "右", |
|
|
|
|
|
"providerCode": "0709FAW-VW7XH", |
|
|
|
|
|
"partType": "C8 DP", |
|
|
|
|
|
"capacity": "12", |
|
|
|
|
|
"printDate": "2021-11-27 10:12:04", |
|
|
|
|
|
"printType": 0, |
|
|
|
|
|
"productLine": "01", |
|
|
|
|
|
"beginVin": "LFV2A24K2M3303677", |
|
|
|
|
|
"endVin": "LFV2A24K2M3303792" |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
"details": [{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303677", |
|
|
|
|
|
"hostSN": 85, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "01", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303680", |
|
|
|
|
|
"hostSN": 86, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "02", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "1", |
|
|
|
|
|
"billNum": " 10000000009", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303694", |
|
|
|
|
|
"hostSN": 87, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "03", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"knr": " 21321501481001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303713", |
|
|
|
|
|
"hostSN": 88, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "04", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
"id": "2", |
|
|
|
|
|
"billNum": " 10000000010", |
|
|
|
|
|
"knr": " 21321502851001", |
|
|
|
|
|
"vin": "LFV2A24K2M3303727", |
|
|
|
|
|
"hostSN": 89, |
|
|
|
|
|
"vehicleModel_DoorPlankCode": "PHEFZ_N5W_7HB_7Y0_3Y0 9VD GS0 0K3 3L5 QQ2 3FU4V020", |
|
|
|
|
|
"topBoxPositionNum": "05", |
|
|
|
|
|
"topSAPMaterialNum": "30052525", |
|
|
|
|
|
"topMaterialDescription": "C8-PHEV.黑4024-左后 FZ(黑PVC多孔低扬无电镀)", |
|
|
|
|
|
"belowSAPMaterialNum": "30052524", |
|
|
|
|
|
"belowMaterialDescription": "C8-PHEV.黑4024-右前 FZ(黑PVC多孔低扬无电镀)" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
}]` |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=menban",qs.stringify(this.fileQuery)) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response);//打印我文件流 |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
@ -1340,10 +1567,10 @@ export default { |
|
|
this.pdfLoading = false |
|
|
this.pdfLoading = false |
|
|
}, 100) |
|
|
}, 100) |
|
|
}, |
|
|
}, |
|
|
printpdf(blob) |
|
|
printpdf(dataResult) |
|
|
{ |
|
|
{ |
|
|
//打印功能,dataResult是后台返回的base64 |
|
|
//打印功能,dataResult是后台返回的base64 |
|
|
//let blob = this.dataURLtoBlob(dataResult); |
|
|
let blob = this.dataURLtoBlob(dataResult); |
|
|
var date = (new Date()).getTime() |
|
|
var date = (new Date()).getTime() |
|
|
var ifr = document.createElement('iframe') |
|
|
var ifr = document.createElement('iframe') |
|
|
ifr.style.frameborder = 'no' |
|
|
ifr.style.frameborder = 'no' |
|
@ -1356,13 +1583,31 @@ export default { |
|
|
this.doPrint('printPdf' + date) |
|
|
this.doPrint('printPdf' + date) |
|
|
window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 |
|
|
window.URL.revokeObjectURL(ifr.src) // 释放URL 对象 |
|
|
}, |
|
|
}, |
|
|
|
|
|
httpPost(URL, PARAMS) { |
|
|
|
|
|
var temp = document.createElement("form"); |
|
|
|
|
|
temp.action = URL; |
|
|
|
|
|
temp.method = "post"; |
|
|
|
|
|
temp.style.display = "none"; |
|
|
|
|
|
|
|
|
|
|
|
for (var x in PARAMS) { |
|
|
|
|
|
var opt = document.createElement("textarea"); |
|
|
|
|
|
opt.name = x; |
|
|
|
|
|
opt.value = PARAMS[x]; |
|
|
|
|
|
temp.appendChild(opt); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(temp); |
|
|
|
|
|
temp.submit(); |
|
|
|
|
|
|
|
|
|
|
|
return temp; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
@import "../../../ux/styles/crmtable.scss"; |
|
|
@import "../../../pg-fis/styles/crmtable.scss"; |
|
|
|
|
|
|
|
|
// /*表格全选框去除空框*/ |
|
|
// /*表格全选框去除空框*/ |
|
|
// .el-table >>> .DisabledSelection .cell .el-checkbox__inner { |
|
|
// .el-table >>> .DisabledSelection .cell .el-checkbox__inner { |
|
|