ปรับปรุงหน้าจก eva detail
This commit is contained in:
@@ -149,6 +149,8 @@ function Oneva_adjust_postponement_normal_percentageChange(){
|
||||
function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(){
|
||||
var current_quota = $("#eva_adjust_postponement_normal_limit_quota").val().replace(/[,-]/g,'');
|
||||
var sum_postpone = 0;
|
||||
var sum_before = 0;
|
||||
var sum_after = 0;
|
||||
|
||||
$('#eva_adjust_postponement_detail_normal_02Body tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
@@ -171,10 +173,14 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged()
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
|
||||
}
|
||||
sum_postpone += new_added;
|
||||
sum_before += old_salary;
|
||||
sum_after += new_salary;
|
||||
}
|
||||
});
|
||||
|
||||
// $("#remain_cost").val(Math.round((current_quota - sum_postpone)*100)/100);
|
||||
$("#remain_cost").maskMoney('mask',Math.round((current_quota - sum_postpone)*100)/100);
|
||||
$("#remain_cost").maskMoney('mask', Math.round((current_quota - sum_postpone) * 100) / 100);
|
||||
$("#sum_before").text(formatNumber(sum_before));
|
||||
$("#sum_after").text(formatNumber(sum_after));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,42 +5,42 @@ var eva_create_evaluation_API = "/api/eva_create_evaluation/";
|
||||
|
||||
function eva_create_evaluation_GetSearchParameter() {
|
||||
var eva_create_evaluationSearchObject = new Object();
|
||||
eva_create_evaluationSearchObject.performance_plan_id = $("#s_eva_create_evaluation_performance_plan_id").val();
|
||||
eva_create_evaluationSearchObject.evaluation_group_id = $("#s_eva_create_evaluation_evaluation_group_id").val();
|
||||
eva_create_evaluationSearchObject.performance_plan_id = $("#s_eva_create_evaluation_performance_plan_id").val();
|
||||
eva_create_evaluationSearchObject.evaluation_group_id = $("#s_eva_create_evaluation_evaluation_group_id").val();
|
||||
|
||||
return eva_create_evaluationSearchObject;
|
||||
}
|
||||
|
||||
function eva_create_evaluation_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_FeedDataToForm(data) {
|
||||
$("#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_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#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_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);
|
||||
$("#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_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#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_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);
|
||||
|
||||
}
|
||||
|
||||
function eva_create_evaluation_GetFromForm() {
|
||||
var eva_create_evaluationObject = new Object();
|
||||
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.employee_id = $("#eva_create_evaluation_employee_id").val();
|
||||
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").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.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_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.employee_id = $("#eva_create_evaluation_employee_id").val();
|
||||
eva_create_evaluationObject.score1 = $("#eva_create_evaluation_score1").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.supervisor1_id = $("#eva_create_evaluation_supervisor1_id").val();
|
||||
eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_supervisor2_id").val();
|
||||
|
||||
return eva_create_evaluationObject;
|
||||
}
|
||||
@@ -48,14 +48,14 @@ eva_create_evaluationObject.supervisor2_id = $("#eva_create_evaluation_superviso
|
||||
function eva_create_evaluation_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_FeedDataToForm(result);
|
||||
eva_create_evaluation_FeedDataToSearchForm(result);
|
||||
eva_create_evaluation_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_create_evaluationModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -82,15 +82,15 @@ function eva_create_evaluation_SetEditForm(a) {
|
||||
eva_create_evaluation_editMode = "UPDATE";
|
||||
eva_create_evaluation_FeedDataToForm(result);
|
||||
$("#eva_create_evaluationModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_SetCreateForm(s) {
|
||||
eva_create_evaluation_editMode = "CREATE";
|
||||
eva_create_evaluation_InitialForm(s);
|
||||
eva_create_evaluation_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_RefreshTable() {
|
||||
@@ -108,8 +108,7 @@ var eva_create_evaluation_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_create_evaluation_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation', eva_create_evaluation_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,9 +120,9 @@ function eva_create_evaluation_PutUpdate() {
|
||||
$("#eva_create_evaluationModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_create_evaluation_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -132,9 +131,9 @@ function eva_create_evaluation_PutUpdate() {
|
||||
$("#eva_create_evaluationModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_create_evaluation_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -145,9 +144,9 @@ function eva_create_evaluation_GoDelete(a) {
|
||||
$("#eva_create_evaluationModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_create_evaluation_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -157,40 +156,40 @@ function eva_create_evaluation_GoDelete(a) {
|
||||
var eva_create_evaluationTableV;
|
||||
|
||||
var eva_create_evaluation_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_create_evaluationTableV = $('#eva_create_evaluationTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "performance_plan_id_eva_performance_plan_fiscal_year" },
|
||||
{ "data": "evaluation_group_id_eva_evaluation_group_name" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "score1" },
|
||||
{ "data": "score2" },
|
||||
|
||||
{ "data": "id" },
|
||||
{ "data": "performance_plan_id_eva_performance_plan_fiscal_year" },
|
||||
{ "data": "evaluation_group_id_eva_evaluation_group_name" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "score1" },
|
||||
{ "data": "score2" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' style='display:none;' class='btn btn-danger btn-sm' onclick='javascript:eva_create_evaluation_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_create_evaluation_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
}],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_create_evaluation_InitiateDataTable() {
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation/GetListBySearch", eva_create_evaluation_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -199,10 +198,10 @@ function eva_create_evaluation_DoSearch() {
|
||||
var eva_create_evaluation_reload = function (result) {
|
||||
eva_create_evaluationTableV.destroy();
|
||||
eva_create_evaluation_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation/GetListBySearch?"+p, eva_create_evaluation_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation/GetListBySearch?" + p, eva_create_evaluation_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_GetSelect(f) {
|
||||
@@ -219,15 +218,13 @@ function eva_create_evaluation_GetSelect(f) {
|
||||
|
||||
//================= Control Function =========================================
|
||||
|
||||
function Oneva_create_evaluation_score1Change()
|
||||
{
|
||||
function Oneva_create_evaluation_score1Change() {
|
||||
var s1 = $("#eva_create_evaluation_score1").val();
|
||||
var s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#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 s2 = $("#eva_create_evaluation_score2").val();
|
||||
$("#eva_create_evaluation_score1").val(100 - s2);
|
||||
|
||||
@@ -5,33 +5,44 @@ var eva_create_evaluation_detail_API = "/api/eva_create_evaluation_detail/";
|
||||
|
||||
function eva_create_evaluation_detail_GetSearchParameter() {
|
||||
var eva_create_evaluation_detailSearchObject = new Object();
|
||||
eva_create_evaluation_detailSearchObject.create_evaluation_id = getUrlParameter("id"); //$("#s_eva_create_evaluation_detail_create_evaluation_id").val();
|
||||
eva_create_evaluation_detailSearchObject.create_evaluation_id = getUrlParameter("id"); //$("#s_eva_create_evaluation_detail_create_evaluation_id").val();
|
||||
|
||||
return eva_create_evaluation_detailSearchObject;
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_create_evaluation_detail_create_evaluation_id").val(data.create_evaluation_id);
|
||||
$("#s_eva_create_evaluation_detail_create_evaluation_id").val(data.create_evaluation_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_create_evaluation_detail_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_detail_id").val(data.id);
|
||||
$("#eva_create_evaluation_detail_create_evaluation_id").val(data.create_evaluation_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_chief"), data, "id", "fullname", "item_chief", data.chief);
|
||||
$("#eva_create_evaluation_detail_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_create_evaluation_id"), data, "external_id", "external_name", "item_create_evaluation_id", data.create_evaluation_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_chief"), data, "id", "fullname", "item_chief", data.chief);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_eva_employee_id"), data, "id", "fullname", "item_eva_employee_id", data.eva_employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor1_id"), data, "id", "fullname", "item_supervisor1_id", data.supervisor1_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_supervisor2_id"), data, "id", "fullname", "item_supervisor2_id", data.supervisor2_id);
|
||||
$("#eva_create_evaluation_detail_work_period").val(data.work_period);
|
||||
$("#eva_create_evaluation_detail_order_of_data").val(data.order_of_data);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_help_org_id"), data, "id", "external_name", "item_help_org_id", data.help_org_id);
|
||||
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_GetFromForm() {
|
||||
var eva_create_evaluation_detailObject = new Object();
|
||||
eva_create_evaluation_detailObject.id = $("#eva_create_evaluation_detail_id").val();
|
||||
eva_create_evaluation_detailObject.create_evaluation_id = $("#eva_create_evaluation_detail_create_evaluation_id").val();
|
||||
eva_create_evaluation_detailObject.employee_id = $("#eva_create_evaluation_detail_employee_id").val();
|
||||
eva_create_evaluation_detailObject.chief = $("#eva_create_evaluation_detail_chief").val();
|
||||
|
||||
eva_create_evaluation_detailObject.id = $("#eva_create_evaluation_detail_id").val();
|
||||
eva_create_evaluation_detailObject.create_evaluation_id = $("#eva_create_evaluation_detail_create_evaluation_id").val();
|
||||
eva_create_evaluation_detailObject.employee_id = $("#eva_create_evaluation_detail_employee_id").val();
|
||||
eva_create_evaluation_detailObject.chief = $("#eva_create_evaluation_detail_chief").val();
|
||||
eva_create_evaluation_detailObject.eva_employee_id = $("#eva_create_evaluation_detail_eva_employee_id").val();
|
||||
eva_create_evaluation_detailObject.supervisor1_id = $("#eva_create_evaluation_detail_supervisor1_id").val();
|
||||
eva_create_evaluation_detailObject.supervisor2_id = $("#eva_create_evaluation_detail_supervisor2_id").val();
|
||||
eva_create_evaluation_detailObject.work_period = $("#eva_create_evaluation_detail_work_period").val();
|
||||
eva_create_evaluation_detailObject.order_of_data = $("#eva_create_evaluation_detail_order_of_data").val();
|
||||
eva_create_evaluation_detailObject.help_org_id = $("#eva_create_evaluation_detail_help_org_id").val();
|
||||
|
||||
return eva_create_evaluation_detailObject;
|
||||
}
|
||||
@@ -39,14 +50,14 @@ eva_create_evaluation_detailObject.chief = $("#eva_create_evaluation_detail_chie
|
||||
function eva_create_evaluation_detail_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_create_evaluation_detail_FeedDataToForm(result);
|
||||
eva_create_evaluation_detail_FeedDataToSearchForm(result);
|
||||
eva_create_evaluation_detail_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_create_evaluation_detailModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -62,7 +73,7 @@ function eva_create_evaluation_detail_GoCreate() {
|
||||
//window_open(appsite + "/eva_create_evaluation_detailView/eva_create_evaluation_detail_d");
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_GoEdit(a) {
|
||||
function eva_create_evaluation_detail_GoEdit(a) {
|
||||
|
||||
// Incase model popup
|
||||
eva_create_evaluation_detail_SetEditForm(a);
|
||||
@@ -76,15 +87,15 @@ function eva_create_evaluation_detail_SetEditForm(a) {
|
||||
eva_create_evaluation_detail_editMode = "UPDATE";
|
||||
eva_create_evaluation_detail_FeedDataToForm(result);
|
||||
$("#eva_create_evaluation_detailModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_create_evaluation_detail_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_SetCreateForm(s) {
|
||||
eva_create_evaluation_detail_editMode = "CREATE";
|
||||
eva_create_evaluation_detail_InitialForm(s);
|
||||
eva_create_evaluation_detail_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_RefreshTable() {
|
||||
@@ -102,8 +113,7 @@ var eva_create_evaluation_detail_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_PutUpdate() {
|
||||
if (!ValidateForm('eva_create_evaluation_detail', eva_create_evaluation_detail_customValidation))
|
||||
{
|
||||
if (!ValidateForm('eva_create_evaluation_detail', eva_create_evaluation_detail_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,9 +125,9 @@ function eva_create_evaluation_detail_PutUpdate() {
|
||||
$("#eva_create_evaluation_detailModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_detail_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_create_evaluation_detail_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
@@ -126,9 +136,9 @@ function eva_create_evaluation_detail_PutUpdate() {
|
||||
$("#eva_create_evaluation_detailModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_detail_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_create_evaluation_detail_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -139,9 +149,9 @@ function eva_create_evaluation_detail_GoDelete(a) {
|
||||
$("#eva_create_evaluation_detailModel").modal("hide");
|
||||
AlertSuccess(result.message);
|
||||
eva_create_evaluation_detail_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_create_evaluation_detail_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -151,25 +161,27 @@ function eva_create_evaluation_detail_GoDelete(a) {
|
||||
var eva_create_evaluation_detailTableV;
|
||||
|
||||
var eva_create_evaluation_detail_setupTable = function (result) {
|
||||
console.log(result);
|
||||
var groupColumn = 8;
|
||||
tmp = '"';
|
||||
console.log(result);
|
||||
var groupColumn = 9;
|
||||
tmp = '"';
|
||||
eva_create_evaluation_detailTableV = $('#eva_create_evaluation_detailTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "employee_no" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "position_type_text" },
|
||||
{ "data": "position_name" },
|
||||
{ "data": "position_level_text" },
|
||||
{ "data": "remark" },
|
||||
{ "data": "chief_external_linkage_external_name" },
|
||||
{ "data": "department_name" },
|
||||
|
||||
{ "data": "id" },
|
||||
{ "data": "order_of_data" },
|
||||
{ "data": "employee_no" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "position_type_text" },
|
||||
{ "data": "position_name" },
|
||||
{ "data": "position_level_text" },
|
||||
{ "data": "remark" },
|
||||
{ "data": "chief_external_linkage_external_name" },
|
||||
{ "data": "department_name" },
|
||||
{ "data": "work_period" },
|
||||
{ "data": "help_org_id_external_linkage_external_name" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -179,36 +191,36 @@ var groupColumn = 8;
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_create_evaluation_detail_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},
|
||||
{ "visible": false, "targets": groupColumn }],
|
||||
{ "visible": false, "targets": groupColumn }],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false,
|
||||
"drawCallback": function ( settings ) {
|
||||
"searching": false,
|
||||
"drawCallback": function (settings) {
|
||||
var api = this.api();
|
||||
var rows = api.rows( {page:'current'} ).nodes();
|
||||
var last=null;
|
||||
|
||||
api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
|
||||
if ( last !== group ) {
|
||||
$(rows).eq( i ).before(
|
||||
'<tr class="group"><td colspan="9"><b>หน่วยงาน : '+group+'</b></td></tr>'
|
||||
var rows = api.rows({ page: 'current' }).nodes();
|
||||
var last = null;
|
||||
|
||||
api.column(groupColumn, { page: 'current' }).data().each(function (group, i) {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before(
|
||||
'<tr class="group"><td colspan="11"><b>หน่วยงาน : ' + group + '</b></td></tr>'
|
||||
);
|
||||
|
||||
|
||||
last = group;
|
||||
}
|
||||
} );
|
||||
});
|
||||
}
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_create_evaluation_detail_InitiateDataTable(id) {
|
||||
startLoad();
|
||||
$("#s_eva_create_evaluation_detail_create_evaluation_id").val(id);
|
||||
var p = $.param(eva_create_evaluation_detail_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation_detail/GetListBySearch?"+p, eva_create_evaluation_detail_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
$("#s_eva_create_evaluation_detail_create_evaluation_id").val(id);
|
||||
var p = $.param(eva_create_evaluation_detail_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation_detail/GetListBySearch?" + p, eva_create_evaluation_detail_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_DoSearch() {
|
||||
@@ -216,10 +228,10 @@ function eva_create_evaluation_detail_DoSearch() {
|
||||
var eva_create_evaluation_detail_reload = function (result) {
|
||||
eva_create_evaluation_detailTableV.destroy();
|
||||
eva_create_evaluation_detail_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation_detail/GetListBySearch?"+p, eva_create_evaluation_detail_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_create_evaluation_detail/GetListBySearch?" + p, eva_create_evaluation_detail_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_GetSelect(f) {
|
||||
|
||||
Reference in New Issue
Block a user