Browse Source

EAM ——> 巡检点检 维修 入库联动

master_hella_20240701
gaojs 5 months ago
parent
commit
12512a3f51
  1. 13
      src/utils/disposition/defaultButtons.ts
  2. 25
      src/views/eam/equipmentRepairJobMain/index.vue
  3. 2
      src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue
  4. 11
      src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts
  5. 2
      src/views/eam/equipmentSpotCheckMain/finishForm1.vue

13
src/utils/disposition/defaultButtons.ts

@ -415,6 +415,19 @@ export function mainListFinishBtn(option:any) {
})
}
// 主列表-作废按钮
export function mainListCancelBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.作废`).replace('ts.', ''),
name: 'cancel',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-验证按钮
export function mainListValidateBtn(option:any) {
return __defaultBtnOption(option,{

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

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

2
src/views/eam/equipmentSpotCheckMain/SpotCheckOrderDetail.vue

@ -917,7 +917,7 @@ const submitForm = async (formType, data) => {
await getList()
updateKey.value += 1
} finally {
formRef.value.formLoading = false
//formRef.value.formLoading = false
}
}

11
src/views/eam/equipmentSpotCheckMain/equipmentSpotCheckMain.data.ts

@ -315,9 +315,14 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
dictType: DICT_TYPE.FALSE_OR_TRUE,
dictClass: 'string',
form: {
component: 'Radio'
},
},
{
label: '是否需要维修',
field: 'isRepair',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.FALSE_OR_TRUE,
dictClass: 'string',
},
{
label: '流程状态',

2
src/views/eam/equipmentSpotCheckMain/finishForm1.vue

@ -67,6 +67,7 @@ const formData = ref({
// verifyer: '',
verifyContent: '',
verifyTime: '',
isRepair:"",
})
const formRules = reactive({
// verifyer: [
@ -92,6 +93,7 @@ const open = async (type: string, row?: object) => {
//
formData.value.id = row.id
formData.value.number = row.planNumber
formData.value.isRepair = row.isRepair
}
defineExpose({ open }) // open

Loading…
Cancel
Save