ปรับโครงสร้างระบบ ให้รองรับ การไปช่วยปฏิบัติงาน
This commit is contained in:
@@ -21,7 +21,7 @@ function eva_limit_frame_employee_FeedDataToSearchForm(data) {
|
||||
|
||||
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_frame_group_guid"), data, "id_guid", "external_name", "item_frame_group_guid", 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);
|
||||
@@ -31,13 +31,14 @@ function eva_limit_frame_employee_FeedDataToForm(data) {
|
||||
$("#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);
|
||||
DropDownClearFormAndFeedWithData($("#eva_limit_frame_employee_help_org_id"), data, "id", "external_name", "item_help_org_id", data.help_org_id);
|
||||
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 = getUrlParameter("id");
|
||||
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();
|
||||
@@ -47,6 +48,7 @@ function eva_limit_frame_employee_GetFromForm() {
|
||||
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.help_org_id = $("#eva_limit_frame_employee_help_org_id").val();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
@@ -184,7 +186,7 @@ var eva_limit_frame_employee_setupTable = function (result) {
|
||||
{ "data": "position_allowance" },
|
||||
{ "data": "monthly_remuneration" },
|
||||
{ "data": "cost_of_living" },
|
||||
|
||||
{ "data": "help_org_id_external_linkage_external_name" },
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
var eva_limit_frame_employee_editMode = "CREATE";
|
||||
var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
//================= 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);
|
||||
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
return eva_limit_frame_employeeObject;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_InitialForm() {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Form Mode Setup and Flow =========================================
|
||||
|
||||
function eva_limit_frame_employee_SetEditForm(a) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_editMode = "UPDATE";
|
||||
eva_limit_frame_employee_FeedDataToForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + a, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_SetCreateForm() {
|
||||
eva_limit_frame_employee_editMode = "CREATE";
|
||||
eva_limit_frame_employee_InitialForm();
|
||||
}
|
||||
|
||||
//================= Update and Delete =========================================
|
||||
|
||||
var eva_limit_frame_employee_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
function eva_limit_frame_employee_PutUpdate() {
|
||||
if (!ValidateForm('eva_limit_frame_employee', eva_limit_frame_employee_customValidation))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = eva_limit_frame_employee_GetFromForm();
|
||||
|
||||
//Update Mode
|
||||
if (eva_limit_frame_employee_editMode === "UPDATE") {
|
||||
var successFunc1 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + eva_limit_frame_employee_API + data.id, data, successFunc1, AlertDanger);
|
||||
}
|
||||
// Create mode
|
||||
else {
|
||||
var successFunc2 = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPostRequest(apisite + eva_limit_frame_employee_API, data, successFunc2, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GoDelete(a) {
|
||||
if (confirm('คุณต้องการลบ ' + a + ' ใช่หรือไม่?')) {
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess(result.code+" "+result.message);
|
||||
eva_limit_frame_employee_RefreshTable();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxDeleteRequest(apisite + eva_limit_frame_employee_API + a, null, successFunc, AlertDanger);
|
||||
}
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
//================= Multi-Selection Function =========================================
|
||||
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
function eva_limit_frame_employee_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
$("#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);
|
||||
$("#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("");
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_FeedDataToForm(data, i, blankItem) {
|
||||
$("#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);
|
||||
$("#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);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetFromForm(obj, i) {
|
||||
var eva_limit_frame_employeeObject = new Object();
|
||||
eva_limit_frame_employeeObject.id = obj.find("#eva_limit_frame_employee_id_" + i).val();
|
||||
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_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;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_GetAllData() {
|
||||
//Insert eva_limit_frame_employee List
|
||||
var eva_limit_frame_employee = [];
|
||||
$('#eva_limit_frame_employeeBody tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
var eacheva_limit_frame_employee = eva_limit_frame_employee_GetFromForm($(this), i);
|
||||
eva_limit_frame_employee.push(eacheva_limit_frame_employee);
|
||||
});
|
||||
return eva_limit_frame_employee;
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Save(id) {
|
||||
//Insert eva_limit_frame_employee List
|
||||
var eva_limit_frame_employee = eva_limit_frame_employee_GetAllData();
|
||||
|
||||
var successFunc = function (result) {
|
||||
AlertSuccess("ปรับปรุงข้อมูลเรียบร้อยแล้ว");
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxPutRequest(apisite + '/api/eva_limit_frame_employee/UpdateMultiple', eva_limit_frame_employee, successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Get(id, blankItem) {
|
||||
|
||||
$('#eva_limit_frame_employeeBody').empty();
|
||||
|
||||
var successFunc = function (response) {
|
||||
//console.log(response);
|
||||
$.each(response, function (i, data) {
|
||||
var tag = '<tr>';
|
||||
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><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>';
|
||||
$('#eva_limit_frame_employeeBody').append($(tag));
|
||||
eva_limit_frame_employee_FeedDataToForm(data, (i + 1), blankItem);
|
||||
});
|
||||
eva_limit_frame_employee_Summary();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee", successFunc, AlertDanger);
|
||||
//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);
|
||||
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Add() {
|
||||
var successFunc = function (result) {
|
||||
var i = $("#eva_limit_frame_employeeBody tr").length;
|
||||
var tag = '<tr>';
|
||||
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><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>';
|
||||
|
||||
$('#eva_limit_frame_employeeBody').append($(tag));
|
||||
eva_limit_frame_employee_ClearForm(i + 1, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Removeeva_limit_frame_employee(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการลบ?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', true);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '0.5' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#restoreBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("0");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_employee_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Restoreeva_limit_frame_employee(e) {
|
||||
if (confirm('กรุณากดตกลง เพื่อยืนยันการกู้คืน?')) {
|
||||
$(e).closest('tr').find("input,select,textarea").attr('disabled', false);
|
||||
$(e).closest('tr').find("input,select,textarea").css({ opacity: '1' });
|
||||
$(e).hide();
|
||||
$(e).closest('tr').find("#removeBtn").show();
|
||||
$(e).closest('tr').find("input").first().val("1");
|
||||
console.log($(e).closest('tr').find("input").first().val());
|
||||
eva_limit_frame_employee_Summary();
|
||||
}
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_Summary() {
|
||||
var sum = 0;
|
||||
$(".input_score").each(function () {
|
||||
sum += +$(this).val();
|
||||
});
|
||||
$("#score_label").text("ผลรวม: " + sum);
|
||||
}
|
||||
|
||||
function eva_limit_frame_employee_InitialForm(id) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_Get(id, result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + "/api/eva_limit_frame_employee/" + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
var eva_limit_frame_employee_API = "/api/eva_limit_frame_employee/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_GetSearchParameter(fileType) {
|
||||
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.fileType = fileType;
|
||||
|
||||
console.log(eva_limit_frame_employeeSearchObject);
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function eva_limit_frame_employee_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
eva_limit_frame_employee_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + eva_limit_frame_employee_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_eva_limit_frame_employee_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function eva_limit_frame_employee_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_eva_limit_frame_employee', s_eva_limit_frame_employee_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(eva_limit_frame_employee_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/eva_limit_frame_employee/eva_limit_frame_employee_report?" + p;
|
||||
|
||||
if (fileType === "pdf") {
|
||||
$("#report_result").attr("src", report_url);
|
||||
$("#report_result").show();
|
||||
//window.open(report_url);
|
||||
} else {
|
||||
$("#report_result").hide();
|
||||
window.open(report_url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user