From 0973e8140622fe9d2f73ac6b6932dfb6771ff0fd Mon Sep 17 00:00:00 2001 From: Jeon Date: Tue, 11 Jul 2023 16:11:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AD=EA=B5=AC=20=EA=B2=80=EC=A6=9D=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=83=81=EC=97=90=EC=84=9C=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=ED=9B=84=20=EC=97=91=EC=85=80=20=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/mock/verificationExcelHeader.json | 4 +- .../modules/calculate/views/Verification.vue | 49 +++++++++++++------ 2 files changed, 35 insertions(+), 18 deletions(-) diff --git a/frontend/src/modules/calculate/service/mock/verificationExcelHeader.json b/frontend/src/modules/calculate/service/mock/verificationExcelHeader.json index fc1bcff..c16b278 100644 --- a/frontend/src/modules/calculate/service/mock/verificationExcelHeader.json +++ b/frontend/src/modules/calculate/service/mock/verificationExcelHeader.json @@ -3,7 +3,7 @@ [ { "key": "discount" - ,"name": "할인율" + ,"name": "할인율(%)" ,"rowspan": 2 }, { @@ -13,7 +13,7 @@ }, { "key": "calUseAmt" - ,"name": "청구금액 계산" + ,"name": "계산된 청구금액" ,"rowspan": 2 }, { diff --git a/frontend/src/modules/calculate/views/Verification.vue b/frontend/src/modules/calculate/views/Verification.vue index 9f31f06..ab2b909 100644 --- a/frontend/src/modules/calculate/views/Verification.vue +++ b/frontend/src/modules/calculate/views/Verification.vue @@ -28,7 +28,8 @@ 총 {{totalCnt}}
- + +
@@ -38,7 +39,9 @@ - + + + @@ -68,8 +71,10 @@ - 할인율 - 유큐브 청구금액 + 할인율(%) + 유큐브
청구금액 + 계산된
청구금액 + 청구금액
일치여부 고객사 사업자번호 유큐브등록번호 @@ -108,6 +113,8 @@ + {{item.calUseAmt}} + {{item.billRslt}} {{item.custNm}} {{item.bizrno}} {{item.entrNo}} @@ -175,7 +182,8 @@ export default { pageType: 'VERIFICATION', totalCnt : 0, noDataStr: '검색 결과가 없습니다.', - excelHeader: [] + excelHeader: [], + excelDownAble:false }; }, components: { @@ -194,7 +202,7 @@ export default { }, methods: { async verification() { - + this.excelDownAble = false; this.params = { lmtYm: moment(this.lmtYm).format('YYYYMM') } @@ -236,11 +244,7 @@ export default { this.excelHeader = res; }); }, - async excuteVerification() { - - let today = moment().format('YYYYMMDDHHmmss'); - const saveFileName = `청구 검증_${today}.xls`; - + excuteVerification() { if (this.list.length <= 0) { this.row.title = '청구 검증 실행'; this.row.msg1 = '조회된 데이터가 없습니다.'; @@ -256,7 +260,7 @@ export default { return false; } - const data = this.list.map((item,index) => { + this.list = this.list.map((item,index) => { if(item.discount.trim() == undefined || item.discount.trim() == null || item.discount.trim() == "" || item.discount.trim().toLowerCase() == "e"){ item.discount = 0; @@ -274,17 +278,30 @@ export default { if(item.calUseAmt == item.billAmt){ item.billRslt = "일치"; } - - return {...item}; + return {...item} }); + + this.excelDownAble = true; + }, + + async verificationExcel() { + let today = moment().format('YYYYMMDDHHmmss'); + const saveFileName = `청구 검증_${today}.xls`; + + if (!this.excelDownAble) { + this.row.title = '청구 검증 엑셀 다운로드'; + this.row.msg1 = '청구 검증을 먼저 실행해 주세요.'; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; + } let options = { header: this.excelHeader, dataOrder: 'header', }; - xlsx.export(data, saveFileName, options).then(() => {}); - }, + xlsx.export(this.list, saveFileName, options).then(() => {}); + } }, };