From 87e3f8bf35e0973580d1a38bc0501d6cdd4be503 Mon Sep 17 00:00:00 2001 From: tengxiaofei <302828528@qq.com> Date: Fri, 20 Sep 2024 10:06:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E9=97=AE=E9=A2=98=EF=BC=9A?= =?UTF-8?q?=E9=A2=84=E7=94=9F=E4=BA=A7=E6=94=B6=E8=B4=A7=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E5=88=B6=E5=93=81=E5=9B=9E=E6=94=B6=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=EF=BC=8C=E8=B0=83=E7=94=A8=E5=85=AC=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=8C=BA=E5=88=86type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productreceiptRecordMain/index.ts | 14 +++++++------- .../productreceiptRecordMain/index.vue | 13 +++++++++++++ .../productreceiptscrapRecordMain/index.vue | 12 ++++++++++++ 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index 0fe298f8c..5bf690773 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => { // 导出制品收货记录主 Excel export const exportProductreceiptRecordMain = async (params) => { - params.type = 'predict' + // params.type = 'predict' if (params.isSearch) { - const cmd = { - 'column':'type', - 'action':'==', - 'value':'predict' - } - params.filters.push(cmd) + // const cmd = { + // 'column':'type', + // 'action':'==', + // 'value':'predict' + // } + // params.filters.push(cmd) delete params.isSearch const data = {...params} return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index f6eafc52b..b6a9a54b5 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -339,6 +339,19 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) + debugger + tableObject.params.type = 'predict' + if (tableObject.params.isSearch){ + const cmd = { + 'column':'type', + 'action':'==', + 'value':'predict' + } + if (!Array.isArray(tableObject.params.filters)) { + tableObject.params.filters = []; + } + tableObject.params.filters.push(cmd) + } const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue index be0ca8bfa..870d2c51f 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue @@ -201,6 +201,18 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) + tableObject.params.type = 'scrap' + if (tableObject.params.isSearch){ + const cmd = { + 'column':'type', + 'action':'==', + 'value':'scrap' + } + if (!Array.isArray(tableObject.params.filters)) { + tableObject.params.filters = []; + } + tableObject.params.filters.push(cmd) + } const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch {