Merge branch 'develop'

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-03-29 13:07:31 +07:00
12 changed files with 150 additions and 89 deletions

View File

@@ -354,6 +354,13 @@
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th></th>
<th>รวมน้ำหนัก</th>
<th><span id="sum_weight_eva_evaluation_behavior"></span></th>
</tr>
</tfoot>
</table>
</section>
<p style="display:none;" id="sum_b"></p>

View File

@@ -177,7 +177,7 @@
<th width="8%"><label>น้ำหนัก (%)</label></th>
<th width="130px"><label>คะแนน (ระบุ 1.00-5.00)</label></th>
<th width="130px"><label>คะแนน (ระบุ 1.000 - 5.000)</label></th>
<th><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
</tr>
@@ -230,7 +230,7 @@
<th><label>พฤติกรรมการปฏิบัติงาน</label></th>
<th><label>น้ำหนัก (%)</label></th>
<th width="130px"><label>คะแนน (ระบุ 1.00-5.00)</label></th>
<th width="130px"><label>คะแนน (ระบุ 1.000 - 5.000)</label></th>
<th><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
</tr>
</thead>

View File

@@ -226,7 +226,7 @@
<th><label>น้ำหนัก (%)</label></th>
<th><label>คะแนน</label></th>
<th><label>รวมคะแนน</label></th>
<th width="130px"><label>คะแนน <br />(ระบุ 1.00-5.00)</label></th>
<th width="150px"><label>คะแนน <br />(ระบุ 1.000 - 5.000)</label></th>
<th><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
</tr>
@@ -278,11 +278,11 @@
<tr>
<th>ลำดับ</th>
<th><label>พฤติกรรมการปฏิบัติงาน</label></th>
<th><label>น้ำหนัก (%)</label></th>
<th style="width:100px; "><label>น้ำหนัก (%)</label></th>
<th><label>คะแนน</label></th>
<th><label>รวมคะแนน</label></th>
<th width="130px"><label>คะแนน <br />(ระบุ 1.00-5.00)</label></th>
<th width="130px"><label>คะแนน <br />(ระบุ 1.000 - 5.000)</label></th>
<th><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
</tr>
</thead>

View File

@@ -129,7 +129,8 @@
<div class="form-group col-md-4">
<label id="lab_eva_limit_frame_group_limit_frame_295" for="eva_limit_frame_group_limit_frame_295">กรอบวงเงินที่กันไว้</label>
<input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_group" />
<input class="form-control" type="number" id="eva_limit_frame_group_limit_frame_295" iLabel="กรอบวงเงินที่กันไว้" iRequire="false" iGroup="eva_limit_frame_group"
onchange="funcCeilCalculateSalaryLimit(event)" />
</div>
</div>
<div class='row'>

View File

@@ -659,3 +659,12 @@ function GetMenu(module, mymenu, menu_url){
startLoad();
AjaxGetRequest(menu_url, refresh_menu, menu_error);
}
function coreFormatPrice(value, digits) {
var currency = 0;
if (value) {
currency = (value / 1).toFixed(digits);
}
return currency.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

View File

@@ -20,8 +20,8 @@ function eva_evaluation_achievement_process_FeedDataToForm(data, i, blankItem) {
$("#eva_evaluation_achievement_process_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
$("#eva_evaluation_achievement_process_achievement_" + i).text(data.achievement);
$("#eva_evaluation_achievement_process_weight_" + i).text(data.weight);
$("#eva_evaluation_achievement_process_score_" + i).val(data.score);
$("#eva_evaluation_achievement_process_sumary_" + i).text(data.sumary);
$("#eva_evaluation_achievement_process_score_" + i).val(data.score.toFixed(3));
$("#eva_evaluation_achievement_process_sumary_" + i).text(data.sumary.toFixed(3));
//$("#eva_evaluation_achievement_process_target_score1_" + i).val(data.target_score1);
//$("#eva_evaluation_achievement_process_target_score2_" + i).val(data.target_score2);
//$("#eva_evaluation_achievement_process_target_score3_" + i).val(data.target_score3);

View File

@@ -25,22 +25,20 @@ function eva_evaluation_achievement_process2_FeedDataToForm(data, i, blankItem,
//console.log(data);
if (role_code === "2") {
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score);
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary);
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score2);
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary2);
}
else if(role_code === "3"){
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score2);
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary2);
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score3);
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary3);
}
else if(role_code === "4"){
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score3);
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary3);
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score4);
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary4);
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary.toFixed(3));
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score2.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary2.toFixed(3));
} else if (role_code === "3") {
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score2.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary2.toFixed(3));
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score3.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary3.toFixed(3));
} else if (role_code === "4") {
$("#eva_evaluation_achievement_process2_score_" + i).text(data.score3.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary_" + i).text(data.sumary3.toFixed(3));
$("#eva_evaluation_achievement_process2_score2_" + i).val(data.score4.toFixed(3));
$("#eva_evaluation_achievement_process2_sumary2_" + i).text(data.sumary4.toFixed(3));
}
//$("#eva_evaluation_achievement_process2_target_score1_" + i).val(data.target_score1);

View File

@@ -162,6 +162,7 @@ var eva_evaluation_behavior_setupTable = function (result) {
sum_b += v.weight;
});
$("#sum_b").text(sum_b);
$("#sum_weight_eva_evaluation_behavior").text(sum_b);
eva_evaluation_behaviorTableV = $('#eva_evaluation_behaviorTable').DataTable({
"processing": true,

View File

@@ -19,8 +19,8 @@ function eva_evaluation_behavior_process_FeedDataToForm(data, i, blankItem) {
$("#eva_evaluation_behavior_process_create_evaluation_detail_id_" + i).val(data.create_evaluation_detail_id);
$("#eva_evaluation_behavior_process_behavior_" + i).text(data.behavior);
$("#eva_evaluation_behavior_process_weight_" + i).text(data.weight);
$("#eva_evaluation_behavior_process_score_" + i).val(data.score);
$("#eva_evaluation_behavior_process_sumary_" + i).text(data.sumary);
$("#eva_evaluation_behavior_process_score_" + i).val(data.score.toFixed(3));
$("#eva_evaluation_behavior_process_sumary_" + i).text(data.sumary.toFixed(3));
//$("#eva_evaluation_behavior_process_target_score1_" + i).val(data.target_score1);
//$("#eva_evaluation_behavior_process_target_score2_" + i).val(data.target_score2);
//$("#eva_evaluation_behavior_process_target_score3_" + i).val(data.target_score3);

View File

@@ -21,22 +21,22 @@ function eva_evaluation_behavior_process2_FeedDataToForm(data, i, blankItem, rol
$("#eva_evaluation_behavior_process2_weight_" + i).val(data.weight);
if(role_code === "2"){
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score);
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary);
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score2);
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary2);
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary.toFixed(3));
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score2.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary2.toFixed(3));
}
else if(role_code === "3"){
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score2);
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary2);
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score3);
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary3);
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score2.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary2.toFixed(3));
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score3.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary3.toFixed(3));
}
else if(role_code === "4"){
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score3);
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary3);
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score4);
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary4);
$("#eva_evaluation_behavior_process2_score_" + i).text(data.score3.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary_" + i).text(data.sumary3.toFixed(3));
$("#eva_evaluation_behavior_process2_score2_" + i).val(data.score4.toFixed(3));
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(data.sumary4.toFixed(3));
}
//$("#eva_evaluation_behavior_process2_target_score1_" + i).val(data.target_score1);

View File

@@ -165,6 +165,24 @@ function eva_limit_frame_employee_GoDelete(a) {
var eva_limit_frame_employeeTableV;
var eva_limit_frame_employee_setupTable = function (result) {
console.log("result", result);
$.each(result, function (index_result, obj_result) {
/*console.log("index_result", index_result);
console.log("obj_result", obj_result);*/
var digits = 2;
var currency_salary = coreFormatPrice(obj_result.salary, digits);
var currency_position_allowance = coreFormatPrice(obj_result.position_allowance, digits);
var currency_monthly_remuneration = coreFormatPrice(obj_result.monthly_remuneration, digits);
var currency_cost_of_living = coreFormatPrice(obj_result.cost_of_living, digits);
obj_result.salary = currency_salary;
obj_result.position_allowance = currency_position_allowance;
obj_result.monthly_remuneration = currency_monthly_remuneration;
obj_result.currency_cost_of_living = currency_cost_of_living
/*console.log(obj_result);*/
});
tmp = '"';
var groupColumn = 3;
eva_limit_frame_employeeTableV = $('#eva_limit_frame_employeeTable').DataTable({

View File

@@ -106,4 +106,31 @@ function eva_limit_frame_group_GoDelete(a) {
//================= Multi-Selection Function =========================================
function funcCeilCalculateSalaryLimit(params) {
console.log("params", params);
var input_id = params.srcElement.id;
var val_input = params.srcElement.value;
var num_check = 10;
var val_divine = 100;
var val_decimal = 0;
var after_cal = 0;
if (val_input) {
val_decimal = Number(parseFloat(val_input));
}
var val_salary = Number($("#eva_limit_frame_group_total_salary").val());
var cal_divine_salary = Number(((val_salary * val_decimal) / val_divine).toFixed(3));
$("#eva_limit_frame_group_total_salary_limit").val(cal_divine_salary.toFixed(3));
var cal_ceil = Math.ceil(cal_divine_salary);
console.log("cal_ceil", cal_ceil);
var str_ceil = cal_ceil.toString();
var split_ceil = str_ceil.split('');
var num_last = Number(split_ceil[split_ceil.length - 1]);
if (num_last) {
after_cal = num_check - num_last;
}
var set_salary_limit_rounded = cal_ceil + after_cal;
/*console.log("set_salary_limit_rounded", set_salary_limit_rounded);*/
$("#eva_limit_frame_group_total_salary_limit_rounded").val(set_salary_limit_rounded.toFixed(3));
}