|
|
@ -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,17 +268,23 @@ 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:''}) |
|
|
|
const params = ref({id: '', number:''}) |
|
|
|
params.value.id = row.id |
|
|
|
params.value.status = '5' |
|
|
|
params.value.number = row.number |
|
|
|
//生成新工单 |
|
|
|
await EquipmentRepairJobMainApi.backEquipmentRepairOrder(params.value) |
|
|
|
message.success(t('工单已打回')) |
|
|
|
await EquipmentRepairJobMainApi.createEquipmentRepairNewOrder(params.value) |
|
|
|
message.success(t('工单已结束')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} |
|
|
|