First Initial
This commit is contained in:
64
wwwroot/js/rep_family/rep_family_report.js
Normal file
64
wwwroot/js/rep_family/rep_family_report.js
Normal file
@@ -0,0 +1,64 @@
|
||||
var rep_family_API = "/api/rep_family/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_family_GetSearchParameter(fileType) {
|
||||
var rep_familySearchObject = new Object();
|
||||
rep_familySearchObject.employee_id = $("#s_rep_family_employee_id").val();
|
||||
rep_familySearchObject.position_id = $("#s_rep_family_position_id").val();
|
||||
rep_familySearchObject.org_id = $("#s_rep_family_org_id").val();
|
||||
rep_familySearchObject.relation_id = $("#s_rep_family_relation_id").val();
|
||||
|
||||
|
||||
rep_familySearchObject.fileType = fileType;
|
||||
|
||||
console.log(rep_familySearchObject);
|
||||
|
||||
return rep_familySearchObject;
|
||||
}
|
||||
|
||||
function rep_family_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_family_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_family_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_family_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_family_relation_id"), data, "id", "external_name", "item_relation_id", data.relation_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function rep_family_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
rep_family_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + rep_family_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_rep_family_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function rep_family_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_rep_family', s_rep_family_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(rep_family_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/rep_family/rep_family_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