Browse Source

测试bug修复

master
ljlong_2630 8 months ago
parent
commit
670b744737
  1. 6
      src/api/eam/device/deviceInspectionMain/index.ts
  2. 1
      src/utils/dict.ts
  3. 26
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  4. 23
      src/views/eam/device/deviceinspectionjob/index.vue
  5. 15
      src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts
  6. 102
      src/views/eam/device/devicemaintenancejob/index.vue
  7. 26
      src/views/eam/mold/moldRepair/moldRepair.data.ts
  8. 2
      src/views/eam/mold/moldinspectionjob/index.vue
  9. 97
      src/views/eam/mold/moldmaintenancejob/index.vue
  10. 17
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

6
src/api/eam/device/deviceInspectionMain/index.ts

@ -62,3 +62,9 @@ export const importTemplate = () => {
export const finishInspection = (id: number) => { export const finishInspection = (id: number) => {
return request.get({ url: `/eam/device-inspection-job-main/onClick?id=` + id }) return request.get({ url: `/eam/device-inspection-job-main/onClick?id=` + id })
} }
// 查询检修工单主列表
export const getDeviceInspectionMainNoPage = async (params) => {
return await request.get({ url: `/eam/device-inspection-job-main/noPage`, params })
}

1
src/utils/dict.ts

@ -301,5 +301,6 @@ export enum DICT_TYPE {
APP_DEVICE_MOLD_TYPE = 'app_device_mold_type', //设备/模具/工艺:类型 APP_DEVICE_MOLD_TYPE = 'app_device_mold_type', //设备/模具/工艺:类型
ITEM_SUBJECT = 'item_subject', //备件的科目 ITEM_SUBJECT = 'item_subject', //备件的科目
TURN_TYPE = 'turn_type', //转移类型 TURN_TYPE = 'turn_type', //转移类型
ORDER_COMPLETE_RESULT = 'order_complete_result', //维修工单完成结果
} }

26
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -182,19 +182,19 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
}, },
{ // {
label: '故障类型', // label: '故障类型',
field: 'faultType', // field: 'faultType',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: '150', // width: '150',
}, // },
dictType: DICT_TYPE.FAULT_TYPE, // dictType: DICT_TYPE.FAULT_TYPE,
dictClass: 'string', // dictClass: 'string',
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ {
label: '描述', label: '描述',
field: 'describes', field: 'describes',

23
src/views/eam/device/deviceinspectionjob/index.vue

@ -223,8 +223,29 @@ const openForm = async (type: string, row?: any) => {
DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = true DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = true
DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = deviceListAll DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = deviceListAll
} else { } else {
const res = await DeviceInspectionMainApi.getDeviceInspectionMainNoPage()
const repairList = await DeviceMaintenanceMainApi.getDeviceMainTempList('DEVICE')
const newDeviceList = deviceList.filter(item => {
let flag = true
res.forEach(element => {
if (item.number == element.deviceNumber && element.status != 'COMPLETED' && element.status != 'VERIFIED' && element.status != 'REJECTED') {
flag = false
}
})
return flag
})
const newRepairList = repairList.filter(item => {
let flag = false
newDeviceList.forEach(element => {
if (item.deviceNumber == element.number) {
flag = true
}
})
return flag
})
DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'maintenanceNumber').componentProps.options = newRepairList
DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = false DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.disabled = false
DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = deviceList DeviceInspectionMain.allSchemas.formSchema.find(item => item.field == 'deviceNumber').componentProps.options = newDeviceList
} }
tableData.value = [] // tableData.value = [] //
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)

15
src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts

@ -742,7 +742,7 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '是否完成', label: '状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
table: { table: {
@ -766,6 +766,19 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '完成方式',
field: 'result',
sort: 'custom',
table: {
width: '150',
},
isSearch: false,
isTable: true,
isForm: false,
dictType: DICT_TYPE.ORDER_COMPLETE_RESULT,
dictClass: 'string',
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

102
src/views/eam/device/devicemaintenancejob/index.vue

@ -395,6 +395,12 @@ const onChange = (field, cur, item) => {
const onChangeSec = (field, cur, item,formRefSec) => { const onChangeSec = (field, cur, item,formRefSec) => {
if (field == 'type') { if (field == 'type') {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'name',
valueField: 'id'
}
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = false
@ -430,7 +436,7 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {} const setV = {}
setV['deviceNumber'] = '' setV['deviceNumber'] = ''
formRefSec.setValues(setV) formRefSec.setValues(setV)
} else { } else if(cur == 'DEVICE'){
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value }).componentProps.options = deviceList.value
@ -456,23 +462,55 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {} const setV = {}
setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber
setV['maintenance'] = newRow.value.maintenance setV['maintenance'] = newRow.value.maintenance
setV['deviceNumber'] = newRow.value.deviceNumber
setV['type'] = newRow.value.type
formRefSec.setValues(setV) formRefSec.setValues(setV)
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'type' return item.field == 'type'
}).componentProps.disabled = false }).componentProps.disabled = false
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = true }).componentProps.disabled = true
if (formRefSec.formModel.type == 'MOLD') {
MoldAccountsApi.getMoldAccountsAllNoPage({})
.then(res => {
moldList.value = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = moldList.value
})
} else {
DeviceAccountsApi.getDeviceAccountsAllNoPage({})
.then(res => {
deviceList.value = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value
})
}
UserApi.getSimpleUserList().then(res => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
} else if (cur == '1') { } else if (cur == '1') {
const setV = {} const setV = {}
setV['deviceNumber'] = newRow.value.deviceNumber setV['deviceNumber'] = newRow.value.deviceNumber
setV['type'] = newRow.value.type setV['type'] = newRow.value.type
setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber
setV['maintenance'] = newRow.value.maintenance
formRefSec.setValues(setV) formRefSec.setValues(setV)
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'type' return item.field == 'type'
@ -485,11 +523,29 @@ const onChangeSec = (field, cur, item,formRefSec) => {
}).componentProps.disabled = false }).componentProps.disabled = false
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = false }).componentProps.disabled = true
UserApi.getSimpleUserList().then(res => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
} }
} }
if (field == 'factoryAreaNumber') { if (field == 'factoryAreaNumber') {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'name',
valueField: 'id'
}
if (formRefSec.formModel.type == 'DEVICE') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: cur, flag: null }).then(res => { selecUserByType({ classType: 'DEVICE', factoryAreaNumber: cur, flag: null }).then(res => {
repairUser.value = res repairUser.value = res
const setV = {} const setV = {}
@ -498,7 +554,25 @@ const onChangeSec = (field, cur, item,formRefSec) => {
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.options = res }).componentProps.options = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
}) })
} else if (formRefSec.formModel.type == 'TECH') {
selecUserByType({ classType: 'TECH', factoryAreaNumber: cur, flag: null }).then(res => {
repairUser.value = res
const setV = {}
setV['maintenance'] = ''
formRefSec.setValues(setV)
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
})
}
} }
} }
@ -525,7 +599,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'repair') { } else if (val == 'repair') {
openDetail(row, '代码', row.number) openDetail(row, '代码', row.number)
} else if (val == 'turnOrder') { } else if (val == 'turnOrder') {
openFormSec('turnOrder', row) turnOrder('turnOrder', row)
} else if (val == 'finishOrder') { } else if (val == 'finishOrder') {
finishOrder(row) finishOrder(row)
} else if (val == 'verifyOrder') { } else if (val == 'verifyOrder') {
@ -552,18 +626,18 @@ const openFormSec = async (type: string, row?: any) => {
}).componentProps.disabled = false }).componentProps.disabled = false
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = true }).componentProps.disabled = true
await MoldAccountsApi.getMoldAccountsNoPage({}) await MoldAccountsApi.getMoldAccountsAllNoPage({})
.then(res => { .then(res => {
moldList.value = res moldList.value = res
}) })
await DeviceAccountsApi.getDeviceAccountsNoPage({}) await DeviceAccountsApi.getDeviceAccountsAllNoPage({})
.then(res => { .then(res => {
deviceList.value = res deviceList.value = res
}) })
@ -576,6 +650,16 @@ const openFormSec = async (type: string, row?: any) => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value }).componentProps.options = deviceList.value
} }
const userListAll = await UserApi.getSimpleUserList()
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = userListAll
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
formRefSec.value.open(type, newRow.value) formRefSec.value.open(type, newRow.value)
} }
@ -652,7 +736,9 @@ function acceptOrder(row) {
getList() getList()
} }
// //
function turnOrder() { } function turnOrder(type, row) {
openFormSec(type,row)
}
// //
function finishOrder(row) { function finishOrder(row) {

26
src/views/eam/mold/moldRepair/moldRepair.data.ts

@ -127,19 +127,19 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
width: '150', width: '150',
}, },
}, },
{ // {
label: '故障类型', // label: '故障类型',
field: 'faultType', // field: 'faultType',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: '150', // width: '150',
}, // },
dictType: DICT_TYPE.FAULT_TYPE, // dictType: DICT_TYPE.FAULT_TYPE,
dictClass: 'string', // dictClass: 'string',
form: { // form: {
component: 'Select' // component: 'Select'
}, // },
}, // },
{ {
label: '描述', label: '描述',
field: 'describes', field: 'describes',

2
src/views/eam/mold/moldinspectionjob/index.vue

@ -234,7 +234,7 @@ const openForm = async (type: string, row?: any) => {
const newRepairList = repairList.filter(item => { const newRepairList = repairList.filter(item => {
let flag = false let flag = false
newMoldList.forEach(element => { newMoldList.forEach(element => {
if (item.number == element.number) { if (item.deviceNumber == element.number) {
flag = true flag = true
} }
}) })

97
src/views/eam/mold/moldmaintenancejob/index.vue

@ -712,18 +712,18 @@ const openFormSec = async (type: string, row?: any) => {
}).componentProps.disabled = false }).componentProps.disabled = false
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = true }).componentProps.disabled = true
await MoldAccountsApi.getMoldAccountsNoPage({}) await MoldAccountsApi.getMoldAccountsAllNoPage({})
.then(res => { .then(res => {
moldList.value = res moldList.value = res
}) })
await DeviceAccountsApi.getDeviceAccountsNoPage({}) await DeviceAccountsApi.getDeviceAccountsAllNoPage({})
.then(res => { .then(res => {
deviceList.value = res deviceList.value = res
}) })
@ -736,6 +736,16 @@ const openFormSec = async (type: string, row?: any) => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value }).componentProps.options = deviceList.value
} }
const userListAll = await UserApi.getSimpleUserList()
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = userListAll
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
formRefSec.value.open(type, newRow.value) formRefSec.value.open(type, newRow.value)
} }
@ -743,6 +753,12 @@ const openFormSec = async (type: string, row?: any) => {
const onChangeSec = (field, cur, item,formRefSec) => { const onChangeSec = (field, cur, item,formRefSec) => {
if (field == 'type') { if (field == 'type') {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'name',
valueField: 'id'
}
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = false
@ -762,7 +778,23 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {} const setV = {}
setV['deviceNumber'] = '' setV['deviceNumber'] = ''
formRefSec.setValues(setV) formRefSec.setValues(setV)
} else { } else if (cur == 'TECH') {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value
selecUserByType({ classType: 'TECH', factoryAreaNumber: '', flag: null }).then(res => {
repairUser.value = res
const setV = {}
setV['maintenance'] = ''
formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
const setV = {}
setV['deviceNumber'] = ''
formRefSec.setValues(setV)
} else if(cur == 'DEVICE'){
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value }).componentProps.options = deviceList.value
@ -788,21 +820,54 @@ const onChangeSec = (field, cur, item,formRefSec) => {
const setV = {} const setV = {}
setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber
setV['maintenance'] = newRow.value.maintenance setV['maintenance'] = newRow.value.maintenance
setV['deviceNumber'] = newRow.value.deviceNumber
setV['type'] = newRow.value.type
formRefSec.setValues(setV) formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'type' return item.field == 'type'
}).componentProps.disabled = false }).componentProps.disabled = false
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber' return item.field == 'deviceNumber'
}).componentProps.disabled = false }).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'factoryAreaNumber' return item.field == 'factoryAreaNumber'
}).componentProps.disabled = true }).componentProps.disabled = true
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = true }).componentProps.disabled = true
if (formRefSec.formModel.type == 'MOLD') {
MoldAccountsApi.getMoldAccountsAllNoPage({})
.then(res => {
moldList.value = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = moldList.value
})
} else {
DeviceAccountsApi.getDeviceAccountsAllNoPage({})
.then(res => {
deviceList.value = res
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'deviceNumber'
}).componentProps.options = deviceList.value
})
}
UserApi.getSimpleUserList().then(res => {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
} else if (cur == '1') { } else if (cur == '1') {
const setV = {} const setV = {}
setV['factoryAreaNumber'] = newRow.value.factoryAreaNumber
setV['maintenance'] = newRow.value.maintenance
setV['deviceNumber'] = newRow.value.deviceNumber setV['deviceNumber'] = newRow.value.deviceNumber
setV['type'] = newRow.value.type setV['type'] = newRow.value.type
formRefSec.setValues(setV) formRefSec.setValues(setV)
@ -817,16 +882,36 @@ const onChangeSec = (field, cur, item,formRefSec) => {
}).componentProps.disabled = false }).componentProps.disabled = false
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.disabled = false }).componentProps.disabled = true
UserApi.getSimpleUserList().then(res => {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.options = res
})
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'nickname',
valueField: 'id'
}
} }
} }
if (field == 'factoryAreaNumber') { if (field == 'factoryAreaNumber') {
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.optionsAlias = {
labelField: 'name',
valueField: 'id'
}
selecUserByType({ classType: 'MOLD', factoryAreaNumber: cur, flag: null }).then(res => { selecUserByType({ classType: 'MOLD', factoryAreaNumber: cur, flag: null }).then(res => {
repairUser.value = res repairUser.value = res
const setV = {} const setV = {}
setV['maintenance'] = '' setV['maintenance'] = ''
formRefSec.setValues(setV) formRefSec.setValues(setV)
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance'
}).componentProps.disabled = false
MoldMaintenanceMainSec.allSchemas.formSchema.find(item => { MoldMaintenanceMainSec.allSchemas.formSchema.find(item => {
return item.field == 'maintenance' return item.field == 'maintenance'
}).componentProps.options = res }).componentProps.options = res

17
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -248,7 +248,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '是否完成', label: '状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
table: { table: {
@ -272,6 +272,19 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '完成方式',
field: 'result',
sort: 'custom',
table: {
width: '150',
},
isSearch: false,
isTable: true,
isForm: false,
dictType: DICT_TYPE.ORDER_COMPLETE_RESULT,
dictClass: 'string',
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -688,7 +701,7 @@ export const MoldMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '是否完成', label: '状态',
field: 'status', field: 'status',
sort: 'custom', sort: 'custom',
table: { table: {

Loading…
Cancel
Save