From 20b100b5e2db6f8639bcfa701be51abad28040de Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Tue, 18 Feb 2025 23:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=95=E6=8D=AE=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BB=B7=E7=A8=8E=E5=90=88=E8=AE=A1?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=A8=8E=E9=A2=9D=E8=AE=A1=E7=AE=97=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/views/bill/mixins/BillModalMixin.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index 0cc16e63..8c02ea9e 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -608,9 +608,16 @@ export const BillModalMixin = { operNumber = row.operNumber-0 //数量 taxLastMoney = value-0 taxRate = row.taxRate-0 //税率 - unitPrice = (taxLastMoney/operNumber/(1+taxRate*0.01)).toFixed(2)-0 - allPrice = (unitPrice*operNumber).toFixed(2)-0 - taxMoney =(taxLastMoney-allPrice).toFixed(2)-0 + if(taxRate) { + unitPrice = (taxLastMoney/operNumber/(1+taxRate*0.01)).toFixed(2)-0 + allPrice = (unitPrice*operNumber).toFixed(2)-0 + taxMoney =(taxLastMoney-allPrice).toFixed(2)-0 + } else { + //税率为0的情况,特殊处理 + allPrice = taxLastMoney + unitPrice = (allPrice/operNumber).toFixed(2)-0 //单价 + taxMoney = 0 + } target.setValues([{rowKey: row.id, values: {unitPrice: unitPrice, allPrice: allPrice, taxMoney: taxMoney}}]) target.recalcAllStatisticsColumns() that.autoChangePrice(target)