รวม code แก้ไขหลายจุด
This commit is contained in:
@@ -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_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
|
left join public.org_type_department_colors as org_depart_color
|
||||||
on org_type_depart.department_degree_id = org_depart_color.id
|
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
|
order by case
|
||||||
when org_type_depart.department_degree_id = 1 then orgdata.department_code::int*1000
|
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
|
when detail.parent_department_id is not null and detail.parent_department_id>0
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var entity = _repository.Get(id);
|
var entity = _repository.Get(id);
|
||||||
var i = Mapper.Map<rep_eva01WithSelectionViewModel>(entity);
|
var i = Mapper.Map<rep_eva01WithSelectionViewModel>(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();
|
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ namespace TodoAPI2.Models
|
|||||||
public rep_eva01WithSelectionViewModel GetBlankItem()
|
public rep_eva01WithSelectionViewModel GetBlankItem()
|
||||||
{
|
{
|
||||||
var i = new rep_eva01WithSelectionViewModel();
|
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();
|
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace TodoAPI2.Models
|
|||||||
{
|
{
|
||||||
var entity = _repository.Get(id);
|
var entity = _repository.Get(id);
|
||||||
var i = Mapper.Map<rep_eva02WithSelectionViewModel>(entity);
|
var i = Mapper.Map<rep_eva02WithSelectionViewModel>(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();
|
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ namespace TodoAPI2.Models
|
|||||||
public rep_eva02WithSelectionViewModel GetBlankItem()
|
public rep_eva02WithSelectionViewModel GetBlankItem()
|
||||||
{
|
{
|
||||||
var i = new rep_eva02WithSelectionViewModel();
|
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();
|
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<div class="form-group col-md-9">
|
<div class="form-group col-md-9">
|
||||||
<label id='lab_s_rep_eva01_org_id' for='s_rep_eva01_org_id'>หน่วยงาน</label>
|
<label id='lab_s_rep_eva01_org_id' for='s_rep_eva01_org_id'>หน่วยงาน</label>
|
||||||
<select multiple="multiple" class="form-control" id="s_rep_eva01_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_eva01" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
|
<select class="form-control" id="s_rep_eva01_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_eva01" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<div class="form-group col-md-9">
|
<div class="form-group col-md-9">
|
||||||
<label id='lab_s_rep_eva02_org_id' for='s_rep_eva02_org_id'>หน่วยงาน</label>
|
<label id='lab_s_rep_eva02_org_id' for='s_rep_eva02_org_id'>หน่วยงาน</label>
|
||||||
<select multiple="multiple" class="form-control" id="s_rep_eva02_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_eva02" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
|
<select class="form-control" id="s_rep_eva02_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_eva02" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
|
|||||||
@@ -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_fiscal_year").val(data.fiscal_year);
|
||||||
$("#eva_adjust_postponement_quota_theDate").val(formatDate(data.theDate));
|
$("#eva_adjust_postponement_quota_theDate").val(formatDate(data.theDate));
|
||||||
$("#eva_adjust_postponement_quota_theRound").val(data.theRound);
|
$("#eva_adjust_postponement_quota_theRound").val(data.theRound);
|
||||||
// $("#eva_adjust_postponement_quota_limit_quota").val(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_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").val(data.limit_frame_quota);
|
||||||
$("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', 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());
|
var limit_frame_quota = parseFloat($("#eva_adjust_postponement_quota_limit_frame_quota").val());
|
||||||
limit_frame_quota = Math.round(limit_frame_quota * 100) / 100;
|
limit_frame_quota = Math.round(limit_frame_quota * 100) / 100;
|
||||||
if (limit_frame_quota < 0) limit_frame_quota = 0;
|
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").val(limit_frame_quota);
|
||||||
$("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', limit_frame_quota);
|
//$("#eva_adjust_postponement_quota_limit_frame_quota").maskMoney('mask', limit_frame_quota);
|
||||||
|
|
||||||
var limit = parseFloat($("#eva_adjust_postponement_quota_limit").val());
|
var limit = parseFloat($("#eva_adjust_postponement_quota_limit").val());
|
||||||
limit = Math.round(limit * 100) / 100;
|
limit = Math.round(limit * 100) / 100;
|
||||||
// $("#eva_adjust_postponement_quota_limit").val(limit);
|
$("#eva_adjust_postponement_quota_limit").val(limit);
|
||||||
$("#eva_adjust_postponement_quota_limit").maskMoney('mask', limit);
|
//$("#eva_adjust_postponement_quota_limit").maskMoney('mask', limit);
|
||||||
|
|
||||||
limit_quota = limit_frame_quota * limit / 100;
|
limit_quota = limit_frame_quota * limit / 100;
|
||||||
// $("#eva_adjust_postponement_quota_limit_quota").val(limit_quota);
|
$("#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").maskMoney('mask', limit_quota);
|
||||||
CalculateRemainQuota();
|
CalculateRemainQuota();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +170,8 @@ console.log("xx");
|
|||||||
|
|
||||||
var remain_quota = limit_quota - sum_receive_quota;
|
var remain_quota = limit_quota - sum_receive_quota;
|
||||||
|
|
||||||
//$("#remain_quota").val(remain_quota);
|
$("#remain_quota").val(remain_quota);
|
||||||
$("#remain_quota").maskMoney('mask', remain_quota);
|
//$("#remain_quota").maskMoney('mask', remain_quota);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function array_to_string_comma(a) {
|
|||||||
|
|
||||||
function rep_eva01_GetSearchParameter(fileType) {
|
function rep_eva01_GetSearchParameter(fileType) {
|
||||||
var rep_eva01SearchObject = new Object();
|
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_id = $("#s_rep_eva01_round_id").val();
|
||||||
rep_eva01SearchObject.round_text = $("#s_rep_eva01_round_id option:selected").text();
|
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) {
|
function DropDownClearFormAndFeedWithDataOrg(d, result, x, y, z, i) {
|
||||||
$(d).html('');
|
$(d).html('');
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", "")
|
||||||
|
.text("กรุณาเลือก"));
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", "-1")
|
||||||
|
.text("เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์"));
|
||||||
if (z !== "") {
|
if (z !== "") {
|
||||||
$.each(result[z], function (key, value) {
|
$.each(result[z], function (key, value) {
|
||||||
$(d).append($("<option></option>")
|
$(d).append($("<option></option>")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function array_to_string_comma(a) {
|
|||||||
|
|
||||||
function rep_eva02_GetSearchParameter(fileType) {
|
function rep_eva02_GetSearchParameter(fileType) {
|
||||||
var rep_eva02SearchObject = new Object();
|
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_id = $("#s_rep_eva02_round_id").val();
|
||||||
rep_eva02SearchObject.round_text = $("#s_rep_eva02_round_id option:selected").text();
|
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) {
|
function DropDownClearFormAndFeedWithDataOrg(d, result, x, y, z, i) {
|
||||||
$(d).html('');
|
$(d).html('');
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", "")
|
||||||
|
.text("กรุณาเลือก"));
|
||||||
|
$(d).append($("<option></option>")
|
||||||
|
.attr("value", "-1")
|
||||||
|
.text("เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์"));
|
||||||
if (z !== "") {
|
if (z !== "") {
|
||||||
$.each(result[z], function (key, value) {
|
$.each(result[z], function (key, value) {
|
||||||
$(d).append($("<option></option>")
|
$(d).append($("<option></option>")
|
||||||
|
|||||||
Reference in New Issue
Block a user