diff --git a/vue/src/router/index.js b/vue/src/router/index.js index 57c0d2a9..61861125 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -67,6 +67,7 @@ export const constantRoutes = [ component: () => import('@/views/login/index'), //component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one //component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one + //component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), hidden: true }, { diff --git a/vue/src/views/pg-fis/basedate.zip b/vue/src/views/pg-fis/basedate.zip deleted file mode 100644 index 1e3ef45f..00000000 Binary files a/vue/src/views/pg-fis/basedate.zip and /dev/null differ diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue index 893b8300..123c628b 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue @@ -576,15 +576,49 @@ export default { myalert = "选中项"; } // let MBVin1 = this.multipleSelection[0].id; - let MBId = MBVin1; - var params = { - printType: 1, - productLine: this.customerInfo.productLine, - reportIdList: MBId, - }; + // let MBId = MBVin1; + // var params = { + // printType: 1, + // productLine: this.customerInfo.productLine, + // reportIdList: MBId, + // }; + // debugger //重新打印 + // console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); + // this.$axios + // .posts("/api/newjit/bill-m100/print-menban-packing-list", params) + // .then((response) => { + // //alert(response.status); + // const index = this.list.indexOf(row); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // this.fileQuery.dataname = JSON.stringify(response.item); + // console.log( + // "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=menban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // this.printpdf(response); //打印我文件流 + // }); + // this.getList(); + // } + // }) + // .catch(() => {}); + + debugger //重新打印 + var params = MBVin1; //选中的门板ID列表 console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); this.$axios - .posts("/api/newjit/bill-m100/print-menban-packing-list", params) + .posts("/api/newjit/bill-m100/load-menban-report", params) .then((response) => { //alert(response.status); const index = this.list.indexOf(row); @@ -611,59 +645,8 @@ export default { this.getList(); } }) - .catch(() => {}); - + .catch(() => {}); - // this.isEdit = true; - // if (this.multipleSelection.length != 1) { - // this.$message({ - // message: "重新打印必须选择单行,不能多选!", - // type: "warning", - // }); - // return; - // } else { - // //this.fetchData(this.multipleSelection[0].id); - // //重新打印方法 - // let MBVin1 = this.multipleSelection[0].id; - // let MBId = [MBVin1]; - // var params = { - // printType: 1, - // productLine: this.customerInfo.productLine, - // reportIdList: MBId, - // }; - // console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); - // this.$axios - // .posts("/api/newjit/bill-m100/print-menban-packing-list", params) - // .then((response) => { - // //alert(response.status); - // const index = this.list.indexOf(row); - // if (response.status === false) { - // this.$message({ - // message: response.message, - // type: "error", - // }); - // return; - // } else { - // this.fileQuery.dataname = JSON.stringify(response.item); - // console.log( - // "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + - // JSON.stringify(this.fileQuery.dataname) - // ); - // this.$axios - // .posts( - // "/Handlers/Handler1.ashx?report=menban", - // qs.stringify(this.fileQuery) - // ) - // .then((response) => { - // this.printpdf(response); //打印我文件流 - // }); - // this.getList(); - // } - // }) - // .catch(() => {}); - - - // } }, diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue index 6293503a..893b8266 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue @@ -539,7 +539,8 @@ export default { }; console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); this.$axios - .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + .posts("/api/newjit/bill-m100/load-zhuhuban-report", params) .then((response) => { console.log("柱护版-打印返回的状态:" + response.status); const index = this.list.indexOf(row); @@ -595,69 +596,7 @@ export default { }) .catch(() => {}); } - // var ZHBVin1 = []; - // ZHBVin1.push(row.id); - // let myalert = ""; //声明变量,其变量必须在此声明后使用 - // this.isEdit = true; - // if (this.multipleSelection.length != 1) { - // this.$message({ - // message: "重新打印必须选择单行,不能多选!", - // type: "warning", - // }); - // return; - // } else { - // // //多选 - // // this.$message({ - // // message: "重新打印必须选择单行,不能多选!", - // // type: "warning", - // // }); - // // return; - // // this.multipleSelection.forEach((element) => { - // // let id = element.id; - // // beginVin1.push(id); - // // }); - // // myalert = "选中项"; - // //let beginVin1 = this.multipleSelection[0].id; - - // let ZHBId = ZHBVin1; - - // var params = { - // printType: 1, - // productLine: this.customerInfo.productLine, - // reportIdList: ZHBId, - // }; - // console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); - // this.$axios - // .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) - // .then((response) => { - // console.log("柱护版-打印返回的状态:" + response.status); - // const index = this.list.indexOf(row); - // if (response.status === false) { - // this.$message({ - // message: response.message, - // type: "error", - // }); - // return; - // } else { - // this.fileQuery.dataname = JSON.stringify(response.item); - // console.log( - // "柱板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + - // JSON.stringify(this.fileQuery.dataname) - // ); - // this.$axios - // .posts( - // "/Handlers/Handler1.ashx?report=zhuhuban", - // qs.stringify(this.fileQuery) - // ) - // .then((response) => { - // this.printpdf(response); //打印我文件流 - // }); - // this.getList(); - // } - // }) - // .catch(() => {}); - // } }, handleUpdateall(row) { this.isEdit = true; @@ -682,7 +621,8 @@ export default { }; console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); this.$axios - .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + .posts("/api/newjit/bill-m100/load-zhuhuban-report", params) .then((response) => { console.log("柱护版-打印返回的状态:" + response.status); const index = this.list.indexOf(row); diff --git a/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue b/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue index 83006b6d..f8000a3b 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue @@ -519,37 +519,110 @@ export default { }); console.log("门板补打输入参数:" + JSON.stringify(params)); - this.$axios - .posts("/api/newjit/bill-m100/print-menban-packing-list", params) - .then((response) => { - - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - this.fileQuery.dataname = JSON.stringify(response.item); - console.log( - "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + - JSON.stringify(this.fileQuery.dataname) - ); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=menban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - this.printpdf(response); //打印我文件流 - this.getList(); //刷新列表 - }); - } - }) - .catch(() => {}); + debugger //补打 + // this.$axios + // .posts("/api/newjit/bill-m100/print-menban-packing-list", params) + // .then((response) => { + + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // this.fileQuery.dataname = JSON.stringify(response.item); + // console.log( + // "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=menban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // this.printpdf(response); //打印我文件流 + // this.getList(); //刷新列表 + // }); + // } + // }) + // .catch(() => {}); + this.private_printMenBan(params); } }, + /** + * 保存、加载、打印门板 + */ + private_printMenBan(input) + { + debugger + this.$axios + .posts( + "/api/newjit/bill-m100/save-menban-report", + input + ) + .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) { + let loadInput = response.item; + //------------------------------------------- + this.$axios + .posts( + "/api/newjit/bill-m100/load-menban-report", + loadInput + ) + .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; + }); + } + }); + //------------------------------------------- + } + }); + }, + /** 重置按钮操作 */ resetQuery(refName) { diff --git a/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue index 136ccd0a..4b72b6c9 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue @@ -519,39 +519,118 @@ export default { }); console.log("柱护板补打输入参数:" + JSON.stringify(params)); - this.$axios - .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) - .then((response) => { - - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - this.fileQuery.dataname = JSON.stringify(response.item); + // this.$axios + // .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) + // .then((response) => { + + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // this.fileQuery.dataname = JSON.stringify(response.item); - console.log( - "柱护板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + - JSON.stringify(this.fileQuery.dataname) - ); + // console.log( + // "柱护板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=zhuhuban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - this.printpdf(response); //打印我文件流 - this.getList(); //刷新列表 - }); - } - }) - .catch(() => {}); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=zhuhuban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // this.printpdf(response); //打印我文件流 + // this.getList(); //刷新列表 + // }); + // } + // }) + // .catch(() => {}); + this.private_printZhuHuBan(params); } }, + /** + * 保存、加载、打印柱护板 + */ + private_printZhuHuBan(input) + { + debugger + //门板 + //传递大众顺序号起止 + this.$axios + .posts( + "/api/newjit/bill-m100/save-zhuhuban-report", + input + ) + .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) { + let loadInput = {}; + loadInput.dataResultType = "1"; //全部打印 + loadInput.reportIdList = response.item; + + // //-------------------------------------- + //门板 + //传递大众顺序号起止 + this.$axios + .posts( + "/api/newjit/bill-m100/load-zhuhuban-report", + loadInput + ) + .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; + }); + } + }); + //-------------------------------------- + } + }); + }, + /** 重置按钮操作 */ resetQuery(refName) { diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 58604933..7c63f6b6 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -1533,48 +1533,7 @@ export default { .then(() => { //门板 //传递大众顺序号起止 - this.$axios - .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; - }); - } - }); + this.private_printMenBan(); }) .catch(() => { this.isDisable = false; @@ -1583,57 +1542,7 @@ export default { //无断号 //门板 //传递大众顺序号起止 - this.$axios - .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; - }); + this.private_printMenBan(); } }); } else if (this.listQuery.productType === 2) { @@ -1667,48 +1576,7 @@ export default { .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.formLoading = false; - this.isDisable = false; - this.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - this.isDisable = false; - }); - } - }); + this.private_printZhuHuBan(true); }) .catch(() => { this.isDisable = false; @@ -1717,169 +1585,12 @@ export default { //无断号 //门板 //传递大众顺序号起止 - 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.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.private_printZhuHuBan(true); } }); //柱护板 - // 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 { /**接口1获取打印数据,接口2获得grid++模板的base64编码 */ @@ -1887,476 +1598,168 @@ export default { 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; - }); + //门板 + //传递底盘号起止 + this.private_printMenBan(); } 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; - }); + //柱护板 + //传递底盘号起止 + this.private_printZhuHuBan(true); } } } }); }, - /**保存*/ - save1() { - //this.listLoaddingPrint = true; - if (this.isShowHostSN === true) { - if (this.form.beginHostSN === "" || this.form.endHostSN === "") { - this.$message({ - message: "请输入完整的顺序号起始范围", - type: "error", - }); - return; - } else { - if (this.listQuery.productType === 1) { - //门板 - if ( - parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) <= - 0 - ) { - this.$message({ - message: "起止大众顺序号相减不能为零!", - type: "error", - }); - return; - } - } else if (this.listQuery.productType === 2) { - //柱护板 - if ( - parseInt(this.form.endHostSN) - parseInt(this.form.beginHostSN) > - 23 - ) { - this.$message({ - message: - "最多只能打印24个顺序号,终止顺序号不能大于" + - (parseInt(this.form.beginHostSN) + 23), - type: "error", - }); - return; - } - } - } - } - if (this.isShowVin === true) { - if (this.form.beginVin === "" || this.form.endVin === "") { - this.$message({ - message: "请输入完整的底盘号起始范围", - type: "error", - }); - return; - } - } - /**打印时传递大众顺序号范围,接口1获取大众顺序号,接口2验证是否断号,接口3获取打印数据,接口4获得grid++模板的base64编码 */ - if ( - this.formTitle === "打印-门板发货排序单" || - this.formTitle === "打印-柱护板发货排序单" - ) { - this.hostPrintQuery.beginHostSN = parseInt(this.form.beginHostSN); - this.hostPrintQuery.endHostSN = parseInt(this.form.endHostSN); - - if (this.listQuery.productType === 1) { - //门板-打印 - this.$axios - .posts( - "/api/newjit/bill-m100/check-mb-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-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.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - }); - } - }); - }) - .catch(() => {}); - } else { - //无断号 - //门板 - //传递大众顺序号起止 - this.$axios - .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", - }); - 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.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; - }); - } - } - }, - //获取所有产线 + + /** + * 保存、加载、打印门板 + */ + private_printMenBan() + { + debugger + this.$axios + .posts( + "/api/newjit/bill-m100/save-menban-report", + 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) { + let loadInput = response.item; + //------------------------------------------- + this.$axios + .posts( + "/api/newjit/bill-m100/load-menban-report", + loadInput + ) + .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; + }); + } + }); + //------------------------------------------- + } + }); + }, + + /** + * 保存、加载、打印柱护板 + */ + private_printZhuHuBan(isSelAll = true) + { + debugger + //门板 + //传递大众顺序号起止 + this.$axios + .posts( + "/api/newjit/bill-m100/save-zhuhuban-report", + 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) { + let loadInput = {}; + loadInput.dataResultType = (isSelAll == true) ? "1" : "2"; + loadInput.reportIdList = response.item; + //-------------------------------------- + //门板 + //传递大众顺序号起止 + this.$axios + .posts( + "/api/newjit/bill-m100/load-zhuhuban-report", + loadInput + ) + .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; + }); + } + }); + //-------------------------------------- + } + }); + }, + + //获取所有产线 getProductLine() { this.listPLQuery.UserId = this.userInfo.userId; console.log(