TC 기능 수정 / 디자인 수정 변경

This commit is contained in:
kimre
2022-07-15 14:21:03 +09:00
parent a4e5cde9f6
commit 34e7957081
91 changed files with 9087 additions and 8673 deletions

View File

@@ -1,135 +1,133 @@
<template>
<div class="contents">
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">웹발송 차단내역</h3>
<p class="breadcrumb">리스크관리 &gt; 차단 내역</p>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<label for="right" class="label">발송일</label>
<div class="group">
<div class="input_box cal one">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
v-model="startDate"
@selected="selectedStartDate(0)"
></vuejs-datepicker>
<!-- <input class="" type="text" id=""
placeholder="2022-10-12"
v-model="grid.params.startDt"
@click="openStartPicker = true" />
<div v-show="openStartPicker === true">
<calendar ref="calendar"/> -->
<!-- </div> -->
</div>
<button type="button" class="button grey btn-a" @click="todayDate">오늘</button>
<div class="select_box id">
<label for="right" class="label">차단사유</label>
<select name="" id="" v-model="blckRsnCd">
<option value="" selected>전체</option>
<option value="01">일반</option>
<option value="02">대출</option>
<option value="03">의약품</option>
<option value="04">도박</option>
<option value="05">스미싱</option>
<option value="06">기타</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">차단구분</label>
<select name="" id="" v-model="blckTpCd">
<option value="" selected>전체</option>
<option value="01">발신번호차단</option>
<option value="02">메시지차단</option>
<option value="03">080수신번호차단</option>
</select>
</div>
</div>
<div class="group">
<div class="input_box">
<label for="right" class="label">발신번호</label>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.sndrno" v-on:keyup="onlyNum" @input="onlyNum" maxlength="12">
</div>
<div class="input_box">
<label for="right" class="label">수신번호</label>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.rcvno" v-on:keyup="onlyNum" @input="onlyNum" maxlength="12">
</div>
<div class="select_box">
<label for="right" class="label">상세검색</label>
<select name="" id="" v-model="searchType1">
<option value="01" selected>고객사명</option>
<option value="02">사업자번호</option>
<option value="03">발송ID</option>
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</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="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">웹발송 차단내역</h3>
<p class="breadcrumb">리스크관리 &gt; 차단 내역</p>
</div>
<div class="search_wrap">
<label for="right" class="label">발송일</label>
<div class="group">
<div class="input_box cal one">
<vuejs-datepicker
:language="ko"
:format="customFormatter"
v-model="startDate"
@selected="selectedStartDate(0)"
></vuejs-datepicker>
</div>
<button type="button" class="button grey btn-a" @click="todayDate">오늘</button>
<div class="select_box id">
<label for="right" class="label">차단사유</label>
<select name="" id="" v-model="blckRsnCd">
<option value="" selected>전체</option>
<option value="01">일반</option>
<option value="02">대출</option>
<option value="03">의약품</option>
<option value="04">도박</option>
<option value="05">스미싱</option>
<option value="06">기타</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">차단구분</label>
<select name="" id="" v-model="blckTpCd">
<option value="" selected>전체</option>
<option value="01">발신번호차단</option>
<option value="02">메시지차단</option>
<option value="03">080수신번호차단</option>
</select>
</div>
</div>
<div class="group">
<div class="input_box">
<label for="right" class="label">발신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.sndrno"
@keypress="onlyNum" @input="onlyNum" maxlength="11">
</div>
<div class="input_box">
<label for="right" class="label">수신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.rcvno"
@keypress="onlyNum" @input="onlyNum" maxlength="11">
</div>
<div class="select_box">
<label for="right" class="label">상세검색</label>
<select name="" id="" v-model="searchType1">
<option value="01" selected>고객사명</option>
<option value="02">사업자번호</option>
<option value="03">발송ID</option>
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.searchText1" maxlength="100">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</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="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template>
<script>
import customGrid from '@/components/CustomGrid';
import moment from 'moment';
import commonModal from "@/components/modal/commonModal";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import {utils_mixin, chkPattern2} from '../service/mixins';
//import api from '../service/api';
class CustomATagRenderer {
constructor(props) {
this.props = props;
const el = document.createElement('a');
el.href = 'javascript:void(0);';
el.className = 'btn_text';
el.innerText= String(props.colValue)
this.el = el;
}
constructor(props) {
this.props = props;
const el = document.createElement('a');
el.href = 'javascript:void(0);';
el.className = 'btn_text';
el.innerText = String(props.colValue)
this.el = el;
}
getElement() {
return this.el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options;
callback(this.props);
});
}
addEvent(selEl) {
selEl.addEventListener("click", () => {
const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props);
});
}
}
export default {
name: 'intrcpList',
mixins: [utils_mixin, chkPattern2],
@@ -142,18 +140,18 @@ export default {
periodDay: 7,
sDateDiv: 'day',
startDate: new Date(),
endDate: new Date(),
endDate: new Date(),
options: [
{ text: '20', value: 20},
{ text: '50', value: 50},
{ text: '100', value: 100}
{text: '20', value: 20},
{text: '50', value: 50},
{text: '100', value: 100}
],
statType: [],
userType: [],
blckRsnCd:'',
blckTpCd:'',
searchType1:'01',
row:{},
blckRsnCd: '',
blckTpCd: '',
searchType1: '01',
row: {},
grid: {
url: '/api/v1/bo/riskMgt/web/intrcpList',
perPage: 20,
@@ -164,36 +162,38 @@ export default {
addCls: 'box_OFvis',
header: [
[
{ header: 'NO', childNames: [] },
{ header: '차단구분', childNames: [] },
{ header: '발송ID', childNames: [] },
{ header: '발신번호', childNames: [] },
{ header: '고객사명', childNames: [] },
{ header: '사업자번호', childNames: [] },
{ header: '수신번호', childNames: [] },
{ header: '차단사유', childNames: [] },
{ header: '발송일자', childNames: [] }
{header: 'NO', childNames: []},
{header: '차단구분', childNames: []},
{header: '발송ID', childNames: []},
{header: '발신번호', childNames: []},
{header: '고객사명', childNames: []},
{header: '사업자번호', childNames: []},
{header: '수신번호', childNames: []},
{header: '차단사유', childNames: []},
{header: '발송일자', childNames: []}
]
],
columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' },
{ name: 'blckTpCd', header: '차단구분', align: 'center', width: '11%' },
{ name: 'userId', header: '발송ID', align: 'center', width: '11%'},
{ name: 'sndrno', header: '발신번호', align: 'center', width: '11%'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '11%', renderer: {
type: CustomATagRenderer
, options: {
callback: this.custDetail,
columns: [
{name: 'no', header: 'NO', align: 'center', width: '5%'},
{name: 'blckTpCd', header: '차단구분', align: 'center', width: '11%'},
{name: 'userId', header: '발송ID', align: 'center', width: '11%'},
{name: 'sndrno', header: '발신번호', align: 'center', width: '11%'},
{
name: 'custNm', header: '고객사명', align: 'center', width: '11%', renderer: {
type: CustomATagRenderer
, options: {
callback: this.custDetail,
}
}
}},
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '11%'},
{ name: 'rcvno', header: '수신번호', align: 'center', width: '11%' },
{ name: 'blckRsnCd', header: '차단사유', align: 'center', width: '7%' },
{ name: 'blckDt', header: '발송일자', align: 'center', width: '11%' },
},
{name: 'bizrno', header: '사업자번호', align: 'center', width: '11%'},
{name: 'rcvno', header: '수신번호', align: 'center', width: '11%'},
{name: 'blckRsnCd', header: '차단사유', align: 'center', width: '7%'},
{name: 'blckDt', header: '발송일자', align: 'center', width: '11%'},
],
noDataStr: '검색 결과가 없습니다.',
noDataStr: '검색 결과가 없습니다.',
params: {
blckDt: '',
blckRsnCd: '',
@@ -205,31 +205,31 @@ export default {
startDt: new Date(+new Date() + 3240 * 10000).toISOString().split("T")[0],
},
excelHeader: []
}
}
};
},
},
components: {
customGrid: customGrid,
commonModal,
vuejsDatepicker,
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
page: 1,
perPage: 20,
params: {
blckDt: '',
blckRsnCd: '',
blckTpCd: '',
sndrno: '',
rcvno: '',
searchType1: '',
searchText1: ''
}
});
this.startDate = '';
this.$store.commit('searchcondition/updateSearchCondition', {
page: 1,
perPage: 20,
params: {
blckDt: '',
blckRsnCd: '',
blckTpCd: '',
sndrno: '',
rcvno: '',
searchType1: '',
searchText1: ''
}
});
this.startDate = '';
},
created(){
created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
this.setPeriodDay(0);
},
@@ -238,7 +238,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false;
if(getCondition) {
if (getCondition) {
this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params;
page = getCondition.page;
@@ -247,7 +247,7 @@ export default {
this.search(isKeep);
},
methods: {
search: function(isKeep) {
search: function (isKeep) {
console.log(this.grid.params);
this.grid.params.blckDt = moment(this.startDate).format('YYYYMMDD');
this.grid.params.blckTpCd = this.blckTpCd
@@ -256,12 +256,12 @@ 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: this.grid.params
});
@@ -277,10 +277,10 @@ export default {
this.closeDate('start');
},
selectedStartDate(day) {
selectedStartDate(day) {
if (day != undefined && day != null) {
this.periodDay = day;
}
}
console.log(this.startDate);
},
selectedEndDate(day) {
@@ -290,11 +290,11 @@ export default {
},
closeDate(type) {
if (type != undefined && type != null) {
}
console.log(this.startDate);
},
customFormatter: function(date) {
customFormatter: function (date) {
if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') {
@@ -307,13 +307,13 @@ export default {
custDetail(props) {
//this.row.custNm = props.serviceId;
this.row.serviceId = props.serviceId;
this.$router.push({ name: 'subsDetail', params: this.row });
this.$router.push({name: 'subsDetail', params: this.row});
},
calendarCalbackFnc(year, month, day){
calendarCalbackFnc(year, month, day) {
if(this.openStartPicker){
this.startDate= year +''+ month +''+ day
if(Number(this.endDate) < Number(this.startDate) && this.endDate !== 0){
if (this.openStartPicker) {
this.startDate = year + '' + month + '' + day
if (Number(this.endDate) < Number(this.startDate) && this.endDate !== 0) {
this.row.title = '청약고객관리';
this.row.msg1 = '조회 시작일이 종료일보다 큽니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
@@ -323,9 +323,9 @@ export default {
this.grid.params.startDt = year + '-' + month + '-' + day
this.openStartPicker = false
}
if(this.openEndPicker){
this.endDate=year +''+ month +''+ day
if(Number(this.endDate) < Number(this.startDate) && this.startDate !== 0){
if (this.openEndPicker) {
this.endDate = year + '' + month + '' + day
if (Number(this.endDate) < Number(this.startDate) && this.startDate !== 0) {
this.row.title = '청약고객관리';
this.row.msg1 = '조회 종료일이 시작일보다 작습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
@@ -341,16 +341,16 @@ 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>