|
|
@ -68,13 +68,36 @@ |
|
|
|
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => {//表单选中表格后走的方法 |
|
|
|
const searchTableSuccess = async(formField, searchField, val, formRef) => {//表单选中表格后走的方法 |
|
|
|
if(formField=='itemNumber'){ |
|
|
|
const aa = await ItemAccountsApi.getByItemNumber(val[0][searchField]); |
|
|
|
if(aa.locationNumber==null||aa.locationNumber==''){//该备件无台账 |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['itemName'] = val[0]['name'] |
|
|
|
setV['locationNumber'] = '' |
|
|
|
setV['areaNumber'] = '' |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
}else{//有台账直接回显 |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['itemName'] = val[0]['name'] |
|
|
|
setV['locationNumber'] = aa.locationNumber |
|
|
|
setV['areaNumber'] =aa.areaNumber |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|