mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:02:58 +09:00
고객관리 > 청약고갹관리/회원관리 기능 추가
This commit is contained in:
@@ -45,9 +45,9 @@
|
||||
<th class="center">라인타입</th>
|
||||
<td colspan="2">
|
||||
<select name="" id="" v-model="lineType">
|
||||
<option value="ID">일반</option>
|
||||
<option value="이름">실시간</option>
|
||||
<option value="관리자ID">배치</option>
|
||||
<option value="NORMAL">일반</option>
|
||||
<option value="BATCH">배치</option>
|
||||
<option value="REAL">실시간</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -66,12 +66,16 @@
|
||||
<th>메모</th>
|
||||
<td colspan="5">
|
||||
<div class="input-memo">
|
||||
<textarea class="memo_text" cols="160" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
<textarea class="memo_text" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
<!--
|
||||
<textarea class="memo_text" cols="160" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다" v-model="memo"></textarea>
|
||||
-->
|
||||
<!--
|
||||
|
||||
textarea 구글 검색하셔서 태그 옵션 더 확인해보면 좋아요
|
||||
<textarea name="" id="" cols="30" rows="10" placeholder="메모 입력란입니다. 작성글은 저장 버튼으로 저장되고 마지막 저장 내용은 남아 있습니다"></textarea>
|
||||
-->
|
||||
<button type="button" class="button grey btn-a">전체 메모보기</button>
|
||||
<button type="button" class="button grey btn-a" @click="memoTotalPopOpen();">전체 메모보기</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -86,9 +90,9 @@
|
||||
<p>( 최대 100개까지 등록 가능 )</p>
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add">사용자 ID 생성</button>
|
||||
<button type="button" class="button blue add" @click="memberInsertPopOpen();">사용자 ID 생성</button>
|
||||
<button type="button" class="button blue add" @click="excelPopOpen();">사용자 ID 대량생성</button>
|
||||
<button type="button" class="button white del">삭제</button>
|
||||
<button type="button" class="button white del" @click="memberDelete">삭제</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -105,7 +109,7 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="admin_check1"><label for="admin_check1"></label></th>
|
||||
<th><input type="checkbox" id="admin_check1" v-model="selectAll"><label for="admin_check1"></label></th>
|
||||
<th>NO</th>
|
||||
<th>ID</th>
|
||||
<th>이름</th>
|
||||
@@ -116,13 +120,16 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(option, i) in list" v-bind:key="i">
|
||||
<td><input type="checkbox" checked="" id="admin_check2"><label for="admin_check2"></label></td>
|
||||
<td><input type="checkbox" :id="'chk'+option.userId" v-model="selected" :value="option.userId"><label :for="'chk'+option.userId"></label></td>
|
||||
<td>{{ option.no }}</td>
|
||||
<td>{{ option.userId }}</td>
|
||||
<td>{{ option.userNm }}</td>
|
||||
<td>{{ option.mdn }}</td>
|
||||
<td><input type="checkbox" id="user_id_status01" name="user_id_status"><label class="toggle_switch" for="user_id_status01"></label></td>
|
||||
<td><button type="button" class="button white btn-a">수정</button></td>
|
||||
<td>
|
||||
<input type="checkbox" id="user_id_status01" name="user_id_status" v-model="option.userStat" true-value='정상' false-value='사용중지' disabled/>
|
||||
<label class="toggle_switch" for="user_id_status01"></label>
|
||||
</td>
|
||||
<td><button type="button" class="button white btn-a" @click="memberUpdatePopOpen(option.userId);">수정</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -130,11 +137,14 @@
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" type="button" @click="toComplete();">취소</button>
|
||||
<button class="btn-pcolor" type="button">저장</button>
|
||||
<button class="btn-pcolor" type="button" @click="updateAdminInfoTotal();">저장</button>
|
||||
</div>
|
||||
|
||||
|
||||
<member-bulk-reg-pop ref="memberBulkRegPop"> </member-bulk-reg-pop>
|
||||
<member-reg-pop ref="memberRegPop"> </member-reg-pop>
|
||||
<member-modify-pop ref="memberModifyPop"> </member-modify-pop>
|
||||
<memo-total-pop ref="memoTatalListPop"> </memo-total-pop>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,9 +154,17 @@
|
||||
<script>
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import MemberBulkRegPop from '../components/MemberBulkRegPop';
|
||||
import MemberRegPop from '../components/MemberRegPop';
|
||||
import MemberModifyPop from '../components/MemberModifyPop';
|
||||
import MemoTotalPop from '../components/MemoTotalPop';
|
||||
|
||||
export default {
|
||||
name: 'memberAdminDetail',
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
row:{},
|
||||
@@ -166,6 +184,8 @@ export default {
|
||||
memo: '',
|
||||
mdn : '',
|
||||
email: '',
|
||||
userTotalCnt:0,
|
||||
selected: [],
|
||||
|
||||
}
|
||||
},
|
||||
@@ -177,6 +197,9 @@ export default {
|
||||
},
|
||||
components: {
|
||||
MemberBulkRegPop,
|
||||
MemberRegPop,
|
||||
MemberModifyPop,
|
||||
MemoTotalPop,
|
||||
},
|
||||
created(){
|
||||
this.memberDetail(this.$route.params.serviceId);
|
||||
@@ -184,11 +207,37 @@ export default {
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''}
|
||||
});
|
||||
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
|
||||
},
|
||||
},
|
||||
computed:{
|
||||
selectAll: {
|
||||
get() {
|
||||
return this.list ? (this.selected ? (this.selected.length === this.list.length) : false) : false;
|
||||
},
|
||||
set(value) {
|
||||
const selected = [];
|
||||
|
||||
if (value) {
|
||||
this.list.forEach((com) => {
|
||||
selected.push(com.userId);
|
||||
});
|
||||
}
|
||||
|
||||
this.selected = selected;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async memberDetail(serviceId){
|
||||
this.row.userId = serviceId;
|
||||
@@ -196,6 +245,7 @@ export default {
|
||||
const response = await custMgtApi.memberAdminDetail(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.formReset();
|
||||
this.userNm = result.data.userNm;
|
||||
this.userId = result.data.userId;
|
||||
this.regDt = result.data.regDt;
|
||||
@@ -210,6 +260,38 @@ export default {
|
||||
this.mdn = result.data.mdn;
|
||||
this.email = result.data.email;
|
||||
this.list = result.data.list;
|
||||
this.userTotalCnt = result.data.list.length;
|
||||
console.log('userTotalCnt:'+result.data.list.length);
|
||||
this.totalItems = result.data.paging.totalCnt;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
|
||||
},
|
||||
async updateAdminInfoTotal(){
|
||||
|
||||
this.row.userId = this.adminId;
|
||||
this.row.sendingLimit = this.sendingLimit;
|
||||
this.row.lineType = this.lineType;
|
||||
this.row.userStat = this.userStat;
|
||||
this.row.memo = this.memo;
|
||||
|
||||
console.log(this.row);
|
||||
|
||||
try {
|
||||
const response = await custMgtApi.updateAdminInfoTotal(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
alert("저장 완료하였습니다.");
|
||||
|
||||
}else if(result != null && result.retCode == "4019"){
|
||||
alert("발송한도금액이 정액한도금액보다 작습니다.");
|
||||
|
||||
}else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
@@ -223,8 +305,52 @@ export default {
|
||||
},
|
||||
excelPopOpen() {
|
||||
console.log(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId);
|
||||
this.$refs.memberBulkRegPop.excelPopOpen(this.adminId, this.totalItems);
|
||||
},
|
||||
memberUpdatePopOpen(target) {
|
||||
this.row.userId = target;
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memberModifyPop.memberUpdateModalOpen(this.row);
|
||||
},
|
||||
memberInsertPopOpen() {
|
||||
this.row.adminId = this.adminId;
|
||||
this.row.userTotalCnt = this.userTotalCnt;
|
||||
this.$refs.memberRegPop.memberInsertModalOpen(this.row);
|
||||
},
|
||||
memoTotalPopOpen(){
|
||||
this.row.adminId = this.adminId;
|
||||
this.$refs.memoTatalListPop.memoTotalModalOpen(this.row);
|
||||
},
|
||||
async memberDelete(){
|
||||
// console.log(this.selected)
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
this.row.list = this.selected;
|
||||
console.log(this.row);
|
||||
try {
|
||||
const response = await custMgtApi.deleteUser(this.row);
|
||||
const result = response.data;
|
||||
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
//alert("저장 완료하였습니다.");
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
setAuthData() {
|
||||
// 권한 옵션.
|
||||
api.commAuth().then(response => {
|
||||
this.authType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user