แก้ไข op 10 ข้อ

This commit is contained in:
Nakorn Rientrakrunchai
2021-03-07 12:48:25 +07:00
parent 9530d1aa37
commit 9bac5ef7d3
23 changed files with 1567 additions and 355 deletions

View File

@@ -28,20 +28,20 @@ function eva_create_evaluation_detail_agreement_FeedDataToForm(data) {
function eva_create_evaluation_detail_agreement_GetFromForm() {
var eva_create_evaluation_detail_agreementObject = new Object();
eva_create_evaluation_detail_agreementObject.id = $("#eva_create_evaluation_detail_agreement_id").val();
eva_create_evaluation_detail_agreementObject.evaluation_round = $("#eva_create_evaluation_detail_agreement_evaluation_round").text();
eva_create_evaluation_detail_agreementObject.employee_code = $("#eva_create_evaluation_detail_agreement_employee_code").text();
eva_create_evaluation_detail_agreementObject.employee_fullname = $("#eva_create_evaluation_detail_agreement_employee_fullname").text();
eva_create_evaluation_detail_agreementObject.employee_position = $("#eva_create_evaluation_detail_agreement_employee_position").text();
eva_create_evaluation_detail_agreementObject.employee_position_type = $("#eva_create_evaluation_detail_agreement_employee_position_type").text();
eva_create_evaluation_detail_agreementObject.employee_position_level = $("#eva_create_evaluation_detail_agreement_employee_position_level").text();
eva_create_evaluation_detail_agreementObject.employee_org = $("#eva_create_evaluation_detail_agreement_employee_org").text();
eva_create_evaluation_detail_agreementObject.chief_fullname = $("#eva_create_evaluation_detail_agreement_chief_fullname").text();
eva_create_evaluation_detail_agreementObject.chief_position = $("#eva_create_evaluation_detail_agreement_chief_position").text();
eva_create_evaluation_detail_agreementObject.create_evaluation_id = $("#eva_create_evaluation_detail_agreement_create_evaluation_id").val();
eva_create_evaluation_detail_agreementObject.org_id = $("#eva_create_evaluation_detail_agreement_org_id").val();
eva_create_evaluation_detail_agreementObject.search_employee_code = $("#eva_create_evaluation_detail_agreement_search_employee_code").val();
eva_create_evaluation_detail_agreementObject.search_employee_fullname = $("#eva_create_evaluation_detail_agreement_search_employee_fullname").val();
eva_create_evaluation_detail_agreementObject.id = $("#eva_create_evaluation_detail_agreement_id").val();
eva_create_evaluation_detail_agreementObject.evaluation_round = $("#eva_create_evaluation_detail_agreement_evaluation_round").text();
eva_create_evaluation_detail_agreementObject.employee_code = $("#eva_create_evaluation_detail_agreement_employee_code").text();
eva_create_evaluation_detail_agreementObject.employee_fullname = $("#eva_create_evaluation_detail_agreement_employee_fullname").text();
eva_create_evaluation_detail_agreementObject.employee_position = $("#eva_create_evaluation_detail_agreement_employee_position").text();
eva_create_evaluation_detail_agreementObject.employee_position_type = $("#eva_create_evaluation_detail_agreement_employee_position_type").text();
eva_create_evaluation_detail_agreementObject.employee_position_level = $("#eva_create_evaluation_detail_agreement_employee_position_level").text();
eva_create_evaluation_detail_agreementObject.employee_org = $("#eva_create_evaluation_detail_agreement_employee_org").text();
eva_create_evaluation_detail_agreementObject.chief_fullname = $("#eva_create_evaluation_detail_agreement_chief_fullname").text();
eva_create_evaluation_detail_agreementObject.chief_position = $("#eva_create_evaluation_detail_agreement_chief_position").text();
eva_create_evaluation_detail_agreementObject.create_evaluation_id = $("#eva_create_evaluation_detail_agreement_create_evaluation_id").val();
eva_create_evaluation_detail_agreementObject.org_id = $("#eva_create_evaluation_detail_agreement_org_id").val();
eva_create_evaluation_detail_agreementObject.search_employee_code = $("#eva_create_evaluation_detail_agreement_search_employee_code").val();
eva_create_evaluation_detail_agreementObject.search_employee_fullname = $("#eva_create_evaluation_detail_agreement_search_employee_fullname").val();
return eva_create_evaluation_detail_agreementObject;
@@ -50,9 +50,9 @@ eva_create_evaluation_detail_agreementObject.search_employee_fullname = $("#eva_
function eva_create_evaluation_detail_agreement_InitialForm() {
var successFunc = function (result) {
eva_create_evaluation_detail_agreement_FeedDataToForm(result);
endLoad();
endLoad();
};
startLoad();
startLoad();
AjaxGetRequest(apisite + eva_create_evaluation_detail_agreement_API + "GetBlankItem", successFunc, AlertDanger);
}
@@ -62,15 +62,15 @@ function eva_create_evaluation_detail_agreement_SetEditForm(a) {
var successFunc = function (result) {
eva_create_evaluation_detail_agreement_editMode = "UPDATE";
eva_create_evaluation_detail_agreement_FeedDataToForm(result);
endLoad();
endLoad();
};
startLoad();
startLoad();
AjaxGetRequest(apisite + eva_create_evaluation_detail_agreement_API + a, successFunc, AlertDanger);
}
function eva_create_evaluation_detail_agreement_SetCreateForm() {
eva_create_evaluation_detail_agreement_editMode = "CREATE";
eva_create_evaluation_detail_agreement_InitialForm();
eva_create_evaluation_detail_agreement_InitialForm();
}
//================= Update and Delete =========================================
@@ -80,8 +80,7 @@ var eva_create_evaluation_detail_agreement_customValidation = function (group) {
};
function eva_create_evaluation_detail_agreement_PutUpdate() {
if (!ValidateForm('eva_create_evaluation_detail_agreement', eva_create_evaluation_detail_agreement_customValidation))
{
if (!ValidateForm('eva_create_evaluation_detail_agreement', eva_create_evaluation_detail_agreement_customValidation)) {
return;
}
var data = eva_create_evaluation_detail_agreement_GetFromForm();
@@ -90,18 +89,18 @@ function eva_create_evaluation_detail_agreement_PutUpdate() {
if (eva_create_evaluation_detail_agreement_editMode === "UPDATE") {
var successFunc1 = function (result) {
AlertSuccess(result.message);
endLoad();
endLoad();
};
startLoad();
startLoad();
AjaxPutRequest(apisite + eva_create_evaluation_detail_agreement_API + data.id, data, successFunc1, AlertDanger);
}
// Create mode
else {
var successFunc2 = function (result) {
AlertSuccess(result.message);
endLoad();
endLoad();
};
startLoad();
startLoad();
AjaxPostRequest(apisite + eva_create_evaluation_detail_agreement_API, data, successFunc2, AlertDanger);
}
}
@@ -111,9 +110,9 @@ function eva_create_evaluation_detail_agreement_GoDelete(a) {
var successFunc = function (result) {
AlertSuccess(result.message);
eva_create_evaluation_detail_agreement_RefreshTable();
endLoad();
endLoad();
};
startLoad();
startLoad();
AjaxDeleteRequest(apisite + eva_create_evaluation_detail_agreement_API + a, null, successFunc, AlertDanger);
}
}