解决单据录入中批量换仓库的bug
This commit is contained in:
@@ -275,17 +275,23 @@ export const BillModalMixin = {
|
|||||||
getMaterialByBarCode(param).then((res) => {
|
getMaterialByBarCode(param).then((res) => {
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
let mList = res.data
|
let mList = res.data
|
||||||
|
//构造新的列表数组,用于存放单据明细信息
|
||||||
|
let newDetailArr = []
|
||||||
if(mList && mList.length) {
|
if(mList && mList.length) {
|
||||||
//构造新的列表数组,用于存放单据明细信息
|
|
||||||
let newDetailArr = []
|
|
||||||
for (let i = 0; i < detailArr.length; i++) {
|
for (let i = 0; i < detailArr.length; i++) {
|
||||||
let item = detailArr[i]
|
let item = detailArr[i]
|
||||||
item.depotId = depotId
|
item.depotId = depotId
|
||||||
item.stock = mList[i].stock
|
item.stock = mList[i].stock
|
||||||
newDetailArr.push(item)
|
newDetailArr.push(item)
|
||||||
}
|
}
|
||||||
this.materialTable.dataSource = newDetailArr
|
} else {
|
||||||
|
for (let i = 0; i < detailArr.length; i++) {
|
||||||
|
let item = detailArr[i]
|
||||||
|
item.depotId = depotId
|
||||||
|
newDetailArr.push(item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.materialTable.dataSource = newDetailArr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user