|
|
@ -47,7 +47,7 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countJobMain.data' |
|
|
|
import { CountJobMain, CountJobMainRules, CountJobDetail, CountJobDetailRules } from './countadjustWork.data' |
|
|
|
import * as CountJobMainApi from '@/api/eam/item/countJobMain' |
|
|
|
import * as CountJobDetailApi from '@/api/eam/item/countJobDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
@ -156,6 +156,7 @@ |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainExport(null),// 导出 |
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
] |
|
|
@ -163,9 +164,13 @@ |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
|
|
|
|
if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} |
|
|
|
else if (val == 'mainExport') { // 导出 |
|
|
|
handleMainExport(row.id) |
|
|
|
} |
|
|
|
else if (val == 'mainOrderClo') { // 关闭 |
|
|
|
handleClose(row.id) |
|
|
|
} |
|
|
@ -200,6 +205,23 @@ |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
/** 列表导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleMainExport = async (id : number) => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await CountJobMainApi.handleMainExport(id) |
|
|
|
download.excel(data, '盘点工单.xlsx') |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleClose = async (id : number) => { |
|
|
|
try { |
|
|
@ -214,7 +236,6 @@ |
|
|
|
} |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
const handleExport = async () => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|