From 6bcc25e137ccfebe3ac4d71ef9d7d2f3991efc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Sat, 7 Aug 2021 23:07:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E6=8D=AE=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E5=95=86=E5=93=81=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/mixins/BillModalMixin.js | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index abc065d3..39a7182b 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -190,21 +190,24 @@ export const BillModalMixin = { let mList = res.data if (value.indexOf(',') > -1) { //多个条码 - let mArr = this.materialTable.dataSource - for (let i = 0; i < mList.length; i++) { - let mInfo = mList[i] - let mObj = this.parseInfoToObj(mInfo) - mObj.depotId = mInfo.depotId - mObj.stock = mInfo.stock - mArr.push(mObj) - } - let taxLastMoneyTotal = 0 - for (let j = 0; j < mArr.length; j++) { - taxLastMoneyTotal += mArr[j].taxLastMoney - } - this.materialTable.dataSource = mArr - target.statisticsColumns.taxLastMoney = taxLastMoneyTotal - that.autoChangePrice(target) + this.$refs.materialDataTable.getValues((error, values) => { + values.pop() //移除最后一行数据 + let mArr = values + for (let i = 0; i < mList.length; i++) { + let mInfo = mList[i] + let mObj = this.parseInfoToObj(mInfo) + mObj.depotId = mInfo.depotId + mObj.stock = mInfo.stock + mArr.push(mObj) + } + let taxLastMoneyTotal = 0 + for (let j = 0; j < mArr.length; j++) { + taxLastMoneyTotal += mArr[j].taxLastMoney-0 + } + this.materialTable.dataSource = mArr + target.statisticsColumns.taxLastMoney = taxLastMoneyTotal + that.autoChangePrice(target) + }) } else { //单个条码 let mArr = []