|
@ -94,6 +94,7 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts |
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; |
|
|
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|
|
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; |
|
|
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|
|
import * as ToolItemApi from "@/api/eam/toolAccounts"; |
|
|
|
|
|
import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'EquipmentInspectionMain' }) |
|
|
defineOptions({ name: 'EquipmentInspectionMain' }) |
|
@ -189,9 +190,10 @@ const isShowEditStatusButton = (row) => { |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentInspectionMain:update'}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentInspectionMain:update'}), // 编辑 |
|
|
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentInspectionMain:update'}), // 接单 |
|
|
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentInspectionMain:update'}), // 接单 |
|
|
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentInspectionMain:update'}), // 执行 |
|
|
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentInspectionMain:update'}), // 执行 |
|
|
|
|
|
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), //作废 |
|
|
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), // 完成巡检 |
|
|
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentInspectionMain:update'}), // 完成巡检 |
|
|
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentInspectionMain:update'}), // 验证 |
|
|
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentInspectionMain:update'}), // 验证 |
|
|
//defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentInspectionMain:update'}), |
|
|
//defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentInspectionMain:update'}), |
|
@ -213,6 +215,8 @@ const buttonTableClick = async (val, row) => { |
|
|
handleFinish(row) |
|
|
handleFinish(row) |
|
|
} else if (val == 'validate') { // 验证 |
|
|
} else if (val == 'validate') { // 验证 |
|
|
handleValidate(row) |
|
|
handleValidate(row) |
|
|
|
|
|
} else if (val == 'cancel') { // 作废 |
|
|
|
|
|
handleCancel(row.id) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -392,6 +396,26 @@ const handleValidate = async (row) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 作废按钮操作 */ |
|
|
|
|
|
const handleCancel = async (id: number) => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 二次确认 |
|
|
|
|
|
await message.delConfirm('是否作废所选中任务?'); |
|
|
|
|
|
const params = ref({ |
|
|
|
|
|
id: '', |
|
|
|
|
|
status:'', |
|
|
|
|
|
}) |
|
|
|
|
|
params.value.id = id |
|
|
|
|
|
params.value.status = '8' |
|
|
|
|
|
// 发起 |
|
|
|
|
|
await EquipmentInspectionMainApi.updateEquipmentInspectionOrder(params.value) |
|
|
|
|
|
message.success(t('执行成功')) |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} catch {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const detailBasicFormOnChange = (field, item) => { |
|
|
const detailBasicFormOnChange = (field, item) => { |
|
|
//未完成 |
|
|
//未完成 |
|
|
if(field == 'result' && item == '1'){ |
|
|
if(field == 'result' && item == '1'){ |
|
|