일계부 데이터 Excel 일괄 업로드 기능 추가
관리자 > 임가현황
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
(response) => { // 성공
|
||||
console.log("은행자동이체내역 조회 : ", response);
|
||||
// console.log("은행자동이체내역 조회 : ", response);
|
||||
gridBankIncomeTable(response.incomes);
|
||||
gridBankExpenseTable(response.expenses);
|
||||
},
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
function(response) { // 성공
|
||||
console.log("일계부 현황 리스트 조회 : ", response);
|
||||
// console.log("일계부 현황 리스트 조회 : ", response);
|
||||
const listArea = $('.tab-content .daily-record-list');
|
||||
const detailArea = $('.tab-content .daily-record-detail');
|
||||
const tbody = listArea.find('tbody');
|
||||
@@ -445,7 +445,7 @@
|
||||
'/api/household/dailyRecordStatus',
|
||||
{ recordSeq: id, recordMonth: f.recordMonth.value },
|
||||
function(response) { // 성공
|
||||
console.log("일계부 등록 상세 데이터 : ", response);
|
||||
// console.log("일계부 등록 상세 데이터 : ", response);
|
||||
|
||||
// 금일 데이터 없음 체크
|
||||
$('#incomeStatus').attr('checked', response.status.incomeStatus === 'TODAY_NONE');
|
||||
@@ -472,7 +472,7 @@
|
||||
gridFarmingTable(response.status.farmingStatus, response.farmings);
|
||||
|
||||
if (groupNo === 1) {
|
||||
console.log(groupNo, response.monthlyCarryOver)
|
||||
// console.log(groupNo, response.monthlyCarryOver)
|
||||
if (response.monthlyCarryOver != null) {
|
||||
$('#carryOver').text(Number(response.monthlyCarryOver).toLocaleString() + '원');
|
||||
} else {
|
||||
@@ -514,6 +514,7 @@
|
||||
}
|
||||
|
||||
let tmpl = '';
|
||||
// console.log(data)
|
||||
$(data).each((idx, item) => {
|
||||
tmpl +=
|
||||
`
|
||||
@@ -527,14 +528,17 @@
|
||||
</td>
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
||||
<td class="underline"><a href="javascript:void(0);" onclick="showDailyIncomeModal(${item.id});">${ifNullHyphen(item.incomeKind)}</a></td> <!-- 수입의 종류 -->
|
||||
<td class="underline">
|
||||
<a href="javascript:void(0);" onclick="showDailyIncomeModal(${item.id});">${ifNullHyphen(item.incomeKind)}</a>
|
||||
${item.ocrErrorResult ? '<br><span style="color:red">(확인필요)</span>' : ''}
|
||||
</td> <!-- 수입의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td class="align-center">
|
||||
${item.fileId ? `<a href="${item.attachmentURL}" download>다운로드</a>` : '-'}
|
||||
${item.fileId ? `<a href="javascript:void(0);" onclick="downloadFile('${item.attachmentURL}','수입','${ifNullHyphen(item.incomeKind)}','${idx+1}')" download>다운로드</a>` : '-'}
|
||||
</td>
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
@@ -609,6 +613,8 @@
|
||||
}
|
||||
|
||||
let tmpl = '';
|
||||
|
||||
|
||||
$(data).each((idx, item) => {
|
||||
tmpl +=
|
||||
`
|
||||
@@ -621,14 +627,16 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상 또는 카드구입 -->
|
||||
<td class="underline"><a href="javascript:void(0);" onclick="showDailyExpenseModal(${item.id});">${ifNullHyphen(item.expenseKind)}</a></td> <!-- 지출의 종류 -->
|
||||
<td class="underline"><a href="javascript:void(0);" onclick="showDailyExpenseModal(${item.id});">${ifNullHyphen(item.expenseKind)}</a>
|
||||
${item.ocrErrorResult ? '<br><span style="color:red">(확인필요)</span>' : ''}
|
||||
</td> <!-- 지출의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
<td class="align-center">
|
||||
${item.fileId ? `<a href="${item.attachmentURL}" download>다운로드</a>` : '-'}
|
||||
${item.fileId ? `<a href="javascript:void(0);" onclick="downloadFile('${item.attachmentURL}','지출','${ifNullHyphen(item.expenseKind)}','${idx+1}')" download>다운로드</a>` : '-'}
|
||||
</td>
|
||||
<td>
|
||||
${item.updatedBy}<br>
|
||||
@@ -853,7 +861,7 @@
|
||||
const saveDaily = (el) => {
|
||||
const currentStep = $(el).data('step');
|
||||
const currentModalId = $(el).data('modalId');
|
||||
console.log('saveDaily', currentStep, currentModalId);
|
||||
// console.log('saveDaily', currentStep, currentModalId);
|
||||
|
||||
if (currentStep === 'INCOME') {
|
||||
showDailyIncomeModal();
|
||||
@@ -874,7 +882,7 @@
|
||||
const removeDaily = (el) => {
|
||||
const currentStep = $(el).data('step');
|
||||
const currentListId = $(el).data('listId');
|
||||
console.log('removeDaily', currentStep, currentListId);
|
||||
// console.log('removeDaily', currentStep, currentListId);
|
||||
|
||||
if ($('#'+currentListId).find('input[type="checkbox"]:checked').length === 0) {
|
||||
alert('삭제내용은 최소 1건은 선택해야 합니다.');
|
||||
@@ -892,7 +900,7 @@
|
||||
const obj = {};
|
||||
obj.selectedIds = selectedValues;
|
||||
obj.currentStep = currentStep;
|
||||
console.log(obj)
|
||||
// console.log(obj)
|
||||
|
||||
etUI.dialog.confirm({
|
||||
title: '삭제 안내',
|
||||
@@ -910,6 +918,22 @@
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const downloadFile = (url,type, title, num) => {
|
||||
const houseHoldNum = document.getElementById("targetHouseHoldNum").innerText;
|
||||
const yearMonth = document.getElementById("recordMonthStr").value;
|
||||
let text = document.querySelector("h3._selectedGroupNo").innerText;
|
||||
let day = text.match(/\d+/)[0].padStart(2, "0");
|
||||
const changeFileName = houseHoldNum+"_"+yearMonth+""+day+"_"+type+"_"+title.replace(/\s+/g, "")+"_"+num.padStart(3, "0");
|
||||
|
||||
const urlReplace = `${url}?rename=${encodeURIComponent(changeFileName)}`;
|
||||
|
||||
const a = document.createElement("a");
|
||||
a.href = urlReplace;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -76,7 +76,7 @@
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
(response) => { // 성공
|
||||
console.log("임산물 현황 리스트 조회 : ", response);
|
||||
// console.log("임산물 현황 리스트 조회 : ", response);
|
||||
|
||||
const tbody = $('.tab-content.forest-product tbody');
|
||||
tbody.empty();
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
// 이번달 등록내용 없음 수정 처리
|
||||
const updateForestProductNone = (obj) => {
|
||||
console.log(obj);
|
||||
// console.log(obj);
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/forestProduct/nothing',
|
||||
JSON.stringify(obj),
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
recordMonth: f.recordMonth.value
|
||||
},
|
||||
(response) => { // 성공
|
||||
console.log("임가 방문정보 조회 : ", response);
|
||||
// console.log("임가 방문정보 조회 : ", response);
|
||||
const tbody = $('.tab-content.household-visit tbody');
|
||||
|
||||
tbody.empty();
|
||||
|
||||
Reference in New Issue
Block a user