Browse Source

EAM ——> 点检巡检保养 工单作废

master_hella_20240701
gaojs 5 months ago
parent
commit
9e24028919
  1. 26
      src/views/eam/equipmentInspectionMain/index.vue
  2. 25
      src/views/eam/equipmentMaintenanceMain/index.vue
  3. 25
      src/views/eam/equipmentSpotCheckMain/index.vue
  4. 2
      src/views/eam/planInspection/index.vue
  5. 2
      src/views/eam/planSpotCheck/index.vue

26
src/views/eam/equipmentInspectionMain/index.vue

@ -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'){

25
src/views/eam/equipmentMaintenanceMain/index.vue

@ -104,6 +104,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 EquipmentInspectionMainApi from "@/api/eam/equipmentInspectionMain";
defineOptions({ name: 'EquipmentMaintenanceMain' }) defineOptions({ name: 'EquipmentMaintenanceMain' })
@ -197,9 +198,10 @@ const isShowEditStatusButton = (row) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentMaintenanceMain:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}), defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentMaintenanceMain:update'}),
@ -221,6 +223,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)
} }
} }
@ -391,6 +395,25 @@ 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 EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
/** 启用 */ /** 启用 */
const handleEnable = async (id: number) => { const handleEnable = async (id: number) => {
try { try {

25
src/views/eam/equipmentSpotCheckMain/index.vue

@ -93,6 +93,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 EquipmentRepairJobMainApi from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'EquipmentSpotCheckMain' }) defineOptions({ name: 'EquipmentSpotCheckMain' })
@ -187,9 +188,10 @@ const isShowEditStatusButton = (row) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hide: isShowEditStatusButton(row),hasPermi:'eam:equipmentSpotCheckMain:update'}), // defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['3','4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentSpotCheckMain:update'}), // defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), // defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListCancelBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentSpotCheckMain:update'}), // defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //
//defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentSpotCheckMain:update'}), //defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:equipmentSpotCheckMain:update'}),
@ -211,6 +213,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)
} }
} }
@ -389,6 +393,25 @@ 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 EquipmentSpotCheckMainApi.updateEquipmentSpotCheckOrder(params.value)
message.success(t('执行成功'))
//
await getList()
} catch {}
}
const detailBasicFormOnChange = (field, item) => { const detailBasicFormOnChange = (field, item) => {
// //

2
src/views/eam/planInspection/index.vue

@ -159,7 +159,7 @@ const isShowStatusButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'eam:planInspection:update'}), // defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), // defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planInspection:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planInspection:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planInspection:update'}), defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planInspection:update'}),

2
src/views/eam/planSpotCheck/index.vue

@ -160,7 +160,7 @@ const isShowStatusButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'eam:planSpotCheck:update'}), // defaultButtons.mainListEditBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), // defaultButtons.mainListAuditingBtn({hide: isShowStatusButton(row,['0']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planSpotCheck:update'}), // defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:planSpotCheck:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planSpotCheck:update'}), defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:planSpotCheck:update'}),

Loading…
Cancel
Save