|
|
@ -90,7 +90,8 @@ import * as ItemBasicApi from '@/api/wms/itembasic' |
|
|
|
import * as BomApi from "@/api/wms/bom"; |
|
|
|
import * as SwitchApi from '@/api/wms/switch' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 预生产备件计划 |
|
|
|
defineOptions({ name: 'ProductionMainPredictSparePart' }) |
|
|
|
|
|
|
@ -124,6 +125,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow[formField] = item[searchField] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['itemName'] = item['itemName'] |
|
|
|
|
|
|
|
// 查看BOM版本 |
|
|
|
const param1 = { |
|
|
|
productItemCode: item['itemCode'], |
|
|
@ -495,19 +498,18 @@ const handleDelete = async (id: number) => { |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await ProductionMainApi.exportProductionMainPredictSparePart(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
loadDone() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|