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