[FO] 마이페이지 수정 + [BO] 임가현황 작업 중 ..
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
<strong>은행 자동이체(수입) 내역 <span>[[${bankList.totalElements}]]</span>건 등록</strong> 되었습니다.
|
||||
<strong>은행 자동이체(수입) 내역 <span id="totalItems">[[${bankList.totalElements}]]</span>건 등록</strong> 되었습니다.
|
||||
</h3>
|
||||
<p>수입 내역을 등록해 주세요.</p>
|
||||
</hgroup>
|
||||
@@ -246,7 +246,7 @@
|
||||
clearAllItems.style.display = "none";
|
||||
}
|
||||
},
|
||||
openAddForm() {
|
||||
openAddForm(callback) {
|
||||
ajaxUtil._ajaxAsyncMethod(
|
||||
"/api/front/info/bank/create/input/from",
|
||||
{},
|
||||
@@ -298,6 +298,9 @@
|
||||
ENV.module.modalPopup.open();
|
||||
|
||||
document.querySelector('.modal-content').scrollTop = 0;
|
||||
|
||||
// 모두 로드된 후 콜백 실행
|
||||
if (typeof callback === 'function') callback();
|
||||
},
|
||||
function(code, rstData) {
|
||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
||||
@@ -423,11 +426,9 @@
|
||||
const product = ENV.data.bankList.find(p => p.id == id);
|
||||
if (!product) return;
|
||||
|
||||
this.openAddForm();
|
||||
|
||||
setTimeout(function(){
|
||||
|
||||
this.openAddForm(() => {
|
||||
const form = document.getElementById('popupForm');
|
||||
if (!form) return;
|
||||
|
||||
Object.entries(product).forEach(([key, val]) => {
|
||||
const field = form.elements.namedItem(key);
|
||||
@@ -446,20 +447,39 @@
|
||||
ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode);
|
||||
ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);
|
||||
document.getElementById("unit").value = product.unit;
|
||||
|
||||
},100)
|
||||
|
||||
});
|
||||
},
|
||||
// 선택 아이템 삭제
|
||||
deleteItemById(id) {
|
||||
ENV.data.bankList = ENV.data.bankList.filter(p => p.id != id);
|
||||
const target = document.querySelector(`#listBody div[data-id='${id}']`);
|
||||
if (target) target.remove();
|
||||
this.updateLayout();
|
||||
etUI.dialog.alert({
|
||||
title: '삭제 안내',
|
||||
message: '등록하신 내용을 삭제하시겠어요?<br>삭제된 내용은 복구할 수 없습니다.',
|
||||
type: 'confirm',
|
||||
dialogType: 'confirm',
|
||||
callback: function () {
|
||||
ENV.data.bankList = ENV.data.bankList.filter(p => p.id != id);
|
||||
const target = document.querySelector(`#listBody div[data-id='${id}']`);
|
||||
if (target) target.remove();
|
||||
formControl.updateLayout();
|
||||
},
|
||||
});
|
||||
},
|
||||
// 전체 초기화
|
||||
clearAllItems() {
|
||||
location.reload();
|
||||
etUI.dialog.alert({
|
||||
title: '초기화 안내',
|
||||
message: '등록하신 모든 내용을 삭제하시겠어요?<br>삭제된 내용은 복구할 수 없습니다.',
|
||||
type: 'confirm',
|
||||
dialogType: 'confirm',
|
||||
callback: function () {
|
||||
ENV.data.bankList = [];
|
||||
document.getElementById('listBody').innerHTML = '';
|
||||
formControl.updateLayout();
|
||||
|
||||
// TODO(ks): 선택 삭제 시 전체 count 미반영 중. 일단 전체 초기화에서만 count 갱신.
|
||||
document.getElementById('totalItems').textContent = ENV.data.bankList.length;
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
goSave() {
|
||||
|
||||
Reference in New Issue
Block a user