Commit 00ddc01b authored by 季圣华's avatar 季圣华
Browse files

解决单据录入界面批量切换仓库,库存不重新计算的bug

parent 985396ba
......@@ -259,13 +259,35 @@ export const BillModalMixin = {
}).then(allValues => {
//获取单据明细列表信息
let detailArr = allValues.tablesValue[0].values
//构造新的列表数组,用于存放单据明细信息
let newDetailArr = []
let barCodes = ''
for(let detail of detailArr){
detail.depotId = depotId
newDetailArr.push(detail)
barCodes += detail.barCode + ','
}
this.materialTable.dataSource = newDetailArr
if(barCodes) {
barCodes = barCodes.substring(0, barCodes.length-1)
}
let param = {
barCode: barCodes,
depotId: depotId,
mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
prefixNo: this.prefixNo
}
getMaterialByBarCode(param).then((res) => {
if (res && res.code === 200) {
let mList = res.data
if(mList && mList.length) {
//构造新的列表数组,用于存放单据明细信息
let newDetailArr = []
for (let i = 0; i < detailArr.length; i++) {
let item = detailArr[i]
item.depotId = depotId
item.stock = mList[i].stock
newDetailArr.push(item)
}
this.materialTable.dataSource = newDetailArr
}
}
})
})
},
depotModalFormOk() {
......
Supports Markdown
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