From d1409d90690169b5a2ccb1e61ac95181c27751d2 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 13 Aug 2024 21:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB=E5=88=B0?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorychangeRecordMain/index.vue | 4 +++- .../inventorychangeRequestMain/index.vue | 6 ++++-- .../inventorymoveJobMain/index.vue | 16 +++++++++------- .../inventorymoveRecordMain/index.vue | 18 ++++++++++-------- .../inventorymoveRecordMainNew/index.vue | 6 ++++-- .../inventorymoveRequestMain/index.vue | 14 ++++++++------ .../inventorymoveRequestMainOKHOLD/index.vue | 14 ++++++++------ 7 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue index 1160b62f2..97a9fc005 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue @@ -68,6 +68,7 @@ import * as InventorychangeRecordMainApi from '@/api/wms/inventorychangeRecordMa import * as InventorychangeRecordDetailApi from '@/api/wms/inventorychangeRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 库存修改记录主 defineOptions({ name: 'InventorychangeRecordMain' }) @@ -201,8 +202,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(tableObject.params) - download.excel(data, '库存修改记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 8aaab1ed4..21289bbea 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -105,6 +105,7 @@ import { InventorychangeRequestMain,InventorychangeRequestMainRules,Inventorycha import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequestMain' import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { formatDate } from '@/utils/formatTime' const message = useMessage() // 消息弹窗 @@ -404,8 +405,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params) - download.excel(data, '库存修改申请.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -507,7 +509,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '库存修改申请导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue index 496dd016e..74a558456 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue @@ -73,6 +73,7 @@ import * as InventorymoveJobMainApi from '@/api/wms/inventorymoveJobMain' import * as InventorymoveJobDetailApi from '@/api/wms/inventorymoveJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 库存转移任务主 defineOptions({ name: 'InventorymoveJobMain' }) @@ -299,27 +300,28 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdJobMain'){ const data = await InventorymoveJobMainApi.exportOkToHoldJobMain(tableObject.params) - download.excel(data, '合格转隔离任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookJobMain') { const data = await InventorymoveJobMainApi.exportNokToHoldJobMain(tableObject.params) - download.excel(data, '不合格转隔离任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookJobMain') { const data = await InventorymoveJobMainApi.exportHoldToOkJobMain(tableObject.params) - download.excel(data, '隔离转合格任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtoscrapJobMain') { const data = await InventorymoveJobMainApi.exportHoldToScrapJobMain(tableObject.params) - download.excel(data, '隔离转报废任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'OktoscrapJobtMain') { const data = await InventorymoveJobMainApi.exportOkToScrapJobMain(tableObject.params) - download.excel(data, '合格转报废任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'ScraptoholdJobMain') { const data = await InventorymoveJobMainApi.exportScrapToHoldJobMain(tableObject.params) - download.excel(data, '报废转隔离任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await InventorymoveJobMainApi.exportInventorymoveJobMain(tableObject.params) - download.excel(data, '库存转移任务主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue index 4fed4c42e..101139d83 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue @@ -71,6 +71,7 @@ import * as InventorymoveRecordMainApi from '@/api/wms/inventorymoveRecordMain' import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 库存转移记录主 defineOptions({ name: 'InventorymoveRecordMain' }) @@ -227,27 +228,28 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRecordMain'){ const data = await InventorymoveRecordMainApi.exportOkToHoldRecordMain(tableObject.params) - download.excel(data, '合格转隔离记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookRecordMain') { const data = await InventorymoveRecordMainApi.exportNokToHoldRecordMain(tableObject.params) - download.excel(data, '不合格转隔离记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookRecordMain') { const data = await InventorymoveRecordMainApi.exportHoldToOkRecordMain(tableObject.params) - download.excel(data, '隔离转合格记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtoscrapRecordMain') { const data = await InventorymoveRecordMainApi.exportHoldToScrapRecordMain(tableObject.params) - download.excel(data, '隔离转报废记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'OktoscrapRecordtMain') { const data = await InventorymoveRecordMainApi.exportOkToScrapRecordMain(tableObject.params) - download.excel(data, '合格转报废记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'ScraptoholdRecordMain') { const data = await InventorymoveRecordMainApi.exportScrapToHoldRecordMain(tableObject.params) - download.excel(data, '报废转隔离记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params) - download.excel(data, '库存转移记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { @@ -264,7 +266,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: importFileName.value + '.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue index 35b55234f..aafffdb83 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -97,6 +97,7 @@ import * as InventorymoveRecordMainApi from '@/api/wms/inventorymoveRecordMain' import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { formatDate } from '@/utils/formatTime' // 库存转移记录主 defineOptions({ name: 'InventorymoveRecordMainNew' }) @@ -290,8 +291,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params) - download.excel(data, '库存转移记录主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -421,7 +423,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: importFileName.value + '.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 499e908c3..9695926a6 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -88,6 +88,7 @@ import { InventorymoveRequestMain,InventorymoveRequestMainRules,InventorymoveReq import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain' import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { formatDate } from '@/utils/formatTime' // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -639,18 +640,19 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRequestMain'){ const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) - download.excel(data, '物料转隔离申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookRequestMain') { const data = await InventorymoveRequestMainApi.exportHoldToOkRequestMain(tableObject.params) - download.excel(data, '隔离转合格申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtoscrapRequestMain') { const data = await InventorymoveRequestMainApi.exportHoldToScrapRequestMain(tableObject.params) - download.excel(data, '隔离转报废申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'OktoscrapRequestMain') { const data = await InventorymoveRequestMainApi.exportOkToScrapRequestMain(tableObject.params) - download.excel(data, '合格转报废申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } // else if ( routeName.value == 'ScraptoholdRequestMain') { // const data = await InventorymoveRequestMainApi.exportScrapToHoldRequestMain(tableObject.params) @@ -658,7 +660,7 @@ const handleExport = async () => { // } else{ const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params) - download.excel(data, '库存转移申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { @@ -762,7 +764,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: importFileName.value + '.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index 7ddee302a..d58c2c9f7 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -89,6 +89,7 @@ import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as LocationApi from '@/api/wms/location' +import { formatDate } from '@/utils/formatTime' // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -668,18 +669,19 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRequestMain'){ const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) - download.excel(data, '物料转隔离申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtookRequestMain') { const data = await InventorymoveRequestMainApi.exportHoldToOkRequestMain(tableObject.params) - download.excel(data, '隔离转合格申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'HoldtoscrapRequestMain') { const data = await InventorymoveRequestMainApi.exportHoldToScrapRequestMain(tableObject.params) - download.excel(data, '隔离转报废申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else if ( routeName.value == 'OktoscrapRequestMain') { const data = await InventorymoveRequestMainApi.exportOkToScrapRequestMain(tableObject.params) - download.excel(data, '合格转报废申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } // else if ( routeName.value == 'ScraptoholdRequestMain') { // const data = await InventorymoveRequestMainApi.exportScrapToHoldRequestMain(tableObject.params) @@ -687,7 +689,7 @@ const handleExport = async () => { // } else{ const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(tableObject.params) - download.excel(data, '库存转移申请主.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { @@ -791,7 +793,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: importFileName.value + '.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后