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

优化单据多选商品的功能

parent d75b5048
...@@ -190,7 +190,9 @@ export const BillModalMixin = { ...@@ -190,7 +190,9 @@ 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) => {
values.pop() //移除最后一行数据
let mArr = values
for (let i = 0; i < mList.length; i++) { for (let i = 0; i < mList.length; i++) {
let mInfo = mList[i] let mInfo = mList[i]
let mObj = this.parseInfoToObj(mInfo) let mObj = this.parseInfoToObj(mInfo)
...@@ -200,11 +202,12 @@ export const BillModalMixin = { ...@@ -200,11 +202,12 @@ export const BillModalMixin = {
} }
let taxLastMoneyTotal = 0 let taxLastMoneyTotal = 0
for (let j = 0; j < mArr.length; j++) { for (let j = 0; j < mArr.length; j++) {
taxLastMoneyTotal += mArr[j].taxLastMoney taxLastMoneyTotal += mArr[j].taxLastMoney-0
} }
this.materialTable.dataSource = mArr this.materialTable.dataSource = mArr
target.statisticsColumns.taxLastMoney = taxLastMoneyTotal target.statisticsColumns.taxLastMoney = taxLastMoneyTotal
that.autoChangePrice(target) 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