mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:16:34 +09:00
청구 검증 추가
This commit is contained in:
@@ -523,6 +523,18 @@ header .user_wrap .user_info .logout {
|
||||
color: #c9c9c9;
|
||||
}
|
||||
|
||||
.contents table input {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
border: 1px solid #c9c9c9;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.contents .id {
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import CalcList from '../views/CalcList'
|
||||
import Verification from '../views/Verification'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -7,6 +8,11 @@ export default [
|
||||
name: 'calcList',
|
||||
meta: { public: false }
|
||||
},
|
||||
|
||||
{
|
||||
path: '/calculate/verification',
|
||||
component: Verification,
|
||||
name: 'verification',
|
||||
meta: { public: false }
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import httpClient from '@/common/http-client';
|
||||
import calcListExcelHeader from './mock/calcExcelHeader.json';
|
||||
import verificationExcelHeader from './mock/verificationExcelHeader';
|
||||
// 공통 코드.
|
||||
const getCommCode = (params) => {
|
||||
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
|
||||
@@ -10,6 +11,9 @@ const calcListExcel = (params) => {
|
||||
return httpClient.post('/api/v1/bo/calculate/calcListExcel', params);
|
||||
}
|
||||
|
||||
const verification = (params) => {
|
||||
return httpClient.post('/api/v1/bo/calculate/verification', params, { withCredentials: false })
|
||||
}
|
||||
|
||||
const getExcelHeader = category => {
|
||||
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
|
||||
@@ -19,6 +23,9 @@ const getExcelHeader = category => {
|
||||
case 'CALC':
|
||||
header = calcListExcelHeader.header;
|
||||
break;
|
||||
case 'VERIFICATION':
|
||||
header = verificationExcelHeader.header;
|
||||
break;
|
||||
default:
|
||||
header = '';
|
||||
break;
|
||||
@@ -27,8 +34,11 @@ const getExcelHeader = category => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
getCommCode,
|
||||
getExcelHeader,
|
||||
calcListExcel,
|
||||
verification
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ const utils_mixin = {
|
||||
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
|
||||
}
|
||||
},
|
||||
restrictChars : function($event,regExp,hanYn){
|
||||
restrictChars : function($event,regExp,hanYn){
|
||||
|
||||
if(this.isNull(hanYn)){
|
||||
hanYn='N';
|
||||
@@ -223,7 +223,7 @@ const utils_mixin = {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
setLenth: function (e, len) {
|
||||
setLenth: function (e, len) {
|
||||
this.cut(e, len);
|
||||
},
|
||||
onlyCustom: function (e,strRegExp,hanYn) {
|
||||
@@ -245,11 +245,24 @@ const utils_mixin = {
|
||||
this.cut(e, len);
|
||||
return this.restrictChars(e,regExp_g,hanYn);
|
||||
},
|
||||
onlyNum: function (e, len, isEventCall) {
|
||||
onlyNum: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEng: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyNumFstZero: function(e, len, isEventCall) {
|
||||
this.cut(e, len);
|
||||
var str = e.target.value;
|
||||
|
||||
if(str.length > 0){
|
||||
if (!/^[1-9]/g.exec(str)) {
|
||||
e.target.value = str.replace(/[^1-9]/gi, '');
|
||||
}
|
||||
}
|
||||
|
||||
var strRegExp = '^[0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
@@ -260,44 +273,44 @@ const utils_mixin = {
|
||||
onlyUpperEng: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyEmail: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyEmail: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyName: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyName: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyTitle: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyTitle: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyText: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyText: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyPassword: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyPassword: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyId: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyId: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyIp: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyIp: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[0-9,.*]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
onlyRoleNm_Space: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyRoleNm_Space: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y');
|
||||
},
|
||||
onlyRoleId_UnderBar: function (e, len, isEventCall) {
|
||||
},
|
||||
onlyRoleId_UnderBar: function (e, len, isEventCall) {
|
||||
var strRegExp = '^[a-zA-Z0-9_]*$';
|
||||
return this.onlyCommon(strRegExp, e, len, isEventCall);
|
||||
},
|
||||
cut: function (ele, len, isValidChk) {
|
||||
cut: function (ele, len, isValidChk) {
|
||||
let e=ele;
|
||||
if (typeof ele.target != "undefined") {
|
||||
e=ele.target;
|
||||
@@ -312,16 +325,16 @@ const utils_mixin = {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
cutBytes: function (str, len) {
|
||||
},
|
||||
cutBytes: function (str, len) {
|
||||
while(1 === 1){
|
||||
if(this.bytes(str) <= len){
|
||||
return str;
|
||||
}
|
||||
str = str.slice(0,-1);
|
||||
}
|
||||
},
|
||||
bytes: function (str) {
|
||||
},
|
||||
bytes: function (str) {
|
||||
var length = ((s,b,i,c) => {
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
|
||||
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
|
||||
@@ -336,8 +349,8 @@ const utils_mixin = {
|
||||
return b
|
||||
})(str);
|
||||
return length;
|
||||
},
|
||||
checkPhone: function(str) {
|
||||
},
|
||||
checkPhone: function(str) {
|
||||
str = str.replace(/[-\s]+/g, '');
|
||||
if (str.charAt(0)!="0"){
|
||||
str = "0"+str;
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"header": [
|
||||
[
|
||||
{
|
||||
"key": "discount"
|
||||
,"name": "할인율"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "billAmt"
|
||||
,"name": "유큐브 청구금액"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "calUseAmt"
|
||||
,"name": "청구금액 계산"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "billRslt"
|
||||
,"name": "청구금액 일치여부"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "custNm"
|
||||
,"name": "고객사"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "bizrno"
|
||||
,"name": "사업자번호"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "entrNo"
|
||||
,"name": "유큐브등록번호"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "prodNm"
|
||||
,"name": "상품명"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "opnDt"
|
||||
,"name": "가입일"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "dayUser"
|
||||
,"name": "일할대상"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "dtlCdNm"
|
||||
,"name": "상태"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"key": "succCnt"
|
||||
,"name": "성공건수"
|
||||
,"rowspan": 2
|
||||
},
|
||||
{
|
||||
"name": "결과"
|
||||
,"colspan": 5
|
||||
},
|
||||
{
|
||||
"name": "이전 달",
|
||||
"colspan": 9
|
||||
},
|
||||
{
|
||||
"name": "사용금액"
|
||||
,"colspan": 5
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"key": "mrtUseAmt"
|
||||
,"name": "과금금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "lmtPerUseDay"
|
||||
,"name": "일할 정액요금"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "nowCfwdAmt"
|
||||
,"name": "신규 이월금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "estCfwdAmt"
|
||||
,"name": "예상 이월금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "rsltStr"
|
||||
,"name": "일치여부"
|
||||
},
|
||||
{
|
||||
"key": "fxLmtAmt"
|
||||
,"name": "정액요금"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "cfwdAmt"
|
||||
,"name": "이월금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "extncAmt"
|
||||
,"name": "소멸금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "extcChrgAmt"
|
||||
,"name": "소멸충전금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "cfwdChrgAmt"
|
||||
,"name": "이월충전금액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "extcChrgRsrt"
|
||||
,"name": "소멸충전복원"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "cfwdChrgRsrt"
|
||||
,"name": "이월충전복원"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "extcChrgBlnc"
|
||||
,"name": "소멸충전잔액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "cfwdChrgBlnc"
|
||||
,"name": "이월충전잔액"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
|
||||
{
|
||||
"key": "totalUseAmt"
|
||||
,"name": "총"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "kkoNotiUseAmt"
|
||||
,"name": "알림톡"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "smsUseAmt"
|
||||
,"name": "SMS"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "lmsUseAmt"
|
||||
,"name": "LMS"
|
||||
,"format": "Format_00"
|
||||
},
|
||||
{
|
||||
"key": "mmsUseAmt"
|
||||
,"name": "MMS"
|
||||
,"format": "Format_00"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
294
frontend/src/modules/calculate/views/Verification.vue
Normal file
294
frontend/src/modules/calculate/views/Verification.vue
Normal file
@@ -0,0 +1,294 @@
|
||||
<template>
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">청구 검증</h3>
|
||||
<p class="breadcrumb">운영 관리 > 청구 검증</p>
|
||||
</div>
|
||||
<div class="search_wrap">
|
||||
<div class="input_box cal">
|
||||
<label for="right" class="label txt">조회기간</label>
|
||||
<div class="term">
|
||||
<span class="custom_input icon_date">
|
||||
<vuejs-datepicker
|
||||
:language="ko"
|
||||
:format="customFormatter"
|
||||
:disabled-dates="disabledDate"
|
||||
:minimumView="sDateDiv"
|
||||
:maximumView="sDateDiv"
|
||||
v-model="lmtYm"
|
||||
@selected="selectedDate"
|
||||
></vuejs-datepicker>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">
|
||||
총 <span>{{totalCnt}}</span>건
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue" @click="excuteVerification()">청구 검증 실행</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table calculate scroll">
|
||||
<section>
|
||||
<div class="box_scroll box_OFvis">
|
||||
<table class="tbl_col_type cgrid" style="table-layout: fixed;">
|
||||
<colgroup>
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 150px;">
|
||||
<col style="width: 120px;">
|
||||
<col style="width: 180px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 80px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 80px;">
|
||||
<col style="width: 80px;">
|
||||
<col style="width: 100px;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2">할인율</th>
|
||||
<th scope="col" rowspan="2">유큐브 청구금액</th>
|
||||
<th scope="col" rowspan="2">고객사</th>
|
||||
<th scope="col" rowspan="2">사업자번호</th>
|
||||
<th scope="col" rowspan="2">유큐브등록번호</th>
|
||||
<th scope="col" rowspan="2">상품명</th>
|
||||
<th scope="col" rowspan="2">가입일</th>
|
||||
<th scope="col" rowspan="2">일할대상</th>
|
||||
<th scope="col" rowspan="2">상태</th>
|
||||
<th scope="col" rowspan="2">성공건수</th>
|
||||
<th scope="colgroup" colspan="5" id="thHeader08" class="th_line">결과</th>
|
||||
<th scope="colgroup" colspan="9" id="thHeader09" class="th_line">이전 달</th>
|
||||
<th scope="colgroup" colspan="5" id="thHeader10" class="th_line">사용금액</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th headers="thHeader08" class="th_line">과금금액</th>
|
||||
<th headers="thHeader08" class="th_line">일할 정액요금</th>
|
||||
<th headers="thHeader08" class="th_line">신규 이월금액</th>
|
||||
<th headers="thHeader08" class="th_line">예상 이월금액</th>
|
||||
<th headers="thHeader08" class="th_line">일치여부</th>
|
||||
<th headers="thHeader09" class="th_line">정액요금</th>
|
||||
<th headers="thHeader09" class="th_line">이월금액</th>
|
||||
<th headers="thHeader09" class="th_line">소멸금액</th>
|
||||
<th headers="thHeader09" class="th_line">소멸충전금액</th>
|
||||
<th headers="thHeader09" class="th_line">이월충전금액</th>
|
||||
<th headers="thHeader09" class="th_line">소멸충전복원</th>
|
||||
<th headers="thHeader09" class="th_line">이월충전복원</th>
|
||||
<th headers="thHeader09" class="th_line">소멸충전잔액</th>
|
||||
<th headers="thHeader09" class="th_line">이월충전잔액</th>
|
||||
<th headers="thHeader010" class="th_line">총</th>
|
||||
<th headers="thHeader010" class="th_line">알림톡</th>
|
||||
<th headers="thHeader010" class="th_line">SMS</th>
|
||||
<th headers="thHeader010" class="th_line">LMS</th>
|
||||
<th headers="thHeader010" class="th_line">MMS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, i) in list" v-bind:key="i" >
|
||||
<td><input type="text" class="search-box" @keypress="onlyNumFstZero" @input="onlyNumFstZero" maxlength="3" v-model="item.discount" autocomplete="off"></td>
|
||||
<td><input type="text" class="search-box" @keypress="onlyNumFstZero" @input="onlyNumFstZero" maxlength="10" v-model="item.billAmt" autocomplete="off"></td>
|
||||
<td>{{item.custNm}}</td>
|
||||
<td>{{item.bizrno}}</td>
|
||||
<td>{{item.entrNo}}</td>
|
||||
<td>{{item.prodNm}}</td>
|
||||
<td>{{item.opnDt}}</td>
|
||||
<td>{{item.dayUser}}</td>
|
||||
<td>{{item.dtlCdNm}}</td>
|
||||
<td>{{item.succCnt}}</td>
|
||||
<td>{{item.mrtUseAmt}}</td>
|
||||
<td>{{item.lmtPerUseDay}}</td>
|
||||
<td>{{item.nowCfwdAmt}}</td>
|
||||
<td>{{item.estCfwdAmt}}</td>
|
||||
<td>{{item.rsltStr}}</td>
|
||||
<td>{{item.fxLmtAmt}}</td>
|
||||
<td>{{item.cfwdAmt}}</td>
|
||||
<td>{{item.extncAmt}}</td>
|
||||
<td>{{item.extcChrgAmt}}</td>
|
||||
<td>{{item.cfwdChrgAmt}}</td>
|
||||
<td>{{item.extcChrgRsrt}}</td>
|
||||
<td>{{item.cfwdChrgRsrt}}</td>
|
||||
<td>{{item.extcChrgBlnc}}</td>
|
||||
<td>{{item.cfwdChrgBlnc}}</td>
|
||||
<td>{{item.totalUseAmt}}</td>
|
||||
<td>{{item.kkoNotiUseAmt}}</td>
|
||||
<td>{{item.smsUseAmt}}</td>
|
||||
<td>{{item.lmsUseAmt}}</td>
|
||||
<td>{{item.mmsUseAmt}}</td>
|
||||
</tr>
|
||||
<tr v-if="list.length < 1">
|
||||
<td colspan="29" class="no_data">검색 결과가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import xlsx from '@/common/excel';
|
||||
import commonModal from '@/components/modal/commonModal';
|
||||
import calcMgtApi from "@/modules/calculate/service/calcMgtApi";
|
||||
import {utils_mixin, chkPattern2} from '../service/mixins';
|
||||
|
||||
export default {
|
||||
name: 'verification',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data() {
|
||||
return {
|
||||
ko: vdp_translation_ko.js,
|
||||
periodDay: 7,
|
||||
sDateDiv: 'month',
|
||||
lmtYm: new Date(new Date().setMonth(new Date().getMonth()-1)),
|
||||
disabledDate: {from : new Date(new Date().setMonth(new Date().getMonth()-1))},
|
||||
|
||||
row: {},
|
||||
|
||||
list: [],
|
||||
params: {},
|
||||
pageType: 'VERIFICATION',
|
||||
totalCnt : 0,
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
excelHeader: []
|
||||
};
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
vuejsDatepicker
|
||||
},
|
||||
computed : {},
|
||||
watch: {
|
||||
discount : function(){
|
||||
console.log("dddd");
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getExcelHeader();
|
||||
},
|
||||
destroyed() {},
|
||||
mounted() {
|
||||
let isKeep = false;
|
||||
this.verification();
|
||||
},
|
||||
methods: {
|
||||
async verification() {
|
||||
|
||||
this.params = {
|
||||
lmtYm: moment(this.lmtYm).format('YYYYMM')
|
||||
}
|
||||
try {
|
||||
const response = await calcMgtApi.verification(this.params);
|
||||
|
||||
const result = response.data;
|
||||
|
||||
if (result != null && result.retCode == '0000') {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
}
|
||||
|
||||
} catch(err){
|
||||
this.row.title = '청구 목록 조회 실패';
|
||||
this.row.msg1 = err;
|
||||
this.$parent.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
customFormatter: function (date) {
|
||||
if (this.sDateDiv == 'month') {
|
||||
return moment(date).format('YYYY-MM');
|
||||
} else if (this.sDateDiv == 'year') {
|
||||
return moment(date).format('YYYY');
|
||||
} else {
|
||||
return moment(date).format('YYYY-MM-DD');
|
||||
}
|
||||
},
|
||||
selectedDate(day) {
|
||||
let isKeep = false;
|
||||
this.lmtYm = day;
|
||||
this.verification();
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
calcMgtApi.getExcelHeader(this.pageType).then((res) => {
|
||||
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
async excuteVerification() {
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `청구 검증_${today}.xls`;
|
||||
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '청구 검증 실행';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(moment(new Date(new Date().setMonth(new Date().getMonth()-1))).format('YYYYMM') == moment(this.lmtYm).format('YYYYMM')
|
||||
&& (new Date().getDate() < 4)){
|
||||
this.row.title = '청구 검증 실행';
|
||||
this.row.msg1 = '해당월은 4일 부터 청구 검증이 가능합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
const data = 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;
|
||||
}
|
||||
|
||||
if(item.billAmt.trim() == undefined || item.billAmt.trim() == null || item.billAmt.trim() == "" || item.billAmt.trim().toLowerCase() == "e"){
|
||||
item.billAmt = 0;
|
||||
}
|
||||
|
||||
item.calUseAmt = (Number(item.lmtPerUseDay)+Number(item.mrtUseAmt));
|
||||
item.calUseAmt = item.calUseAmt - (item.calUseAmt*(Number(item.discount)/100));
|
||||
item.calUseAmt = Math.floor(item.calUseAmt/10) * 10;
|
||||
|
||||
item.billRslt = "불일치";
|
||||
if(item.calUseAmt == item.billAmt){
|
||||
item.billRslt = "일치";
|
||||
}
|
||||
return {...item};
|
||||
});
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header',
|
||||
};
|
||||
|
||||
xlsx.export(data, saveFileName, options).then(() => {});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user