|
|
@ -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` |
|
|
|
}) |
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
|