mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:12:34 +09:00
TC 기능 수정 / 디자인 수정 변경
This commit is contained in:
@@ -1,70 +1,66 @@
|
||||
<template>
|
||||
|
||||
<div class="contents">
|
||||
<div class="contents_wrap">
|
||||
<div class="top_wrap">
|
||||
<h3 class="title">알림톡 템플릿 목록 조회</h3>
|
||||
<p class="breadcrumb">채널관리 > 알림톡 템플릿 관리</p>
|
||||
</div>
|
||||
<form autocomplete="off" class="search_form">
|
||||
<div class="search_wrap">
|
||||
<div class="select_box">
|
||||
<label for="stat" class="label">상태</label>
|
||||
<select name="" id="stat" v-model="searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">폐기</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="searchType" class="label">상세검색</label>
|
||||
<select name="" id="searchType" v-model="searchType2" @keyup.enter="search">
|
||||
<option value="custNm" selected="selected">고객사명</option>
|
||||
<option value="bizNo">사업자번호</option>
|
||||
<option value="tmpltNm">템플릿명</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="search" class="label">검색어</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="perPage" v-model="grid.pagePerRows" @keyup.enter="search">
|
||||
<option value="20">20</option>
|
||||
<option value="50" selected>50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<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="select_box">
|
||||
<label for="stat" class="label">상태</label>
|
||||
<select name="" id="stat" v-model="searchType1" @keyup.enter="search">
|
||||
<option value="">전체</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">폐기</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="select_box">
|
||||
<label for="searchType" class="label">상세검색</label>
|
||||
<select name="" id="searchType" v-model="searchType2" @keyup.enter="search">
|
||||
<option value="custNm" selected="selected">고객사명</option>
|
||||
<option value="bizNo">사업자번호</option>
|
||||
<option value="tmpltNm">템플릿명</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input_box id">
|
||||
<label for="search" class="label">검색어</label>
|
||||
<input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
|
||||
@keyup.enter="search" maxlength="100"/>
|
||||
</div>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="perPage" v-model="grid.pagePerRows" @keyup.enter="search">
|
||||
<option value="20">20</option>
|
||||
<option value="50" selected>50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- <div class="button_group">-->
|
||||
<!-- <button type="button" class="button blue admin" @click="excelDown();">엑셀다운로드</button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<custom-grid
|
||||
ref="table"
|
||||
:totalItems="'totalItems'"
|
||||
:url="grid.url"
|
||||
:pagePerRows="grid.pagePerRows"
|
||||
:initialRequest="grid.initialRequest"
|
||||
:pagination="grid.pagination"
|
||||
:isCheckbox="grid.isCheckbox"
|
||||
:columns="grid.columns"
|
||||
:noDataStr="grid.noDataStr"
|
||||
:addCls="grid.addCls"
|
||||
:header="grid.headder"
|
||||
></custom-grid>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -74,106 +70,18 @@ import xlsx from '@/common/excel';
|
||||
import moment from 'moment';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
class customBRegNo {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var bregNo = String(props.colValue);
|
||||
el.innerText= bregNo;
|
||||
if(bregNo.length == 10){
|
||||
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10)
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
class customTmpltType {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var tmpltType = String(props.colValue);
|
||||
el.innerText= "";
|
||||
switch(tmpltType){
|
||||
case '01' :
|
||||
el.innerText= "기본형";
|
||||
break;
|
||||
case '02' :
|
||||
el.innerText= "부가정보형";
|
||||
break;
|
||||
case '03' :
|
||||
el.innerText= "광고추가형";
|
||||
break;
|
||||
case '04' :
|
||||
el.innerText= "복잡형";
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
|
||||
class customStat {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('td');
|
||||
var stat = String(props.colValue);
|
||||
el.innerText= "";
|
||||
switch(stat){
|
||||
case 'T' :
|
||||
el.innerText= "신청완료";
|
||||
break;
|
||||
case 'R' :
|
||||
el.innerText= "검수요청완료";
|
||||
break;
|
||||
case 'Q' :
|
||||
el.innerText= "카카오 검수중";
|
||||
break;
|
||||
case 'A' :
|
||||
el.innerText= "템플릿승인";
|
||||
break;
|
||||
case 'S' :
|
||||
el.innerText= "반려(" + props.returnReason + ")";
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'temltList',
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
pageType: 'CHANN',
|
||||
searchType1:'',
|
||||
searchType2:'custNm',
|
||||
searchType1: '',
|
||||
searchType2: 'custNm',
|
||||
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
@@ -188,77 +96,78 @@ export default {
|
||||
|
||||
header: [
|
||||
[
|
||||
{ header: 'NO', childNames: [] },
|
||||
{ header: '고객사명', childNames: [] },
|
||||
{ header: '사업자번호', childNames: [] },
|
||||
{ header: '템플릿코드', childNames: [] },
|
||||
{ header: '템플릿명', childNames: [] },
|
||||
{ header: '템플릿 유형', childNames: [] },
|
||||
{ header: '상태(반려사유)', childNames: [] },
|
||||
{ header: '발신프로필', childNames: [] },
|
||||
{ header: '최종수정일', childNames: [] }
|
||||
{header: 'NO', childNames: []},
|
||||
{header: '고객사명', childNames: []},
|
||||
{header: '사업자번호', childNames: []},
|
||||
{header: '템플릿코드', childNames: []},
|
||||
{header: '템플릿명', childNames: []},
|
||||
{header: '템플릿 유형', childNames: []},
|
||||
{header: '상태', childNames: []},
|
||||
{header: '발신프로필', childNames: []},
|
||||
{header: '최종수정일', childNames: []}
|
||||
]
|
||||
],
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '4%' },
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', width: '12%' },
|
||||
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '12%',renderer: {type: customBRegNo}},
|
||||
{ name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'},
|
||||
{ name: 'tmpltNm', header: '템플릿명', align: 'center', width: '12%'},
|
||||
{ name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '12%',renderer: {type: customTmpltType}},
|
||||
{ name: 'stat', header: '상태(반려사유)', align: 'center', width: '12%',renderer: {type: customStat}},
|
||||
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: '125'},
|
||||
{ name: 'lastChgDt', header: '최종수정일', width: '12%', cls: 'td_line' }
|
||||
columns: [
|
||||
{name: 'no', header: 'NO', align: 'center', width: '4%'},
|
||||
{name: 'custNm', header: '고객사명', align: 'center', width: '12%'},
|
||||
{name: 'bregNo', header: '사업자번호', align: 'center', width: '12%'},
|
||||
{name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'},
|
||||
{name: 'tmpltNm', header: '템플릿명', align: 'center', width: '12%'},
|
||||
{name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '12%'},
|
||||
{name: 'stat', header: '상태', align: 'center', width: '12%'},
|
||||
{name: 'sendProfile', header: '발신프로필', align: 'center', width: '125'},
|
||||
{name: 'lastChgDt', header: '최종수정일', width: '12%', cls: 'td_line'}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: 'custNm',
|
||||
searchText1: ''
|
||||
},
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid,
|
||||
channelMgtApi,
|
||||
commonModal,
|
||||
},
|
||||
created(){
|
||||
created() {
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
this.getExcelHeader();
|
||||
},
|
||||
destroyed() {
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: 'custNm',
|
||||
searchText1: ''}
|
||||
});
|
||||
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: 'custNm',
|
||||
searchText1: ''
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
this.search(isKeep);
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
search: function (isKeep) {
|
||||
console.log(this.grid.params);
|
||||
this.grid.params.searchType1 = this.searchType1
|
||||
this.grid.params.searchType2 = this.searchType2
|
||||
@@ -266,17 +175,17 @@ export default {
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
sendStoreData: function () {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: 'custNm',
|
||||
searchText1: ''
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
@@ -296,7 +205,7 @@ export default {
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
return result.data;
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -320,7 +229,8 @@ export default {
|
||||
dataOrder: 'header'
|
||||
};
|
||||
// console.log(data);
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {});
|
||||
xlsx.export(data.list, saveFileName, options).then(() => {
|
||||
});
|
||||
},
|
||||
getExcelHeader() {
|
||||
// 헤더를 mockup으로 관리한다.
|
||||
@@ -329,18 +239,18 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user