|
|
@ -392,6 +392,7 @@ import Lockr from "lockr"; |
|
|
|
import moment from "moment"; |
|
|
|
import Detail from "./detail.vue"; |
|
|
|
import { downloadFile } from "@/utils/crmindex.js"; |
|
|
|
import qs from 'qs' |
|
|
|
|
|
|
|
//组件计量单位 |
|
|
|
const bomUnit = [ |
|
|
@ -520,6 +521,9 @@ export default { |
|
|
|
beginVin: undefined, |
|
|
|
endVin: undefined |
|
|
|
}, |
|
|
|
fileQuery:{ |
|
|
|
dataname:undefined, |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
details:[] |
|
|
|
}, |
|
|
@ -691,25 +695,25 @@ export default { |
|
|
|
/** 重置按钮操作 */ |
|
|
|
resetQuery(refName) { |
|
|
|
//this.$refs[refName].resetFields(); |
|
|
|
this.listQuery.billType = ""; |
|
|
|
this.listQuery.productLine = ""; |
|
|
|
this.listQuery.Version = ""; |
|
|
|
this.listQuery.serialNumBegin = ""; |
|
|
|
this.listQuery.serialNumEnd = ""; |
|
|
|
this.listQuery.HostSNBegin = ""; |
|
|
|
this.listQuery.HostSNEnd = ""; |
|
|
|
this.listQuery.KNRBegin = ""; |
|
|
|
this.listQuery.KNREnd = ""; |
|
|
|
this.listQuery.VINBegin = ""; |
|
|
|
this.listQuery.VINEnd = ""; |
|
|
|
this.listQuery.billType = undefined; |
|
|
|
this.listQuery.productLine = undefined; |
|
|
|
this.listQuery.Version = undefined; |
|
|
|
this.listQuery.serialNumBegin = undefined; |
|
|
|
this.listQuery.serialNumEnd = undefined; |
|
|
|
this.listQuery.HostSNBegin = undefined; |
|
|
|
this.listQuery.HostSNEnd = undefined; |
|
|
|
this.listQuery.KNRBegin = undefined; |
|
|
|
this.listQuery.KNREnd = undefined; |
|
|
|
this.listQuery.VINBegin = undefined; |
|
|
|
this.listQuery.VINEnd = undefined; |
|
|
|
this.listQuery.OnlineTimeValue = []; |
|
|
|
this.listQuery.OnlineTimeBegin = ""; |
|
|
|
this.listQuery.OnlineTimeEnd = ""; |
|
|
|
this.listQuery.OnlineTimeBegin = undefined; |
|
|
|
this.listQuery.OnlineTimeEnd = undefined; |
|
|
|
this.listQuery.ReceiveTimeValue = []; |
|
|
|
this.listQuery.ReceiveTimeBegin = ""; |
|
|
|
this.listQuery.ReceiveTimeEnd = ""; |
|
|
|
this.listQuery.ReceiveTimeBegin = undefined; |
|
|
|
this.listQuery.ReceiveTimeEnd = undefined; |
|
|
|
this.listQuery.state = []; |
|
|
|
this.listQuery.billStatus = ""; |
|
|
|
this.listQuery.billStatus = undefined; |
|
|
|
this.handleQuery(); |
|
|
|
this.getProductLine(); |
|
|
|
}, |
|
|
@ -1087,6 +1091,7 @@ export default { |
|
|
|
.then((response) => { |
|
|
|
console.log("打印门板装箱单"); |
|
|
|
console.log(response); |
|
|
|
console.log(response.status); |
|
|
|
if(response.status === false) |
|
|
|
{ |
|
|
|
this.$message({ |
|
|
@ -1097,8 +1102,119 @@ export default { |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//传给grid++接口json数据,得到返回的文件流pdfstream |
|
|
|
this.printpdf(pdfstream);//打印我文件流 |
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
//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(() => { |
|
|
|
}); |
|
|
|
} |
|
|
|
else |
|
|
|
else//无断号 |
|
|
|
{ |
|
|
|
//判断productType类型 |
|
|
|
if(this.listQuery.productType === 1)//门板 |
|
|
@ -1155,8 +1271,119 @@ export default { |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
//传给grid++接口json数据,得到返回的文件流pdfstream |
|
|
|
this.printpdf(pdfstream);//打印我文件流 |
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
//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(() => { |
|
|
@ -1340,10 +1567,10 @@ export default { |
|
|
|
this.pdfLoading = false |
|
|
|
}, 100) |
|
|
|
}, |
|
|
|
printpdf(blob) |
|
|
|
printpdf(dataResult) |
|
|
|
{ |
|
|
|
//打印功能,dataResult是后台返回的base64 |
|
|
|
//let blob = this.dataURLtoBlob(dataResult); |
|
|
|
let blob = this.dataURLtoBlob(dataResult); |
|
|
|
var date = (new Date()).getTime() |
|
|
|
var ifr = document.createElement('iframe') |
|
|
|
ifr.style.frameborder = 'no' |
|
|
@ -1356,13 +1583,31 @@ export default { |
|
|
|
this.doPrint('printPdf' + date) |
|
|
|
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> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "../../../ux/styles/crmtable.scss"; |
|
|
|
@import "../../../pg-fis/styles/crmtable.scss"; |
|
|
|
|
|
|
|
// /*表格全选框去除空框*/ |
|
|
|
// .el-table >>> .DisabledSelection .cell .el-checkbox__inner { |
|
|
|