ปรับปรุงทศนิยม 3 ตำแหน่ง เพิ่มเติม และเปิดให้พิมพ์แบบประเมิน กับ แบบข้อตกลง ต่อเนื่องกันได้
This commit is contained in:
@@ -171,14 +171,14 @@
|
|||||||
<table id="eva_evaluation_achievement_processTable" class="display table table-bordered table-striped">
|
<table id="eva_evaluation_achievement_processTable" class="display table table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ลำดับ</th>
|
<th width="5%">ลำดับ</th>
|
||||||
|
|
||||||
<th width="60%"><label>ผลสัมฤทธิ์ตัวชี้วัดผลงาน</label></th>
|
<th width="60%"><label>ผลสัมฤทธิ์ตัวชี้วัดผลงาน</label></th>
|
||||||
<th><label>น้ำหนัก (%)</label></th>
|
<th width="8%"><label>น้ำหนัก (%)</label></th>
|
||||||
|
|
||||||
|
|
||||||
<th width="10%"><label>คะแนน (ระบุ 1.00-5.00)</label></th>
|
<th><label>คะแนน (ระบุ 1.00-5.00)</label></th>
|
||||||
<th width="10%"><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
|
<th><label>รวมคะแนน<br />(น้ำหนัก x คะแนน / 100)</label></th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -366,13 +366,15 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-danger" onclick="javascript:window_open_from_root('@MyHelper.GetConfig(Configuration, "SiteInformation:mainsite")');"><i class="fa fa-repeat"></i> กลับ</button>
|
||||||
|
|
||||||
<button id="btna01" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveAll()">บันทึก</button>
|
<button id="btna01" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveAll()">บันทึก</button>
|
||||||
|
<button id="btna03" type="button" class="btn btn-danger mycontrol01" onclick="javascript:saveStatus('back1')">ตีกลับแบบประเมิน</button>
|
||||||
|
|
||||||
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
<button class="btn btn-secondary" onclick="javascript:print_report();">พิมพ์แบบประเมิน</button>
|
||||||
|
|
||||||
<button id="btna02" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveStatus('next1')">ส่งแบบประเมิน</button>
|
<button id="btna02" type="button" class="btn btn-primary mycontrol01" onclick="javascript:saveStatus('next1')">ส่งแบบประเมิน</button>
|
||||||
|
|
||||||
<button id="btna03" type="button" class="btn btn-submit mycontrol01" onclick="javascript:saveStatus('back1')">ตีกลับแบบประเมิน</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -628,8 +628,8 @@
|
|||||||
eva_idp_plan_InitiateDataTable(id);
|
eva_idp_plan_InitiateDataTable(id);
|
||||||
eva_idp_plan_InitialForm();
|
eva_idp_plan_InitialForm();
|
||||||
|
|
||||||
setTimeout(Oneva_evaluation_achievement_process2_scoreChange, 4000);
|
setTimeout(Oneva_evaluation_achievement_process2_scoreChange, 3000);
|
||||||
setTimeout(Oneva_evaluation_behavior_process2_scoreChange, 4000);
|
setTimeout(Oneva_evaluation_behavior_process2_scoreChange, 3000);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
eva_create_evaluation_detail_process_SetCreateForm();
|
eva_create_evaluation_detail_process_SetCreateForm();
|
||||||
|
|||||||
@@ -4,27 +4,27 @@ var eva_create_evaluation_API = "/api/eva_create_evaluation/";
|
|||||||
//================= Form Data Customizaiton =========================================
|
//================= Form Data Customizaiton =========================================
|
||||||
|
|
||||||
function eva_create_evaluation_FeedDataToForm(data) {
|
function eva_create_evaluation_FeedDataToForm(data) {
|
||||||
$("#eva_create_evaluation_id").val(data.id);
|
$("#eva_create_evaluation_id").val(data.id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||||
$("#eva_create_evaluation_score1").val(data.score1);
|
$("#eva_create_evaluation_score1").val(data.score1);
|
||||||
$("#eva_create_evaluation_score2").val(data.score2);
|
$("#eva_create_evaluation_score2").val(data.score2);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function eva_create_evaluation_GetFromForm() {
|
function eva_create_evaluation_GetFromForm() {
|
||||||
var eva_create_evaluationObject = new Object();
|
var eva_create_evaluationObject = new Object();
|
||||||
eva_create_evaluationObject.id = $("#eva_create_evaluation_id").val();
|
eva_create_evaluationObject.id = $("#eva_create_evaluation_id").val();
|
||||||
eva_create_evaluationObject.performance_plan_id = $("#eva_create_evaluation_performance_plan_id").val();
|
eva_create_evaluationObject.performance_plan_id = $("#eva_create_evaluation_performance_plan_id").val();
|
||||||
eva_create_evaluationObject.employee_id = $("#eva_create_evaluation_employee_id").val();
|
eva_create_evaluationObject.employee_id = $("#eva_create_evaluation_employee_id").val();
|
||||||
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").val();
|
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").val();
|
||||||
eva_create_evaluationObject.score2 = $("#eva_create_evaluation_score2").val();
|
eva_create_evaluationObject.score2 = $("#eva_create_evaluation_score2").val();
|
||||||
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
eva_create_evaluationObject.evaluation_group_id = $("#eva_create_evaluation_evaluation_group_id").val();
|
||||||
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
eva_create_evaluationObject.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||||
|
|
||||||
return eva_create_evaluationObject;
|
return eva_create_evaluationObject;
|
||||||
}
|
}
|
||||||
@@ -32,9 +32,9 @@ eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_superviso
|
|||||||
function eva_create_evaluation_InitialForm() {
|
function eva_create_evaluation_InitialForm() {
|
||||||
var successFunc = function (result) {
|
var successFunc = function (result) {
|
||||||
eva_create_evaluation_FeedDataToForm(result);
|
eva_create_evaluation_FeedDataToForm(result);
|
||||||
endLoad();
|
endLoad();
|
||||||
};
|
};
|
||||||
startLoad();
|
startLoad();
|
||||||
AjaxGetRequest(apisite + eva_create_evaluation_API + "GetBlankItem", successFunc, AlertDanger);
|
AjaxGetRequest(apisite + eva_create_evaluation_API + "GetBlankItem", successFunc, AlertDanger);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,15 +44,15 @@ function eva_create_evaluation_SetEditForm(a) {
|
|||||||
var successFunc = function (result) {
|
var successFunc = function (result) {
|
||||||
eva_create_evaluation_editMode = "UPDATE";
|
eva_create_evaluation_editMode = "UPDATE";
|
||||||
eva_create_evaluation_FeedDataToForm(result);
|
eva_create_evaluation_FeedDataToForm(result);
|
||||||
endLoad();
|
endLoad();
|
||||||
};
|
};
|
||||||
startLoad();
|
startLoad();
|
||||||
AjaxGetRequest(apisite + eva_create_evaluation_API + a, successFunc, AlertDanger);
|
AjaxGetRequest(apisite + eva_create_evaluation_API + a, successFunc, AlertDanger);
|
||||||
}
|
}
|
||||||
|
|
||||||
function eva_create_evaluation_SetCreateForm() {
|
function eva_create_evaluation_SetCreateForm() {
|
||||||
eva_create_evaluation_editMode = "CREATE";
|
eva_create_evaluation_editMode = "CREATE";
|
||||||
eva_create_evaluation_InitialForm();
|
eva_create_evaluation_InitialForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
//================= Update and Delete =========================================
|
//================= Update and Delete =========================================
|
||||||
@@ -62,8 +62,7 @@ var eva_create_evaluation_customValidation = function (group) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function eva_create_evaluation_PutUpdate() {
|
function eva_create_evaluation_PutUpdate() {
|
||||||
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation))
|
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation)) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var data = eva_create_evaluation_GetFromForm();
|
var data = eva_create_evaluation_GetFromForm();
|
||||||
@@ -72,18 +71,18 @@ function eva_create_evaluation_PutUpdate() {
|
|||||||
if (eva_create_evaluation_editMode === "UPDATE") {
|
if (eva_create_evaluation_editMode === "UPDATE") {
|
||||||
var successFunc1 = function (result) {
|
var successFunc1 = function (result) {
|
||||||
AlertSuccess(result.message);
|
AlertSuccess(result.message);
|
||||||
endLoad();
|
endLoad();
|
||||||
};
|
};
|
||||||
startLoad();
|
startLoad();
|
||||||
AjaxPutRequest(apisite + eva_create_evaluation_API + data.id, data, successFunc1, AlertDanger);
|
AjaxPutRequest(apisite + eva_create_evaluation_API + data.id, data, successFunc1, AlertDanger);
|
||||||
}
|
}
|
||||||
// Create mode
|
// Create mode
|
||||||
else {
|
else {
|
||||||
var successFunc2 = function (result) {
|
var successFunc2 = function (result) {
|
||||||
AlertSuccess(result.message);
|
AlertSuccess(result.message);
|
||||||
endLoad();
|
endLoad();
|
||||||
};
|
};
|
||||||
startLoad();
|
startLoad();
|
||||||
AjaxPostRequest(apisite + eva_create_evaluation_API, data, successFunc2, AlertDanger);
|
AjaxPostRequest(apisite + eva_create_evaluation_API, data, successFunc2, AlertDanger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -93,9 +92,9 @@ function eva_create_evaluation_GoDelete(a) {
|
|||||||
var successFunc = function (result) {
|
var successFunc = function (result) {
|
||||||
AlertSuccess(result.message);
|
AlertSuccess(result.message);
|
||||||
eva_create_evaluation_RefreshTable();
|
eva_create_evaluation_RefreshTable();
|
||||||
endLoad();
|
endLoad();
|
||||||
};
|
};
|
||||||
startLoad();
|
startLoad();
|
||||||
AjaxDeleteRequest(apisite + eva_create_evaluation_API + a, null, successFunc, AlertDanger);
|
AjaxDeleteRequest(apisite + eva_create_evaluation_API + a, null, successFunc, AlertDanger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,15 +105,13 @@ function eva_create_evaluation_GoDelete(a) {
|
|||||||
|
|
||||||
//================= Control Function =========================================
|
//================= Control Function =========================================
|
||||||
|
|
||||||
function Oneva_create_evaluation_score1Change()
|
function Oneva_create_evaluation_score1Change() {
|
||||||
{
|
|
||||||
var s1 = $("#eva_create_evaluation_score1").val();
|
var s1 = $("#eva_create_evaluation_score1").val();
|
||||||
var s2 = $("#eva_create_evaluation_score2").val();
|
var s2 = $("#eva_create_evaluation_score2").val();
|
||||||
$("#eva_create_evaluation_score2").val(100 - s1);
|
$("#eva_create_evaluation_score2").val(100 - s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Oneva_create_evaluation_score2Change()
|
function Oneva_create_evaluation_score2Change() {
|
||||||
{
|
|
||||||
var s1 = $("#eva_create_evaluation_score1").val();
|
var s1 = $("#eva_create_evaluation_score1").val();
|
||||||
var s2 = $("#eva_create_evaluation_score2").val();
|
var s2 = $("#eva_create_evaluation_score2").val();
|
||||||
$("#eva_create_evaluation_score1").val(100 - s2);
|
$("#eva_create_evaluation_score1").val(100 - s2);
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ function eva_create_evaluation_detail_GetSelect(f) {
|
|||||||
});
|
});
|
||||||
//alert(eva_create_evaluation_detail_selectitem);
|
//alert(eva_create_evaluation_detail_selectitem);
|
||||||
|
|
||||||
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 0); // 0 คือ ไม่ต้องต่อท้ายแบบข้อตกลง ออกมา
|
rep_eva_x_DoSearch("pdf", eva_create_evaluation_detail_selectitem, 1); // 0 คือ ไม่ต้องต่อท้ายแบบข้อตกลง ออกมา, 1 คือพิมพ์ต่อท้าย
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
|
|||||||
//================= Control Function =========================================
|
//================= Control Function =========================================
|
||||||
|
|
||||||
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor) {
|
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor) {
|
||||||
|
return;
|
||||||
$(".mycontrol01").hide();
|
$(".mycontrol01").hide();
|
||||||
$(".mycontrol02").attr("disabled", true);
|
$(".mycontrol02").attr("disabled", true);
|
||||||
$("#eva_create_evaluation_detail_review01_supervisor1_remark").attr("disabled", true);
|
$("#eva_create_evaluation_detail_review01_supervisor1_remark").attr("disabled", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user