Commit 68cfd60d authored by jingnan's avatar jingnan 👀

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

parent 89c96bcb
...@@ -117,12 +117,7 @@ export default { ...@@ -117,12 +117,7 @@ export default {
this.$set(this.cmpOptions, 'layKey', `add_outStorageUseItem_${val.useRequestType}`) this.$set(this.cmpOptions, 'layKey', `add_outStorageUseItem_${val.useRequestType}`)
} }
if (val && val.id) { if (val && val.id) {
if (this.basicData.inStorageRequestItems && (!this.tableData || !this.tableData.length)) { this.getDetailsData(val.id)
this.tableData = this.basicData.inStorageRequestItems.map(item => {
item.allocatedAmount = this.$utils.sumArray(item.inventoryJobResponses, 'allocatedAmount')
return item
})
}
} }
} }
} }
...@@ -170,6 +165,74 @@ export default { ...@@ -170,6 +165,74 @@ export default {
selectionChange(val) { selectionChange(val) {
this.selectionRows = 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() { addHandle() {
const useRequestType = this.basicData.useRequestType const useRequestType = this.basicData.useRequestType
if (useRequestType === 'swapUse') { if (useRequestType === 'swapUse') {
......
...@@ -293,20 +293,30 @@ export default { ...@@ -293,20 +293,30 @@ export default {
'openProps': [ 'openProps': [
{ {
'name': 'extMaterial', 'name': 'extMaterial',
'openProps': [ 'openProps': [{
{ 'name': 'resType2'
'name': 'extUnit' }, {
}, 'name': 'extUnit'
{ }]
'name': 'resType2' }, {
} 'name': 'extDxSipplier'
]
},
{
'name': 'inventory'
}, },
{ {
'name': 'extSupportingItemVO',
'openProps': [{
'name': 'extMaterial',
'openProps': [{
'name': 'resType2'
}]
}]
}, {
'name': 'inventoryJobResponses' 'name': 'inventoryJobResponses'
}, {
'name': 'storageZone'
},
{ 'name': 'outStorageRequest',
'openProps': [
{ 'name': 'extWorkCenter' }]
} }
], ],
'sortItem': [ '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