รวมหน้าจอ วงเงินที่ใช้ในการเลื่อนเงินเดือน
This commit is contained in:
@@ -5,48 +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 = $("#s_eva_limit_frame_employee_frame_group_guid").val();
|
||||
eva_limit_frame_employeeSearchObject.employee_id = $("#s_eva_limit_frame_employee_employee_id").val();
|
||||
eva_limit_frame_employeeSearchObject.frame_group_guid = getUrlParameter("id");
|
||||
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);
|
||||
$("#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);
|
||||
|
||||
$("#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", "fullname", "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);
|
||||
console.log(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 = $("#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();
|
||||
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_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;
|
||||
@@ -55,14 +55,14 @@ eva_limit_frame_employeeObject.order_of_data = $("#eva_limit_frame_employee_orde
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -89,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() {
|
||||
@@ -115,8 +115,7 @@ 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;
|
||||
}
|
||||
|
||||
@@ -126,22 +125,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);
|
||||
}
|
||||
}
|
||||
@@ -150,11 +149,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);
|
||||
}
|
||||
}
|
||||
@@ -164,37 +163,38 @@ function eva_limit_frame_employee_GoDelete(a) {
|
||||
var eva_limit_frame_employeeTableV;
|
||||
|
||||
var eva_limit_frame_employee_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
tmp = '"';
|
||||
var groupColumn = 3;
|
||||
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_text" },
|
||||
{ "data": "level_text" },
|
||||
{ "data": "salary" },
|
||||
{ "data": "position_allowance" },
|
||||
{ "data": "monthly_remuneration" },
|
||||
{ "data": "cost_of_living" },
|
||||
{ "data": "order_of_data" },
|
||||
//{ "data": "" },
|
||||
{ "data": "id" },
|
||||
{ "data": "order_of_data" },
|
||||
{ "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" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0, //1,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_limit_frame_employee_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_limit_frame_employee_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_limit_frame_employee_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button style='display:none;' type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_limit_frame_employee_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
},
|
||||
{ "visible": false, "targets": groupColumn }
|
||||
//{
|
||||
// targets: 0,
|
||||
// data: "",
|
||||
@@ -202,20 +202,35 @@ 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,
|
||||
"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="10">' + group + '</td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
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() {
|
||||
@@ -223,10 +238,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) {
|
||||
|
||||
Reference in New Issue
Block a user