เตรียม UI รายงานแบบประเมิน

This commit is contained in:
Nakorn Rientrakrunchai
2020-08-29 19:19:13 +07:00
parent f4a7c9c814
commit 933c9f7b4f
31 changed files with 1575 additions and 10 deletions

View File

@@ -0,0 +1,58 @@
var rep_eva_x_API = "/api/rep_eva_x/";
//================= Search Customizaiton =========================================
function rep_eva_x_GetSearchParameter(fileType) {
var rep_eva_xSearchObject = new Object();
rep_eva_xSearchObject.detail_id = $("#s_rep_eva_x_detail_id").val();
rep_eva_xSearchObject.fileType = fileType;
console.log(rep_eva_xSearchObject);
return rep_eva_xSearchObject;
}
function rep_eva_x_FeedDataToSearchForm(data) {
$("#s_rep_eva_x_detail_id").val(data.detail_id);
}
//================= Form Data Customizaiton =========================================
function rep_eva_x_InitialForm(s) {
var successFunc = function (result) {
rep_eva_x_FeedDataToSearchForm(result);
endLoad();
};
startLoad();
AjaxGetRequest(apisite + rep_eva_x_API + "GetBlankItem", successFunc, AlertDanger);
}
//================= Data Table =========================================
var s_rep_eva_x_customValidation = function (group) {
return "";
};
function rep_eva_x_DoSearch(fileType) {
if (!ValidateForm('s_rep_eva_x', s_rep_eva_x_customValidation)) {
return;
}
var p = $.param(rep_eva_x_GetSearchParameter(fileType));
var report_url = apisite + "/api/rep_eva_x/rep_eva_x_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);
}
}