รวม code แก้บัก
This commit is contained in:
@@ -173,6 +173,8 @@ namespace TodoAPI2.Models
|
||||
existingEntity.weight = model.weight;
|
||||
existingEntity.score = model.score;
|
||||
existingEntity.sumary = model.sumary;
|
||||
existingEntity.score2 = model.score;
|
||||
existingEntity.sumary2 = model.sumary;
|
||||
existingEntity.target_score1 = model.target_score1;
|
||||
existingEntity.target_score2 = model.target_score2;
|
||||
existingEntity.target_score3 = model.target_score3;
|
||||
@@ -212,13 +214,14 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.weight = i.weight;
|
||||
existingEntity.score = i.score;
|
||||
existingEntity.sumary = i.sumary;
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
//existingEntity.target_score1 = i.target_score1;
|
||||
//existingEntity.target_score2 = i.target_score2;
|
||||
//existingEntity.target_score3 = i.target_score3;
|
||||
//existingEntity.target_score4 = i.target_score4;
|
||||
//existingEntity.target_score5 = i.target_score5;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ namespace TodoAPI2.Models
|
||||
behavior = m_eva_evaluation_behavior_process2.behavior,
|
||||
weight = m_eva_evaluation_behavior_process2.weight,
|
||||
score = m_eva_evaluation_behavior_process2.score,
|
||||
sumary = m_eva_evaluation_behavior_process2.sumary,
|
||||
score2 = m_eva_evaluation_behavior_process2.score2,
|
||||
sumary2 = m_eva_evaluation_behavior_process2.sumary2,
|
||||
target_score1 = m_eva_evaluation_behavior_process2.target_score1,
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public decimal? score { get; set; }
|
||||
|
||||
public decimal? sumary { get; set; }
|
||||
|
||||
public decimal? score2 { get; set; }
|
||||
|
||||
public decimal? sumary2 { get; set; }
|
||||
|
||||
@@ -188,14 +188,14 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_agreement_employee_position" for="eva_create_evaluation_detail_agreement_employee_position">ตำแหน่ง</label>
|
||||
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position" />
|
||||
<label id="lab_eva_create_evaluation_detail_agreement_employee_position_type" for="eva_create_evaluation_detail_agreement_employee_position_type">ประเภทตำแหน่ง</label>
|
||||
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position_type" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-4">
|
||||
<label id="lab_eva_create_evaluation_detail_agreement_employee_position_type" for="eva_create_evaluation_detail_agreement_employee_position_type">ประเภทตำแหน่ง</label>
|
||||
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position_type" />
|
||||
<label id="lab_eva_create_evaluation_detail_agreement_employee_position" for="eva_create_evaluation_detail_agreement_employee_position">ตำแหน่ง</label>
|
||||
<p class="form-control" id="eva_create_evaluation_detail_agreement_employee_position" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
|
||||
@@ -283,30 +283,32 @@
|
||||
<tr>
|
||||
<th>ลำดับ</th>
|
||||
<th><label>พฤติกรรมการปฏิบัติงาน</label></th>
|
||||
<th width="10%"><label>น้ำหนัก</label></th>
|
||||
<th width="8%"><label>น้ำหนัก</label></th>
|
||||
<th width="7%"><label>1</label></th>
|
||||
<th width="7%"><label>2</label></th>
|
||||
<th width="7%"><label>3</label></th>
|
||||
<th width="7%"><label>4</label></th>
|
||||
<th width="7%"><label>5</label></th>
|
||||
<th width="10%"><label>คะแนน</label></th>
|
||||
<th width="15%"><label>คะแนน</label></th>
|
||||
<th width="10%"><label>รวมคะแนน</label></th>
|
||||
<th width="8%"><label>คะแนน</label></th>
|
||||
<th width="8%"><label>รวมคะแนน</label></th>
|
||||
<th width="13%"><label>คะแนน</label></th>
|
||||
<th width="8%"><label>รวมคะแนน</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><label id='h_eva_evaluation_behavior_process2_behavior'>รวม</label></th>
|
||||
<th width="10%"><label id='h_eva_evaluation_behavior_process2_weight'></label></th>
|
||||
<th width="8%"><label id='h_eva_evaluation_behavior_process2_weight'></label></th>
|
||||
<th width="7%"><label id='h_eva_evaluation_behavior_process2_target_score1'></label></th>
|
||||
<th width="7%"><label id='h_eva_evaluation_behavior_process2_target_score2'></label></th>
|
||||
<th width="7%"><label id='h_eva_evaluation_behavior_process2_target_score3'></label></th>
|
||||
<th width="7%"><label id='h_eva_evaluation_behavior_process2_target_score4'></label></th>
|
||||
<th width="7%"><label id='h_eva_evaluation_behavior_process2_target_score5'></label></th>
|
||||
<th width="10%"><label id='h_eva_evaluation_behavior_process2_score'></label></th>
|
||||
<th width="15%"><label id='h_eva_evaluation_behavior_process2_score2'></label></th>
|
||||
<th width="10%"><p id="eva_create_evaluation_detail_summary2_total_summary_competency_supervisor" /></th>
|
||||
<th width="8%"><label id='h_eva_evaluation_behavior_process2_score'></label></th>
|
||||
<th width="8%"><p id="x2" /></th>
|
||||
<th width="13%"><label id='h_eva_evaluation_behavior_process2_score2'></label></th>
|
||||
<th width="8%"><p id="eva_create_evaluation_detail_summary2_total_summary_competency_supervisor" /></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody class="thin-border-bottom" id="eva_evaluation_behavior_process2Body"></tbody>
|
||||
@@ -468,7 +470,7 @@
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review02_supervisor2_remark" for="eva_create_evaluation_detail_review02_supervisor2_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
||||
<label id="lab_eva_create_evaluation_detail_review02_supervisor2_remark" for="eva_create_evaluation_detail_review02_supervisor2_remark">ความเห็นผู้ประเมินสูงสุด </label> <span id="review02x" style="color:red;display:none;">*</span>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review02_supervisor2_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="false" iGroup="eva_create_evaluation_detail_review02"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -526,7 +528,7 @@
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_remark" for="eva_create_evaluation_detail_review03_supervisor1A_remark">ความเห็นผู้ประเมิน</label>
|
||||
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_remark" for="eva_create_evaluation_detail_review03_supervisor1A_remark">ความเห็นผู้ประเมิน</label> <span id="review03x" style="color:red;display:none;">*</span>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review03_supervisor1A_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="false" iGroup="eva_create_evaluation_detail_review03"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -574,7 +576,7 @@
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class="form-group col-md-12">
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_remark" for="eva_create_evaluation_detail_review04_supervisor2A_remark">ความเห็นผู้ประเมินสูงสุด</label>
|
||||
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_remark" for="eva_create_evaluation_detail_review04_supervisor2A_remark">ความเห็นผู้ประเมินสูงสุด</label> <span id="review04x" style="color:red;display:none;">*</span>
|
||||
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review04_supervisor2A_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="false" iGroup="eva_create_evaluation_detail_review04"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -641,32 +643,35 @@
|
||||
});
|
||||
|
||||
function Oneva_create_evaluation_detail_review02_supervisor2_resultChanged(a){
|
||||
console.log($(a).val());
|
||||
if($(a).val() == "Y"){
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire","false");
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").css('border-color', '');
|
||||
$("#review02x").hide();
|
||||
}else{
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("iRequire","true");
|
||||
$("#review02x").show();
|
||||
}
|
||||
}
|
||||
|
||||
function Oneva_create_evaluation_detail_review03_supervisor1A_resultChanged(a){
|
||||
console.log($(a).val());
|
||||
if($(a).val() == "Y"){
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").attr("iRequire","false");
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").css('border-color', '');
|
||||
$("#review03x").hide();
|
||||
}else{
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").attr("iRequire","true");
|
||||
$("#review03x").show();
|
||||
}
|
||||
}
|
||||
|
||||
function Oneva_create_evaluation_detail_review04_supervisor2A_resultChanged(a){
|
||||
console.log($(a).val());
|
||||
if($(a).val() == "Y"){
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").attr("iRequire","false");
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").css('border-color', '');
|
||||
$("#review04x").hide();
|
||||
}else{
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").attr("iRequire","true");
|
||||
$("#review04x").show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ function eva_create_evaluation_detail_process_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_process_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_process_FeedDataToForm(result);
|
||||
setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor);
|
||||
//setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -131,7 +131,7 @@ function Oneva_evaluation_behavior_process_scoreChange(){
|
||||
|
||||
$("#eva_create_evaluation_detail_summary1_total_summary_competency_chief").text((total_behavior * 20).toFixed(2));
|
||||
$("#eva_create_evaluation_detail_summary1_Final_summary_competency_chief").text((total_behavior * 20).toFixed(2));
|
||||
$("#eva_create_evaluation_detail_summary1_competency_chief").text((total_behavior_score * w2 /10).toFixed(2));
|
||||
$("#eva_create_evaluation_detail_summary1_competency_chief").text(((total_behavior*20)*w2/100).toFixed(2));
|
||||
|
||||
calculationAllItem();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ $("#eva_evaluation_behavior_process2_create_evaluation_detail_id_" + i).val(data
|
||||
$("#eva_evaluation_behavior_process2_behavior_" + i).text(data.behavior);
|
||||
$("#eva_evaluation_behavior_process2_weight_" + i).val(data.weight);
|
||||
$("#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_target_score1_" + i).val(data.target_score1);
|
||||
@@ -38,6 +39,7 @@ eva_evaluation_behavior_process2Object.create_evaluation_detail_id = obj.find("#
|
||||
eva_evaluation_behavior_process2Object.behavior = obj.find("#eva_evaluation_behavior_process2_behavior_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.weight = obj.find("#eva_evaluation_behavior_process2_weight_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.score = obj.find("#eva_evaluation_behavior_process2_score_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.sumary = obj.find("#eva_evaluation_behavior_process2_sumary_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.score2 = obj.find("#eva_evaluation_behavior_process2_score2_" + i).val();
|
||||
eva_evaluation_behavior_process2Object.sumary2 = obj.find("#eva_evaluation_behavior_process2_sumary2_" + i).text();
|
||||
eva_evaluation_behavior_process2Object.target_score1 = obj.find("#eva_evaluation_behavior_process2_target_score1_" + i).val();
|
||||
@@ -81,7 +83,7 @@ function eva_evaluation_behavior_process2_Get(a, blankItem) {
|
||||
$('#eva_evaluation_behavior_process2Body').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
//console.log(response);
|
||||
console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_evaluation_behavior_process2" value="1" /><input class="form-control" type="hidden" id="eva_evaluation_behavior_process2_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_evaluation_behavior_process2_create_evaluation_detail_id_' + (i + 1)+'" /></td>';
|
||||
@@ -94,6 +96,7 @@ function eva_evaluation_behavior_process2_Get(a, blankItem) {
|
||||
tag += '<td><input type="text" class="form-control" id="eva_evaluation_behavior_process2_target_score4_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input type="text" class="form-control" id="eva_evaluation_behavior_process2_target_score5_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><p id="eva_evaluation_behavior_process2_score_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><p id="eva_evaluation_behavior_process2_sumary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input min="0" max="5" step=".01" onchange="Oneva_evaluation_behavior_process2_scoreChange()" class="form-control" type="number" id="eva_evaluation_behavior_process2_score2_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><p id="eva_evaluation_behavior_process2_sumary2_' + (i + 1)+'" /></td>';
|
||||
|
||||
@@ -126,17 +129,20 @@ function Oneva_evaluation_behavior_process2_scoreChange(){
|
||||
var total_behavior_weight = 0;
|
||||
var total_behavior_score = 0;
|
||||
var total_behavior_score_old = 0;
|
||||
var total_behavior_old = 0;
|
||||
$('#eva_evaluation_behavior_process2Body tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
var score = $("#eva_evaluation_behavior_process2_score2_" + i).val();
|
||||
var score_old = $("#eva_evaluation_behavior_process2_score_" + i).text();
|
||||
var weight = $("#eva_evaluation_behavior_process2_weight_" + i).val();
|
||||
var total = (score * weight / 100).toFixed(2);
|
||||
var total_old = (score_old * weight / 100).toFixed(2);
|
||||
$("#eva_evaluation_behavior_process2_sumary2_" + i).text(total);
|
||||
total_behavior += parseFloat(total);
|
||||
total_behavior_weight += parseFloat(weight);
|
||||
total_behavior_score += parseFloat(score);
|
||||
total_behavior_score_old += parseFloat(score_old);
|
||||
total_behavior_old += parseFloat(total_old);
|
||||
});
|
||||
$("#h_eva_evaluation_behavior_process2_weight").text(total_behavior_weight.toFixed(2));
|
||||
$("#h_eva_evaluation_behavior_process2_score2").text(total_behavior_score.toFixed(2));
|
||||
@@ -144,6 +150,7 @@ function Oneva_evaluation_behavior_process2_scoreChange(){
|
||||
|
||||
var w2 = parseFloat($("#w2").text());
|
||||
|
||||
$("#x2").text((total_behavior_old*20).toFixed(2));
|
||||
$("#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*20)*w2/100).toFixed(2));
|
||||
|
||||
Reference in New Issue
Block a user