From 2d4dc1139e9fbbb0c710fb7e0e60cb3b72088647 Mon Sep 17 00:00:00 2001 From: "hongxi.lian" Date: Tue, 28 Nov 2023 15:50:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/inventoryinitRecordMain/index.ts | 7 ++++- src/api/wms/inventoryinitRequestMain/index.ts | 9 ++++-- .../inventoryinitRecordMain/index.vue | 2 +- .../inventoryinitRequestMain/index.vue | 28 +++++++++---------- .../inventoryinitRequestMain.data.ts | 2 +- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/api/wms/inventoryinitRecordMain/index.ts b/src/api/wms/inventoryinitRecordMain/index.ts index 40e5b5521..173941d31 100644 --- a/src/api/wms/inventoryinitRecordMain/index.ts +++ b/src/api/wms/inventoryinitRecordMain/index.ts @@ -53,7 +53,12 @@ export const deleteInventoryinitRecordMain = async (id: number) => { // 导出库存初始化记录主 Excel export const exportInventoryinitRecordMain = async (params) => { - return await request.download({ url: `/wms/inventoryinit-record-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/inventoryinit-record-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/inventoryinit-record-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/inventoryinitRequestMain/index.ts b/src/api/wms/inventoryinitRequestMain/index.ts index 821a49cff..1cab338b4 100644 --- a/src/api/wms/inventoryinitRequestMain/index.ts +++ b/src/api/wms/inventoryinitRequestMain/index.ts @@ -5,7 +5,7 @@ export interface InventoryinitRequestMainVO { number: string businessType: string remark: string - creationTime: Date + createTime: Date creator: string requestTime: Date dueTime: Date @@ -75,7 +75,12 @@ export const deleteInventoryinitRequestMain = async (id: number) => { // 导出库存初始化申请主 Excel export const exportInventoryinitRequestMain = async (params) => { - return await request.download({ url: `/wms/inventoryinit-request-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/inventoryinit-request-main/export-excel-senior`, data }) + } else { + return await request.download({ url: `/wms/inventoryinit-request-main/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue index ba1da5289..06a81db77 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue @@ -141,7 +141,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await InventoryinitRecordMainApi.exportInventoryinitRecordMain(setSearchParams) + const data = await InventoryinitRecordMainApi.exportInventoryinitRecordMain(tableObject.params) download.excel(data, '库存初始化记录主.xlsx') } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index 24cc91892..1e7ff7f8a 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -187,7 +187,7 @@ const butttondata = (row) => { defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventoryinit-request-main:agree'}), // 审批通过 defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventoryinit-request-main:handle'}), // 处理 defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventoryinit-request-main:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventoryinit-request-main:delete'}), // 删除 + ] } @@ -207,8 +207,6 @@ const buttonTableClick = async (val, row) => { handleHandle(row.id) } else if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) } } @@ -293,17 +291,17 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 删除按钮操作 */ -const handleDelete = async (id: number) => { - try { - // 删除的二次确认 - await message.delConfirm() - // 发起删除 - await InventoryinitRequestMainApi.deleteInventoryinitRequestMain(id) - message.success(t('common.delSuccess')) - // 刷新列表 - await getList() - } catch {} -} +// const handleDelete = async (id: number) => { +// try { +// // 删除的二次确认 +// await message.delConfirm() +// // 发起删除 +// await InventoryinitRequestMainApi.deleteInventoryinitRequestMain(id) +// message.success(t('common.delSuccess')) +// // 刷新列表 +// await getList() +// } catch {} +// } /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 @@ -313,7 +311,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await InventoryinitRequestMainApi.exportInventoryinitRequestMain(setSearchParams) + const data = await InventoryinitRequestMainApi.exportInventoryinitRequestMain(tableObject.params) download.excel(data, '库存初始化申请主.xlsx') } catch { } finally { diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts index 74e7d77d5..534413c6a 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts @@ -96,7 +96,7 @@ export const InventoryinitRequestMain = useCrudSchemas(reactive([ }, { label: '创建时间', - field: 'creationTime', + field: 'createTime', formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss'