diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 14842e9..40da506 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -179,4 +179,28 @@ function bindIncomeChangeableInput() { $(this).parent().parent().find(".input-changeable-total-tax-exclude").val(amount*price/(1+taxRate/100)); }); +} + +/** + * 收入明细增加一行 + */ +function appendTrIncome() { + var template = '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' '; + $("#incomeTable").append(template); } \ No newline at end of file diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index ba9f905..ff3cc2a 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -495,24 +495,7 @@ }); }); $("#incomeAddBtn").click(function () { - var template = '\n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' '; - $("#incomeTable").append(template); + appendTrIncome(); bindDeleteBtn(); bindIncomeChangeableInput(); });