| | |
| | | afterTaxAmountRandom: 0 |
| | | } |
| | | }, |
| | | watch: { |
| | | 'crud.status.cu'(newValue) { |
| | | if (newValue === 0) { |
| | | this.individualIncomeTaxRandom = null |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
| | | [CRUD.HOOK.beforeRefresh]() { |
| | |
| | | // 税前金额随机数 |
| | | this.preTaxAmountRandom = Math.random() |
| | | // 个人所得税随机数 |
| | | this.individualIncomeTaxRandom = Math.random() |
| | | // this.individualIncomeTaxRandom = Math.random() |
| | | this.individualIncomeTaxRandom = 0 |
| | | // 税后金额随机数 |
| | | this.afterTaxAmountRandom = Math.random() |
| | | }, |
| | |
| | | // 个人所得税 |
| | | this.form.individualIncomeTax = 0 |
| | | // 个人所得税随机数 |
| | | this.individualIncomeTaxRandom = Math.random() |
| | | // this.individualIncomeTaxRandom = Math.random() |
| | | // 税后金额 |
| | | this.form.afterTaxAmount = 0 |
| | | // 税后金额随机数 |
| | |
| | | // 个人所得税 = 税额 |
| | | this.form.individualIncomeTax = taxAmount |
| | | // 个人所得税随机数 |
| | | this.individualIncomeTaxRandom = Math.random() |
| | | // this.individualIncomeTaxRandom = Math.random() |
| | | // 税后金额 = 计税金额 - 税额 |
| | | this.form.afterTaxAmount = (taxableAmount - taxAmount) < 0 ? 0 : taxableAmount - taxAmount |
| | | // 税后金额随机数 |