mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 06:52:01 +09:00
고객관리 > 청약고갹관리/회원관리 기능 추가
This commit is contained in:
268
frontend/src/modules/custMgt/components/MemoTotalPop.vue
Normal file
268
frontend/src/modules/custMgt/components/MemoTotalPop.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memoTotal" @click="memoTotalModalClose();"></div>
|
||||
<div class="popup-wrap memoTotal">
|
||||
<!-- 수정 확인 -->
|
||||
<div class="popup memoTotal popup_form b-popup">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">전체 메모보기</h3>
|
||||
</div>
|
||||
<table class="table-c">
|
||||
<!--
|
||||
<thead>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<th>작성자</th>
|
||||
<th>작성일</th>
|
||||
<th>삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="memo">작성한 메모 내용이 노출됩니다. <br/>
|
||||
해당영역은 최대 5줄까지 노출되며 이후 우측 스크롤이 생성됩니다.<br/>
|
||||
작성한 메모 내용이 노출됩니다. <br/>
|
||||
해당영역은 최대 5줄까지 노출되며 이후 우측 스크롤이 생성됩니다.<br/>
|
||||
작성한 메모 내용이 노출됩니다.</td>
|
||||
<td>관리자</td>
|
||||
<td>2022-03-10</td>
|
||||
<td><button type="button" class="button white btn-a">삭제</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
-->
|
||||
|
||||
<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>
|
||||
|
||||
</table>
|
||||
<div class="pop-btn2">
|
||||
|
||||
<button class="btn-default" @click="memoTotalModalClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from "@/components/CustomGrid";
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
// const el = document.createElement('a');
|
||||
const el = document.createElement('button');
|
||||
el.href = 'javascript:void(0);';
|
||||
//el.className = 'btn_text';
|
||||
el.className = 'button white btn-a';
|
||||
//el.innerText= String(props.colValue)
|
||||
el.innerText= String('삭제')
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "memoTatalListPop",
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
// props: [],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
memorow: {},
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 10,
|
||||
userId: '',
|
||||
grid: {
|
||||
url: '/api/v1/bo/custMgt/allMemoList',
|
||||
pagePerRows: 10,
|
||||
pagination: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'memo', header: '내용', align: 'center', cls:'memo'},
|
||||
{ name: 'register', header: '작성자', align: 'center'},
|
||||
{ name: 'regDt', header: '작성일', align: 'center'},
|
||||
{ name: 'delete', header: '삭제', align: 'center', renderer: {
|
||||
type: CustomATagRenderer
|
||||
,options: {
|
||||
callback: this.deleteMemo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'seqNo', header: '내용일련번호', align: 'center', hidden: true},
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
userId: '',
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
components:{
|
||||
customGrid: customGrid,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let pageMemo = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition_memo = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition_memo : '+getCondition_memo);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeepMemo = false;
|
||||
if (getCondition_memo) {
|
||||
this.grid.pagePerRows = getCondition_memo.perPage;
|
||||
this.grid.params = getCondition_memo.params;
|
||||
pageMemo = getCondition_memo.page;
|
||||
isKeepMemo = true;
|
||||
}
|
||||
|
||||
// this.search(isKeep);
|
||||
},
|
||||
methods :{
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt:'+this.perPageCnt);
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP_memo = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP_memo._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
userId : this.userId,
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition_memo = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition_memo : "+ getCondition_memo.perPage);
|
||||
},
|
||||
//메모전체 모달 Open
|
||||
async memoTotalModalOpen(props){
|
||||
this.grid.params.userId = props.adminId;
|
||||
this.userId = props.adminId;
|
||||
|
||||
console.log(props.adminId);
|
||||
|
||||
// 메모 모달팝업 오픈
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
// 리스트 그리드 오픈
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
|
||||
},
|
||||
//메모전체 모달 Close
|
||||
memoTotalModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memoTotal');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
//this.formReset();
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memoTotalModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
deleteMemo: function(props) {
|
||||
console.log(props);
|
||||
var param = {};
|
||||
param.seqNo = props.seqNo;
|
||||
param.userId = this.userId;
|
||||
this.deleteMemoConfirm(param);
|
||||
},
|
||||
async deleteMemoConfirm(target){
|
||||
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await custMgtApi.deleteMemo(target);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
// alert('삭제 성공');
|
||||
// 그리드 reload
|
||||
// 리스트 그리드 오픈
|
||||
let page = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition : '+getCondition);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeep = false;
|
||||
if (getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user