Browse Source

备件台账需求变更

master
songguoqiang 6 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 = () => {
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['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,

60
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
// },
]
}
}

Loading…
Cancel
Save