รวม 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

@@ -96,7 +96,17 @@ function eva_evaluation_achievement_process_Get(a, blankItem) {
//AjaxGetRequest(apisite + '/api/eva_evaluation_achievement_process/GetListBycreate_evaluation_detail_id/' + a, successFunc, AlertDanger);
}
function CheckValidValueachievement(){
$('#eva_evaluation_achievement_processBody tr').each(function () {
var i = $(this).find("#rowCount").text();
var score = $("#eva_evaluation_achievement_process_score_" + i).val();
if(score > 5) $("#eva_evaluation_achievement_process_score_" + i).val(5);
if(score < 0) $("#eva_evaluation_achievement_process_score_" + i).val(0);
});
}
function Oneva_evaluation_achievement_process_scoreChange(){
CheckValidValueachievement();
var total_achievement = 0;
var total_achievement_weight = 0;
var total_achievement_score = 0;
@@ -114,9 +124,12 @@ function Oneva_evaluation_achievement_process_scoreChange(){
$("#h_eva_evaluation_achievement_process_weight").text(total_achievement_weight.toFixed(2));
$("#h_eva_evaluation_achievement_process_score").text(total_achievement_score.toFixed(2));
$("#eva_create_evaluation_detail_summary1_total_summary_chief").text(total_achievement.toFixed(2));
$("#eva_create_evaluation_detail_summary1_Final_summary_chief").text(total_achievement_score.toFixed(2));
$("#eva_create_evaluation_detail_summary1_achievement_chief").text(total_achievement.toFixed(2));
var w1 = parseFloat($("#w1").text());
console.log(w1);
$("#eva_create_evaluation_detail_summary1_total_summary_chief").text((total_achievement * 20).toFixed(2));
$("#eva_create_evaluation_detail_summary1_Final_summary_chief").text((total_achievement * 20).toFixed(2));
$("#eva_create_evaluation_detail_summary1_achievement_chief").text((total_achievement_score * w1/10).toFixed(2));
calculationAllItem();
}