From 592a3e3c1b9f5947e9989b59592f324b62ba2cf9 Mon Sep 17 00:00:00 2001 From: Nakorn Rientrakrunchai Date: Sun, 16 Aug 2020 10:08:59 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=A7=E0=B8=A1=20code=20=E0=B9=81?= =?UTF-8?q?=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=AB=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=88=E0=B8=B8=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../external_linkageService.cs | 3 ++- Models/rep_eva01/rep_eva01Service.cs | 4 ++-- Models/rep_eva02/rep_eva02Service.cs | 4 ++-- Views/rep_eva01View/rep_eva01_report.cshtml | 2 +- Views/rep_eva02View/rep_eva02_report.cshtml | 2 +- .../eva_adjust_postponement_quota_d.js | 20 +++++++++---------- wwwroot/js/rep_eva01/rep_eva01_report.js | 8 +++++++- wwwroot/js/rep_eva02/rep_eva02_report.js | 8 +++++++- 8 files changed, 32 insertions(+), 19 deletions(-) diff --git a/Models/external_linkage/external_linkageService.cs b/Models/external_linkage/external_linkageService.cs index 7720db5..c7d5f69 100644 --- a/Models/external_linkage/external_linkageService.cs +++ b/Models/external_linkage/external_linkageService.cs @@ -429,7 +429,8 @@ left join public.{0}DepartmentData{0} orgdata2 on orgdata2.id = detail.parent_de left join public.org_type_departments as org_type_depart on orgdata.department_type_id = org_type_depart.id left join public.org_type_department_colors as org_depart_color on org_type_depart.department_degree_id = org_depart_color.id -where orgdata.department_name is not null +where orgdata.department_name is not null +and orgdata.deleted_at is null and orgdata2.deleted_at is null order by case when org_type_depart.department_degree_id = 1 then orgdata.department_code::int*1000 when detail.parent_department_id is not null and detail.parent_department_id>0 diff --git a/Models/rep_eva01/rep_eva01Service.cs b/Models/rep_eva01/rep_eva01Service.cs index a3e6979..6e92f3b 100644 --- a/Models/rep_eva01/rep_eva01Service.cs +++ b/Models/rep_eva01/rep_eva01Service.cs @@ -57,7 +57,7 @@ namespace TodoAPI2.Models { var entity = _repository.Get(id); var i = Mapper.Map(entity); - i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList(); + i.item_org_id = (from x in ext.GetSortingDep() select x).ToList(); i.item_round_id = (from x in ext.GetEvaRound() select x).ToList(); @@ -66,7 +66,7 @@ namespace TodoAPI2.Models public rep_eva01WithSelectionViewModel GetBlankItem() { var i = new rep_eva01WithSelectionViewModel(); - i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList(); + i.item_org_id = (from x in ext.GetSortingDep() select x).ToList(); i.item_round_id = (from x in ext.GetEvaRound() select x).ToList(); diff --git a/Models/rep_eva02/rep_eva02Service.cs b/Models/rep_eva02/rep_eva02Service.cs index ba05a6f..c740a3e 100644 --- a/Models/rep_eva02/rep_eva02Service.cs +++ b/Models/rep_eva02/rep_eva02Service.cs @@ -57,7 +57,7 @@ namespace TodoAPI2.Models { var entity = _repository.Get(id); var i = Mapper.Map(entity); - i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList(); + i.item_org_id = (from x in ext.GetSortingDep() select x).ToList(); i.item_round_id = (from x in ext.GetEvaRound() select x).ToList(); @@ -66,7 +66,7 @@ namespace TodoAPI2.Models public rep_eva02WithSelectionViewModel GetBlankItem() { var i = new rep_eva02WithSelectionViewModel(); - i.item_org_id = (from x in ext.GetDepartmentDataForReport() select x).ToList(); + i.item_org_id = (from x in ext.GetSortingDep() select x).ToList(); i.item_round_id = (from x in ext.GetEvaRound() select x).ToList(); diff --git a/Views/rep_eva01View/rep_eva01_report.cshtml b/Views/rep_eva01View/rep_eva01_report.cshtml index 214e926..2a9ef00 100644 --- a/Views/rep_eva01View/rep_eva01_report.cshtml +++ b/Views/rep_eva01View/rep_eva01_report.cshtml @@ -28,7 +28,7 @@
- +
diff --git a/Views/rep_eva02View/rep_eva02_report.cshtml b/Views/rep_eva02View/rep_eva02_report.cshtml index 7ac20cb..0a4c5e2 100644 --- a/Views/rep_eva02View/rep_eva02_report.cshtml +++ b/Views/rep_eva02View/rep_eva02_report.cshtml @@ -28,7 +28,7 @@
- +
diff --git a/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js b/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js index 5bf6bc8..dd76f80 100644 --- a/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js +++ b/wwwroot/js/eva_adjust_postponement_quota/eva_adjust_postponement_quota_d.js @@ -8,8 +8,8 @@ function eva_adjust_postponement_quota_FeedDataToForm(data) { $("#eva_adjust_postponement_quota_fiscal_year").val(data.fiscal_year); $("#eva_adjust_postponement_quota_theDate").val(formatDate(data.theDate)); $("#eva_adjust_postponement_quota_theRound").val(data.theRound); - // $("#eva_adjust_postponement_quota_limit_quota").val(data.limit_quota); - $("#eva_adjust_postponement_quota_limit_quota").maskMoney('mask', data.limit_quota); + $("#eva_adjust_postponement_quota_limit_quota").val(data.limit_quota); + //$("#eva_adjust_postponement_quota_limit_quota").maskMoney('mask', data.limit_quota); // $("#eva_adjust_postponement_quota_limit_frame_quota").val(data.limit_frame_quota); $("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', data.limit_frame_quota); @@ -124,17 +124,17 @@ function Oneva_adjust_postponement_quota_limit_frame_quotaChange() { var limit_frame_quota = parseFloat($("#eva_adjust_postponement_quota_limit_frame_quota").val()); limit_frame_quota = Math.round(limit_frame_quota * 100) / 100; if (limit_frame_quota < 0) limit_frame_quota = 0; - // $("#eva_adjust_postponement_quota_limit_frame_quota").val(limit_frame_quota); - $("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', limit_frame_quota); + $("#eva_adjust_postponement_quota_limit_frame_quota").val(limit_frame_quota); + //$("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', limit_frame_quota); var limit = parseFloat($("#eva_adjust_postponement_quota_limit").val()); limit = Math.round(limit * 100) / 100; - // $("#eva_adjust_postponement_quota_limit").val(limit); - $("#eva_adjust_postponement_quota_limit").maskMoney('mask', limit); + $("#eva_adjust_postponement_quota_limit").val(limit); + //$("#eva_adjust_postponement_quota_limit").maskMoney('mask', limit); limit_quota = limit_frame_quota * limit / 100; - // $("#eva_adjust_postponement_quota_limit_quota").val(limit_quota); - $("#eva_adjust_postponement_quota_limit_quota").maskMoney('mask', limit_quota); + $("#eva_adjust_postponement_quota_limit_quota").val(limit_quota); + //$("#eva_adjust_postponement_quota_limit_quota").maskMoney('mask', limit_quota); CalculateRemainQuota(); } @@ -170,8 +170,8 @@ console.log("xx"); var remain_quota = limit_quota - sum_receive_quota; - //$("#remain_quota").val(remain_quota); - $("#remain_quota").maskMoney('mask', remain_quota); + $("#remain_quota").val(remain_quota); + //$("#remain_quota").maskMoney('mask', remain_quota); } diff --git a/wwwroot/js/rep_eva01/rep_eva01_report.js b/wwwroot/js/rep_eva01/rep_eva01_report.js index dfa267e..972c3b3 100644 --- a/wwwroot/js/rep_eva01/rep_eva01_report.js +++ b/wwwroot/js/rep_eva01/rep_eva01_report.js @@ -13,7 +13,7 @@ function array_to_string_comma(a) { function rep_eva01_GetSearchParameter(fileType) { var rep_eva01SearchObject = new Object(); - rep_eva01SearchObject.org_id = array_to_string_comma($("#s_rep_eva01_org_id").val()); + rep_eva01SearchObject.org_id = $("#s_rep_eva01_org_id").val(); rep_eva01SearchObject.round_id = $("#s_rep_eva01_round_id").val(); rep_eva01SearchObject.round_text = $("#s_rep_eva01_round_id option:selected").text(); @@ -31,6 +31,12 @@ function rep_eva01_FeedDataToSearchForm(data) { function DropDownClearFormAndFeedWithDataOrg(d, result, x, y, z, i) { $(d).html(''); + $(d).append($("") + .attr("value", "") + .text("กรุณาเลือก")); + $(d).append($("") + .attr("value", "-1") + .text("เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์")); if (z !== "") { $.each(result[z], function (key, value) { $(d).append($("") diff --git a/wwwroot/js/rep_eva02/rep_eva02_report.js b/wwwroot/js/rep_eva02/rep_eva02_report.js index 661590b..f0b0f12 100644 --- a/wwwroot/js/rep_eva02/rep_eva02_report.js +++ b/wwwroot/js/rep_eva02/rep_eva02_report.js @@ -13,7 +13,7 @@ function array_to_string_comma(a) { function rep_eva02_GetSearchParameter(fileType) { var rep_eva02SearchObject = new Object(); - rep_eva02SearchObject.org_id = array_to_string_comma($("#s_rep_eva02_org_id").val()); + rep_eva02SearchObject.org_id = $("#s_rep_eva02_org_id").val(); rep_eva02SearchObject.round_id = $("#s_rep_eva02_round_id").val(); rep_eva02SearchObject.round_text = $("#s_rep_eva02_round_id option:selected").text(); @@ -31,6 +31,12 @@ function rep_eva02_FeedDataToSearchForm(data) { function DropDownClearFormAndFeedWithDataOrg(d, result, x, y, z, i) { $(d).html(''); + $(d).append($("") + .attr("value", "") + .text("กรุณาเลือก")); + $(d).append($("") + .attr("value", "-1") + .text("เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์")); if (z !== "") { $.each(result[z], function (key, value) { $(d).append($("")