diff --git a/src/api/eam/basic/item/index.ts b/src/api/eam/basic/item/index.ts index 8881555..d5b5f8e 100644 --- a/src/api/eam/basic/item/index.ts +++ b/src/api/eam/basic/item/index.ts @@ -94,3 +94,15 @@ export const getItemNoPage = async (params) => { export const importTemplate = () => { return request.download({ url: '/eam/basic/item/get-import-template' }) } + +// 备件台账查询不在台账内的备件列表 +export const getNoAccountItemPage = async (params) => { + params.flag = '1'; + if (params.isSearch) { + delete params.isSearch + const data = { ...params } + return await request.post({ url: '/eam/basic/item/senior', data }) + } else { + return await request.get({ url: `/eam/basic/item/page`, params }) + } +} diff --git a/src/views/eam/item/itemAccounts/index.vue b/src/views/eam/item/itemAccounts/index.vue index 495d646..9048218 100644 --- a/src/views/eam/item/itemAccounts/index.vue +++ b/src/views/eam/item/itemAccounts/index.vue @@ -78,6 +78,8 @@ setV['itemName'] = val[0]['name'] setV['locationNumber'] = '' setV['areaNumber'] = '' + setV['locationName'] = '' + setV['areaName'] = '' formRef.setValues(setV) }) }else{//有台账直接回显 @@ -87,9 +89,18 @@ setV['itemName'] = val[0]['name'] setV['locationNumber'] = aa.locationNumber setV['areaNumber'] =aa.areaNumber + setV['locationName'] = aa.locationName + setV['areaName'] =aa.areaName formRef.setValues(setV) }) } + }if(formField=='locationNumber'){//选中库位编号给库区编号赋值 + nextTick(() => { + const setV = {} + setV[formField] = val[0][searchField] + setV['areaNumber'] = val[0]['areaNumber'] + formRef.setValues(setV) + }) }else{ nextTick(() => { const setV = {} @@ -178,7 +189,7 @@ searchTableRef.value.open( '选择备件', Item.allSchemas, - ItemApi.getItemPage, + ItemApi.getNoAccountItemPage, null, Item.allSchemas.searchSchema, true, diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index ad58165..d3f2e4c 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -60,36 +60,52 @@ export const ItemAccounts = useCrudSchemas( }, isSearch: false }, + // { + // label: '库区编号', + // field: 'areaNumber', + // sort: 'custom', + // isSearch: true, + // form: { + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择库区编号', // 输入框占位文本 + // searchField: 'number', // 查询弹窗赋值字段 + // searchTitle: '库区信息', // 查询弹窗标题 + // searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类 + // searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法 + // searchCondition: [ + // { + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // } + // ] + // } + // } + // }, { label: '库区编号', field: 'areaNumber', sort: 'custom', isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择库区编号', // 输入框占位文本 - searchField: 'number', // 查询弹窗赋值字段 - searchTitle: '库区信息', // 查询弹窗标题 - searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类 - searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ] + table: { + width: 130 + }, + form:{ + componentProps:{ + disabled:true } } }, + { label: '库区名称', field: 'areaName', sort: 'custom', isSearch: false, - isForm: false, table: { + isForm: false, + table: { width: 130 }, }, @@ -113,11 +129,11 @@ export const ItemAccounts = useCrudSchemas( value: 'TRUE', isMainValue: false }, - { - key: 'areaNumber', - value: 'areaNumber', - isMainValue: true - }, + // { + // key: 'areaNumber', + // value: 'areaNumber', + // isMainValue: true + // }, ] } }