From 00ddc01b50ca3b1f4d9451fc06c01648f7d4cba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Tue, 23 Nov 2021 00:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=95=E6=8D=AE=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E7=95=8C=E9=9D=A2=E6=89=B9=E9=87=8F=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=BB=93=E5=BA=93=EF=BC=8C=E5=BA=93=E5=AD=98=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E8=AE=A1=E7=AE=97=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/mixins/BillModalMixin.js | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index f458236a..5a9336a4 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -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() {