|
@ -1533,48 +1533,7 @@ export default { |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
//门板 |
|
|
//门板 |
|
|
//传递大众顺序号起止 |
|
|
//传递大众顺序号起止 |
|
|
this.$axios |
|
|
this.private_printMenBan(); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
console.log(response.status); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
response.item |
|
|
|
|
|
); |
|
|
|
|
|
//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.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
this.isDisable = false; |
|
|
this.isDisable = false; |
|
@ -1583,57 +1542,7 @@ export default { |
|
|
//无断号 |
|
|
//无断号 |
|
|
//门板 |
|
|
//门板 |
|
|
//传递大众顺序号起止 |
|
|
//传递大众顺序号起止 |
|
|
this.$axios |
|
|
this.private_printMenBan(); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.isDisable=false; |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
response.item |
|
|
|
|
|
); |
|
|
|
|
|
//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.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else if (this.listQuery.productType === 2) { |
|
|
} else if (this.listQuery.productType === 2) { |
|
@ -1667,48 +1576,7 @@ export default { |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
//门板 |
|
|
//门板 |
|
|
//传递大众顺序号起止 |
|
|
//传递大众顺序号起止 |
|
|
this.$axios |
|
|
this.private_printZhuHuBan(true); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
console.log(response.status); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
response.item |
|
|
|
|
|
); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
this.isDisable = false; |
|
|
this.isDisable = false; |
|
@ -1717,169 +1585,12 @@ export default { |
|
|
//无断号 |
|
|
//无断号 |
|
|
//门板 |
|
|
//门板 |
|
|
//传递大众顺序号起止 |
|
|
//传递大众顺序号起止 |
|
|
this.$axios |
|
|
this.private_printZhuHuBan(true); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
response.item |
|
|
|
|
|
); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
this.isDisable = false; |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
//柱护板 |
|
|
//柱护板 |
|
|
|
|
|
|
|
|
// this.hostCheckQuery.beginHostSN = parseInt(this.form.beginHostSN); |
|
|
|
|
|
// this.hostCheckQuery.endHostSN = parseInt(this.form.endHostSN); |
|
|
|
|
|
// this.hostCheckQuery.productLine = this.listQuery.productLine; |
|
|
|
|
|
// this.$axios |
|
|
|
|
|
// .posts( |
|
|
|
|
|
// "/api/newjit/bill-m100/check-zhb-hostsn-break-num", |
|
|
|
|
|
// this.hostCheckQuery |
|
|
|
|
|
// ) |
|
|
|
|
|
// .then((response) => { |
|
|
|
|
|
// console.log("检查柱护板-大众顺序号是否断号"); |
|
|
|
|
|
// if (response.item.length > 0) { |
|
|
|
|
|
// //有断号 |
|
|
|
|
|
// this.$confirm( |
|
|
|
|
|
// "本次打印存在断号是否继续?" + response.item, |
|
|
|
|
|
// "提示", |
|
|
|
|
|
// { |
|
|
|
|
|
// confirmButtonText: "确定", |
|
|
|
|
|
// cancelButtonText: "取消", |
|
|
|
|
|
// type: "warning", |
|
|
|
|
|
// } |
|
|
|
|
|
// ) |
|
|
|
|
|
// .then(() => { |
|
|
|
|
|
// //门板 |
|
|
|
|
|
// //传递大众顺序号起止 |
|
|
|
|
|
// this.$axios |
|
|
|
|
|
// .posts( |
|
|
|
|
|
// "/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
// this.hostPrintQuery |
|
|
|
|
|
// ) |
|
|
|
|
|
// .then((response) => { |
|
|
|
|
|
// console.log("打印门板装箱单"); |
|
|
|
|
|
// console.log(response); |
|
|
|
|
|
// console.log(response.status); |
|
|
|
|
|
// if (response.status === false) { |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// message: response.message, |
|
|
|
|
|
// type: "error", |
|
|
|
|
|
// }); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// //传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
// //this.fileQuery.report = "menban"; |
|
|
|
|
|
// this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
// response.item |
|
|
|
|
|
// ); |
|
|
|
|
|
// //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(() => {}); |
|
|
|
|
|
// } //无断号 |
|
|
|
|
|
// else { |
|
|
|
|
|
// //门板 |
|
|
|
|
|
// //传递大众顺序号起止 |
|
|
|
|
|
// this.$axios |
|
|
|
|
|
// .posts( |
|
|
|
|
|
// "/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
// this.hostPrintQuery |
|
|
|
|
|
// ) |
|
|
|
|
|
// .then((response) => { |
|
|
|
|
|
// console.log("打印门板装箱单"); |
|
|
|
|
|
// console.log(response); |
|
|
|
|
|
// if (response.status === false) { |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// message: response.message, |
|
|
|
|
|
// type: "error", |
|
|
|
|
|
// }); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// //传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
// //this.fileQuery.report = "menban"; |
|
|
|
|
|
// this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
// response.item |
|
|
|
|
|
// ); |
|
|
|
|
|
// //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(() => { |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// message: response.message, |
|
|
|
|
|
// type: "error", |
|
|
|
|
|
// }); |
|
|
|
|
|
// return; |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */ |
|
|
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */ |
|
@ -1887,476 +1598,168 @@ export default { |
|
|
this.hostPrintQuery.endVin = this.form.endVin; |
|
|
this.hostPrintQuery.endVin = this.form.endVin; |
|
|
//判断productType类型 |
|
|
//判断productType类型 |
|
|
if (this.listQuery.productType === 1) { |
|
|
if (this.listQuery.productType === 1) { |
|
|
//门板 |
|
|
//门板 |
|
|
//传递底盘号起止 |
|
|
//传递底盘号起止 |
|
|
this.$axios |
|
|
this.private_printMenBan(); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log( |
|
|
|
|
|
"重新或补打打印门板装箱单" + |
|
|
|
|
|
JSON.stringify(this.hostPrintQuery) |
|
|
|
|
|
); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
//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(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (this.listQuery.productType === 2) { |
|
|
} else if (this.listQuery.productType === 2) { |
|
|
//柱护板 |
|
|
//柱护板 |
|
|
//传递底盘号起止 |
|
|
//传递底盘号起止 |
|
|
this.$axios |
|
|
this.private_printZhuHuBan(true); |
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印柱护板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "zhuhuban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
/**保存*/ |
|
|
|
|
|
save1() { |
|
|
/** |
|
|
//this.listLoaddingPrint = true; |
|
|
* 保存、加载、打印门板 |
|
|
if (this.isShowHostSN === true) { |
|
|
*/ |
|
|
if (this.form.beginHostSN === "" || this.form.endHostSN === "") { |
|
|
private_printMenBan() |
|
|
this.$message({ |
|
|
{ |
|
|
message: "请输入完整的顺序号起始范围", |
|
|
debugger |
|
|
type: "error", |
|
|
this.$axios |
|
|
}); |
|
|
.posts( |
|
|
return; |
|
|
"/api/newjit/bill-m100/save-menban-report", |
|
|
} else { |
|
|
this.hostPrintQuery |
|
|
if (this.listQuery.productType === 1) { |
|
|
) |
|
|
//门板 |
|
|
.then((response) => { |
|
|
if ( |
|
|
console.log("保存门板报表"); |
|
|
parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) <= |
|
|
console.log(response); |
|
|
0 |
|
|
console.log(response.status); |
|
|
) { |
|
|
if (response.status === false) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: "起止大众顺序号相减不能为零!", |
|
|
message: response.message, |
|
|
type: "error", |
|
|
type: "error", |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} else if (response.status === true) { |
|
|
} else if (this.listQuery.productType === 2) { |
|
|
let loadInput = response.item; |
|
|
//柱护板 |
|
|
//------------------------------------------- |
|
|
if ( |
|
|
this.$axios |
|
|
parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) > |
|
|
.posts( |
|
|
23 |
|
|
"/api/newjit/bill-m100/load-menban-report", |
|
|
) { |
|
|
loadInput |
|
|
this.$message({ |
|
|
) |
|
|
message: |
|
|
.then((response) => { |
|
|
"最多只能打印24个顺序号,终止顺序号不能大于" + |
|
|
console.log("加载门板报表"); |
|
|
(parseInt(this.form.beginHostSN) + 23), |
|
|
console.log(response); |
|
|
type: "error", |
|
|
console.log(response.status); |
|
|
}); |
|
|
if (response.status === false) { |
|
|
return; |
|
|
this.$message({ |
|
|
} |
|
|
message: response.message, |
|
|
} |
|
|
type: "error", |
|
|
} |
|
|
}); |
|
|
} |
|
|
return; |
|
|
if (this.isShowVin === true) { |
|
|
} else if (response.status === true) { |
|
|
if (this.form.beginVin === "" || this.form.endVin === "") { |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
this.$message({ |
|
|
//this.fileQuery.report = "menban"; |
|
|
message: "请输入完整的底盘号起始范围", |
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
type: "error", |
|
|
response.item |
|
|
}); |
|
|
); |
|
|
return; |
|
|
//this.fileQuery.dataname = ""; |
|
|
} |
|
|
console.log("打印json"); |
|
|
} |
|
|
console.log(this.fileQuery.dataname); |
|
|
/**打印时传递大众顺序号范围,接口1获取大众顺序号,接口2验证是否断号,接口3获取打印数据,接口4获得grid++模板的base64编码 */ |
|
|
this.$axios |
|
|
if ( |
|
|
.posts( |
|
|
this.formTitle === "打印-门板发货排序单" || |
|
|
"/Handlers/Handler1.ashx?report=menban", |
|
|
this.formTitle === "打印-柱护板发货排序单" |
|
|
qs.stringify(this.fileQuery) |
|
|
) { |
|
|
) |
|
|
this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN); |
|
|
.then((response) => { |
|
|
this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN); |
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
if (this.listQuery.productType === 1) { |
|
|
this.formLoading = false; |
|
|
//门板-打印 |
|
|
this.isDisable = false; |
|
|
this.$axios |
|
|
this.printpdf(response); //打印我文件流 |
|
|
.posts( |
|
|
}) |
|
|
"/api/newjit/bill-m100/check-mb-hostsn-break-num", |
|
|
.catch((error) => { |
|
|
this.hostCheckQuery |
|
|
this.formLoading = false; |
|
|
) |
|
|
this.isDisable = false; |
|
|
.then((response) => { |
|
|
}); |
|
|
console.log("检查门板-大众顺序号是否断号"); |
|
|
} |
|
|
if (response.item.length > 0) { |
|
|
}); |
|
|
//有断号 |
|
|
//------------------------------------------- |
|
|
this.$confirm( |
|
|
} |
|
|
"本次打印存在断号是否继续?" + response.item, |
|
|
}); |
|
|
"提示", |
|
|
}, |
|
|
{ |
|
|
|
|
|
confirmButtonText: "确定", |
|
|
/** |
|
|
cancelButtonText: "取消", |
|
|
* 保存、加载、打印柱护板 |
|
|
type: "warning", |
|
|
*/ |
|
|
} |
|
|
private_printZhuHuBan(isSelAll = true) |
|
|
) |
|
|
{ |
|
|
.then(() => { |
|
|
debugger |
|
|
//门板 |
|
|
//门板 |
|
|
//传递大众顺序号起止 |
|
|
//传递大众顺序号起止 |
|
|
this.$axios |
|
|
this.$axios |
|
|
.posts( |
|
|
.posts( |
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
"/api/newjit/bill-m100/save-zhuhuban-report", |
|
|
this.hostPrintQuery |
|
|
this.hostPrintQuery |
|
|
) |
|
|
) |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
console.log("打印门板装箱单"); |
|
|
console.log("保存柱护板报表"); |
|
|
console.log(response); |
|
|
console.log(response); |
|
|
console.log(response.status); |
|
|
console.log(response.status); |
|
|
if (response.status === false) { |
|
|
if (response.status === false) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: response.message, |
|
|
message: response.message, |
|
|
type: "error", |
|
|
type: "error", |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} else if (response.status === true) { |
|
|
} else if (response.status === true) { |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
let loadInput = {}; |
|
|
//this.fileQuery.report = "menban"; |
|
|
loadInput.dataResultType = (isSelAll == true) ? "1" : "2"; |
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
loadInput.reportIdList = response.item; |
|
|
response.item |
|
|
//-------------------------------------- |
|
|
); |
|
|
//门板 |
|
|
//this.fileQuery.dataname = ""; |
|
|
//传递大众顺序号起止 |
|
|
console.log("打印json"); |
|
|
this.$axios |
|
|
console.log(this.fileQuery.dataname); |
|
|
.posts( |
|
|
this.$axios |
|
|
"/api/newjit/bill-m100/load-zhuhuban-report", |
|
|
.posts( |
|
|
loadInput |
|
|
"/Handlers/Handler1.ashx?report=menban", |
|
|
) |
|
|
qs.stringify(this.fileQuery) |
|
|
.then((response) => { |
|
|
) |
|
|
console.log("加载柱护板报表"); |
|
|
.then((response) => { |
|
|
console.log(response); |
|
|
console.log("获取文件base64编码"); |
|
|
console.log(response.status); |
|
|
console.log(response); |
|
|
if (response.status === false) { |
|
|
this.formLoading = false; |
|
|
this.$message({ |
|
|
this.printpdf(response); //打印我文件流 |
|
|
message: response.message, |
|
|
}) |
|
|
type: "error", |
|
|
.catch((error) => { |
|
|
}); |
|
|
this.formLoading = false; |
|
|
return; |
|
|
}); |
|
|
} else if (response.status === true) { |
|
|
} |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
}); |
|
|
//this.fileQuery.report = "menban"; |
|
|
}) |
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
.catch(() => {}); |
|
|
response.item |
|
|
} else { |
|
|
); |
|
|
//无断号 |
|
|
//this.fileQuery.dataname = ""; |
|
|
//门板 |
|
|
console.log("打印json"); |
|
|
//传递大众顺序号起止 |
|
|
console.log(this.fileQuery.dataname); |
|
|
this.$axios |
|
|
this.$axios |
|
|
.posts( |
|
|
.posts( |
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
this.hostPrintQuery |
|
|
qs.stringify(this.fileQuery) |
|
|
) |
|
|
) |
|
|
.then((response) => { |
|
|
.then((response) => { |
|
|
console.log("打印门板装箱单"); |
|
|
console.log("获取文件base64编码"); |
|
|
console.log(response); |
|
|
console.log(response); |
|
|
if (response.status === false) { |
|
|
this.formLoading = false; |
|
|
this.$message({ |
|
|
this.isDisable = false; |
|
|
message: response.message, |
|
|
this.printpdf(response); //打印我文件流 |
|
|
type: "error", |
|
|
}) |
|
|
}); |
|
|
.catch((error) => { |
|
|
return; |
|
|
this.formLoading = false; |
|
|
} else if (response.status === true) { |
|
|
this.isDisable = false; |
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
}); |
|
|
//this.fileQuery.report = "menban"; |
|
|
} |
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
}); |
|
|
//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.formLoading = false; |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
this.formLoading = false; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (this.listQuery.productType === 2) { |
|
|
|
|
|
//柱护板 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/check-zhb-hostsn-break-num", |
|
|
|
|
|
this.hostCheckQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("检查柱护板-大众顺序号是否断号"); |
|
|
|
|
|
if (response.item.length > 0) { |
|
|
|
|
|
//有断号 |
|
|
|
|
|
this.$confirm( |
|
|
|
|
|
"本次打印存在断号是否继续?" + response.item, |
|
|
|
|
|
"提示", |
|
|
|
|
|
{ |
|
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
.then(() => { |
|
|
|
|
|
//门板 |
|
|
|
|
|
//传递大众顺序号起止 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
console.log(response.status); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify( |
|
|
|
|
|
response.item |
|
|
|
|
|
); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => {}); |
|
|
|
|
|
} //无断号 |
|
|
|
|
|
else { |
|
|
|
|
|
//门板 |
|
|
|
|
|
//传递大众顺序号起止 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印门板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
/**接口1获取打印数据,接口2获得grid++模板的base64编码 */ |
|
|
|
|
|
this.hostPrintQuery.beginVin = this.form.beginVin; |
|
|
|
|
|
this.hostPrintQuery.endVin = this.form.endVin; |
|
|
|
|
|
//判断productType类型 |
|
|
|
|
|
if (this.listQuery.productType === 1) { |
|
|
|
|
|
//门板 |
|
|
|
|
|
//传递底盘号起止 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-menban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log( |
|
|
|
|
|
"重新或补打打印门板装箱单" + JSON.stringify(this.hostPrintQuery) |
|
|
|
|
|
); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "menban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
//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(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} else if (this.listQuery.productType === 2) { |
|
|
|
|
|
//柱护板 |
|
|
|
|
|
//传递底盘号起止 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/api/newjit/bill-m100/print-zhuhuban-packing-list", |
|
|
|
|
|
this.hostPrintQuery |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("打印柱护板装箱单"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
if (response.status === false) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
} else if (response.status === true) { |
|
|
|
|
|
//传给grid++接口json数据,得到返回的文件base64 |
|
|
|
|
|
//this.fileQuery.report = "zhuhuban"; |
|
|
|
|
|
this.fileQuery.dataname = JSON.stringify(response.item); |
|
|
|
|
|
//this.fileQuery.dataname = ""; |
|
|
|
|
|
console.log("打印json"); |
|
|
|
|
|
console.log(this.fileQuery.dataname); |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.posts( |
|
|
|
|
|
"/Handlers/Handler1.ashx?report=zhuhuban", |
|
|
|
|
|
qs.stringify(this.fileQuery) |
|
|
|
|
|
) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
console.log("获取文件base64编码"); |
|
|
|
|
|
console.log(response); |
|
|
|
|
|
this.printpdf(response); //打印我文件流 |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: response.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
//获取所有产线 |
|
|
|
|
|
getProductLine() { |
|
|
getProductLine() { |
|
|
this.listPLQuery.UserId = this.userInfo.userId; |
|
|
this.listPLQuery.UserId = this.userInfo.userId; |
|
|
console.log( |
|
|
console.log( |
|
|