mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 01:33:37 +09:00
TC 수정사항 반영
This commit is contained in:
@@ -1,47 +1,47 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div class="dimmed modal25" onClick="ModalClose();"></div>
|
||||
<div>
|
||||
<div class="dimmed modal25" onClick="ModalClose();"></div>
|
||||
|
||||
<div class="popup modal25 popup_form price">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">이월금액 상세내역</h3>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{totalCnt}}</span>건
|
||||
<p>최근 3개월 내역을 확인할 수 있습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table-r">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<th>시작 금액</th>
|
||||
<th>사용 금액</th>
|
||||
<th>이월 금액</th>
|
||||
<th>소멸 금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.lmtYm }}</td>
|
||||
<td>{{ option.startAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.useAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.krrrAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.extshAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
</tr>
|
||||
<tr v-if="list.length === 0">
|
||||
<td colspan="5">검색 결과가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor download" @click="excelDown();">엑셀 다운로드</button>
|
||||
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
|
||||
<div class="popup modal25 popup_form price">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">이월금액 상세내역</h3>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalCnt }}</span>건
|
||||
<p>최근 3개월 내역을 확인할 수 있습니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<table class="table-r">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>날짜</th>
|
||||
<th>시작 금액</th>
|
||||
<th>사용 금액</th>
|
||||
<th>이월 금액</th>
|
||||
<th>소멸 금액</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td>{{ option.lmtYm }}</td>
|
||||
<td>{{ option.startAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.useAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.krrrAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
<td>{{ option.extshAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||
</tr>
|
||||
<tr v-if="list.length === 0">
|
||||
<td colspan="5">검색 결과가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor download" @click="excelDown();">엑셀 다운로드</button>
|
||||
<button class="btn-default" @click="carryOverListPopClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -49,90 +49,86 @@
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import xlsx from '@/common/excel';
|
||||
import moment from 'moment';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import commonModal from "./commonModal";
|
||||
|
||||
export default {
|
||||
name: "carryOverListPop",
|
||||
data(){
|
||||
return{
|
||||
row: {},
|
||||
list:[],
|
||||
totalCnt: '',
|
||||
pageType: 'CARRY',
|
||||
}
|
||||
},
|
||||
name: "carryOverListPop",
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
list: [],
|
||||
totalCnt: '',
|
||||
pageType: 'CARRY',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
this.getExcelHeader();
|
||||
},
|
||||
methods :{
|
||||
|
||||
// 모달 띄우기
|
||||
async carryOverListPopOpen(serviceId){
|
||||
console.log(serviceId);
|
||||
this.row.serviceId = serviceId;
|
||||
try {
|
||||
const response = await custMgtApi.carryOverList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list;
|
||||
this.totalCnt = result.data.list.length;
|
||||
}
|
||||
} catch(err) {
|
||||
created() {
|
||||
this.getExcelHeader();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 모달 띄우기
|
||||
async carryOverListPopOpen(serviceId) {
|
||||
console.log(serviceId);
|
||||
this.row.serviceId = serviceId;
|
||||
try {
|
||||
const response = await custMgtApi.carryOverList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
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 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
var dimmed = document.getElementsByClassName('modal25');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
carryOverListPopClose(){
|
||||
var dimmed = document.getElementsByClassName('modal25');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
toComplete(){
|
||||
this.getParent('adminList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
excelDown() {
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
var dimmed = document.getElementsByClassName('modal25');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
carryOverListPopClose() {
|
||||
var dimmed = document.getElementsByClassName('modal25');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
toComplete() {
|
||||
this.getParent('adminList').$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
excelDown() {
|
||||
console.log(this.list.length)
|
||||
if (this.list.length <= 0) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `이월금액_${today}.xlsx`;
|
||||
let today = moment().format('YYYYMMDDHHmmss');
|
||||
const saveFileName = `이월금액_${today}.xlsx`;
|
||||
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(this.list, saveFileName, options).then(() => {});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
custMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
let options = {
|
||||
header: this.excelHeader,
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(this.list, saveFileName, options).then(() => {
|
||||
});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
custMgtApi.getExcelHeader(this.pageType).then(res => {
|
||||
this.excelHeader = res;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--<style>-->
|
||||
<!-- .popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}-->
|
||||
<!-- .popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }-->
|
||||
<!-- .popup-btn-wrap button:hover {background: #000; color: #fff;}-->
|
||||
<!--</style>-->
|
||||
</script>
|
||||
Reference in New Issue
Block a user