Browse Source

EAM ——> 维修工单完成添加记录。

master_hella_20240701
gaojs 6 months ago
parent
commit
37788272e4
  1. 7
      src/api/eam/equipmentRepairJobMain/index.ts
  2. 33
      src/views/eam/equipmentRepairJobMain/index.vue

7
src/api/eam/equipmentRepairJobMain/index.ts

@ -104,8 +104,13 @@ export const updateEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO)
return await request.post({ url: `/eam/equipment-repair-job-main/updateOrder`, data })
}
//验证不通过,打回维修工单
//维修验证不通过,打回维修工单
export const backEquipmentRepairOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/fallback`, data })
}
//报修验证不通过,生成新工单
export const createEquipmentRepairNewOrder = async (data: EquipmentRepairJobMainVO) => {
return await request.post({ url: `/eam/equipment-repair-job-main/createNew`, data })
}

33
src/views/eam/equipmentRepairJobMain/index.vue

@ -88,6 +88,7 @@ import Detail from '@/views/eam/equipmentRepairJobMain/EquipmentRepairJobDetail.
import FinishForm1 from '@/views/eam/equipmentRepairJobMain/finishForm1.vue'
import FinishForm2 from '@/views/eam/equipmentRepairJobMain/finishForm2.vue'
import FinishForm3 from '@/views/eam/equipmentRepairJobMain/finishForm3.vue'
import {createEquipmentRepairNewOrder} from "@/api/eam/equipmentRepairJobMain";
defineOptions({ name: 'EquipmentRepairJobMain' })
@ -267,20 +268,26 @@ const finishForm3Ref = ref()
const handleValidateReport = async (row) => {
await message.delConfirm('是否验证所选中工单?');
message.confirmPassword(t('')).then(async () => {
//
//
finishForm3Ref.value.open('update', row);
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '8'
//
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(params.value)
message.success(t('工单已结束'))
//
await getList()
}).catch (async (action: Action) => {
if(action === 'cancel'){
const params = ref({id: '', status:''})
params.value.id = row.id
params.value.status = '5'
//
await EquipmentRepairJobMainApi.backEquipmentRepairOrder(params.value)
message.success(t('工单已打回'))
//
await getList()
}
if(action === 'cancel'){
const params = ref({id: '', number:''})
params.value.id = row.id
params.value.number = row.number
//
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(params.value)
message.success(t('工单已结束'))
//
await getList()
}
})
}

Loading…
Cancel
Save