|
|
@ -423,9 +423,14 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
|
return item.field == 'maintenance' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
MoldAccountsApi.getMoldAccountsNoPage({}).then(res => { |
|
|
|
const setV = {} |
|
|
|
setV['deviceNumber'] = '' |
|
|
|
formRefSec.setValues(setV) |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
} else if (cur == 'TECH') { |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
@ -439,9 +444,14 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
|
return item.field == 'maintenance' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
DeviceAccountsApi.getDeviceAccountsNoPage({}).then(res => { |
|
|
|
const setV = {} |
|
|
|
setV['deviceNumber'] = '' |
|
|
|
formRefSec.setValues(setV) |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
} else if(cur == 'DEVICE'){ |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
@ -455,9 +465,14 @@ const onChangeSec = (field, cur, item,formRefSec) => { |
|
|
|
return item.field == 'maintenance' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
DeviceAccountsApi.getDeviceAccountsNoPage({}).then(res => { |
|
|
|
const setV = {} |
|
|
|
setV['deviceNumber'] = '' |
|
|
|
formRefSec.setValues(setV) |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'deviceNumber' |
|
|
|
}).componentProps.options = res |
|
|
|
}) |
|
|
|
} |
|
|
|
DeviceMaintenanceMainSec.allSchemas.formSchema.find(item => { |
|
|
|
return item.field == 'maintenance' |
|
|
@ -840,25 +855,17 @@ const submitForm = async (formType, data) => { |
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
|
const submitFormSec = async (formType, data) => { |
|
|
|
data.subList = tableData.value.map((item) => { |
|
|
|
return { |
|
|
|
describes: item.describes, |
|
|
|
describes1: item.describes1, |
|
|
|
itemNumbers: item.itemNumbers, |
|
|
|
maintenances: item.maintenances.join(','), |
|
|
|
workOut: item.workOut, |
|
|
|
factoryAreaNumber: newRow.value.factoryAreaNumber, |
|
|
|
const data1 = { |
|
|
|
status: data.turnType, |
|
|
|
deviceNumber: data.deviceNumber, |
|
|
|
type: data.type, |
|
|
|
maintenance: data.maintenance, |
|
|
|
id: data.id |
|
|
|
} |
|
|
|
}) // 拼接子表数据参数 |
|
|
|
console.log(data.subList) |
|
|
|
try { |
|
|
|
if (formType === 'create') { |
|
|
|
await DeviceMaintenanceMainApi.createDeviceMaintenanceMain(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
} else { |
|
|
|
await DeviceMaintenanceMainApi.updateDeviceMaintenanceMain(data) |
|
|
|
await DeviceMaintenanceMainApi.orderTurnTo(data1) |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
} |
|
|
|
formRefSec.value.dialogVisible = false |
|
|
|
// 刷新当前列表 |
|
|
|
getList() |
|
|
|