통합조회 수정

main
이범준 11 months ago
parent 966aa72cd7
commit 93b5c97b61

@ -267,8 +267,10 @@ integrationSearch.renderList = (updown, tabGroup) => {
var empty = ds.empty; var empty = ds.empty;
if(empty){ if(empty){
trs = notFound; trs = notFound;
integrationSearch.setTotalData(updown, []);
} else if(tabGroup == "전체"){ } else if(tabGroup == "전체"){
trs = ds.inStrings(found, replacer); trs = ds.inStrings(found, replacer);
integrationSearch.setTotalData(updown, ds._items);
} else { } else {
var temp = ds._items; var temp = ds._items;
@ -277,6 +279,8 @@ integrationSearch.renderList = (updown, tabGroup) => {
filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup); filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup);
integrationSearch.setTotalData(updown, filtered);
if(filtered.lenth < 1){ if(filtered.lenth < 1){
trs = notFound; trs = notFound;
} else { } else {
@ -295,6 +299,45 @@ integrationSearch.renderList = (updown, tabGroup) => {
} }
//합계 표시
integrationSearch.setTotalData = (updown, list) => {
if(updown == "up"){
$("#minapCnt--${pageName}").set(list.length);
var minapAmt = list.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0);
$("#minapAmt--${pageName}").set(minapAmt);
var listForSgg = list.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD);
$("#minapCntForSgg--${pageName}").set(listForSgg.length);
var minapAmtForSgg = listForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0);
$("#minapAmtForSgg--${pageName}").set(minapAmtForSgg);
} else {
var sunapList = list.filter(item => item.data.TAB_GROUP == '수납');
var sonList = list.filter(item => item.data.TAB_GROUP == '결손');
$("#sunapCnt--${pageName}").set(sunapList.length);
var sunapAmt = sunapList.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0);
$("#sunapAmt--${pageName}").set(sunapAmt);
var sunapListForSgg = sunapList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD);
$("#sunapCntForSgg--${pageName}").set(sunapListForSgg.length);
var sunapAmtForSgg = sunapListForSgg.reduce((a, b) => a + ifEmpty(b.data.RCVMT_AMT,0), 0);
$("#sunapAmtForSgg--${pageName}").set(sunapAmtForSgg);
var sonListForSgg = sonList.filter(item => MY_INFO.info.sggCd == item.data.SGG_CD);
$("#sonCntForSgg--${pageName}").set(sonListForSgg.length);
var sonAmtForSgg = sonListForSgg.reduce((a, b) => a + ifEmpty(b.data.SUM_AMT,0), 0);
$("#sonAmtForSgg--${pageName}").set(sonAmtForSgg);
}
};
// 엑셀 // 엑셀
integrationSearch.fnExcel = (updown) => { integrationSearch.fnExcel = (updown) => {
var headerInfo; var headerInfo;

@ -9,19 +9,23 @@
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
미납건수 미납건수
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="minapCntForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
전체미납건수 전체미납건수
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="minapCnt--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
미납액 미납액
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="minapAmtForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
전체미납액 전체미납액
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="minapAmt--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
</div> </div>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->

@ -9,27 +9,33 @@
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
결손건수 결손건수
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sonCntForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
결손금액 결손금액
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sonAmtForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
수납건수 수납건수
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sunapCntForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
총수납건수 총수납건수
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sunapCnt--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
수납액 수납액
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sunapAmtForSgg--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
<label class="bg-lighter px-2 col-form-label text-sm-end"> <label class="bg-lighter px-2 col-form-label text-sm-end">
총수납액 총수납액
</label> </label>
<input type="text" class="form-control w-px-100" readonly /> <input type="text" id="sunapAmt--${pageName}" class="form-control w-px-100 text-end" readonly
data-fmt-type="number" />
</div> </div>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->

@ -18,9 +18,13 @@ $.fn.set = function(value) {
} else { } else {
$(this).prop("checked", false); $(this).prop("checked", false);
} }
} else {
if(this.dataset.fmtType == "number"){
$(this).val(numberFormat.format(value));
} else { } else {
$(this).val(value); $(this).val(value);
} }
}
}); });
} }

Loading…
Cancel
Save