会计云税务管理个人所得税其他附商业健康保险附子添加删除操作
会计云税务管理个人所得税其他附商业健康保险附子添加删除操作
子添加按钮操作
handleAddAcTaxPiIncomeReportingMedicalInsurance() {
let obj = {};
obj.identificationCode = '';
obj.policyEffectiveDate = '';
obj.annualPremium = '';
obj.monthlyPremium = '';
obj.deductible = '';
this.acTaxPiIncomeReportingMedicalInsuranceList.push(obj);
},
子删除按钮操作
handleDeleteAcTaxPiIncomeReportingMedicalInsurance() {
if (this.checkedAcTaxPiIncomeReportingMedicalInsurance.length == 0) {
this.$alert(
'请先选择要删除的会计云-税务管理-个人所得税-其他附-商业健康保险附-子数据',
'提示',
{ confirmButtonText: '确定' }
);
} else {
this.acTaxPiIncomeReportingMedicalInsuranceList.splice(
this.checkedAcTaxPiIncomeReportingMedicalInsurance[0].index - 1,
1
);
}
},
handleDeleteAcTaxPiIncomeReportingMedicalInsurance() {
if(this.checkedAcTaxPiIncomeReportingMedicalInsurance.length != 1){
this.checkedAcTaxPiIncomeReportingMedicalInsurance.splice(this.checkedAcTaxPiIncomeReportingMedicalInsurance.indexOf(row),1)
this.countNum()
}
},
countNum() {
this.limit = 0;
this.checkedAcTaxPiIncomeReportingMedicalInsurance.forEach((item, index) => {
if (!!item.donateAmount && !!item.deductionRatio) {
if (item.deductionRatio === 100) {
this.limit = this.BigNumber(item.donateAmount).times(item.deductionRatio).div(100).plus(this.limit).toNumber();
}
if (item.deductionRatio === 30 && item.donateAmount > this.BigNumber(this.data.taxableIncome).times(0.3).toNumber()) {
console.log(this.BigNumber(this.data.taxableIncome).times(0.3).toNumber(), this.data.taxableIncome);
this.limit = this.BigNumber(this.limit).plus(this.BigNumber(this.data.taxableIncome).times(0.3)).toNumber();
} else if (item.deductionRatio === 30 && item.donateAmount <= this.BigNumber(this.data.taxableIncome).times(0.3).toNumber()) {
this.limit = this.BigNumber(this.limit).plus(item.donateAmount).toNumber();
}
}
});
}
代码说明:
handleAddAcTaxPiIncomeReportingMedicalInsurance函数用于添加新的商业健康保险附子数据。handleDeleteAcTaxPiIncomeReportingMedicalInsurance函数用于删除选中的商业健康保险附子数据。countNum函数用于计算限制值,根据donateAmount和deductionRatio的值进行计算。
注意:
- 代码中的
BigNumber对象需要根据实际情况进行替换。 - 代码中使用的变量名和函数名需要根据实际情况进行调整。
原文地址: https://www.cveoy.top/t/topic/pgzJ 著作权归作者所有。请勿转载和采集!