ปรับปรุงหน้าโควต้า

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-04-22 16:01:24 +07:00
parent 0e741b6612
commit 8ae5e57a88
3 changed files with 23 additions and 15 deletions

View File

@@ -137,10 +137,10 @@ function Oneva_adjust_postponement_quota_limit_frame_quotaChange() {
//console.log(limit);
$("#eva_adjust_postponement_quota_limit_quota").maskMoney('mask', Math.ceil(limit_quota/10)*10);
CalculateRemainQuota();
CalculateRemainQuota(false);
}
function CalculateRemainQuota() {
function CalculateRemainQuota(m) {
//console.log("xx");
var sum_receive_quota = 0;
var limit_quota = parseFloat($("#eva_adjust_postponement_quota_limit_quota").val().replace(/[,-]/g,''));
@@ -160,13 +160,13 @@ function CalculateRemainQuota() {
var new_sarary_with_quota = new_sarary + receive_quota;
$("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text(formatNumber(new_sarary_with_quota));
//if (m) {
// if (new_sarary_with_quota < 13285) {
// $("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(formatNumber(13285 - new_sarary_with_quota));
// } else {
// $("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(0);
// }
//}
if (m) {
if (new_sarary_with_quota < 13285) {
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(formatNumber(13285 - new_sarary_with_quota));
} else {
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(0);
}
}
sum_receive_quota += receive_quota;