รวม code แก้ issue #1

This commit is contained in:
Nakorn Rientrakrunchai
2020-02-21 00:16:37 +07:00
parent e4f3417bef
commit d9ca4b0aed
8 changed files with 106 additions and 12 deletions

View File

@@ -102,7 +102,17 @@ Oneva_evaluation_behavior_process2_scoreChange();
}
function CheckValidValuebehavior(){
$('#eva_evaluation_behavior_process2Body tr').each(function () {
var i = $(this).find("#rowCount").text();
var score = $("#eva_evaluation_behavior_process2_score2_" + i).val();
if(score > 5) $("#eva_evaluation_behavior_process2_score2_" + i).val(5);
if(score < 0) $("#eva_evaluation_behavior_process2_score2_" + i).val(0);
});
}
function Oneva_evaluation_behavior_process2_scoreChange(){
CheckValidValuebehavior();
var total_behavior = 0;
var total_behavior_weight = 0;
var total_behavior_score = 0;
@@ -119,9 +129,11 @@ function Oneva_evaluation_behavior_process2_scoreChange(){
$("#h_eva_evaluation_behavior_process2_weight").text(total_behavior_weight.toFixed(2));
$("#h_eva_evaluation_behavior_process2_score2").text(total_behavior_score.toFixed(2));
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text(total_behavior.toFixed(2));
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text(total_behavior_score.toFixed(2));
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(total_behavior.toFixed(2));
var w2 = parseFloat($("#w2").text());
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text((total_behavior*20).toFixed(2));
$("#eva_create_evaluation_detail_summary2_Final_summary_competency_supervisor").text((total_behavior*20).toFixed(2));
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text((total_behavior_score*w2/10).toFixed(2));
calculationAllItem();
}