From c595d693b05a2950114269c0ea09438066e2849b Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 7 Nov 2024 17:47:31 +0800 Subject: [PATCH] =?UTF-8?q?11/7=20=E6=89=93=E5=8D=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/workPlace/SysWorkplaceFreight.js | 19 +++ .../workplace/addWorkplaceFreightDialog.vue | 27 ++--- src/views/basic/workplace/freightManage.vue | 111 +++++++++++++++--- 3 files changed, 122 insertions(+), 35 deletions(-) diff --git a/src/api/basic/workPlace/SysWorkplaceFreight.js b/src/api/basic/workPlace/SysWorkplaceFreight.js index eca3dea5..05e1c748 100644 --- a/src/api/basic/workPlace/SysWorkplaceFreight.js +++ b/src/api/basic/workPlace/SysWorkplaceFreight.js @@ -41,3 +41,22 @@ export function updateWorkplaceFreight(query) { data: query }); } + + + +export function printAllFreight(query) { + return axios({ + url: "/udiwms/WorkplaceFreight/printAllFreight", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} +// export function printAllFreight(query) { +// return axios({ +// url: "/udiwms/WorkplaceFreight/printAllFreight", +// method: "post", +// data: query +// }); +// } diff --git a/src/views/basic/workplace/addWorkplaceFreightDialog.vue b/src/views/basic/workplace/addWorkplaceFreightDialog.vue index b0a206b9..a5bdc758 100644 --- a/src/views/basic/workplace/addWorkplaceFreightDialog.vue +++ b/src/views/basic/workplace/addWorkplaceFreightDialog.vue @@ -114,15 +114,15 @@ - - - - - - - - - +
@@ -225,14 +225,7 @@ export default { } }) } else { - addWorkplaceFreight(this.formData).then(res => { - if (res.code == 20000) { - this.$message.success('新增成功') - this.closeDialog() - } else { - this.$message.error(res.message) - } - }) + this.closeDialog() } } diff --git a/src/views/basic/workplace/freightManage.vue b/src/views/basic/workplace/freightManage.vue index f7f9f553..7fe6fba6 100644 --- a/src/views/basic/workplace/freightManage.vue +++ b/src/views/basic/workplace/freightManage.vue @@ -8,8 +8,12 @@