|
|
@ -43,6 +43,7 @@ |
|
|
|
import download from '@/utils/download' |
|
|
|
import { ItemInLocation, ItemInLocationRules } from './itemInLocation.data' |
|
|
|
import * as ItemInLocationApi from '@/api/eam/item/itemInLocation' |
|
|
|
import * as ItemAccountApi from '@/api/eam/item/itemAccounts' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
@ -59,12 +60,27 @@ |
|
|
|
const tableColumns = ref(ItemInLocation.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
|
const searchTableSuccess = async(formField, searchField, val, formRef) => { |
|
|
|
const ret = await ItemAccountApi.getByLocationNumber(val[0][searchField]); |
|
|
|
if(ret.itemNumber==null || ret.itemNumber=='' || !ret.itemNumber){ |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = ''; |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
message.error('该库位下无绑定的备件') |
|
|
|
return; |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
setV['itemNumber'] = ret.itemNumber |
|
|
|
setV['itemName'] = ret.itemName |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|