diff --git a/src/main/resources/static/assets/js/project_budget.js b/src/main/resources/static/assets/js/project_budget.js index 0a5acaa..de33b65 100644 --- a/src/main/resources/static/assets/js/project_budget.js +++ b/src/main/resources/static/assets/js/project_budget.js @@ -706,7 +706,7 @@ function prepareAjaxDataVerify(data, detailProperty, projectId) { function bindChangeableInput() { //数量改变 $(".input-changeable-amount").change(function () { - var amount = parseInt($(this).val()); + var amount = f2($(this).val()); //找到对应的单价和税率 var price = f5($(this).parent().parent().find(".input-changeable-price").val()); var taxRate = f2($(this).parent().parent().find(".input-changeable-tax-rate").val()); @@ -720,7 +720,7 @@ function bindChangeableInput() { $(".input-changeable-price").change(function () { var price = f5($(this).val()); //找到对应的数量和税率 - var amount = parseInt($(this).parent().parent().find(".input-changeable-amount").val()); + var amount = f2($(this).parent().parent().find(".input-changeable-amount").val()); var taxRate = f2($(this).parent().parent().find(".input-changeable-tax-rate").val()); console.log(amount, price, taxRate); @@ -734,7 +734,7 @@ function bindChangeableInput() { $(".input-changeable-tax-rate").change(function () { var taxRate = f2($(this).val()); //找到对应的数量和单价 - var amount = parseInt($(this).parent().parent().find(".input-changeable-amount").val()); + var amount = f2($(this).parent().parent().find(".input-changeable-amount").val()); var price = f5($(this).parent().parent().find(".input-changeable-price").val()); console.log(amount, price, taxRate); @@ -770,7 +770,7 @@ function updateAmount(className, totalClassName) { console.log(className + ": " + f2($(this).val())); total += f2($(this).val()); }); - $("."+totalClassName).val(total); + $("."+totalClassName).val(f2Fixed(total)); } /** diff --git a/src/main/resources/static/assets/js/project_budget_cost.js b/src/main/resources/static/assets/js/project_budget_cost.js index c78d352..b505764 100644 --- a/src/main/resources/static/assets/js/project_budget_cost.js +++ b/src/main/resources/static/assets/js/project_budget_cost.js @@ -8,7 +8,7 @@ COST_DETAIL2={ "category":[false,"类别","string"], "name":[false,"名称","string"], "unit":[false,"单位","string"], - "amount":[false,"数量","string"], + "amount":[false,"数量","number"], "price":[false,"单价","price"], "taxRate":[false,"税率","number"], "totalTaxInclude":[false,"含税总金额","number"], @@ -29,7 +29,7 @@ COST_DETAIL={ "category":[true,"类别","string"], "name":[true,"名称","string"], "unit":[true,"单位","string"], - "amount":[true,"数量","string"], + "amount":[true,"数量","number"], "price":[true,"单价","price"], "taxRate":[true,"税率","number"], "totalTaxInclude":[true,"含税总金额","number"], @@ -222,7 +222,7 @@ function appendTrCost() { ''+ ''+ ''+ - ''+ + ''+ ''+ ''+ ''+ diff --git a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js index 2da0801..b22df1c 100644 --- a/src/main/resources/static/assets/js/project_budget_cost_project_manage.js +++ b/src/main/resources/static/assets/js/project_budget_cost_project_manage.js @@ -9,7 +9,7 @@ COST_PROJECT_MANAGE_DETAIL2={ "name2":[false,"业务项目","string"], "detail":[false,"项目明细","string"], "unit":[false,"单位","string"], - "amount":[false,"数量","string"], + "amount":[false,"数量","number"], "price":[false,"单价","price"], "total":[false,"总金额","number"], "payTime":[false,"支出时间","string"], @@ -27,7 +27,7 @@ COST_PROJECT_MANAGE_DETAIL={ "name2":[false,"业务项目","string"], "detail":[true,"项目明细","string"], "unit":[true,"单位","string"], - "amount":[true,"数量","string"], + "amount":[true,"数量","number"], "price":[true,"单价","price"], "total":[true,"总金额","number"], "payTime":[false,"支出时间","string"], @@ -145,7 +145,7 @@ function appendTrCostProjectManage() { ' \n' + ' \n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + diff --git a/src/main/resources/static/assets/js/project_budget_income.js b/src/main/resources/static/assets/js/project_budget_income.js index e43a044..b535633 100644 --- a/src/main/resources/static/assets/js/project_budget_income.js +++ b/src/main/resources/static/assets/js/project_budget_income.js @@ -7,7 +7,7 @@ INCOME_DETAIL2={ "type":[false,"类别","string"], "name":[false,"名称","string"], "unit":[false,"单位","string"], - "amount":[false,"数量","string"], + "amount":[false,"数量","number"], "price":[false,"单价","price"], "taxRate":[false,"税率","number"], "totalTaxInclude":[false,"含税总金额","number"], @@ -20,7 +20,7 @@ INCOME_DETAIL={ "type":[true,"类别","string"], "name":[true,"名称","string"], "unit":[true,"单位","string"], - "amount":[true,"数量","string"], + "amount":[true,"数量","number"], "price":[true,"单价","price"], "taxRate":[true,"税率","number"], "totalTaxInclude":[true,"含税总金额","number"], @@ -176,7 +176,7 @@ function appendTrIncome() { ' \n' + ' \n' + ' \n' + - ' \n' + + ' \n' + ' \n' + ' \n' + ' \n' + diff --git a/src/main/resources/templates/admin/project_budget_edit.ftl b/src/main/resources/templates/admin/project_budget_edit.ftl index 4fbc782..d232d9c 100644 --- a/src/main/resources/templates/admin/project_budget_edit.ftl +++ b/src/main/resources/templates/admin/project_budget_edit.ftl @@ -460,7 +460,7 @@ - > + > @@ -475,7 +475,7 @@ - > + > @@ -616,7 +616,7 @@ - > + > @@ -645,7 +645,7 @@ - > + > @@ -712,26 +712,26 @@ type="text"<#else>type="hidden" class="am-modal-prompt-input am-modal-prompt-input-cost-project-manage am-modal-prompt-input-cost-project-manage-category2" value="${costProjectManageDetail.name!}"> - oninput="if(value.length>8)value=value.slice(0,8)"> + oninput="if(value.length>8)value=value.slice(0,8)"> @@ -751,7 +751,7 @@ - > + >