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