【修改】税额计算的bug

This commit is contained in:
fengachen
2022-11-09 15:07:01 +08:00
parent d699edfe42
commit b6354f50bf
2 changed files with 2 additions and 2 deletions
@@ -29,7 +29,7 @@
disabled
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
</a-form-item>
<a-form-item label="到账金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-form-item label="未税金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入未税金额"
disabled
v-decorator="['noTaxAmount',validatorRules.noTaxAmount]"
@@ -59,7 +59,7 @@ export const TaxOperateMixin = {
},
// 通过金额 计算 税额、未税金额
calcOtherNumber(amount) {
let noTaxAmount = (amount / (1 + this.taxRate)).toFixed(2) // 未税金额
let noTaxAmount = (amount / (1 + this.taxRate * 1)).toFixed(2) // 未税金额
let tax = (amount - noTaxAmount).toFixed(2) // 税额
return {noTaxAmount, tax}
},