ส่ง code แก้ไข OP Change Request 18 ข้อ
This commit is contained in:
@@ -263,9 +263,9 @@ function AlertSuccess(msg) {
|
||||
}
|
||||
|
||||
function AlertDanger(xhr, status, error) {
|
||||
var errorMessage = xhr.status + ': ' + xhr.statusText +': '+xhr.responseText;
|
||||
var errorMessage = xhr.responseText;
|
||||
endLoad();
|
||||
alert('มีข้อผิดพลาดเกิดขึ้น ดังนี้ : ' + errorMessage);
|
||||
alert(errorMessage);
|
||||
}
|
||||
|
||||
function GetUnix(path) {
|
||||
|
||||
@@ -128,6 +128,7 @@ var tag = "";
|
||||
eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, (i + 1), blankItem);
|
||||
});
|
||||
//eva_adjust_postponement_detail_normal_02_Summary();
|
||||
Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged();
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
|
||||
@@ -15,6 +15,8 @@ $("#eva_adjust_postponement_normal_limit_quota").val(data.limit_quota);
|
||||
$("#eva_adjust_postponement_normal_percentage").val(data.percentage);
|
||||
DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_managed_by"), data, "id", "fullname", "item_managed_by", getCookie("emp_id"));
|
||||
//DropDownClearFormAndFeedWithData($("#eva_adjust_postponement_normal_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
Oneva_adjust_postponement_normal_limit_frameChange();
|
||||
Oneva_adjust_postponement_normal_percentageChange();
|
||||
|
||||
}
|
||||
|
||||
@@ -126,7 +128,7 @@ function Oneva_adjust_postponement_normal_limit_frameChange(){
|
||||
var limit_frame = $("#eva_adjust_postponement_normal_limit_frame").val();
|
||||
limit_frame = Math.round(limit_frame*100)/100;
|
||||
$("#eva_adjust_postponement_normal_limit_frame").val(limit_frame);
|
||||
$("#eva_adjust_postponement_normal_limit_quota").val(Math.round((limit*limit_frame/100)*100)/100);
|
||||
$("#eva_adjust_postponement_normal_limit_quota").val(Math.round( Math.ceil(limit*limit_frame)/1000)*10 );
|
||||
}
|
||||
|
||||
function Oneva_adjust_postponement_normal_percentageChange(){
|
||||
@@ -148,26 +150,26 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged()
|
||||
|
||||
$('#eva_adjust_postponement_detail_normal_02Body tr').each(function () {
|
||||
var i = $(this).find("#rowCount").text();
|
||||
|
||||
var percentage = $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val();
|
||||
percentage = Math.round(percentage*100)/100;
|
||||
$("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val(percentage);
|
||||
if(i){
|
||||
var percentage = $("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val();
|
||||
percentage = Math.round(percentage*100)/100;
|
||||
$("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val(percentage);
|
||||
|
||||
var middle = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_middle_" + i).text());
|
||||
var old_salary = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_sarary_" + i).text());
|
||||
var new_added = Math.ceil(((percentage * middle)/100)/10)*10;
|
||||
var new_salary = parseFloat(old_salary + new_added);
|
||||
var middle = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_middle_" + i).text());
|
||||
var old_salary = parseFloat($(this).find("#eva_adjust_postponement_detail_normal_02_sarary_" + i).text());
|
||||
var new_added = Math.ceil(((percentage * middle)/100)/10)*10;
|
||||
var new_salary = parseFloat(old_salary + new_added);
|
||||
|
||||
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(new_added);
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(formatNumber(new_salary));
|
||||
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(new_added);
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(new_salary);
|
||||
|
||||
if(new_salary < 13285){
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(formatNumber(1000));
|
||||
}else{
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
|
||||
if(new_salary < 13285){
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(1000);
|
||||
}else{
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).text(0);
|
||||
}
|
||||
sum_postpone += new_added;
|
||||
}
|
||||
|
||||
sum_postpone += new_added;
|
||||
});
|
||||
|
||||
$("#remain_cost").val(Math.round((current_quota - sum_postpone)*100)/100);
|
||||
|
||||
@@ -12,7 +12,7 @@ eva_create_evaluationSearchObject.evaluation_group_id = $("#s_eva_create_evaluat
|
||||
}
|
||||
|
||||
function eva_create_evaluation_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id"), data, "id", "thegroup", "item_evaluation_group_id", data.evaluation_group_id);
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ DropDownClearFormAndFeedWithData($("#s_eva_create_evaluation_evaluation_group_id
|
||||
|
||||
function eva_create_evaluation_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#eva_create_evaluation_score2").val(data.score2);
|
||||
|
||||
@@ -5,7 +5,7 @@ var eva_create_evaluation_API = "/api/eva_create_evaluation/";
|
||||
|
||||
function eva_create_evaluation_FeedDataToForm(data) {
|
||||
$("#eva_create_evaluation_id").val(data.id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "fiscal_year", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_performance_plan_id"), data, "id", "display_text", "item_performance_plan_id", data.performance_plan_id);
|
||||
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
$("#eva_create_evaluation_score1").val(data.score1);
|
||||
$("#eva_create_evaluation_score2").val(data.score2);
|
||||
|
||||
@@ -152,28 +152,59 @@ var eva_create_evaluation_detailTableV;
|
||||
|
||||
var eva_create_evaluation_detail_setupTable = function (result) {
|
||||
console.log(result);
|
||||
var groupColumn = 8;
|
||||
tmp = '"';
|
||||
eva_create_evaluation_detailTableV = $('#eva_create_evaluation_detailTable').DataTable({
|
||||
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
"data": result,
|
||||
"select": false,
|
||||
"select": {
|
||||
"style": 'multi'
|
||||
},
|
||||
"columns": [
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "chief_external_linkage_external_name" },
|
||||
{ "data": "status_self" },
|
||||
{ "data": "status_chief" },
|
||||
{ "data": "status_supervisor" },
|
||||
{ "data": "status_supervisor1A" },
|
||||
{ "data": "status_supervisor2A" }
|
||||
{ "data": "" },
|
||||
|
||||
{ "data": "employee_no" },
|
||||
{ "data": "employee_id_external_linkage_external_name" },
|
||||
{ "data": "position_type_text" },
|
||||
{ "data": "position_name" },
|
||||
{ "data": "position_level_text" },
|
||||
{ "data": "remark" },
|
||||
{ "data": "chief_external_linkage_external_name" },
|
||||
{ "data": "department_name" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
targets: 0,
|
||||
data: "",
|
||||
defaultContent: '',
|
||||
orderable: false,
|
||||
className: 'select-checkbox'
|
||||
},
|
||||
{ "visible": false, "targets": groupColumn }
|
||||
],
|
||||
"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="9"><b>หน่วยงาน : '+group+'</b></td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
}
|
||||
} );
|
||||
}
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
@@ -204,6 +235,14 @@ function eva_create_evaluation_detail_GetSelect(f) {
|
||||
alert(eva_create_evaluation_detail_selectitem);
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_SelectAll(){
|
||||
eva_create_evaluation_detailTableV.rows().select();
|
||||
}
|
||||
|
||||
function eva_create_evaluation_detail_DeselectAll(){
|
||||
eva_create_evaluation_detailTableV.rows().deselect();
|
||||
}
|
||||
|
||||
//================= File Upload =========================================
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ $("#eva_create_evaluation_detail_agreement_chief_fullname").text(data.chief_full
|
||||
$("#eva_create_evaluation_detail_agreement_chief_position").text(data.chief_position);
|
||||
$("#eva_create_evaluation_detail_agreement_create_evaluation_id").val(data.create_evaluation_id);
|
||||
|
||||
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
|
||||
|
||||
status_self = data.status_self;
|
||||
CheckPermission();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
|
||||
var eva_create_evaluation_detail_processTableV;
|
||||
|
||||
var eva_create_evaluation_detail_process_setupTable = function (result) {
|
||||
console.log(result);
|
||||
var groupColumn = 5;
|
||||
|
||||
tmp = '"';
|
||||
eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({
|
||||
@@ -206,12 +206,28 @@ var eva_create_evaluation_detail_process_setupTable = function (result) {
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_process_GoEdit(" + tmp + data + tmp + "," + tmp + row["role_code"] + tmp + ")'><i class='fa fa-pencil'></i></button> ";
|
||||
}
|
||||
}],
|
||||
},
|
||||
{ "visible": false, "targets": groupColumn }],
|
||||
"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="12">'+group+'</td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
}
|
||||
} );
|
||||
}
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
@@ -43,6 +43,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_process_org_id
|
||||
$("#eva_create_evaluation_detail_process_search_employee_code").val(data.search_employee_code);
|
||||
$("#eva_create_evaluation_detail_process_search_employee_fullname").val(data.search_employee_fullname);
|
||||
|
||||
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
|
||||
|
||||
//console.log(data);
|
||||
item_level_score = data.item_level_score;
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_process_org_id
|
||||
$("#eva_create_evaluation_detail_process_search_employee_code").val(data.search_employee_code);
|
||||
$("#eva_create_evaluation_detail_process_search_employee_fullname").val(data.search_employee_fullname);
|
||||
|
||||
$("#remark_hrm_work_record").val(data.remark_hrm_work_record);
|
||||
|
||||
item_level_score = data.item_level_score;
|
||||
|
||||
$("#w1").text(data.create_evaluation_score1.toFixed(2)+"%");
|
||||
@@ -151,6 +153,22 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
|
||||
|
||||
//================= Control Function =========================================
|
||||
|
||||
function setViewOfComment(status_supervisor, status_supervisor1A, status_supervisor2A){
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_result").hide();
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_result").hide();
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_result").hide();
|
||||
|
||||
if(status_supervisor === "Y"){
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_result").show();
|
||||
}
|
||||
if(status_supervisor === "Y"){
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_result").show();
|
||||
}
|
||||
if(status_supervisor === "Y"){
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_result").show();
|
||||
}
|
||||
}
|
||||
|
||||
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor, status_supervisor1A, status_supervisor2A){
|
||||
|
||||
$("#btn01").hide();
|
||||
@@ -177,8 +195,12 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
$("#btnd02").hide();
|
||||
$("#btnd03").hide();
|
||||
|
||||
setViewOfComment(status_supervisor, status_supervisor1A, status_supervisor2A);
|
||||
|
||||
if(role_code === "2"){ // ความเห็น ความเห็นผู้ประเมินสูงสุด
|
||||
|
||||
$("#eva_create_evaluation_detail_review02_supervisor2_result").show();
|
||||
|
||||
if(status_chief === "Y" && status_self === "Y"){
|
||||
$("#btn01").show();
|
||||
$("#btn02").show();
|
||||
@@ -208,6 +230,8 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
}
|
||||
|
||||
else if(role_code === "3"){ // ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_result").show();
|
||||
|
||||
if(status_supervisor === "Y" && status_chief === "Y" && status_self === "Y"){
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_result").attr("disabled", false);
|
||||
$("#eva_create_evaluation_detail_review03_supervisor1A_date").attr("disabled", false);
|
||||
@@ -231,6 +255,9 @@ function setPageByRoleAndStatus(role_code, status_self, status_chief, status_sup
|
||||
}
|
||||
|
||||
else if(role_code === "4"){ // ความเห็น ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)
|
||||
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_result").show();
|
||||
|
||||
if(status_supervisor1A === "Y" && status_supervisor === "Y" && status_chief === "Y" && status_self === "Y"){
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_result").attr("disabled", false);
|
||||
$("#eva_create_evaluation_detail_review04_supervisor2A_date").attr("disabled", false);
|
||||
|
||||
@@ -65,6 +65,12 @@ function eva_create_evaluation_detail_status_PutUpdate(a) {
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(CheckWeightBeforeSubmitStatus() === false){
|
||||
alert("น้ำหนักแต่ละส่วน ต้องมีค่า 100 จึงจะส่งแบบประเมินได้");
|
||||
return;
|
||||
}
|
||||
|
||||
var data = eva_create_evaluation_detail_status_GetFromForm();
|
||||
|
||||
if(a == "next0"){
|
||||
|
||||
@@ -190,9 +190,12 @@ var eva_evaluation_achievement_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_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_achievement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
}],
|
||||
},{
|
||||
targets: [ 3, 4, 5, 6, 7 ],
|
||||
visible: false
|
||||
}],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
|
||||
@@ -170,14 +170,15 @@ var eva_evaluation_behavior_setupTable = function (result) {
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "behavior" }
|
||||
{ "data": "behavior" } ,
|
||||
{ "data": "weight" }
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"data": "id",
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_evaluation_behavior_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
|
||||
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_behavior_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
|
||||
}
|
||||
}],
|
||||
"language": {
|
||||
|
||||
@@ -150,6 +150,7 @@ var eva_evaluation_group_detailTableV;
|
||||
|
||||
var eva_evaluation_group_detail_setupTable = function (result) {
|
||||
tmp = '"';
|
||||
var groupColumn = 5;
|
||||
eva_evaluation_group_detailTableV = $('#eva_evaluation_group_detailTable').DataTable({
|
||||
"processing": true,
|
||||
"serverSide": false,
|
||||
@@ -157,9 +158,14 @@ var eva_evaluation_group_detail_setupTable = function (result) {
|
||||
"select": false,
|
||||
"columns": [
|
||||
{ "data": "id" },
|
||||
{ "data": "position_number" },
|
||||
{ "data": "position_name" },
|
||||
{ "data": "fullname" },
|
||||
|
||||
{ "data": "employee_no" },
|
||||
{ "data": "fullname" },
|
||||
{ "data": "position_name" },
|
||||
{ "data": "position_level_text" },
|
||||
{ "data": "department_name" },
|
||||
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
@@ -168,12 +174,27 @@ var eva_evaluation_group_detail_setupTable = function (result) {
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_evaluation_group_detail_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
}],
|
||||
},{ "visible": false, "targets": groupColumn }],
|
||||
"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="6">'+group+'</td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
}
|
||||
} );
|
||||
}
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
@@ -170,7 +170,7 @@ var eva_idp_plan_owner_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_idp_plan_owner_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm' onclick='javascript:eva_idp_plan_owner_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_idp_plan_owner_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_idp_plan_owner_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
|
||||
}
|
||||
}],
|
||||
"language": {
|
||||
|
||||
64
wwwroot/js/rep_leave_total_02/rep_leave_total_02_report.js
Normal file
64
wwwroot/js/rep_leave_total_02/rep_leave_total_02_report.js
Normal file
@@ -0,0 +1,64 @@
|
||||
var rep_leave_total_02_API = "/api/rep_leave_total_02/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_leave_total_02_GetSearchParameter(fileType) {
|
||||
var rep_leave_total_02SearchObject = new Object();
|
||||
rep_leave_total_02SearchObject.employee_id = $("#s_rep_leave_total_02_employee_id").val();
|
||||
rep_leave_total_02SearchObject.org_id = $("#s_rep_leave_total_02_org_id").val();
|
||||
rep_leave_total_02SearchObject.start_date = formatDateForGetParameter(getDate($("#s_rep_leave_total_02_start_date").val()));
|
||||
rep_leave_total_02SearchObject.end_date = formatDateForGetParameter(getDate($("#s_rep_leave_total_02_end_date").val()));
|
||||
|
||||
|
||||
rep_leave_total_02SearchObject.fileType = fileType;
|
||||
|
||||
console.log(rep_leave_total_02SearchObject);
|
||||
|
||||
return rep_leave_total_02SearchObject;
|
||||
}
|
||||
|
||||
function rep_leave_total_02_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_leave_total_02_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_leave_total_02_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
$("#s_rep_leave_total_02_start_date").val(formatDate(data.start_date));
|
||||
$("#s_rep_leave_total_02_end_date").val(formatDate(data.end_date));
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function rep_leave_total_02_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
rep_leave_total_02_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + rep_leave_total_02_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_rep_leave_total_02_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function rep_leave_total_02_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_rep_leave_total_02', s_rep_leave_total_02_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(rep_leave_total_02_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/rep_leave_total_02/rep_leave_total_02_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