From 3123693d57f05d836bd97188873f0d7db66c5c9c Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Tue, 21 Dec 2021 20:15:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=99=9A=E4=B8=8A8=E7=82=B914=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/router/index.js | 8 +- vue/src/router/modules/fisprint.js | 53 ++ .../basedate/m100Online/RepetitionMB.vue | 749 ++++++++++++++++++ .../pg-fis/basedate/m100Online/index.vue | 39 +- .../basedate/m100Online/normalPritIndex.vue | 51 +- .../views/pg-fis/basedate/select/index.vue | 32 +- .../pg-fis/basedate/unknownAssembly/index.vue | 2 +- 7 files changed, 868 insertions(+), 66 deletions(-) create mode 100644 vue/src/router/modules/fisprint.js create mode 100644 vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue diff --git a/vue/src/router/index.js b/vue/src/router/index.js index d5f65438..39b06ed9 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -169,11 +169,11 @@ export const asyncRoutes = [ /** when your routing map is too long, you can split it into small modules **/ managerRouter,//系统首页 personRouter,//系统管理 - //basedataRouter,//基础数据维护 - //vwFisDataRouter,//结算与开票数据导入 - //billdataRouter,//销售结算与开票报表 + basedataRouter,//基础数据维护 + vwFisDataRouter,//结算与开票数据导入 + billdataRouter,//销售结算与开票报表 //businessdataRouter, - //wheeldataRouter,//大众看板和备件 + wheeldataRouter,//大众看板和备件 pgfisPrint,//排序单打印 pgfis,//派格fis //JobTimeDataRouter,//后台作业监控 diff --git a/vue/src/router/modules/fisprint.js b/vue/src/router/modules/fisprint.js new file mode 100644 index 00000000..888a6399 --- /dev/null +++ b/vue/src/router/modules/fisprint.js @@ -0,0 +1,53 @@ +/** 派格fis路由 */ +//import Layout from '@/layout/firstLayout' +import Layout from '@/layout' + +const pgfisPrint = { + path: '/pg-fis-print', + component: Layout, + redirect: 'fisprint', + name: 'pgfis', + meta: { + //requiresAuth: true, + title: '排序单打印', + index: 0, + type: 'crm', + icon: '业务', + keepAlive: false, + }, + children: [ + { + path: '/pg-m100normal-print', + component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), + name: 'pg-M100Online',//命名路由 + meta: { + title: '日常打印M100信息', + //roles: ['SettleAccount.Reports'], + icon: '客户零件' + } + }, + { + path: '/select', + component: () => import('@/views/pg-fis/basedate/select'), + name: 'select',//命名路由 + meta: { + title: 'M100查询', + //roles: ['SettleAccount.Reports'], + icon: '结算对比' + } + }, + { + path: '/pg-M100Online', + component: () => import('@/views/pg-fis/basedate/m100Online'), + name: 'pg-M100Online',//命名路由 + meta: { + title: 'M100上线信息', + //roles: ['SettleAccount.Reports'], + icon: '售后' + } + } + ] +} + +export default pgfisPrint + diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue new file mode 100644 index 00000000..8933b981 --- /dev/null +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue @@ -0,0 +1,749 @@ + + + + + + + + + + diff --git a/vue/src/views/pg-fis/basedate/m100Online/index.vue b/vue/src/views/pg-fis/basedate/m100Online/index.vue index 542659d9..7212991d 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/index.vue @@ -47,10 +47,10 @@ - - - - + - - - + - - - - + + - - - - + + - - - + { diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index ed353a88..66c51caf 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -126,7 +126,7 @@ > - + @@ -291,6 +291,7 @@ v-model="form.endHostSN" placeholder="" clearable + :disabled="true" size="small" style="width: 240px" /> @@ -373,10 +374,10 @@ import MBDetail from "./detailMB.vue"; import ZHBDetail from "./detailZHB.vue"; import { downloadFile } from "@/utils/crmindex.js"; import qs from "qs"; -import RepetitionMB from './RepetitionMB.vue' -import RepetitionZHB from './RepetitionZHB.vue' -import ScrapMB from './ScrapMB.vue' -import ScrapZHB from './ScrapZHB.vue' +import RepetitionMB from "./RepetitionMB.vue"; +import RepetitionZHB from "./RepetitionZHB.vue"; +import ScrapMB from "./ScrapMB.vue"; +import ScrapZHB from "./ScrapZHB.vue"; export default { name: "M100Online", @@ -390,7 +391,7 @@ export default { RepetitionMB, RepetitionZHB, ScrapMB, - ScrapZHB + ScrapZHB, }, directives: { permission }, filters: { @@ -477,6 +478,13 @@ export default { billStatus: undefined, state: [], }, + listQueryList: { + SkipCount: 0, + MaxResultCount: 15, + ProductLine: undefined, + BillStatus: undefined, + CanNotPrint: false, + }, listExportQuery: { erpAssemblyCode: undefined, erpAssemblyName: undefined, @@ -811,23 +819,18 @@ export default { getList(data) { this.listLoading = true; if (data != undefined) { - this.listQuery.SkipCount = (this.page - 1) * data.limit; + this.listQueryList.SkipCount = (this.page - 1) * data.limit; } else { - this.listQuery.SkipCount = (this.page - 1) * 15; - } - if (this.listQuery.OnlineTimeValue !== undefined) { - this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0]; - this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1]; - } - if (this.listQuery.ReceiveTimeValue !== undefined) { - this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0]; - this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1]; - } - if (this.listQuery.state !== undefined) { - this.listQuery.billStatus = this.listQuery.state[0]; + this.listQueryList.SkipCount = (this.page - 1) * 15; } + this.listQueryList.BillStatus = 2; //状态 + this.listQueryList.ProductLine = this.listQuery.productLine; //产线 + this.listQueryList.CanNotPrint = false; //不可打印 + console.log( + "日常打印M100查询条件:" + JSON.stringify(this.listQueryList) + ); this.$axios - .gets("/api/newjit/bill-m100/list", this.listQuery) + .gets("/api/newjit/bill-m100/list", this.listQueryList) .then((response) => { this.list = response.items; this.totalCount = response.totalCount; @@ -954,7 +957,9 @@ export default { }); return; } - this.hostSNQuery.productLine = this.listQuery.productLine; + (this.printNum = "12"), + (this.printNumZHB = "24"), + (this.hostSNQuery.productLine = this.listQuery.productLine); this.hostPrintQuery.productLine = this.listQuery.productLine; //后端服务更改了 前端跟着更改成以下方式 if (this.listQuery.productType === 1) { @@ -1182,7 +1187,6 @@ export default { ) .then((response) => { console.log("检查门板-大众顺序号是否断号"); - response.item = ["断号1", "断号2"]; if (response.item.length > 0) { //有断号 this.$confirm( @@ -1290,7 +1294,6 @@ export default { ) .then((response) => { console.log("检查柱护板-大众顺序号是否断号"); - response.item = ["断号1", "断号2"]; if (response.item.length > 0) { //有断号 this.$confirm( diff --git a/vue/src/views/pg-fis/basedate/select/index.vue b/vue/src/views/pg-fis/basedate/select/index.vue index a7b2e2b3..ab0dd54d 100644 --- a/vue/src/views/pg-fis/basedate/select/index.vue +++ b/vue/src/views/pg-fis/basedate/select/index.vue @@ -9,16 +9,13 @@ v-show="showSearch" :inline="true" > - - - @@ -29,7 +26,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -39,7 +36,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -50,7 +47,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -60,7 +57,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -71,7 +68,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -81,7 +78,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -93,7 +90,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -103,7 +100,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" @keyup.enter.native="handleQuery" /> @@ -147,7 +144,7 @@ - + @@ -297,7 +294,7 @@ placeholder="" clearable size="small" - style="width: 240px" + style="width: 200px" /> @@ -636,7 +633,6 @@ export default { handleDrawerClose(done) { done(); }, - fetchData(id) { //循环动态 this.$axios diff --git a/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue b/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue index d5ca59b3..e23369c3 100644 --- a/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue +++ b/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue @@ -1031,7 +1031,7 @@ export default { } }, handleRowClick(row, column, event) { - this.$refs.multipleTable.clearSelection(); + //this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.toggleRowSelection(row); }, /* 获取车型数据源 */ From a5f2db040227a99224b72e7fe9cccf4be5287eb8 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Tue, 21 Dec 2021 21:19:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/router/index.js | 8 ++++---- .../basedate/m100Online/normalPritIndex.vue | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/vue/src/router/index.js b/vue/src/router/index.js index 39b06ed9..d5f65438 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -169,11 +169,11 @@ export const asyncRoutes = [ /** when your routing map is too long, you can split it into small modules **/ managerRouter,//系统首页 personRouter,//系统管理 - basedataRouter,//基础数据维护 - vwFisDataRouter,//结算与开票数据导入 - billdataRouter,//销售结算与开票报表 + //basedataRouter,//基础数据维护 + //vwFisDataRouter,//结算与开票数据导入 + //billdataRouter,//销售结算与开票报表 //businessdataRouter, - wheeldataRouter,//大众看板和备件 + //wheeldataRouter,//大众看板和备件 pgfisPrint,//排序单打印 pgfis,//派格fis //JobTimeDataRouter,//后台作业监控 diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 66c51caf..cfe34e11 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -283,6 +283,7 @@ v-model="form.beginHostSN" placeholder="" clearable + :disabled="true" size="small" style="width: 240px" /> @@ -445,6 +446,7 @@ export default { list: null, totalCount: 0, listLoading: true, + listLoaddingPrint: true, customerInfo: { bomId: "", }, @@ -1124,6 +1126,7 @@ export default { }, /**保存*/ save() { + //this.listLoaddingPrint = true; if (this.isShowHostSN === true) { if (this.form.beginHostSN === "" || this.form.endHostSN === "") { this.$message({ @@ -1233,14 +1236,19 @@ export default { .then((response) => { console.log("获取文件base64编码"); console.log(response); + this.formLoading = false; this.printpdf(response); //打印我文件流 + + }) + .catch((error) => { + this.formLoading = false; }); } }); }) .catch(() => {}); - } //无断号 - else { + } + else {//无断号 //门板 //传递大众顺序号起止 this.$axios @@ -1272,7 +1280,12 @@ export default { .then((response) => { console.log("获取文件base64编码"); console.log(response); + this.formLoading = false; this.printpdf(response); //打印我文件流 + + }) + .catch((error) => { + this.formLoading = false; }); } }) From 3f20081a236ea365e9ec253850f0b96b36c85fcd Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Wed, 22 Dec 2021 09:56:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E4=BB=A3=E7=A0=811222?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basedate/m100Online/normalPritIndex.vue | 529 ++++++++++++++++-- 1 file changed, 489 insertions(+), 40 deletions(-) diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index cfe34e11..b6db8ffd 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -280,12 +280,13 @@ v-show="isShowHostSN" > { - if (response.item !== null) { - this.form.beginHostSN = parseInt(response.item); - if (val == 12) { + if (val == 12) { + //默认值是12 + this.$axios + .gets( + "/api/newjit/bill-m100/get-print-start-hostsn2", + this.hostSNQuery + ) + .then((response) => { + if (response.item !== null) { + this.form.beginHostSN = parseInt(response.item); //门板 this.form.endHostSN = parseInt(response.item) + 11; } else { - this.form.endHostSN = parseInt(response.item) + this.printNum - 1; + this.$message({ + message: "获取不到大众顺序号", + type: "warning", + }); + return; } - } else { - this.$message({ - message: "获取不到大众顺序号", - type: "warning", - }); - return; - } - }); + }); + } else { + //起止顺序号默认数量不为12 + this.form.endHostSN = + parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1; + } + // this.$axios + // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) + // .then((response) => { + // if (response.item !== null) { + // this.form.beginHostSN = parseInt(response.item); + // if (val == 12) { + // //门板 + // this.form.endHostSN = parseInt(response.item) + 11; + // } else { + // this.form.endHostSN = + // parseInt(response.item) + parseInt(this.printNum) - 1; + // } + // } else { + // this.$message({ + // message: "获取不到大众顺序号", + // type: "warning", + // }); + // return; + // } + // }); }, //柱护板打印更改 valueNumChangeZHB(val) { this.printNumZHB = val; - this.$axios - .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) - .then((response) => { - if (response.item !== null) { - this.form.beginHostSN = parseInt(response.item); - if (val == 24) { - //柱护板 - this.form.endHostSN = parseInt(response.item) + 23; + if (val == 12) { + //默认值是12 + this.$axios + .gets( + "/api/newjit/bill-m100/get-print-start-hostsn2", + this.hostSNQuery + ) + .then((response) => { + if (response.item !== null) { + this.form.beginHostSN = parseInt(response.item); + //门板 + this.form.endHostSN = parseInt(response.item) + 11; } else { - this.form.endHostSN = - parseInt(response.item) + this.printNumZHB - 1; + this.$message({ + message: "获取不到大众顺序号", + type: "warning", + }); + return; } - } else { - this.$message({ - message: "获取不到大众顺序号", - type: "warning", - }); - return; - } - }); + }); + } else { + //起止顺序号默认数量不为12 + this.form.endHostSN = + parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1; + } + // this.$axios + // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) + // .then((response) => { + // if (response.item !== null) { + // this.form.beginHostSN = parseInt(response.item); + // if (val == 24) { + // //柱护板 + // this.form.endHostSN = parseInt(response.item) + 23; + // } else { + // this.form.endHostSN = + // parseInt(response.item) + this.printNumZHB - 1; + // } + // } else { + // this.$message({ + // message: "获取不到大众顺序号", + // type: "warning", + // }); + // return; + // } + // }); }, //抽屉 handleDrawerOpen(param) { @@ -1124,8 +1189,394 @@ export default { this.isShowHostSN = false; this.isShowVin = true; }, - /**保存*/ save() { + this.$refs.form.validate((valid) => { + if (valid) { + //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 { + //传给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 { + //传给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 { + //传给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编码 */ + 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 { + //传给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 { + //传给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 === "") { @@ -1238,7 +1689,6 @@ export default { console.log(response); this.formLoading = false; this.printpdf(response); //打印我文件流 - }) .catch((error) => { this.formLoading = false; @@ -1247,8 +1697,8 @@ export default { }); }) .catch(() => {}); - } - else {//无断号 + } else { + //无断号 //门板 //传递大众顺序号起止 this.$axios @@ -1282,7 +1732,6 @@ export default { console.log(response); this.formLoading = false; this.printpdf(response); //打印我文件流 - }) .catch((error) => { this.formLoading = false;