Commit 68cfd60d authored by jingnan's avatar jingnan 👀

领用出库及供外出库明细数据源修改

parent 89c96bcb
......@@ -117,12 +117,7 @@ export default {
this.$set(this.cmpOptions, 'layKey', `add_outStorageUseItem_${val.useRequestType}`)
}
if (val && val.id) {
if (this.basicData.inStorageRequestItems && (!this.tableData || !this.tableData.length)) {
this.tableData = this.basicData.inStorageRequestItems.map(item => {
item.allocatedAmount = this.$utils.sumArray(item.inventoryJobResponses, 'allocatedAmount')
return item
})
}
this.getDetailsData(val.id)
}
}
}
......@@ -170,6 +165,74 @@ export default {
selectionChange(val) {
this.selectionRows = val
},
getDetailsData(id) {
const params = {
'pageFrom': 1,
'pageSize': 999,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'outStorageRequestId',
'operator': 'EQ',
'value': id
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'extMaterial',
'openProps': [{
'name': 'resType2'
}, {
'name': 'extUnit'
}]
}, {
'name': 'extDxSipplier'
},
{
'name': 'extSupportingItemVO',
'openProps': [{
'name': 'extMaterial',
'openProps': [{
'name': 'resType2'
}]
}]
}, {
'name': 'inventoryJobResponses'
}, {
'name': 'storageZone'
},
{ 'name': 'outStorageRequest',
'openProps': [
{ 'name': 'extWorkCenter' }]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
this.$api.searchApi(`InStorageRequestItem`, params).then(res => {
const data = res.items.content || []
data.forEach(item => {
if (item.inventoryJobResponses) {
item.allocatedAmount = this.$utils.sumArray(item.inventoryJobResponses, 'allocatedAmount')
}
})
this.tableData = data
}).catch((err) => {
console.log(err)
})
},
addHandle() {
const useRequestType = this.basicData.useRequestType
if (useRequestType === 'swapUse') {
......
......@@ -293,20 +293,30 @@ export default {
'openProps': [
{
'name': 'extMaterial',
'openProps': [
{
'name': 'extUnit'
},
{
'name': 'resType2'
}
]
},
{
'name': 'inventory'
'openProps': [{
'name': 'resType2'
}, {
'name': 'extUnit'
}]
}, {
'name': 'extDxSipplier'
},
{
'name': 'extSupportingItemVO',
'openProps': [{
'name': 'extMaterial',
'openProps': [{
'name': 'resType2'
}]
}]
}, {
'name': 'inventoryJobResponses'
}, {
'name': 'storageZone'
},
{ 'name': 'outStorageRequest',
'openProps': [
{ 'name': 'extWorkCenter' }]
}
],
'sortItem': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment