From 043e11131a46b0bb4f621b3fb6ad3bf4b85054ed Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Wed, 16 Oct 2024 13:17:22 +0800 Subject: [PATCH] =?UTF-8?q?YT-421=E3=80=81YT-421=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=94=B6=E8=B4=A7=E7=94=B3=E8=AF=B7=E3=80=81=E9=A2=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/productreceiptJobMain/index.ts | 16 ++++++++++++++++ src/api/wms/productreceiptRequestMain/index.ts | 12 +++++++++++- .../productreceiptJobMain/index.vue | 3 ++- .../productreceiptRequestMain/index.vue | 3 ++- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/api/wms/productreceiptJobMain/index.ts b/src/api/wms/productreceiptJobMain/index.ts index e18fece95..437d43478 100644 --- a/src/api/wms/productreceiptJobMain/index.ts +++ b/src/api/wms/productreceiptJobMain/index.ts @@ -116,6 +116,22 @@ export const exportProductreceiptJobMain = async (params) => { } } +export const exportProductreceiptJobMainPredict = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const cmd = { + 'column':'type', + 'action':'==', + 'value':'predict' + } + params.filters.push(cmd) + const data = {...params} + return await request.downloadPost({ url: `/wms/productreceipt-job-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params }) + } +} + // 导出装配收货任务主 Excel export const exportProductreceiptJobMainAssemble = async (params) => { diff --git a/src/api/wms/productreceiptRequestMain/index.ts b/src/api/wms/productreceiptRequestMain/index.ts index 58529a98f..6c28f7978 100644 --- a/src/api/wms/productreceiptRequestMain/index.ts +++ b/src/api/wms/productreceiptRequestMain/index.ts @@ -93,6 +93,16 @@ export const exportProductreceiptRequestMain = async (params) => { } } +export const exportProductreceiptRequestMainPredict = async (params) => { + params.type = 'predict' + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/productreceipt-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/productreceipt-request-main/export-excel`, params }) + } +} + // 导出制品收货申请主 Excel export const exportProductreceiptRequestMainAssemble = async (params) => { params.type = 'assemble' @@ -143,4 +153,4 @@ export const handle = (id) => { // 创建标签 export const productCreateLabel = async (data: ProductreceiptRequestMainVO) => { return await request.post({ url: `/wms/productreceipt-request-main/productCreateLabel`, data }) -} \ No newline at end of file +} diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index 9f076b485..bc10aba3e 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -106,6 +106,7 @@ import { import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import {exportProductreceiptJobMainPredict} from "@/api/wms/productreceiptJobMain"; const { loadStart, loadDone } = usePageLoading() // 制品收货任务主 // 预生产收货任务主 @@ -352,7 +353,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) + const data = await ProductreceiptJobMainApi.exportProductreceiptJobMainPredict(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index e78a592ce..00d1f931c 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -189,6 +189,7 @@ import { formatDate } from '@/utils/formatTime' import * as WorkshopApi from '@/api/wms/workshop' import * as ConfigApi from '@/api/infra/config' import { usePageLoading } from '@/hooks/web/usePageLoading' +import {exportProductreceiptRequestMainPredict} from "@/api/wms/productreceiptRequestMain"; const { loadStart, loadDone } = usePageLoading() // 制品收货申请 // 预生产收货申请 @@ -687,7 +688,7 @@ const handleExport = async () => { // 发起导出 loadStart() const excelTitle = ref(route.meta.title) - const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain( + const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMainPredict( tableObject.params ) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)