update code
This commit is contained in:
@@ -177,7 +177,7 @@ var eva_create_evaluation_setupTable = function (result) {
|
||||
"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' 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' 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> ";
|
||||
}
|
||||
}],
|
||||
"language": {
|
||||
|
||||
@@ -5,44 +5,48 @@ var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
function eva_limit_frame_employee_GetSearchParameter() {
|
||||
var eva_limit_frame_employeeSearchObject = new Object();
|
||||
eva_limit_frame_employeeSearchObject.frame_group_guid = getUrlParameter("id");
|
||||
eva_limit_frame_employeeSearchObject.employee_id = $("#s_eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeSearchObject.frame_group_guid = $("#s_eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeSearchObject.employee_id = $("#s_eva_limit_frame_employee_employee_id").val();
|
||||
|
||||
return eva_limit_frame_employeeSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
$("#s_eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_employee_id").val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id"), data, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_salary").val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance").val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration").val(data.monthly_remuneration);
|
||||
$("#eva_limit_frame_employee_id").val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
$("#eva_limit_frame_employee_position_text").val(data.position_text);
|
||||
$("#eva_limit_frame_employee_level_text").val(data.level_text);
|
||||
$("#eva_limit_frame_employee_salary").val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance").val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration").val(data.monthly_remuneration);
|
||||
$("#eva_limit_frame_employee_cost_of_living").val(data.cost_of_living);
|
||||
$("#eva_limit_frame_employee_order_of_data").val(data.order_of_data);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetFromForm() {
|
||||
var eva_limit_frame_employeeObject = new Object();
|
||||
eva_limit_frame_employeeObject.id = $("#eva_limit_frame_employee_id").val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = getUrlParameter("id");
|
||||
eva_limit_frame_employeeObject.employee_id = $("#eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeObject.org_id = $("#eva_limit_frame_employee_org_id").val();
|
||||
eva_limit_frame_employeeObject.position_id = $("#eva_limit_frame_employee_position_id").val();
|
||||
eva_limit_frame_employeeObject.level_id = $("#eva_limit_frame_employee_level_id").val();
|
||||
eva_limit_frame_employeeObject.salary = $("#eva_limit_frame_employee_salary").val();
|
||||
eva_limit_frame_employeeObject.position_allowance = $("#eva_limit_frame_employee_position_allowance").val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = $("#eva_limit_frame_employee_monthly_remuneration").val();
|
||||
eva_limit_frame_employeeObject.id = $("#eva_limit_frame_employee_id").val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = $("#eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeObject.employee_id = $("#eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeObject.org_id = $("#eva_limit_frame_employee_org_id").val();
|
||||
eva_limit_frame_employeeObject.position_text = $("#eva_limit_frame_employee_position_text").val();
|
||||
eva_limit_frame_employeeObject.level_text = $("#eva_limit_frame_employee_level_text").val();
|
||||
eva_limit_frame_employeeObject.salary = $("#eva_limit_frame_employee_salary").val();
|
||||
eva_limit_frame_employeeObject.position_allowance = $("#eva_limit_frame_employee_position_allowance").val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = $("#eva_limit_frame_employee_monthly_remuneration").val();
|
||||
eva_limit_frame_employeeObject.cost_of_living = $("#eva_limit_frame_employee_cost_of_living").val();
|
||||
eva_limit_frame_employeeObject.order_of_data = $("#eva_limit_frame_employee_order_of_data").val();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
@@ -51,14 +55,14 @@ function eva_limit_frame_employee_GetFromForm() {
|
||||
function eva_limit_frame_employee_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
eva_limit_frame_employee_FeedDataToSearchForm(result);
|
||||
eva_limit_frame_employee_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_employeeModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -85,15 +89,15 @@ function eva_limit_frame_employee_SetEditForm(a) {
|
||||
eva_limit_frame_employee_editMode = "UPDATE";
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_employeeModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_SetCreateForm(s) {
|
||||
eva_limit_frame_employee_editMode = "CREATE";
|
||||
eva_limit_frame_employee_InitialForm(s);
|
||||
eva_limit_frame_employee_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_RefreshTable() {
|
||||
@@ -111,7 +115,8 @@ var eva_limit_frame_employee_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_employee', eva_limit_frame_employee_customValidation)) {
|
||||
if (!ValidateForm('eva_limit_frame_employee', eva_limit_frame_employee_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,22 +126,22 @@ function eva_limit_frame_employee_PutUpdate() {
|
||||
if (eva_limit_frame_employee_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_employee_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_employee_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -145,11 +150,11 @@ function eva_limit_frame_employee_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_employeeModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_employee_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -159,26 +164,28 @@ function eva_limit_frame_employee_GoDelete(a) {
|
||||
var eva_limit_frame_employeeTableV;
|
||||
|
||||
var eva_limit_frame_employee_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_limit_frame_employeeTableV = $('#eva_limit_frame_employeeTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_group_guid_eva_limit_frame_group_group_guid" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "org_id_external_linkage_external_name" },
|
||||
{ "data": "position_id_external_linkage_external_name" },
|
||||
{ "data": "level_id_external_linkage_external_name" },
|
||||
{ "data": "salary" },
|
||||
{ "data": "position_allowance" },
|
||||
{ "data": "monthly_remuneration" },
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_group_guid_eva_limit_frame_group_group_guid" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "org_id_external_linkage_external_name" },
|
||||
{ "data": "position_text" },
|
||||
{ "data": "level_text" },
|
||||
{ "data": "salary" },
|
||||
{ "data": "position_allowance" },
|
||||
{ "data": "monthly_remuneration" },
|
||||
{ "data": "cost_of_living" },
|
||||
{ "data": "order_of_data" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -195,20 +202,20 @@ var eva_limit_frame_employee_setupTable = function (result) {
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?" + p, eva_limit_frame_employee_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?"+p, eva_limit_frame_employee_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_DoSearch() {
|
||||
@@ -216,10 +223,10 @@ function eva_limit_frame_employee_DoSearch() {
|
||||
var eva_limit_frame_employee_reload = function (result) {
|
||||
eva_limit_frame_employeeTableV.destroy();
|
||||
eva_limit_frame_employee_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?" + p, eva_limit_frame_employee_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/GetListBySearch?"+p, eva_limit_frame_employee_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetSelect(f) {
|
||||
|
||||
@@ -8,11 +8,13 @@ $("#eva_limit_frame_employee_id").val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid").val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id"), data, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id"), data, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_position_text").val(data.position_text);
|
||||
$("#eva_limit_frame_employee_level_text").val(data.level_text);
|
||||
$("#eva_limit_frame_employee_salary").val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance").val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration").val(data.monthly_remuneration);
|
||||
$("#eva_limit_frame_employee_cost_of_living").val(data.cost_of_living);
|
||||
$("#eva_limit_frame_employee_order_of_data").val(data.order_of_data);
|
||||
|
||||
}
|
||||
|
||||
@@ -22,11 +24,13 @@ eva_limit_frame_employeeObject.id = $("#eva_limit_frame_employee_id").val();
|
||||
eva_limit_frame_employeeObject.frame_group_guid = $("#eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeObject.employee_id = $("#eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeObject.org_id = $("#eva_limit_frame_employee_org_id").val();
|
||||
eva_limit_frame_employeeObject.position_id = $("#eva_limit_frame_employee_position_id").val();
|
||||
eva_limit_frame_employeeObject.level_id = $("#eva_limit_frame_employee_level_id").val();
|
||||
eva_limit_frame_employeeObject.position_text = $("#eva_limit_frame_employee_position_text").val();
|
||||
eva_limit_frame_employeeObject.level_text = $("#eva_limit_frame_employee_level_text").val();
|
||||
eva_limit_frame_employeeObject.salary = $("#eva_limit_frame_employee_salary").val();
|
||||
eva_limit_frame_employeeObject.position_allowance = $("#eva_limit_frame_employee_position_allowance").val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = $("#eva_limit_frame_employee_monthly_remuneration").val();
|
||||
eva_limit_frame_employeeObject.cost_of_living = $("#eva_limit_frame_employee_cost_of_living").val();
|
||||
eva_limit_frame_employeeObject.order_of_data = $("#eva_limit_frame_employee_order_of_data").val();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
|
||||
@@ -4,11 +4,13 @@ $("#eva_limit_frame_employee_id_" + i).val("");
|
||||
$("#eva_limit_frame_employee_frame_group_guid_" + i).val("");
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id_" + i), blankItem, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id_" + i), blankItem, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id_" + i), blankItem, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id_" + i), blankItem, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_position_text_" + i).val("");
|
||||
$("#eva_limit_frame_employee_level_text_" + i).val("");
|
||||
$("#eva_limit_frame_employee_salary_" + i).val("");
|
||||
$("#eva_limit_frame_employee_position_allowance_" + i).val("");
|
||||
$("#eva_limit_frame_employee_monthly_remuneration_" + i).val("");
|
||||
$("#eva_limit_frame_employee_cost_of_living_" + i).val("");
|
||||
$("#eva_limit_frame_employee_order_of_data_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
@@ -17,11 +19,13 @@ $("#eva_limit_frame_employee_id_" + i).val(data.id);
|
||||
$("#eva_limit_frame_employee_frame_group_guid_" + i).val(data.frame_group_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_employee_id_" + i), blankItem, "id", "external_name", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_org_id_" + i), blankItem, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_position_id_" + i), blankItem, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_level_id_" + i), blankItem, "id", "external_name", "item_level_id", data.level_id);
|
||||
$("#eva_limit_frame_employee_position_text_" + i).val(data.position_text);
|
||||
$("#eva_limit_frame_employee_level_text_" + i).val(data.level_text);
|
||||
$("#eva_limit_frame_employee_salary_" + i).val(data.salary);
|
||||
$("#eva_limit_frame_employee_position_allowance_" + i).val(data.position_allowance);
|
||||
$("#eva_limit_frame_employee_monthly_remuneration_" + i).val(data.monthly_remuneration);
|
||||
$("#eva_limit_frame_employee_cost_of_living_" + i).val(data.cost_of_living);
|
||||
$("#eva_limit_frame_employee_order_of_data_" + i).val(data.order_of_data);
|
||||
|
||||
}
|
||||
|
||||
@@ -31,11 +35,13 @@ eva_limit_frame_employeeObject.id = obj.find("#eva_limit_frame_employee_id_" + i
|
||||
eva_limit_frame_employeeObject.frame_group_guid = obj.find("#eva_limit_frame_employee_frame_group_guid_" + i).val();
|
||||
eva_limit_frame_employeeObject.employee_id = obj.find("#eva_limit_frame_employee_employee_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.org_id = obj.find("#eva_limit_frame_employee_org_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.position_id = obj.find("#eva_limit_frame_employee_position_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.level_id = obj.find("#eva_limit_frame_employee_level_id_" + i).val();
|
||||
eva_limit_frame_employeeObject.position_text = obj.find("#eva_limit_frame_employee_position_text_" + i).val();
|
||||
eva_limit_frame_employeeObject.level_text = obj.find("#eva_limit_frame_employee_level_text_" + i).val();
|
||||
eva_limit_frame_employeeObject.salary = obj.find("#eva_limit_frame_employee_salary_" + i).val();
|
||||
eva_limit_frame_employeeObject.position_allowance = obj.find("#eva_limit_frame_employee_position_allowance_" + i).val();
|
||||
eva_limit_frame_employeeObject.monthly_remuneration = obj.find("#eva_limit_frame_employee_monthly_remuneration_" + i).val();
|
||||
eva_limit_frame_employeeObject.cost_of_living = obj.find("#eva_limit_frame_employee_cost_of_living_" + i).val();
|
||||
eva_limit_frame_employeeObject.order_of_data = obj.find("#eva_limit_frame_employee_order_of_data_" + i).val();
|
||||
|
||||
eva_limit_frame_employeeObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_employee").val();
|
||||
return eva_limit_frame_employeeObject;
|
||||
@@ -75,11 +81,13 @@ function eva_limit_frame_employee_Get(id, blankItem) {
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_employee" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_employee_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_org_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_position_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_level_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_employee_position_text_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_employee_level_text_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_cost_of_living_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_order_of_data_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_employee_Removeeva_limit_frame_employee(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_employee_Restoreeva_limit_frame_employee(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
@@ -94,8 +102,6 @@ function eva_limit_frame_employee_Get(id, blankItem) {
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByframe_group_guid/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByemployee_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByorg_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListByposition_id/' + a, successFunc, AlertDanger);
|
||||
//AjaxGetRequest(apisite + '/api/eva_limit_frame_employee/GetListBylevel_id/' + a, successFunc, AlertDanger);
|
||||
|
||||
}
|
||||
|
||||
@@ -106,11 +112,13 @@ function eva_limit_frame_employee_Add() {
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_limit_frame_employee" value="1" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_id_' + (i + 1)+'" /><input class="form-control" type="hidden" id="eva_limit_frame_employee_frame_group_guid_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_employee_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_org_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_position_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><select class="form-control" id="eva_limit_frame_employee_level_id_' + (i + 1) +'"></select></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_employee_position_text_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_employee_level_text_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_position_allowance_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_monthly_remuneration_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_cost_of_living_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_employee_order_of_data_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_employee_Removeeva_limit_frame_employee(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_employee_Restoreeva_limit_frame_employee(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
@@ -5,40 +5,42 @@ var eva_limit_frame_group_API = "/api/eva_limit_frame_group/";
|
||||
|
||||
function eva_limit_frame_group_GetSearchParameter() {
|
||||
var eva_limit_frame_groupSearchObject = new Object();
|
||||
eva_limit_frame_groupSearchObject.frame_plan_guid = getUrlParameter("id");
|
||||
eva_limit_frame_groupSearchObject.group_guid = $("#s_eva_limit_frame_group_group_guid").val();
|
||||
eva_limit_frame_groupSearchObject.frame_plan_guid = $("#s_eva_limit_frame_group_frame_plan_guid").val();
|
||||
eva_limit_frame_groupSearchObject.group_guid = $("#s_eva_limit_frame_group_group_guid").val();
|
||||
|
||||
return eva_limit_frame_groupSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#s_eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_group_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_group_id").val(data.id);
|
||||
$("#eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295").val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary").val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit").val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded").val(data.total_salary_limit_rounded);
|
||||
$("#eva_limit_frame_group_id").val(data.id);
|
||||
$("#eva_limit_frame_group_frame_plan_guid").val(data.frame_plan_guid);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_group_group_guid"), data, "id", "code", "item_group_guid", data.group_guid);
|
||||
$("#eva_limit_frame_group_limit_frame_295").val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary").val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit").val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded").val(data.total_salary_limit_rounded);
|
||||
$("#eva_limit_frame_group_remark").val(data.remark);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetFromForm() {
|
||||
var eva_limit_frame_groupObject = new Object();
|
||||
eva_limit_frame_groupObject.id = $("#eva_limit_frame_group_id").val();
|
||||
eva_limit_frame_groupObject.frame_plan_guid = getUrlParameter("id");
|
||||
eva_limit_frame_groupObject.group_guid = $("#eva_limit_frame_group_group_guid").val();
|
||||
eva_limit_frame_groupObject.limit_frame_295 = $("#eva_limit_frame_group_limit_frame_295").val();
|
||||
eva_limit_frame_groupObject.total_salary = $("#eva_limit_frame_group_total_salary").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = $("#eva_limit_frame_group_total_salary_limit").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = $("#eva_limit_frame_group_total_salary_limit_rounded").val();
|
||||
eva_limit_frame_groupObject.id = $("#eva_limit_frame_group_id").val();
|
||||
eva_limit_frame_groupObject.frame_plan_guid = $("#eva_limit_frame_group_frame_plan_guid").val();
|
||||
eva_limit_frame_groupObject.group_guid = $("#eva_limit_frame_group_group_guid").val();
|
||||
eva_limit_frame_groupObject.limit_frame_295 = $("#eva_limit_frame_group_limit_frame_295").val();
|
||||
eva_limit_frame_groupObject.total_salary = $("#eva_limit_frame_group_total_salary").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = $("#eva_limit_frame_group_total_salary_limit").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = $("#eva_limit_frame_group_total_salary_limit_rounded").val();
|
||||
eva_limit_frame_groupObject.remark = $("#eva_limit_frame_group_remark").val();
|
||||
|
||||
|
||||
return eva_limit_frame_groupObject;
|
||||
@@ -47,14 +49,14 @@ function eva_limit_frame_group_GetFromForm() {
|
||||
function eva_limit_frame_group_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
eva_limit_frame_group_FeedDataToSearchForm(result);
|
||||
eva_limit_frame_group_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_groupModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -70,10 +72,10 @@ function eva_limit_frame_group_GoCreate() {
|
||||
|
||||
function eva_limit_frame_group_GoEdit(a) {
|
||||
// Incase model popup
|
||||
//eva_limit_frame_group_SetEditForm(a);
|
||||
eva_limit_frame_group_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
window_open(appsite + "/eva_limit_frame_groupView/eva_limit_frame_group_d?id=" + a);
|
||||
//window_open(appsite + "/eva_limit_frame_groupView/eva_limit_frame_group_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_SetEditForm(a) {
|
||||
@@ -81,15 +83,15 @@ function eva_limit_frame_group_SetEditForm(a) {
|
||||
eva_limit_frame_group_editMode = "UPDATE";
|
||||
eva_limit_frame_group_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_groupModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_group_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_SetCreateForm(s) {
|
||||
eva_limit_frame_group_editMode = "CREATE";
|
||||
eva_limit_frame_group_InitialForm(s);
|
||||
eva_limit_frame_group_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_RefreshTable() {
|
||||
@@ -107,7 +109,8 @@ var eva_limit_frame_group_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_limit_frame_group_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_group', eva_limit_frame_group_customValidation)) {
|
||||
if (!ValidateForm('eva_limit_frame_group', eva_limit_frame_group_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -117,22 +120,22 @@ function eva_limit_frame_group_PutUpdate() {
|
||||
if (eva_limit_frame_group_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_group_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_group_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -141,11 +144,11 @@ function eva_limit_frame_group_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_groupModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_group_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_group_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -155,24 +158,25 @@ function eva_limit_frame_group_GoDelete(a) {
|
||||
var eva_limit_frame_groupTableV;
|
||||
|
||||
var eva_limit_frame_group_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_limit_frame_groupTableV = $('#eva_limit_frame_groupTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_plan_guid_eva_limit_frame_plan_executed_date" },
|
||||
{ "data": "group_guid_eva_evaluation_group_code" },
|
||||
{ "data": "limit_frame_295" },
|
||||
{ "data": "total_salary" },
|
||||
{ "data": "total_salary_limit" },
|
||||
{ "data": "total_salary_limit_rounded" },
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "frame_plan_guid_eva_limit_frame_plan_executed_date" },
|
||||
{ "data": "group_guid_eva_evaluation_group_code" },
|
||||
{ "data": "limit_frame_295" },
|
||||
{ "data": "total_salary" },
|
||||
{ "data": "total_salary_limit" },
|
||||
{ "data": "total_salary_limit_rounded" },
|
||||
{ "data": "remark" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -189,20 +193,20 @@ var eva_limit_frame_group_setupTable = function (result) {
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_group_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_group_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?" + p, eva_limit_frame_group_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_group_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?"+p, eva_limit_frame_group_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_DoSearch() {
|
||||
@@ -210,10 +214,10 @@ function eva_limit_frame_group_DoSearch() {
|
||||
var eva_limit_frame_group_reload = function (result) {
|
||||
eva_limit_frame_groupTableV.destroy();
|
||||
eva_limit_frame_group_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?" + p, eva_limit_frame_group_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_group/GetListBySearch?"+p, eva_limit_frame_group_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_group_GetSelect(f) {
|
||||
|
||||
@@ -11,6 +11,7 @@ $("#eva_limit_frame_group_limit_frame_295").val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary").val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit").val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded").val(data.total_salary_limit_rounded);
|
||||
$("#eva_limit_frame_group_remark").val(data.remark);
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +24,7 @@ eva_limit_frame_groupObject.limit_frame_295 = $("#eva_limit_frame_group_limit_fr
|
||||
eva_limit_frame_groupObject.total_salary = $("#eva_limit_frame_group_total_salary").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = $("#eva_limit_frame_group_total_salary_limit").val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = $("#eva_limit_frame_group_total_salary_limit_rounded").val();
|
||||
eva_limit_frame_groupObject.remark = $("#eva_limit_frame_group_remark").val();
|
||||
|
||||
|
||||
return eva_limit_frame_groupObject;
|
||||
|
||||
@@ -7,6 +7,7 @@ $("#eva_limit_frame_group_limit_frame_295_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_limit_" + i).val("");
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val("");
|
||||
$("#eva_limit_frame_group_remark_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +19,7 @@ $("#eva_limit_frame_group_limit_frame_295_" + i).val(data.limit_frame_295);
|
||||
$("#eva_limit_frame_group_total_salary_" + i).val(data.total_salary);
|
||||
$("#eva_limit_frame_group_total_salary_limit_" + i).val(data.total_salary_limit);
|
||||
$("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val(data.total_salary_limit_rounded);
|
||||
$("#eva_limit_frame_group_remark_" + i).val(data.remark);
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +32,7 @@ eva_limit_frame_groupObject.limit_frame_295 = obj.find("#eva_limit_frame_group_l
|
||||
eva_limit_frame_groupObject.total_salary = obj.find("#eva_limit_frame_group_total_salary_" + i).val();
|
||||
eva_limit_frame_groupObject.total_salary_limit = obj.find("#eva_limit_frame_group_total_salary_limit_" + i).val();
|
||||
eva_limit_frame_groupObject.total_salary_limit_rounded = obj.find("#eva_limit_frame_group_total_salary_limit_rounded_" + i).val();
|
||||
eva_limit_frame_groupObject.remark = obj.find("#eva_limit_frame_group_remark_" + i).val();
|
||||
|
||||
eva_limit_frame_groupObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_group").val();
|
||||
return eva_limit_frame_groupObject;
|
||||
@@ -72,6 +75,7 @@ function eva_limit_frame_group_Get(id, blankItem) {
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_group_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_group_Removeeva_limit_frame_group(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_group_Restoreeva_limit_frame_group(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
@@ -98,6 +102,7 @@ function eva_limit_frame_group_Add() {
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_group_total_salary_limit_rounded_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_group_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_group_Removeeva_limit_frame_group(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_group_Restoreeva_limit_frame_group(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
@@ -5,46 +5,50 @@ var eva_limit_frame_plan_API = "/api/eva_limit_frame_plan/";
|
||||
|
||||
function eva_limit_frame_plan_GetSearchParameter() {
|
||||
var eva_limit_frame_planSearchObject = new Object();
|
||||
eva_limit_frame_planSearchObject.executed_date = formatDateForGetParameter(getDate($("#s_eva_limit_frame_plan_executed_date").val()));
|
||||
eva_limit_frame_planSearchObject.executed_date = formatDateForGetParameter(getDate($("#s_eva_limit_frame_plan_executed_date").val()));
|
||||
|
||||
return eva_limit_frame_planSearchObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToSearchForm(data) {
|
||||
$("#s_eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
$("#s_eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_plan_FeedDataToForm(data) {
|
||||
$("#eva_limit_frame_plan_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid"), data, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005").val(data.limit_frame_005);
|
||||
$("#eva_limit_frame_plan_status_self").val(data.status_self);
|
||||
$("#eva_limit_frame_plan_status_chief").val(data.status_chief);
|
||||
$("#eva_limit_frame_plan_supervisor1").val(data.supervisor1);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result"), data, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark").val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date").val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date").val(formatDate(data.salary_adjustment_date));
|
||||
$("#eva_limit_frame_plan_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_plan_guid"), data, "id", "fiscal_year", "item_plan_guid", data.plan_guid);
|
||||
$("#eva_limit_frame_plan_executed_date").val(formatDate(data.executed_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005").val(data.limit_frame_005);
|
||||
$("#eva_limit_frame_plan_status_self").val(data.status_self);
|
||||
$("#eva_limit_frame_plan_status_chief").val(data.status_chief);
|
||||
$("#eva_limit_frame_plan_supervisor1").val(data.supervisor1);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result"), data, "id", "external_name", "item_supervisor1_result", data.supervisor1_result);
|
||||
$("#eva_limit_frame_plan_supervisor1_remark").val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date").val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date").val(formatDate(data.salary_adjustment_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total").val(data.limit_frame_005_total);
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_rounded").val(data.limit_frame_005_total_rounded);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetFromForm() {
|
||||
var eva_limit_frame_planObject = new Object();
|
||||
eva_limit_frame_planObject.id = $("#eva_limit_frame_plan_id").val();
|
||||
eva_limit_frame_planObject.plan_guid = $("#eva_limit_frame_plan_plan_guid").val();
|
||||
eva_limit_frame_planObject.executed_date = getDate($("#eva_limit_frame_plan_executed_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005 = $("#eva_limit_frame_plan_limit_frame_005").val();
|
||||
eva_limit_frame_planObject.status_self = $("#eva_limit_frame_plan_status_self").val();
|
||||
eva_limit_frame_planObject.status_chief = $("#eva_limit_frame_plan_status_chief").val();
|
||||
eva_limit_frame_planObject.supervisor1 = $("#eva_limit_frame_plan_supervisor1").val();
|
||||
eva_limit_frame_planObject.supervisor1_result = $("#eva_limit_frame_plan_supervisor1_result").val();
|
||||
eva_limit_frame_planObject.supervisor1_remark = $("#eva_limit_frame_plan_supervisor1_remark").val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate($("#eva_limit_frame_plan_supervisor1_date").val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate($("#eva_limit_frame_plan_salary_adjustment_date").val());
|
||||
eva_limit_frame_planObject.id = $("#eva_limit_frame_plan_id").val();
|
||||
eva_limit_frame_planObject.plan_guid = $("#eva_limit_frame_plan_plan_guid").val();
|
||||
eva_limit_frame_planObject.executed_date = getDate($("#eva_limit_frame_plan_executed_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005 = $("#eva_limit_frame_plan_limit_frame_005").val();
|
||||
eva_limit_frame_planObject.status_self = $("#eva_limit_frame_plan_status_self").val();
|
||||
eva_limit_frame_planObject.status_chief = $("#eva_limit_frame_plan_status_chief").val();
|
||||
eva_limit_frame_planObject.supervisor1 = $("#eva_limit_frame_plan_supervisor1").val();
|
||||
eva_limit_frame_planObject.supervisor1_result = $("#eva_limit_frame_plan_supervisor1_result").val();
|
||||
eva_limit_frame_planObject.supervisor1_remark = $("#eva_limit_frame_plan_supervisor1_remark").val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate($("#eva_limit_frame_plan_supervisor1_date").val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate($("#eva_limit_frame_plan_salary_adjustment_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005_total = $("#eva_limit_frame_plan_limit_frame_005_total").val();
|
||||
eva_limit_frame_planObject.limit_frame_005_total_rounded = $("#eva_limit_frame_plan_limit_frame_005_total_rounded").val();
|
||||
|
||||
|
||||
return eva_limit_frame_planObject;
|
||||
@@ -53,14 +57,14 @@ function eva_limit_frame_plan_GetFromForm() {
|
||||
function eva_limit_frame_plan_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
eva_limit_frame_plan_FeedDataToSearchForm(result);
|
||||
eva_limit_frame_plan_FeedDataToSearchForm(result);
|
||||
if (s) {
|
||||
// Incase model popup
|
||||
$("#eva_limit_frame_planModel").modal("show");
|
||||
}
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
@@ -76,10 +80,10 @@ function eva_limit_frame_plan_GoCreate() {
|
||||
|
||||
function eva_limit_frame_plan_GoEdit(a) {
|
||||
// Incase model popup
|
||||
//eva_limit_frame_plan_SetEditForm(a);
|
||||
eva_limit_frame_plan_SetEditForm(a);
|
||||
|
||||
// Incase open new page
|
||||
window_open(appsite + "/eva_limit_frame_planView/eva_limit_frame_plan_d?id=" + a);
|
||||
//window_open(appsite + "/eva_limit_frame_planView/eva_limit_frame_plan_d?id=" + a);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_SetEditForm(a) {
|
||||
@@ -87,15 +91,15 @@ function eva_limit_frame_plan_SetEditForm(a) {
|
||||
eva_limit_frame_plan_editMode = "UPDATE";
|
||||
eva_limit_frame_plan_FeedDataToForm(result);
|
||||
$("#eva_limit_frame_planModel").modal("show");
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_plan_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_SetCreateForm(s) {
|
||||
eva_limit_frame_plan_editMode = "CREATE";
|
||||
eva_limit_frame_plan_InitialForm(s);
|
||||
eva_limit_frame_plan_InitialForm(s);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_RefreshTable() {
|
||||
@@ -113,7 +117,8 @@ var eva_limit_frame_plan_customValidation = function (group) {
|
||||
};
|
||||
|
||||
function eva_limit_frame_plan_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_plan', eva_limit_frame_plan_customValidation)) {
|
||||
if (!ValidateForm('eva_limit_frame_plan', eva_limit_frame_plan_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -123,22 +128,22 @@ function eva_limit_frame_plan_PutUpdate() {
|
||||
if (eva_limit_frame_plan_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_plan_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_plan_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -147,11 +152,11 @@ function eva_limit_frame_plan_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบข้อมูล ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
$("#eva_limit_frame_planModel").modal("hide");
|
||||
AlertSuccess(result.code + " " + result.message);
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_plan_RefreshTable();
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_plan_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
@@ -161,27 +166,30 @@ function eva_limit_frame_plan_GoDelete(a) {
|
||||
var eva_limit_frame_planTableV;
|
||||
|
||||
var eva_limit_frame_plan_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
eva_limit_frame_planTableV = $('#eva_limit_frame_planTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
//"select": {
|
||||
//"select": {
|
||||
// "style": 'multi'
|
||||
//},
|
||||
"columns": [
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "plan_guid_eva_performance_plan_fiscal_year" },
|
||||
{ "data": "txt_executed_date" },
|
||||
{ "data": "limit_frame_005" },
|
||||
{ "data": "status_self" },
|
||||
{ "data": "status_chief" },
|
||||
{ "data": "supervisor1" },
|
||||
{ "data": "supervisor1_result_external_linkage_external_name" },
|
||||
{ "data": "supervisor1_remark" },
|
||||
{ "data": "txt_supervisor1_date" },
|
||||
{ "data": "txt_salary_adjustment_date" },
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "id" },
|
||||
{ "data": "plan_guid_eva_performance_plan_fiscal_year" },
|
||||
{ "data": "txt_executed_date" },
|
||||
{ "data": "limit_frame_005" },
|
||||
{ "data": "status_self" },
|
||||
{ "data": "status_chief" },
|
||||
{ "data": "supervisor1" },
|
||||
{ "data": "supervisor1_result_external_linkage_external_name" },
|
||||
{ "data": "supervisor1_remark" },
|
||||
{ "data": "txt_supervisor1_date" },
|
||||
{ "data": "txt_salary_adjustment_date" },
|
||||
{ "data": "limit_frame_005_total" },
|
||||
{ "data": "limit_frame_005_total_rounded" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -198,20 +206,20 @@ var eva_limit_frame_plan_setupTable = function (result) {
|
||||
// orderable: false,
|
||||
// className: 'select-checkbox'
|
||||
//}
|
||||
],
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false
|
||||
});
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
|
||||
function eva_limit_frame_plan_InitiateDataTable() {
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_plan_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?" + p, eva_limit_frame_plan_setupTable, AlertDanger);
|
||||
startLoad();
|
||||
var p = $.param(eva_limit_frame_plan_GetSearchParameter());
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?"+p, eva_limit_frame_plan_setupTable, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_DoSearch() {
|
||||
@@ -219,10 +227,10 @@ function eva_limit_frame_plan_DoSearch() {
|
||||
var eva_limit_frame_plan_reload = function (result) {
|
||||
eva_limit_frame_planTableV.destroy();
|
||||
eva_limit_frame_plan_setupTable(result);
|
||||
endLoad();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?" + p, eva_limit_frame_plan_reload, AlertDanger);
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_plan/GetListBySearch?"+p, eva_limit_frame_plan_reload, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_plan_GetSelect(f) {
|
||||
|
||||
@@ -15,6 +15,8 @@ DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result"),
|
||||
$("#eva_limit_frame_plan_supervisor1_remark").val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date").val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date").val(formatDate(data.salary_adjustment_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total").val(data.limit_frame_005_total);
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_rounded").val(data.limit_frame_005_total_rounded);
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +33,8 @@ eva_limit_frame_planObject.supervisor1_result = $("#eva_limit_frame_plan_supervi
|
||||
eva_limit_frame_planObject.supervisor1_remark = $("#eva_limit_frame_plan_supervisor1_remark").val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate($("#eva_limit_frame_plan_supervisor1_date").val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate($("#eva_limit_frame_plan_salary_adjustment_date").val());
|
||||
eva_limit_frame_planObject.limit_frame_005_total = $("#eva_limit_frame_plan_limit_frame_005_total").val();
|
||||
eva_limit_frame_planObject.limit_frame_005_total_rounded = $("#eva_limit_frame_plan_limit_frame_005_total_rounded").val();
|
||||
|
||||
|
||||
return eva_limit_frame_planObject;
|
||||
|
||||
@@ -11,6 +11,8 @@ DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result_" +
|
||||
$("#eva_limit_frame_plan_supervisor1_remark_" + i).val("");
|
||||
$("#eva_limit_frame_plan_supervisor1_date_" + i).val("");
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date_" + i).val("");
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_" + i).val("");
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_rounded_" + i).val("");
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +28,8 @@ DropDownClearFormAndFeedWithData($("#eva_limit_frame_plan_supervisor1_result_" +
|
||||
$("#eva_limit_frame_plan_supervisor1_remark_" + i).val(data.supervisor1_remark);
|
||||
$("#eva_limit_frame_plan_supervisor1_date_" + i).val(formatDate(data.supervisor1_date));
|
||||
$("#eva_limit_frame_plan_salary_adjustment_date_" + i).val(formatDate(data.salary_adjustment_date));
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_" + i).val(data.limit_frame_005_total);
|
||||
$("#eva_limit_frame_plan_limit_frame_005_total_rounded_" + i).val(data.limit_frame_005_total_rounded);
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +46,8 @@ eva_limit_frame_planObject.supervisor1_result = obj.find("#eva_limit_frame_plan_
|
||||
eva_limit_frame_planObject.supervisor1_remark = obj.find("#eva_limit_frame_plan_supervisor1_remark_" + i).val();
|
||||
eva_limit_frame_planObject.supervisor1_date = getDate(obj.find("#eva_limit_frame_plan_supervisor1_date_" + i).val());
|
||||
eva_limit_frame_planObject.salary_adjustment_date = getDate(obj.find("#eva_limit_frame_plan_salary_adjustment_date_" + i).val());
|
||||
eva_limit_frame_planObject.limit_frame_005_total = obj.find("#eva_limit_frame_plan_limit_frame_005_total_" + i).val();
|
||||
eva_limit_frame_planObject.limit_frame_005_total_rounded = obj.find("#eva_limit_frame_plan_limit_frame_005_total_rounded_" + i).val();
|
||||
|
||||
eva_limit_frame_planObject.active_mode = obj.find("#isActive_" + i + "_eva_limit_frame_plan").val();
|
||||
return eva_limit_frame_planObject;
|
||||
@@ -86,6 +92,8 @@ function eva_limit_frame_plan_Get(id, blankItem) {
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_plan_supervisor1_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_total_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_total_rounded_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_plan_Removeeva_limit_frame_plan(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_plan_Restoreeva_limit_frame_plan(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
@@ -114,6 +122,8 @@ function eva_limit_frame_plan_Add() {
|
||||
tag += '<td><textarea class="form-control" rows="2" cols="25" id="eva_limit_frame_plan_supervisor1_remark_' + (i + 1)+'" ></textarea></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_supervisor1_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="text" id="eva_limit_frame_plan_salary_adjustment_date_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_total_' + (i + 1)+'" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_limit_frame_plan_limit_frame_005_total_rounded_' + (i + 1)+'" /></td>';
|
||||
|
||||
tag += '<td><a href="javascript:;" class="btn btn-danger btn-sm" onclick="javascript:eva_limit_frame_plan_Removeeva_limit_frame_plan(this)" id="removeBtn"><i class="fa fa-trash-o" style="color:white;"></i></a><a href="javascript:;" class="btn btn-primary btn-sm" onclick="javascript:eva_limit_frame_plan_Restoreeva_limit_frame_plan(this)" style="display: none;" id="restoreBtn"><i class="fa fa-upload" style="color:white;"></i></a></td>';
|
||||
tag += '</tr>';
|
||||
|
||||
Reference in New Issue
Block a user