แก้บักระบบ โดยต้น นคร
This commit is contained in:
Binary file not shown.
@@ -317,7 +317,7 @@ namespace TodoAPI2.Models
|
|||||||
p.id = k1;
|
p.id = k1;
|
||||||
p.create_evaluation_detail_id = n.id;
|
p.create_evaluation_detail_id = n.id;
|
||||||
p.behavior = k.competency_code + " " + k.competency_topic;
|
p.behavior = k.competency_code + " " + k.competency_topic;
|
||||||
p.weight = 0;
|
p.weight = 20;
|
||||||
p.created = DateTime.Now;
|
p.created = DateTime.Now;
|
||||||
p.updated = DateTime.Now;
|
p.updated = DateTime.Now;
|
||||||
p.isActive = true;
|
p.isActive = true;
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public decimal? weight { get; set; }
|
public decimal? weight { get; set; }
|
||||||
|
|
||||||
|
public string target_score1 { get; set; }
|
||||||
|
|
||||||
|
public string target_score2 { get; set; }
|
||||||
|
|
||||||
|
public string target_score3 { get; set; }
|
||||||
|
|
||||||
|
public string target_score4 { get; set; }
|
||||||
|
|
||||||
|
public string target_score5 { get; set; }
|
||||||
|
|
||||||
public string active_mode { get; set; }
|
public string active_mode { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ namespace TodoAPI2.Models
|
|||||||
create_evaluation_detail_id = m_eva_evaluation_behavior.create_evaluation_detail_id,
|
create_evaluation_detail_id = m_eva_evaluation_behavior.create_evaluation_detail_id,
|
||||||
behavior = m_eva_evaluation_behavior.behavior,
|
behavior = m_eva_evaluation_behavior.behavior,
|
||||||
weight = m_eva_evaluation_behavior.weight,
|
weight = m_eva_evaluation_behavior.weight,
|
||||||
|
target_score1 = m_eva_evaluation_behavior.target_score1,
|
||||||
|
target_score2 = m_eva_evaluation_behavior.target_score2,
|
||||||
|
target_score3 = m_eva_evaluation_behavior.target_score3,
|
||||||
|
target_score4 = m_eva_evaluation_behavior.target_score4,
|
||||||
|
target_score5 = m_eva_evaluation_behavior.target_score5,
|
||||||
|
|
||||||
create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id = fk_eva_create_evaluation_detailResult1.create_evaluation_id,
|
create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id = fk_eva_create_evaluation_detailResult1.create_evaluation_id,
|
||||||
|
|
||||||
@@ -193,7 +198,11 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.create_evaluation_detail_id = model.create_evaluation_detail_id;
|
existingEntity.create_evaluation_detail_id = model.create_evaluation_detail_id;
|
||||||
existingEntity.behavior = model.behavior;
|
existingEntity.behavior = model.behavior;
|
||||||
existingEntity.weight = model.weight;
|
existingEntity.weight = model.weight;
|
||||||
|
existingEntity.target_score1 = model.target_score1;
|
||||||
|
existingEntity.target_score2 = model.target_score2;
|
||||||
|
existingEntity.target_score3 = model.target_score3;
|
||||||
|
existingEntity.target_score4 = model.target_score4;
|
||||||
|
existingEntity.target_score5 = model.target_score5;
|
||||||
|
|
||||||
var updated = _repository.Update(id, existingEntity);
|
var updated = _repository.Update(id, existingEntity);
|
||||||
return Get(updated.id);
|
return Get(updated.id);
|
||||||
@@ -223,7 +232,11 @@ namespace TodoAPI2.Models
|
|||||||
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
|
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
|
||||||
existingEntity.behavior = i.behavior;
|
existingEntity.behavior = i.behavior;
|
||||||
existingEntity.weight = i.weight;
|
existingEntity.weight = i.weight;
|
||||||
|
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);
|
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,16 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public decimal? weight { get; set; }
|
public decimal? weight { get; set; }
|
||||||
|
|
||||||
|
public string target_score1 { get; set; }
|
||||||
|
|
||||||
|
public string target_score2 { get; set; }
|
||||||
|
|
||||||
|
public string target_score3 { get; set; }
|
||||||
|
|
||||||
|
public string target_score4 { get; set; }
|
||||||
|
|
||||||
|
public string target_score5 { get; set; }
|
||||||
|
|
||||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ namespace TodoAPI2.Models
|
|||||||
|
|
||||||
public List<external_linkageViewModel> GetDepartmentData()
|
public List<external_linkageViewModel> GetDepartmentData()
|
||||||
{
|
{
|
||||||
var sql = string.Format("select * from public.{0}DepartmentData{0} where department_name != ''; ",'"'.ToString());
|
var sql = string.Format("select * from public.{0}DepartmentData{0} where department_name != '' and deleted_at is null; ", '"'.ToString());
|
||||||
var para = db.GetParameterListNpgsql();
|
var para = db.GetParameterListNpgsql();
|
||||||
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
|
DataTable dt = db.ExecuteDataTableNpgsql(sql, para);
|
||||||
var result = new List<external_linkageViewModel>();
|
var result = new List<external_linkageViewModel>();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<input class="form-control" type="hidden" id="eva_evaluation_behavior_id" />
|
<input class="form-control" type="hidden" id="eva_evaluation_behavior_id" />
|
||||||
<input class="form-control" type="hidden" id="eva_evaluation_behavior_create_evaluation_detail_id" />
|
<input class="form-control" type="hidden" id="eva_evaluation_behavior_create_evaluation_detail_id" />
|
||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label id="lab_eva_evaluation_behavior_behavior" for="eva_evaluation_behavior_behavior">พฤติกรรมการปฏิบัติงาน</label>
|
<label id="lab_eva_evaluation_behavior_behavior" for="eva_evaluation_behavior_behavior">พฤติกรรมการปฏิบัติงาน</label>
|
||||||
@@ -29,11 +28,33 @@
|
|||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label id="lab_eva_evaluation_behavior_weight" for="eva_evaluation_behavior_weight">น้ำหนัก</label>
|
<label id="lab_eva_evaluation_behavior_weight" for="eva_evaluation_behavior_weight">น้ำหนัก</label>
|
||||||
<input class="form-control" type="number" id="eva_evaluation_behavior_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_behavior" />
|
<input disabled class="form-control" type="number" id="eva_evaluation_behavior_weight" iLabel="น้ำหนัก" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_evaluation_behavior_target_score1" for="eva_evaluation_behavior_target_score1">คะแนนตามค่าระดับเป้าหมาย1</label>
|
||||||
|
<input class="form-control" type="text" id="eva_evaluation_behavior_target_score1" iLabel="คะแนนตามค่าระดับเป้าหมาย1" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_evaluation_behavior_target_score2" for="eva_evaluation_behavior_target_score2">คะแนนตามค่าระดับเป้าหมาย2</label>
|
||||||
|
<input class="form-control" type="text" id="eva_evaluation_behavior_target_score2" iLabel="คะแนนตามค่าระดับเป้าหมาย2" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_evaluation_behavior_target_score3" for="eva_evaluation_behavior_target_score3">คะแนนตามค่าระดับเป้าหมาย3</label>
|
||||||
|
<input class="form-control" type="text" id="eva_evaluation_behavior_target_score3" iLabel="คะแนนตามค่าระดับเป้าหมาย3" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row'>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_evaluation_behavior_target_score4" for="eva_evaluation_behavior_target_score4">คะแนนตามค่าระดับเป้าหมาย4</label>
|
||||||
|
<input class="form-control" type="text" id="eva_evaluation_behavior_target_score4" iLabel="คะแนนตามค่าระดับเป้าหมาย4" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-4">
|
||||||
|
<label id="lab_eva_evaluation_behavior_target_score5" for="eva_evaluation_behavior_target_score5">คะแนนตามค่าระดับเป้าหมาย5</label>
|
||||||
|
<input class="form-control" type="text" id="eva_evaluation_behavior_target_score5" iLabel="คะแนนตามค่าระดับเป้าหมาย5" iRequire="true" iGroup="eva_evaluation_behavior" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -268,20 +289,12 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>เครื่องมือ</th>
|
<th>เครื่องมือ</th>
|
||||||
<th><label id='h_eva_evaluation_behavior_behavior'>พฤติกรรมการปฏิบัติงาน</label></th>
|
<th><label id='h_eva_evaluation_behavior_behavior'>พฤติกรรมการปฏิบัติงาน</label></th>
|
||||||
<th><label id='h_eva_evaluation_behavior_weight'>น้ำหนัก</label></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<th> </th>
|
|
||||||
<th> </th>
|
|
||||||
<th><p id="sum_b"></p></th>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
<p style="display:none;" id="sum_b"></p>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<section class="wrapper">
|
<section class="wrapper">
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ function Oneva_evaluation_achievement_process2_scoreChange(){
|
|||||||
total_achievement_weight += parseFloat(weight);
|
total_achievement_weight += parseFloat(weight);
|
||||||
total_achievement_score += parseFloat(score);
|
total_achievement_score += parseFloat(score);
|
||||||
total_achievement_score_old += parseFloat(score_old);
|
total_achievement_score_old += parseFloat(score_old);
|
||||||
console.log(score_old);
|
//console.log(score_old);
|
||||||
});
|
});
|
||||||
$("#h_eva_evaluation_achievement_process2_weight").text(total_achievement_weight.toFixed(2));
|
$("#h_eva_evaluation_achievement_process2_weight").text(total_achievement_weight.toFixed(2));
|
||||||
$("#h_eva_evaluation_achievement_process2_score2").text(total_achievement_score.toFixed(2));
|
$("#h_eva_evaluation_achievement_process2_score2").text(total_achievement_score.toFixed(2));
|
||||||
@@ -142,7 +142,7 @@ function Oneva_evaluation_achievement_process2_scoreChange(){
|
|||||||
|
|
||||||
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text((total_achievement*20).toFixed(2));
|
$("#eva_create_evaluation_detail_summary2_total_summary_supervisor").text((total_achievement*20).toFixed(2));
|
||||||
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text((total_achievement*20).toFixed(2));
|
$("#eva_create_evaluation_detail_summary2_Final_summary_supervisor").text((total_achievement*20).toFixed(2));
|
||||||
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text((total_achievement_score*w1/10).toFixed(2));
|
$("#eva_create_evaluation_detail_summary2_achievement_supervisor").text(((total_achievement*20)*w1/100).toFixed(2));
|
||||||
|
|
||||||
calculationAllItem();
|
calculationAllItem();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ $("#eva_evaluation_behavior_id").val(data.id);
|
|||||||
$("#eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
$("#eva_evaluation_behavior_create_evaluation_detail_id").val(data.create_evaluation_detail_id);
|
||||||
$("#eva_evaluation_behavior_behavior").val(data.behavior);
|
$("#eva_evaluation_behavior_behavior").val(data.behavior);
|
||||||
$("#eva_evaluation_behavior_weight").val(data.weight);
|
$("#eva_evaluation_behavior_weight").val(data.weight);
|
||||||
|
$("#eva_evaluation_behavior_target_score1").val(data.target_score1);
|
||||||
|
$("#eva_evaluation_behavior_target_score2").val(data.target_score2);
|
||||||
|
$("#eva_evaluation_behavior_target_score3").val(data.target_score3);
|
||||||
|
$("#eva_evaluation_behavior_target_score4").val(data.target_score4);
|
||||||
|
$("#eva_evaluation_behavior_target_score5").val(data.target_score5);
|
||||||
}
|
}
|
||||||
|
|
||||||
function eva_evaluation_behavior_GetFromForm() {
|
function eva_evaluation_behavior_GetFromForm() {
|
||||||
@@ -31,7 +35,11 @@ eva_evaluation_behaviorObject.id = $("#eva_evaluation_behavior_id").val();
|
|||||||
eva_evaluation_behaviorObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_behavior_create_evaluation_detail_id").val();
|
eva_evaluation_behaviorObject.create_evaluation_detail_id = getUrlParameter("id"); //$("#eva_evaluation_behavior_create_evaluation_detail_id").val();
|
||||||
eva_evaluation_behaviorObject.behavior = $("#eva_evaluation_behavior_behavior").val();
|
eva_evaluation_behaviorObject.behavior = $("#eva_evaluation_behavior_behavior").val();
|
||||||
eva_evaluation_behaviorObject.weight = $("#eva_evaluation_behavior_weight").val();
|
eva_evaluation_behaviorObject.weight = $("#eva_evaluation_behavior_weight").val();
|
||||||
|
eva_evaluation_behaviorObject.target_score1 = $("#eva_evaluation_behavior_target_score1").val();
|
||||||
|
eva_evaluation_behaviorObject.target_score2 = $("#eva_evaluation_behavior_target_score2").val();
|
||||||
|
eva_evaluation_behaviorObject.target_score3 = $("#eva_evaluation_behavior_target_score3").val();
|
||||||
|
eva_evaluation_behaviorObject.target_score4 = $("#eva_evaluation_behavior_target_score4").val();
|
||||||
|
eva_evaluation_behaviorObject.target_score5 = $("#eva_evaluation_behavior_target_score5").val();
|
||||||
|
|
||||||
return eva_evaluation_behaviorObject;
|
return eva_evaluation_behaviorObject;
|
||||||
}
|
}
|
||||||
@@ -162,8 +170,7 @@ var eva_evaluation_behavior_setupTable = function (result) {
|
|||||||
"select": false,
|
"select": false,
|
||||||
"columns": [
|
"columns": [
|
||||||
{ "data": "id" },
|
{ "data": "id" },
|
||||||
{ "data": "behavior" },
|
{ "data": "behavior" }
|
||||||
{ "data": "weight" },
|
|
||||||
],
|
],
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ $("#eva_evaluation_behavior_process_behavior_" + i).text(data.behavior);
|
|||||||
$("#eva_evaluation_behavior_process_weight_" + i).text(data.weight);
|
$("#eva_evaluation_behavior_process_weight_" + i).text(data.weight);
|
||||||
$("#eva_evaluation_behavior_process_score_" + i).val(data.score);
|
$("#eva_evaluation_behavior_process_score_" + i).val(data.score);
|
||||||
$("#eva_evaluation_behavior_process_sumary_" + i).text(data.sumary);
|
$("#eva_evaluation_behavior_process_sumary_" + i).text(data.sumary);
|
||||||
//$("#eva_evaluation_behavior_process_target_score1_" + i).text(data.target_score1);
|
$("#eva_evaluation_behavior_process_target_score1_" + i).text(data.target_score1);
|
||||||
//$("#eva_evaluation_behavior_process_target_score2_" + i).text(data.target_score2);
|
$("#eva_evaluation_behavior_process_target_score2_" + i).text(data.target_score2);
|
||||||
//$("#eva_evaluation_behavior_process_target_score3_" + i).text(data.target_score3);
|
$("#eva_evaluation_behavior_process_target_score3_" + i).text(data.target_score3);
|
||||||
//$("#eva_evaluation_behavior_process_target_score4_" + i).text(data.target_score4);
|
$("#eva_evaluation_behavior_process_target_score4_" + i).text(data.target_score4);
|
||||||
//$("#eva_evaluation_behavior_process_target_score5_" + i).text(data.target_score5);
|
$("#eva_evaluation_behavior_process_target_score5_" + i).text(data.target_score5);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ function Oneva_evaluation_behavior_process2_scoreChange(){
|
|||||||
|
|
||||||
$("#eva_create_evaluation_detail_summary2_total_summary_competency_supervisor").text((total_behavior*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_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));
|
$("#eva_create_evaluation_detail_summary2_competency_supervisor").text(((total_behavior*20)*w2/100).toFixed(2));
|
||||||
|
|
||||||
calculationAllItem();
|
calculationAllItem();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user