Commit 6bcc25e1 authored by 季圣华's avatar 季圣华
Browse files

优化单据多选商品的功能

parent d75b5048
...@@ -190,21 +190,24 @@ export const BillModalMixin = { ...@@ -190,21 +190,24 @@ export const BillModalMixin = {
let mList = res.data let mList = res.data
if (value.indexOf(',') > -1) { if (value.indexOf(',') > -1) {
//多个条码 //多个条码
let mArr = this.materialTable.dataSource this.$refs.materialDataTable.getValues((error, values) => {
for (let i = 0; i < mList.length; i++) { values.pop() //移除最后一行数据
let mInfo = mList[i] let mArr = values
let mObj = this.parseInfoToObj(mInfo) for (let i = 0; i < mList.length; i++) {
mObj.depotId = mInfo.depotId let mInfo = mList[i]
mObj.stock = mInfo.stock let mObj = this.parseInfoToObj(mInfo)
mArr.push(mObj) mObj.depotId = mInfo.depotId
} mObj.stock = mInfo.stock
let taxLastMoneyTotal = 0 mArr.push(mObj)
for (let j = 0; j < mArr.length; j++) { }
taxLastMoneyTotal += mArr[j].taxLastMoney let taxLastMoneyTotal = 0
} for (let j = 0; j < mArr.length; j++) {
this.materialTable.dataSource = mArr taxLastMoneyTotal += mArr[j].taxLastMoney-0
target.statisticsColumns.taxLastMoney = taxLastMoneyTotal }
that.autoChangePrice(target) this.materialTable.dataSource = mArr
target.statisticsColumns.taxLastMoney = taxLastMoneyTotal
that.autoChangePrice(target)
})
} else { } else {
//单个条码 //单个条码
let mArr = [] let mArr = []
......
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