mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2026-01-28 01:57:17 +09:00
[유치현황관리 / 유치채널현황] 고객사명 엔티티코드 변환
This commit is contained in:
@@ -11,129 +11,129 @@
|
|||||||
<div class="table table_form m50">
|
<div class="table table_form m50">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width:140px">
|
<col style="width: 140px" />
|
||||||
<col style="width:auto">
|
<col style="width: auto" />
|
||||||
<col style="width:auto">
|
<col style="width: auto" />
|
||||||
<col style="width:140px">
|
<col style="width: 140px" />
|
||||||
<col style="width:auto">
|
<col style="width: auto" />
|
||||||
<col style="width:auto">
|
<col style="width: auto" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="tr_input w75">
|
<tr class="tr_input w75">
|
||||||
<th>가입일</th>
|
<th>가입일</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="subsDt"></td>
|
<td colspan="2"><input type="text" disabled v-model="subsDt" /></td>
|
||||||
<th>상태</th>
|
<th>상태</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="subsSttusNm"></td>
|
<td colspan="2"><input type="text" disabled v-model="subsSttusNm" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="tr_input w75">
|
<tr class="tr_input w75">
|
||||||
<th>고객사</th>
|
<th>고객사</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="custNm"></td>
|
<td colspan="2"><input type="text" disabled v-model="custNm" /></td>
|
||||||
<th>요금제</th>
|
<th>요금제</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="plan"></td>
|
<td colspan="2"><input type="text" disabled v-model="plan" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="tr_input w75">
|
<tr class="tr_input w75">
|
||||||
<th>대표자</th>
|
<th>대표자</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="reprNm"></td>
|
<td colspan="2"><input type="text" disabled v-model="reprNm" /></td>
|
||||||
<th>사용자 구분</th>
|
<th>사용자 구분</th>
|
||||||
<td colspan="2"><input type="text" disabled v-model="custTyNm"></td>
|
<td colspan="2"><input type="text" disabled v-model="custTyNm" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="tr_input">
|
<tr class="tr_input">
|
||||||
<th>사업자등록번호</th>
|
<th>사업자등록번호</th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="input-bnumber">
|
<div class="input-bnumber">
|
||||||
<input type="text" disabled v-model="bizrno1">
|
<input type="text" disabled v-model="bizrno1" />
|
||||||
<input type="text" disabled v-model="bizrno2">
|
<input type="text" disabled v-model="bizrno2" />
|
||||||
<input type="text" disabled v-model="bizrno3">
|
<input type="text" disabled v-model="bizrno3" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>법인등록번호</th>
|
<th>법인등록번호</th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="input-double">
|
<div class="input-double">
|
||||||
<input type="text" disabled v-model="cprRegNo1">
|
<input type="text" disabled v-model="cprRegNo1" />
|
||||||
<input type="text" disabled v-model="cprRegNo2">
|
<input type="text" disabled v-model="cprRegNo2" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="tr_input">
|
<tr class="tr_input">
|
||||||
<th>사업장 주소</th>
|
<th>사업장 주소</th>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<div class="input-address">
|
<div class="input-address">
|
||||||
<input type="text" disabled v-model="adr1">
|
<input type="text" disabled v-model="adr1" />
|
||||||
<input type="text" disabled v-model="adr2">
|
<input type="text" disabled v-model="adr2" />
|
||||||
<input type="text" disabled v-model="adr3">
|
<input type="text" disabled v-model="adr3" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="tr_input">
|
<tr class="tr_input">
|
||||||
<th>유치자명</th>
|
<th>유치자명</th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="input-double">
|
<div class="input-double">
|
||||||
<input type="text" disabled v-model="channelId">
|
<input type="text" disabled v-model="channelId" />
|
||||||
<input type="text" disabled v-model="channelNm">
|
<input type="text" disabled v-model="channelNm" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>관리자명</th>
|
<th>관리자명</th>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="input-double">
|
<div class="input-double">
|
||||||
<input type="text" disabled v-model="adminId">
|
<input type="text" disabled v-model="adminId" />
|
||||||
<input type="text" disabled v-model="adminNm">
|
<input type="text" disabled v-model="adminNm" />
|
||||||
<button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button>
|
<button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="count">발송건수
|
<div class="count">
|
||||||
|
발송건수
|
||||||
<p>( 최근 3년 사용 전월까지 확인 가능하며, 청구금액은 유큐브에서 확인 가능합니다. )</p>
|
<p>( 최근 3년 사용 전월까지 확인 가능하며, 청구금액은 유큐브에서 확인 가능합니다. )</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="button_group">
|
<div class="button_group">
|
||||||
<button type="button" class="button blue download" @click="excelDown()">엑셀 다운로드</button>
|
<button type="button" class="button blue download" @click="excelDown()">엑셀 다운로드</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table calculate">
|
<div class="table calculate">
|
||||||
<form autocomplete="off">
|
<form autocomplete="off">
|
||||||
<table class="table-r">
|
<table class="table-r">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="16%">
|
<col width="16%" />
|
||||||
<col width="16%">
|
<col width="16%" />
|
||||||
<col width="16%">
|
<col width="16%" />
|
||||||
<col width="16%">
|
<col width="16%" />
|
||||||
<col width="16%">
|
<col width="16%" />
|
||||||
<col width="20%">
|
<col width="20%" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">날짜</th>
|
<th rowspan="2">날짜</th>
|
||||||
<th colspan="5">채널별 발송 건수</th>
|
<th colspan="5">채널별 발송 건수</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="total">
|
<tr class="total">
|
||||||
<th>전체</th>
|
<th>전체</th>
|
||||||
<th>SMS</th>
|
<th>SMS</th>
|
||||||
<th>LMS</th>
|
<th>LMS</th>
|
||||||
<th>MMS</th>
|
<th>MMS</th>
|
||||||
<th>알림톡</th>
|
<th>알림톡</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>합계</td>
|
<td>합계</td>
|
||||||
<td>{{ sndCntTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntSTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntSTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||||
<td>{{ option.sumYm }}</td>
|
<td>{{ option.sumYm }}</td>
|
||||||
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
<td>{{ option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
<td>{{ option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
@@ -156,7 +156,7 @@ import xlsx from '@/common/excel';
|
|||||||
import AdminNmPop from '../../custMgt/components/AdminNmPop';
|
import AdminNmPop from '../../custMgt/components/AdminNmPop';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "channelDetail",
|
name: 'channelDetail',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
row: {},
|
row: {},
|
||||||
@@ -208,7 +208,7 @@ export default {
|
|||||||
serviceId: '',
|
serviceId: '',
|
||||||
subsSttusNm: '',
|
subsSttusNm: '',
|
||||||
custTyNm: '',
|
custTyNm: '',
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
// props: {
|
// props: {
|
||||||
// userSeq: {
|
// userSeq: {
|
||||||
@@ -222,7 +222,8 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getExcelHeader();
|
this.getExcelHeader();
|
||||||
if(this.$route.params.userSeq != null){ //리스트에서 상세 호출
|
if (this.$route.params.userSeq != null) {
|
||||||
|
//리스트에서 상세 호출
|
||||||
this.$store.commit('dataStore/updateUserSeq', this.$route.params.userSeq);
|
this.$store.commit('dataStore/updateUserSeq', this.$route.params.userSeq);
|
||||||
this.channelDetail(this.$route.params.userSeq);
|
this.channelDetail(this.$route.params.userSeq);
|
||||||
}
|
}
|
||||||
@@ -243,15 +244,15 @@ export default {
|
|||||||
var sndCntLTotal = 0;
|
var sndCntLTotal = 0;
|
||||||
var sndCntMTotal = 0;
|
var sndCntMTotal = 0;
|
||||||
var sndCntATotal = 0;
|
var sndCntATotal = 0;
|
||||||
if (result != null && result.retCode == "0000") {
|
if (result != null && result.retCode == '0000') {
|
||||||
//데이터값이 널이면 오류처리
|
//데이터값이 널이면 오류처리
|
||||||
|
|
||||||
for (var i = 0; i < result.data.list.length; i++) {
|
for (var i = 0; i < result.data.list.length; i++) {
|
||||||
sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt);
|
sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt);
|
||||||
sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS)
|
sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS);
|
||||||
sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL)
|
sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL);
|
||||||
sndCntMTotal = sndCntMTotal + Number(result.data.list[i].sndCntM)
|
sndCntMTotal = sndCntMTotal + Number(result.data.list[i].sndCntM);
|
||||||
sndCntATotal = sndCntATotal + Number(result.data.list[i].sndCntA)
|
sndCntATotal = sndCntATotal + Number(result.data.list[i].sndCntA);
|
||||||
}
|
}
|
||||||
this.sndCntTotal = sndCntTotal;
|
this.sndCntTotal = sndCntTotal;
|
||||||
this.sndCntSTotal = sndCntSTotal;
|
this.sndCntSTotal = sndCntSTotal;
|
||||||
@@ -259,12 +260,12 @@ export default {
|
|||||||
this.sndCntMTotal = sndCntMTotal;
|
this.sndCntMTotal = sndCntMTotal;
|
||||||
this.sndCntATotal = sndCntATotal;
|
this.sndCntATotal = sndCntATotal;
|
||||||
this.list = result.data.list;
|
this.list = result.data.list;
|
||||||
this.sndCntS = result.data.sndCntS
|
this.sndCntS = result.data.sndCntS;
|
||||||
this.sndCntL = result.data.sndCntL
|
this.sndCntL = result.data.sndCntL;
|
||||||
this.sndCntM = result.data.sndCntM
|
this.sndCntM = result.data.sndCntM;
|
||||||
this.sndCntA = result.data.sndCntA;
|
this.sndCntA = result.data.sndCntA;
|
||||||
this.loginId = result.data.loginId;
|
this.loginId = result.data.loginId;
|
||||||
this.custNm = result.data.custNm;
|
this.custNm = this.fromHtmlEntities(result.data.custNm);
|
||||||
this.subsDt = result.data.subsDt;
|
this.subsDt = result.data.subsDt;
|
||||||
this.subsSttusCd = result.data.subsSttusCd;
|
this.subsSttusCd = result.data.subsSttusCd;
|
||||||
this.reprNm = result.data.reprNm;
|
this.reprNm = result.data.reprNm;
|
||||||
@@ -291,17 +292,13 @@ export default {
|
|||||||
this.cprRegNo2 = this.cprRegNo.substr(6);
|
this.cprRegNo2 = this.cprRegNo.substr(6);
|
||||||
}
|
}
|
||||||
this.serviceId = result.data.userId;
|
this.serviceId = result.data.userId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (error) {}
|
||||||
} catch (error) {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getExcelHeader() {
|
getExcelHeader() {
|
||||||
// 헤더를 mockup으로 관리한다.
|
// 헤더를 mockup으로 관리한다.
|
||||||
channelMgtApi.getExcelHeader(this.pageType).then(res => {
|
channelMgtApi.getExcelHeader(this.pageType).then((res) => {
|
||||||
this.excelHeader = res;
|
this.excelHeader = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -330,42 +327,40 @@ export default {
|
|||||||
sndCntMTotal = sndCntMTotal + Number(data.list[i].sndCntM);
|
sndCntMTotal = sndCntMTotal + Number(data.list[i].sndCntM);
|
||||||
sndCntATotal = sndCntATotal + Number(data.list[i].sndCntA);
|
sndCntATotal = sndCntATotal + Number(data.list[i].sndCntA);
|
||||||
}
|
}
|
||||||
console.log("sndCntTotal : "+ sndCntTotal);
|
console.log('sndCntTotal : ' + sndCntTotal);
|
||||||
console.log("sndCntSTotal : "+ sndCntSTotal);
|
console.log('sndCntSTotal : ' + sndCntSTotal);
|
||||||
console.log("sndCntLTotal : "+ sndCntLTotal);
|
console.log('sndCntLTotal : ' + sndCntLTotal);
|
||||||
console.log("sndCntMTotal : "+ sndCntMTotal);
|
console.log('sndCntMTotal : ' + sndCntMTotal);
|
||||||
console.log("sndCntATotal : "+ sndCntATotal);
|
console.log('sndCntATotal : ' + sndCntATotal);
|
||||||
let totalRow = {
|
let totalRow = {
|
||||||
'sumYm' : '합계',
|
sumYm: '합계',
|
||||||
'sndCnt' : sndCntTotal,
|
sndCnt: sndCntTotal,
|
||||||
'sndCntA' : sndCntATotal,
|
sndCntA: sndCntATotal,
|
||||||
'sndCntL' : sndCntLTotal,
|
sndCntL: sndCntLTotal,
|
||||||
'sndCntM' : sndCntMTotal,
|
sndCntM: sndCntMTotal,
|
||||||
'sndCntS' : sndCntSTotal
|
sndCntS: sndCntSTotal,
|
||||||
};
|
};
|
||||||
// 합계 데이터 추가
|
// 합계 데이터 추가
|
||||||
data.list.unshift(totalRow);
|
data.list.unshift(totalRow);
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
|
|
||||||
header: this.excelHeader,
|
header: this.excelHeader,
|
||||||
dataOrder: 'header'
|
dataOrder: 'header',
|
||||||
};
|
};
|
||||||
xlsx.export(data.list, saveFileName, options).then(() => {
|
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async getExcelDataDown() {
|
async getExcelDataDown() {
|
||||||
try {
|
try {
|
||||||
let response;
|
let response;
|
||||||
const params = {
|
const params = {
|
||||||
userSeq: this.row.userSeq
|
userSeq: this.row.userSeq,
|
||||||
};
|
};
|
||||||
|
|
||||||
response = await channelMgtApi.sendNumberListExcel(params);
|
response = await channelMgtApi.sendNumberListExcel(params);
|
||||||
|
|
||||||
const result = response.data;
|
const result = response.data;
|
||||||
if (result != null && result.retCode == "0000") {
|
if (result != null && result.retCode == '0000') {
|
||||||
return result.data;
|
return result.data;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -375,19 +370,21 @@ export default {
|
|||||||
}
|
}
|
||||||
}, // end of getExcelDataDown
|
}, // end of getExcelDataDown
|
||||||
goChannelList() {
|
goChannelList() {
|
||||||
this.$router.push({name: 'channelList'});
|
this.$router.push({ name: 'channelList' });
|
||||||
},
|
},
|
||||||
searchIDPopOpen: function () {
|
searchIDPopOpen: function () {
|
||||||
var params = {
|
var params = {
|
||||||
"serviceId": this.serviceId,
|
serviceId: this.serviceId,
|
||||||
"serviceSeq": this.row.userSeq,
|
serviceSeq: this.row.userSeq,
|
||||||
"parentDiv": 'channelDetail'
|
parentDiv: 'channelDetail',
|
||||||
}
|
};
|
||||||
this.$refs.adminNmPop.ModalOpen(params);
|
this.$refs.adminNmPop.ModalOpen(params);
|
||||||
},
|
},
|
||||||
|
fromHtmlEntities(str) {
|
||||||
}
|
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||||
}
|
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -10,26 +10,26 @@
|
|||||||
<div class="input_box cal">
|
<div class="input_box cal">
|
||||||
<label for="right" class="label">조회기간</label>
|
<label for="right" class="label">조회기간</label>
|
||||||
<div class="term">
|
<div class="term">
|
||||||
<span class="custom_input icon_date">
|
|
||||||
<vuejs-datepicker
|
|
||||||
:language="ko"
|
|
||||||
:format="customFormatter"
|
|
||||||
:disabled-dates="disabledSDate"
|
|
||||||
v-model="startDate"
|
|
||||||
@selected="selectedStartDate(0)"
|
|
||||||
@closed="closeDate('start')"
|
|
||||||
></vuejs-datepicker>
|
|
||||||
</span>~
|
|
||||||
<span class="custom_input icon_date">
|
<span class="custom_input icon_date">
|
||||||
<vuejs-datepicker
|
<vuejs-datepicker
|
||||||
:language="ko"
|
:language="ko"
|
||||||
:format="customFormatter"
|
:format="customFormatter"
|
||||||
:disabled-dates="disabledEDate"
|
:disabled-dates="disabledSDate"
|
||||||
v-model="endDate"
|
v-model="startDate"
|
||||||
@selected="selectedEndDate(0)"
|
@selected="selectedStartDate(0)"
|
||||||
@closed="closeDate('end')"
|
@closed="closeDate('start')"
|
||||||
></vuejs-datepicker>
|
></vuejs-datepicker> </span
|
||||||
</span>
|
>~
|
||||||
|
<span class="custom_input icon_date">
|
||||||
|
<vuejs-datepicker
|
||||||
|
:language="ko"
|
||||||
|
:format="customFormatter"
|
||||||
|
:disabled-dates="disabledEDate"
|
||||||
|
v-model="endDate"
|
||||||
|
@selected="selectedEndDate(0)"
|
||||||
|
@closed="closeDate('end')"
|
||||||
|
></vuejs-datepicker>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="select_box id">
|
<div class="select_box id">
|
||||||
@@ -52,11 +52,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="input_box">
|
<div class="input_box">
|
||||||
<label for="right" class="label">유치자 마당ID</label>
|
<label for="right" class="label">유치자 마당ID</label>
|
||||||
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model.trim="grid.params.loginId" maxlength="50"/>
|
<input
|
||||||
|
class="search-box"
|
||||||
|
type="text"
|
||||||
|
id=""
|
||||||
|
placeholder="검색어 입력"
|
||||||
|
v-model.trim="grid.params.loginId"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="input_box">
|
<div class="input_box">
|
||||||
<label for="right" class="label">유치업체</label>
|
<label for="right" class="label">유치업체</label>
|
||||||
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model.trim="grid.params.norgNm" maxlength="50"/>
|
<input
|
||||||
|
class="search-box"
|
||||||
|
type="text"
|
||||||
|
id=""
|
||||||
|
placeholder="검색어 입력"
|
||||||
|
v-model.trim="grid.params.norgNm"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
@@ -69,59 +83,62 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input_box">
|
<div class="input_box">
|
||||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
|
<input
|
||||||
v-model.trim="grid.params.searchText" maxlength="100"/>
|
class="search-box"
|
||||||
|
type="text"
|
||||||
|
id="search"
|
||||||
|
placeholder="검색어 입력"
|
||||||
|
v-model.trim="grid.params.searchText"
|
||||||
|
maxlength="100"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="button grey" @click="search">조회</button>
|
<button type="button" class="button grey" @click="search">조회</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건
|
<div class="count">
|
||||||
|
총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span
|
||||||
|
>건
|
||||||
<div class="select_box NumberSe">
|
<div class="select_box NumberSe">
|
||||||
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
|
||||||
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
|
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">
|
||||||
option.text
|
{{ option.text }}
|
||||||
}}
|
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button_group">
|
<div class="button_group">
|
||||||
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
|
<button type="button" class="button blue download" @click="excelDown()">엑셀 다운로드</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<custom-grid
|
<custom-grid
|
||||||
ref="table"
|
ref="table"
|
||||||
:totalItems="'totalItems'"
|
:totalItems="'totalItems'"
|
||||||
:url="grid.url"
|
:url="grid.url"
|
||||||
:pagePerRows="grid.pagePerRows"
|
:pagePerRows="grid.pagePerRows"
|
||||||
:initialRequest="grid.initialRequest"
|
:initialRequest="grid.initialRequest"
|
||||||
:pagination="grid.pagination"
|
:pagination="grid.pagination"
|
||||||
:isCheckbox="grid.isCheckbox"
|
:isCheckbox="grid.isCheckbox"
|
||||||
:columns="grid.columns"
|
:columns="grid.columns"
|
||||||
:noDataStr="grid.noDataStr"
|
:noDataStr="grid.noDataStr"
|
||||||
:addCls="grid.addCls"
|
:addCls="grid.addCls"
|
||||||
:header="grid.headder"
|
:header="grid.headder"
|
||||||
></custom-grid>
|
></custom-grid>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<common-modal ref="commonModal"></common-modal>
|
<common-modal ref="commonModal"></common-modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import commonModal from "@/components/modal/commonModal";
|
import commonModal from '@/components/modal/commonModal';
|
||||||
import customGrid from '@/components/CustomGrid';
|
import customGrid from '@/components/CustomGrid';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import api from '@/service/api.js';
|
import api from '@/service/api.js';
|
||||||
import channelMgtApi from "../service/channelMgtApi.js";
|
import channelMgtApi from '../service/channelMgtApi.js';
|
||||||
import xlsx from '@/common/excel';
|
import xlsx from '@/common/excel';
|
||||||
|
|
||||||
class CustomATagRenderer {
|
class CustomATagRenderer {
|
||||||
@@ -130,7 +147,7 @@ class CustomATagRenderer {
|
|||||||
const el = document.createElement('a');
|
const el = document.createElement('a');
|
||||||
el.href = 'javascript:void(0);';
|
el.href = 'javascript:void(0);';
|
||||||
el.className = 'btn_text';
|
el.className = 'btn_text';
|
||||||
el.innerText = String(props.colValue)
|
el.innerText = String(props.colValue);
|
||||||
this.el = el;
|
this.el = el;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,8 +156,8 @@ class CustomATagRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addEvent(selEl) {
|
addEvent(selEl) {
|
||||||
selEl.addEventListener("click", () => {
|
selEl.addEventListener('click', () => {
|
||||||
const {callback} = this.props["cgrido" + this.props.colName].options;
|
const { callback } = this.props['cgrido' + this.props.colName].options;
|
||||||
callback(this.props);
|
callback(this.props);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -149,8 +166,8 @@ class CustomATagRenderer {
|
|||||||
export default {
|
export default {
|
||||||
name: 'channelList',
|
name: 'channelList',
|
||||||
data() {
|
data() {
|
||||||
|
const vm = this;
|
||||||
return {
|
return {
|
||||||
|
|
||||||
ko: vdp_translation_ko.js,
|
ko: vdp_translation_ko.js,
|
||||||
periodDay: 7,
|
periodDay: 7,
|
||||||
sDateDiv: 'day',
|
sDateDiv: 'day',
|
||||||
@@ -165,9 +182,9 @@ export default {
|
|||||||
// 테이블 리스트 데이터
|
// 테이블 리스트 데이터
|
||||||
perPageCnt: 50,
|
perPageCnt: 50,
|
||||||
options: [
|
options: [
|
||||||
{text: '20', value: 20},
|
{ text: '20', value: 20 },
|
||||||
{text: '50', value: 50},
|
{ text: '50', value: 50 },
|
||||||
{text: '100', value: 100}
|
{ text: '100', value: 100 },
|
||||||
],
|
],
|
||||||
searchType: '01',
|
searchType: '01',
|
||||||
totalItems: 0,
|
totalItems: 0,
|
||||||
@@ -175,37 +192,50 @@ export default {
|
|||||||
url: '/api/v1/bo/attractMgt/channelList',
|
url: '/api/v1/bo/attractMgt/channelList',
|
||||||
pagePerRows: 20,
|
pagePerRows: 20,
|
||||||
pagination: true,
|
pagination: true,
|
||||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||||
initialRequest: false,
|
initialRequest: false,
|
||||||
addCls: 'box_OFvis',
|
addCls: 'box_OFvis',
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{name: 'no', header: 'No', align: 'center', width: '6%'},
|
{ name: 'no', header: 'No', align: 'center', width: '6%' },
|
||||||
{name: 'subsDt', header: '가입일', align: 'center', width: '11%'},
|
{ name: 'subsDt', header: '가입일', align: 'center', width: '11%' },
|
||||||
{name: 'norgNm', header: '유치업체', align: 'center', width: '10%'},
|
{ name: 'norgNm', header: '유치업체', align: 'center', width: '10%' },
|
||||||
{name: 'userSeq', header: '사용자일련번호', align: 'center', width: '10%', hidden: true},
|
{ name: 'userSeq', header: '사용자일련번호', align: 'center', width: '10%', hidden: true },
|
||||||
{name: 'loginId', header: '마당ID(이름)', align: 'center', width: '10%'},
|
{ name: 'loginId', header: '마당ID(이름)', align: 'center', width: '10%' },
|
||||||
{name: 'custNm', header: '고객사명', align: 'center', width: '10%', renderer: {
|
|
||||||
type: CustomATagRenderer
|
|
||||||
, options: {
|
|
||||||
callback: this.channelDetail,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{name: 'bizrno', header: '사업자번호', align: 'center', width: '12%'},
|
|
||||||
{name: 'userNm', header: '이름', align: 'center', width: '10%'},
|
|
||||||
{name: 'subsSttusCd', header: '상태', align: 'center', width: '10%', hidden: true},
|
|
||||||
{name: 'subsSttusNm', header: '상태', align: 'center', width: '10%'},
|
|
||||||
{name: 'custTyCd', header: '구분', align: 'center', width: '10%', hidden: true},
|
|
||||||
{name: 'custTyNm', header: '구분', align: 'center', width: '10%'},
|
|
||||||
{
|
{
|
||||||
name: 'sndCnt', header: '전체발송건수', align: 'center', width: '11%',
|
name: 'custNm',
|
||||||
formatter: props => {
|
header: '고객사명',
|
||||||
|
align: 'center',
|
||||||
|
width: '10%',
|
||||||
|
renderer: {
|
||||||
|
type: CustomATagRenderer,
|
||||||
|
options: {
|
||||||
|
callback: this.channelDetail,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
formatter: (props) => {
|
||||||
|
let result = vm.fromHtmlEntities(props.custNm);
|
||||||
|
//.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '12%' },
|
||||||
|
{ name: 'userNm', header: '이름', align: 'center', width: '10%' },
|
||||||
|
{ name: 'subsSttusCd', header: '상태', align: 'center', width: '10%', hidden: true },
|
||||||
|
{ name: 'subsSttusNm', header: '상태', align: 'center', width: '10%' },
|
||||||
|
{ name: 'custTyCd', header: '구분', align: 'center', width: '10%', hidden: true },
|
||||||
|
{ name: 'custTyNm', header: '구분', align: 'center', width: '10%' },
|
||||||
|
{
|
||||||
|
name: 'sndCnt',
|
||||||
|
header: '전체발송건수',
|
||||||
|
align: 'center',
|
||||||
|
width: '11%',
|
||||||
|
formatter: (props) => {
|
||||||
let result = props.sndCnt;
|
let result = props.sndCnt;
|
||||||
//.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
//.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||||
return result;
|
return result;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
noDataStr: '검색 결과가 없습니다.',
|
noDataStr: '검색 결과가 없습니다.',
|
||||||
params: {
|
params: {
|
||||||
@@ -222,8 +252,8 @@ export default {
|
|||||||
custTyCd: '',
|
custTyCd: '',
|
||||||
custTyNm: '',
|
custTyNm: '',
|
||||||
},
|
},
|
||||||
excelHeader: []
|
excelHeader: [],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -242,7 +272,6 @@ export default {
|
|||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.grid.params.subsSttusCd = '';
|
this.grid.params.subsSttusCd = '';
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let page = 1;
|
let page = 1;
|
||||||
@@ -263,11 +292,12 @@ export default {
|
|||||||
search: function (isKeep) {
|
search: function (isKeep) {
|
||||||
this.grid.params.subsStDt = this.startDate;
|
this.grid.params.subsStDt = this.startDate;
|
||||||
this.grid.params.subsEdDt = this.endDate;
|
this.grid.params.subsEdDt = this.endDate;
|
||||||
this.grid.params.searchType = this.searchType
|
this.grid.params.searchType = this.searchType;
|
||||||
this.$refs.table.search(this.grid.params, isKeep);
|
this.$refs.table.search(this.grid.params, isKeep);
|
||||||
this.sendStoreData();
|
this.sendStoreData();
|
||||||
},
|
},
|
||||||
changePerPage: function () { // 페이지당 조회할 개수
|
changePerPage: function () {
|
||||||
|
// 페이지당 조회할 개수
|
||||||
this.grid.pagePerRows = this.perPageCnt;
|
this.grid.pagePerRows = this.perPageCnt;
|
||||||
this.search(true);
|
this.search(true);
|
||||||
},
|
},
|
||||||
@@ -276,7 +306,7 @@ export default {
|
|||||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
page: getP._currentPage,
|
page: getP._currentPage,
|
||||||
perPage: this.perPageCnt,
|
perPage: this.perPageCnt,
|
||||||
params: this.grid.params
|
params: this.grid.params,
|
||||||
});
|
});
|
||||||
|
|
||||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||||
@@ -291,13 +321,13 @@ export default {
|
|||||||
searchType2: this.grid.params.searchType1,
|
searchType2: this.grid.params.searchType1,
|
||||||
searchText1: this.grid.params.searchText,
|
searchText1: this.grid.params.searchText,
|
||||||
loginId: this.grid.params.loginId,
|
loginId: this.grid.params.loginId,
|
||||||
norgNm: this.grid.params.norgNm
|
norgNm: this.grid.params.norgNm,
|
||||||
};
|
};
|
||||||
|
|
||||||
response = await channelMgtApi.channelListExcel(params);
|
response = await channelMgtApi.channelListExcel(params);
|
||||||
|
|
||||||
const result = response.data;
|
const result = response.data;
|
||||||
if (result != null && result.retCode == "0000") {
|
if (result != null && result.retCode == '0000') {
|
||||||
return result.data;
|
return result.data;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -307,7 +337,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}, // end of getExcelDataDown
|
}, // end of getExcelDataDown
|
||||||
async excelDown() {
|
async excelDown() {
|
||||||
|
|
||||||
if (this.$refs.table.getData().length <= 0) {
|
if (this.$refs.table.getData().length <= 0) {
|
||||||
this.row.title = '유치채널현황';
|
this.row.title = '유치채널현황';
|
||||||
this.row.msg1 = '조회된 데이터가 없습니다.';
|
this.row.msg1 = '조회된 데이터가 없습니다.';
|
||||||
@@ -321,31 +350,30 @@ export default {
|
|||||||
const data = await this.getExcelDataDown();
|
const data = await this.getExcelDataDown();
|
||||||
let options = {
|
let options = {
|
||||||
header: this.excelHeader,
|
header: this.excelHeader,
|
||||||
dataOrder: 'header'
|
dataOrder: 'header',
|
||||||
};
|
};
|
||||||
xlsx.export(data.list, saveFileName, options).then(() => {
|
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getExcelHeader() {
|
getExcelHeader() {
|
||||||
// 헤더를 mockup으로 관리한다.
|
// 헤더를 mockup으로 관리한다.
|
||||||
channelMgtApi.getExcelHeader(this.pageType).then(res => {
|
channelMgtApi.getExcelHeader(this.pageType).then((res) => {
|
||||||
this.excelHeader = res;
|
this.excelHeader = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
channelDetail(props) {
|
channelDetail(props) {
|
||||||
this.row.userId = props.loginId;
|
this.row.userId = props.loginId;
|
||||||
this.row.userSeq = props.userSeq;
|
this.row.userSeq = props.userSeq;
|
||||||
this.$router.push({name: 'channelDetail', params: this.row});
|
this.$router.push({ name: 'channelDetail', params: this.row });
|
||||||
},
|
},
|
||||||
setCodeData() {
|
setCodeData() {
|
||||||
// 상태 옵션 셋팅.
|
// 상태 옵션 셋팅.
|
||||||
api.commCode({'grpCd': 'SUBS_STTUS_CD'}).then(response => {
|
api.commCode({ grpCd: 'SUBS_STTUS_CD' }).then((response) => {
|
||||||
// grid.params.subsSttusCd
|
// grid.params.subsSttusCd
|
||||||
this.subsSttusCdList = response.data.data.list;
|
this.subsSttusCdList = response.data.data.list;
|
||||||
this.grid.params.subsSttusCd = '';
|
this.grid.params.subsSttusCd = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
api.commCode({'grpCd': 'CUST_KD_CD'}).then(response => {
|
api.commCode({ grpCd: 'CUST_KD_CD' }).then((response) => {
|
||||||
this.custTyCdList = response.data.data.list;
|
this.custTyCdList = response.data.data.list;
|
||||||
this.grid.params.custTyCd = '';
|
this.grid.params.custTyCd = '';
|
||||||
});
|
});
|
||||||
@@ -377,11 +405,11 @@ export default {
|
|||||||
closeDate(type) {
|
closeDate(type) {
|
||||||
if (type != undefined && type != null) {
|
if (type != undefined && type != null) {
|
||||||
if (type == 'start') {
|
if (type == 'start') {
|
||||||
this.disabledSDate = {from: this.endDate};
|
this.disabledSDate = { from: this.endDate };
|
||||||
this.disabledEDate = {to: this.startDate, from: this.endDate};
|
this.disabledEDate = { to: this.startDate, from: this.endDate };
|
||||||
} else if (type == 'end') {
|
} else if (type == 'end') {
|
||||||
this.disabledSDate = {from: this.endDate};
|
this.disabledSDate = { from: this.endDate };
|
||||||
this.disabledEDate = {to: this.startDate, from: new Date()};
|
this.disabledEDate = { to: this.startDate, from: new Date() };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -399,14 +427,18 @@ export default {
|
|||||||
let initStartDate = new Date(setYear, 0, 1);
|
let initStartDate = new Date(setYear, 0, 1);
|
||||||
this.startDate = initStartDate;
|
this.startDate = initStartDate;
|
||||||
},
|
},
|
||||||
|
fromHtmlEntities(str) {
|
||||||
|
return (str + '').replace(/&#\d+;/gm, function (s) {
|
||||||
|
return String.fromCharCode(s.match(/\d+/gm)[0]);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
|
|
||||||
const getP = this.$refs.table.getPagination();
|
const getP = this.$refs.table.getPagination();
|
||||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||||
page: getP._currentPage,
|
page: getP._currentPage,
|
||||||
perPage: this.perPageCnt,
|
perPage: this.perPageCnt,
|
||||||
params: this.grid.params
|
params: this.grid.params,
|
||||||
});
|
});
|
||||||
// 라우트 하기전 실행
|
// 라우트 하기전 실행
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user