|
|
@ -95,6 +95,7 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts |
|
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
|
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|
|
|
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|
|
|
import {mainListCancelBtn} from "@/utils/disposition/defaultButtons"; |
|
|
|
|
|
|
|
defineOptions({ name: 'EquipmentRepairJobMain' }) |
|
|
|
|
|
|
@ -188,6 +189,7 @@ const butttondata = (row) => { |
|
|
|
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 执行 |
|
|
|
defaultButtons.mainListTransferBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 转办 |
|
|
|
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentRepairJobMain:update'}), //完成 |
|
|
|
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentRepairJobMain:update'}), //作废 |
|
|
|
defaultButtons.mainListValidateRepairBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentRepairJobMain:update'}), // 维修验证 |
|
|
|
defaultButtons.mainListValidateReportBtn({hide: isShowBaoXiuButton(row),hasPermi:'eam:equipmentRepairJobMain:update'}), // 报修验证 |
|
|
|
] |
|
|
@ -205,6 +207,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
handleExecute(row.id) |
|
|
|
} else if (val == 'finish') { // 完成 |
|
|
|
handleFinish(row) |
|
|
|
} else if (val == 'cancel') { // 作废 |
|
|
|
handleCancel(row.id) |
|
|
|
} else if (val == 'validate_repair') { // 维修验证 |
|
|
|
handleValidateRepair(row) |
|
|
|
} else if (val == 'validate_report') { // 报修验证 |
|
|
@ -390,6 +394,27 @@ const handleReceive = async (id: number) => { |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 作废按钮操作 */ |
|
|
|
const handleCancel = async (id: number) => { |
|
|
|
try { |
|
|
|
// 二次确认 |
|
|
|
await message.delConfirm('是否作废所选中任务?'); |
|
|
|
const params = ref({ |
|
|
|
id: '', |
|
|
|
status:'', |
|
|
|
}) |
|
|
|
params.value.id = id |
|
|
|
params.value.status = '9' |
|
|
|
// 发起 |
|
|
|
await EquipmentRepairJobMainApi.updateEquipmentRepairOrder(params.value) |
|
|
|
message.success(t('执行成功')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 执行按钮操作 */ |
|
|
|
const handleExecute = async (id: number) => { |
|
|
|
try { |
|
|
|