|
|
@ -101,10 +101,11 @@ |
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
|
import TableDetail from '@/components/TableDetail/src/TableDetail.vue' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
|
|
|
|
// 采购订单 |
|
|
|
defineOptions({ name: 'PurchaseMain' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
@ -483,19 +484,18 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await PurchaseMainApi.exportPurchaseMain(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
loadDone() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|