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