First Initial
This commit is contained in:
62
wwwroot/js/rep_position_salary/rep_position_salary_report.js
Normal file
62
wwwroot/js/rep_position_salary/rep_position_salary_report.js
Normal file
@@ -0,0 +1,62 @@
|
||||
var rep_position_salary_API = "/api/rep_position_salary/";
|
||||
|
||||
//================= Search Customizaiton =========================================
|
||||
|
||||
function rep_position_salary_GetSearchParameter(fileType) {
|
||||
var rep_position_salarySearchObject = new Object();
|
||||
rep_position_salarySearchObject.employee_id = $("#s_rep_position_salary_employee_id").val();
|
||||
rep_position_salarySearchObject.position_id = $("#s_rep_position_salary_position_id").val();
|
||||
rep_position_salarySearchObject.org_id = $("#s_rep_position_salary_org_id").val();
|
||||
|
||||
|
||||
rep_position_salarySearchObject.fileType = fileType;
|
||||
|
||||
console.log(rep_position_salarySearchObject);
|
||||
|
||||
return rep_position_salarySearchObject;
|
||||
}
|
||||
|
||||
function rep_position_salary_FeedDataToSearchForm(data) {
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_position_salary_employee_id"), data, "id", "fullname", "item_employee_id", data.employee_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_position_salary_position_id"), data, "id", "external_name", "item_position_id", data.position_id);
|
||||
DropDownClearFormAndFeedWithData($("#s_rep_position_salary_org_id"), data, "id", "external_name", "item_org_id", data.org_id);
|
||||
|
||||
}
|
||||
|
||||
//================= Form Data Customizaiton =========================================
|
||||
|
||||
function rep_position_salary_InitialForm(s) {
|
||||
var successFunc = function (result) {
|
||||
rep_position_salary_FeedDataToSearchForm(result);
|
||||
endLoad();
|
||||
};
|
||||
startLoad();
|
||||
AjaxGetRequest(apisite + rep_position_salary_API + "GetBlankItem", successFunc, AlertDanger);
|
||||
}
|
||||
|
||||
//================= Data Table =========================================
|
||||
|
||||
var s_rep_position_salary_customValidation = function (group) {
|
||||
return "";
|
||||
};
|
||||
|
||||
|
||||
function rep_position_salary_DoSearch(fileType) {
|
||||
if (!ValidateForm('s_rep_position_salary', s_rep_position_salary_customValidation)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var p = $.param(rep_position_salary_GetSearchParameter(fileType));
|
||||
|
||||
var report_url = apisite + "/api/rep_position_salary/rep_position_salary_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