ปรับปรุงหน้าโควต้า
This commit is contained in:
@@ -99,6 +99,14 @@
|
||||
<section class="wrapper">
|
||||
<div class="title"><div class="line"></div>รายชื่อบุคลลากร</div>
|
||||
|
||||
<div class="tools">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<button class="btn btn-info" type="button" onclick="javascript:CalculateRemainQuota(true)">คำนวณค่าครองชีพใหม่ ตามเกณฑ์เงินเดือน 13,285</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="eva_adjust_postponement_detail_quota_02Table" class="display table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
$("#eva_adjust_postponement_detail_quota_02_promoted_percentage_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_total_promote_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_remark_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text("");
|
||||
@@ -32,7 +32,7 @@ function eva_adjust_postponement_detail_quota_02_FeedDataToForm(data, i, blankIt
|
||||
$("#eva_adjust_postponement_detail_quota_02_promoted_percentage_" + i).text(formatNumberTemp(data.promoted_percentage));
|
||||
$("#eva_adjust_postponement_detail_quota_02_total_promote_" + i).text(formatNumber(data.total_promote));
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text(formatNumberTemp(data.new_sarary));
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).text(formatNumber(data.new_cost_living));
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val(data.new_cost_living);
|
||||
$("#eva_adjust_postponement_detail_quota_02_remark_" + i).text(data.remark);
|
||||
$("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val(data.receive_quota);
|
||||
$("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text(formatNumber(data.new_sarary_with_quota));
|
||||
@@ -56,7 +56,7 @@ function eva_adjust_postponement_detail_quota_02_GetFromForm(obj, i) {
|
||||
eva_adjust_postponement_detail_quota_02Object.promoted_percentage = obj.find("#eva_adjust_postponement_detail_quota_02_promoted_percentage_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.total_promote = obj.find("#eva_adjust_postponement_detail_quota_02_total_promote_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.new_sarary = obj.find("#eva_adjust_postponement_detail_quota_02_new_sarary_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.new_cost_living = obj.find("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.new_cost_living = obj.find("#eva_adjust_postponement_detail_quota_02_new_cost_living_" + i).val();
|
||||
eva_adjust_postponement_detail_quota_02Object.remark = obj.find("#eva_adjust_postponement_detail_quota_02_remark_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.receive_quota = obj.find("#eva_adjust_postponement_detail_quota_02_receive_quota_" + i).val();
|
||||
eva_adjust_postponement_detail_quota_02Object.new_sarary_with_quota = obj.find("#eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_" + i).text();
|
||||
@@ -129,9 +129,9 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_promoted_percentage_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_total_promote_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_quota_02_new_sarary_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><input onchange="CalculateRemainQuota();" class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_receive_quota_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input onchange="CalculateRemainQuota(false);" class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_receive_quota_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_remark_' + (i + 1) + '" /></td>';
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
|
||||
Oneva_adjust_postponement_quota_limit_frame_quotaChange();
|
||||
|
||||
//CalculateRemainQuota();
|
||||
//CalculateRemainQuota(false);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user