|
@ -67,6 +67,7 @@ import * as PackageApi from '@/api/wms/package' |
|
|
import { formatTime } from '@/utils/index' |
|
|
import { formatTime } from '@/utils/index' |
|
|
import * as Itempackaging from '@/api/wms/itempackage' |
|
|
import * as Itempackaging from '@/api/wms/itempackage' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
// 采购标签 |
|
|
// 采购标签 |
|
|
defineOptions({ name: 'PurchasePackage' }) |
|
|
defineOptions({ name: 'PurchasePackage' }) |
|
@ -154,6 +155,7 @@ const buttonBaseClick = (val, item) => { |
|
|
} else if (val == 'import') { // 导入 |
|
|
} else if (val == 'import') { // 导入 |
|
|
handleImport() |
|
|
handleImport() |
|
|
} else if (val == 'export') { // 导出 |
|
|
} else if (val == 'export') { // 导出 |
|
|
|
|
|
debugger |
|
|
handleExport() |
|
|
handleExport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
@ -241,12 +243,13 @@ const handleDelete = async (id: number) => { |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
|
try { |
|
|
try { |
|
|
|
|
|
debugger |
|
|
// 导出的二次确认 |
|
|
// 导出的二次确认 |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
const data = await BarbasicApi.exportBarbasic(tableObject.params) |
|
|
const data = await BarbasicApi.exportBarbasic(tableObject.params) |
|
|
download.excel(data, '制造件件标签.xlsx') |
|
|
download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
@ -318,7 +321,7 @@ const handleImport = () => { |
|
|
// 导入附件弹窗所需的参数 |
|
|
// 导入附件弹窗所需的参数 |
|
|
const importTemplateData = reactive({ |
|
|
const importTemplateData = reactive({ |
|
|
templateUrl: '', |
|
|
templateUrl: '', |
|
|
templateTitle: '包装导入模版.xlsx' |
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|