Browse Source

备件台账需求变更

master
songguoqiang 7 months ago
parent
commit
6a4ae96ae1
  1. 12
      src/api/eam/basic/item/index.ts
  2. 13
      src/views/eam/item/itemAccounts/index.vue
  3. 60
      src/views/eam/item/itemAccounts/itemAccounts.data.ts

12
src/api/eam/basic/item/index.ts

@ -94,3 +94,15 @@ export const getItemNoPage = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/basic/item/get-import-template' }) 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 })
}
}

13
src/views/eam/item/itemAccounts/index.vue

@ -78,6 +78,8 @@
setV['itemName'] = val[0]['name'] setV['itemName'] = val[0]['name']
setV['locationNumber'] = '' setV['locationNumber'] = ''
setV['areaNumber'] = '' setV['areaNumber'] = ''
setV['locationName'] = ''
setV['areaName'] = ''
formRef.setValues(setV) formRef.setValues(setV)
}) })
}else{// }else{//
@ -87,9 +89,18 @@
setV['itemName'] = val[0]['name'] setV['itemName'] = val[0]['name']
setV['locationNumber'] = aa.locationNumber setV['locationNumber'] = aa.locationNumber
setV['areaNumber'] =aa.areaNumber setV['areaNumber'] =aa.areaNumber
setV['locationName'] = aa.locationName
setV['areaName'] =aa.areaName
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
}if(formField=='locationNumber'){//
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['areaNumber'] = val[0]['areaNumber']
formRef.setValues(setV)
})
}else{ }else{
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
@ -178,7 +189,7 @@
searchTableRef.value.open( searchTableRef.value.open(
'选择备件', '选择备件',
Item.allSchemas, Item.allSchemas,
ItemApi.getItemPage, ItemApi.getNoAccountItemPage,
null, null,
Item.allSchemas.searchSchema, Item.allSchemas.searchSchema,
true, true,

60
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -60,36 +60,52 @@ export const ItemAccounts = useCrudSchemas(
}, },
isSearch: false 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: '库区编号', label: '库区编号',
field: 'areaNumber', field: 'areaNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: { table: {
// labelMessage: '信息提示说明!!!', width: 130
componentProps: { },
isSearchList: true, // 开启查询弹窗 form:{
searchListPlaceholder: '请选择库区编号', // 输入框占位文本 componentProps:{
searchField: 'number', // 查询弹窗赋值字段 disabled:true
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类
searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
} }
} }
}, },
{ {
label: '库区名称', label: '库区名称',
field: 'areaName', field: 'areaName',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false, table: { isForm: false,
table: {
width: 130 width: 130
}, },
}, },
@ -113,11 +129,11 @@ export const ItemAccounts = useCrudSchemas(
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}, },
{ // {
key: 'areaNumber', // key: 'areaNumber',
value: 'areaNumber', // value: 'areaNumber',
isMainValue: true // isMainValue: true
}, // },
] ]
} }
} }

Loading…
Cancel
Save