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