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