From 72bd97acff1c0ee4d15885417e487b1d720d9b59 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Tue, 22 Apr 2025 10:27:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3bug=EF=BC=9A=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E5=BD=95=E5=85=A5=E7=9A=84=E6=97=B6=E5=80=99=E6=89=B9?= =?UTF-8?q?=E6=AC=A1=E5=95=86=E5=93=81=E6=89=B9=E5=8F=B7=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=95=B0=E9=87=8F=E5=8F=98=E5=8C=96=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/mixins/BillModalMixin.js | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index 372621b6..7acd968a 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -533,32 +533,35 @@ export const BillModalMixin = { } break; case "batchNumber": - batchNumber = value - let depotItemId = '' - if(this.model.id) { - //只有在保存之后的编辑页面下才获取明细id - let rowId = row.id - if(rowId.length<=19) { - depotItemId = rowId-0 - } - } - getBatchNumberList({name:'', depotItemId: depotItemId, depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => { - if (res && res.code === 200) { - if(res.data && res.data.rows) { - let info = res.data.rows[0] - operNumber = info.totalNum - taxRate = row.taxRate-0 //税率 - unitPrice = row.unitPrice-0 //单价 - allPrice = (unitPrice*operNumber).toFixed(2)-0 - taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0 - taxLastMoney = (allPrice + taxMoney).toFixed(2)-0 - target.setValues([{rowKey: row.id, values: {expirationDate: info.expirationDateStr, operNumber: operNumber, - allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}]) - target.recalcAllStatisticsColumns() - that.autoChangePrice(target) + //只针对销售出库、采购退货、其它出库 + if(this.prefixNo === 'XSCK' || this.prefixNo === 'CGTH' || this.prefixNo === 'QTCK') { + batchNumber = value + let depotItemId = '' + if(this.model.id) { + //只有在保存之后的编辑页面下才获取明细id + let rowId = row.id + if(rowId.length<=19) { + depotItemId = rowId-0 } } - }) + getBatchNumberList({name:'', depotItemId: depotItemId, depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => { + if (res && res.code === 200) { + if(res.data && res.data.rows) { + let info = res.data.rows[0] + operNumber = info.totalNum + taxRate = row.taxRate-0 //税率 + unitPrice = row.unitPrice-0 //单价 + allPrice = (unitPrice*operNumber).toFixed(2)-0 + taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0 + taxLastMoney = (allPrice + taxMoney).toFixed(2)-0 + target.setValues([{rowKey: row.id, values: {expirationDate: info.expirationDateStr, operNumber: operNumber, + allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}]) + target.recalcAllStatisticsColumns() + that.autoChangePrice(target) + } + } + }) + } break; case "operNumber": operNumber = value-0