diff --git a/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue b/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue index 188b8547..870a44a4 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue @@ -405,7 +405,10 @@ this.materialTable.dataSource = listEx ///给优惠后金额重新赋值 allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0 - let discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + let discount = 0 + if(allTaxLastMoney!==0) { + discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + } let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0 this.$nextTick(() => { this.form.setFieldsValue({ diff --git a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue index 6a446d19..80007ff6 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue @@ -449,7 +449,10 @@ this.materialTable.dataSource = listEx ///给优惠后金额重新赋值 allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0 - let discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + let discount = 0 + if(allTaxLastMoney!==0) { + discount = (discountMoney / allTaxLastMoney * 100).toFixed(2) - 0 + } let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0 let changeAmount = discountLastMoney if(deposit) { diff --git a/jshERP-web/src/views/bill/modules/SaleBackModal.vue b/jshERP-web/src/views/bill/modules/SaleBackModal.vue index 87ac9419..74ec23c0 100644 --- a/jshERP-web/src/views/bill/modules/SaleBackModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleBackModal.vue @@ -416,7 +416,10 @@ this.materialTable.dataSource = listEx ///给优惠后金额重新赋值 allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0 - let discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + let discount = 0 + if(allTaxLastMoney!==0) { + discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + } let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0 this.$nextTick(() => { this.form.setFieldsValue({ diff --git a/jshERP-web/src/views/bill/modules/SaleOutModal.vue b/jshERP-web/src/views/bill/modules/SaleOutModal.vue index 0dd5b840..685dc9d7 100644 --- a/jshERP-web/src/views/bill/modules/SaleOutModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleOutModal.vue @@ -467,7 +467,10 @@ this.materialTable.dataSource = listEx ///给优惠后金额重新赋值 allTaxLastMoney = allTaxLastMoney?allTaxLastMoney:0 - let discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + let discount = 0 + if(allTaxLastMoney!==0) { + discount = (discountMoney/allTaxLastMoney*100).toFixed(2)-0 + } let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0 let changeAmount = discountLastMoney if(deposit) {