ปรับปรุงหลายข้อ

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-07-19 16:47:05 +07:00
parent dce57d2ca1
commit 38a2e1fe88
7 changed files with 120 additions and 97 deletions

View File

@@ -101,6 +101,9 @@ namespace TodoAPI2.Controllers
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite"); string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username"); string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password"); string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
_repository.SetEvaDate(model);
string url = $"{mainurl}{reportsite}/rep_eva02.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}"; string url = $"{mainurl}{reportsite}/rep_eva02.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
var data = httpclient.DownloadData(url); var data = httpclient.DownloadData(url);

View File

@@ -95,7 +95,7 @@ namespace TodoAPI2.Models
where m_eva_salary_cylinder.position_type == position_type || !position_type.HasValue where m_eva_salary_cylinder.position_type == position_type || !position_type.HasValue
orderby m_eva_salary_cylinder.created descending orderby fk_external_linkageResult1.external_code, fk_external_linkageResult2.external_code
select new eva_salary_cylinderViewModel() select new eva_salary_cylinderViewModel()
{ {
id = m_eva_salary_cylinder.id, id = m_eva_salary_cylinder.id,
@@ -139,7 +139,7 @@ namespace TodoAPI2.Models
&& (m_eva_salary_cylinder.position_type == model.position_type || !model.position_type.HasValue) && (m_eva_salary_cylinder.position_type == model.position_type || !model.position_type.HasValue)
orderby m_eva_salary_cylinder.created descending orderby fk_external_linkageResult1.external_code, fk_external_linkageResult2.external_code
select new eva_salary_cylinderViewModel() select new eva_salary_cylinderViewModel()
{ {
id = m_eva_salary_cylinder.id, id = m_eva_salary_cylinder.id,

View File

@@ -16,7 +16,7 @@ namespace TodoAPI2.Models
rep_eva02WithSelectionViewModel GetWithSelection(Guid id); rep_eva02WithSelectionViewModel GetWithSelection(Guid id);
rep_eva02WithSelectionViewModel GetBlankItem(); rep_eva02WithSelectionViewModel GetBlankItem();
void SetEvaDate(rep_eva02ReportRequestModel model);
} }
} }

View File

@@ -18,7 +18,7 @@ namespace TodoAPI2.Models
public int? round_id { get; set; } public int? round_id { get; set; }
public string round_text { get; set; } public string round_text { get; set; }
public string eva_date { get; set; }
} }
} }

View File

@@ -73,6 +73,13 @@ namespace TodoAPI2.Models
return i; return i;
} }
public void SetEvaDate(rep_eva02ReportRequestModel model)
{
model.eva_date = (from i in _repository.Context.eva_adjust_postponement
where i.id == model.round_id
select MyHelper.GetDateStringForReport(i.theDate)).FirstOrDefault();
}
#endregion #endregion
#endregion #endregion

View File

@@ -94,8 +94,7 @@ function eva_create_evaluation_detail_process_GoEdit(a, role_code) {
if (role_code == "1") { if (role_code == "1") {
window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + a); window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + a);
} }
else else {
{
window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + a); window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + a);
} }
} }
@@ -131,8 +130,7 @@ var eva_create_evaluation_detail_process_customValidation = function (group) {
}; };
function eva_create_evaluation_detail_process_PutUpdate() { function eva_create_evaluation_detail_process_PutUpdate() {
if (!ValidateForm('eva_create_evaluation_detail_process', eva_create_evaluation_detail_process_customValidation)) if (!ValidateForm('eva_create_evaluation_detail_process', eva_create_evaluation_detail_process_customValidation)) {
{
return; return;
} }
@@ -245,7 +243,7 @@ function eva_create_evaluation_detail_process_InitiateDataTable() {
function eva_create_evaluation_detail_process_DoSearch() { function eva_create_evaluation_detail_process_DoSearch() {
var p = $.param(eva_create_evaluation_detail_process_GetSearchParameter()); var p = $.param(eva_create_evaluation_detail_process_GetSearchParameter());
console.log(p); //console.log(p);
var eva_create_evaluation_detail_process_reload = function (result) { var eva_create_evaluation_detail_process_reload = function (result) {
eva_create_evaluation_detail_processTableV.destroy(); eva_create_evaluation_detail_processTableV.destroy();
eva_create_evaluation_detail_process_setupTable(result); eva_create_evaluation_detail_process_setupTable(result);

View File

@@ -158,7 +158,7 @@ function eva_salary_cylinder_GoDelete(a) {
var eva_salary_cylinderTableV; var eva_salary_cylinderTableV;
var eva_salary_cylinder_setupTable = function (result) { var eva_salary_cylinder_setupTable = function (result) {
console.log(result); var groupColumn = 1;
tmp = '"'; tmp = '"';
eva_salary_cylinderTableV = $('#eva_salary_cylinderTable').DataTable({ eva_salary_cylinderTableV = $('#eva_salary_cylinderTable').DataTable({
"processing": true, "processing": true,
@@ -237,7 +237,22 @@ var eva_salary_cylinder_setupTable = function (result) {
"url": appsite + "/DataTables-1.10.16/thai.json" "url": appsite + "/DataTables-1.10.16/thai.json"
}, },
"paging": true, "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(); endLoad();
}; };