mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:39:35 +09:00
고객관리 > 청약고갹관리/회원관리 기능 추가
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<tr class="tr_input">
|
||||
<th>이름</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="userNm">
|
||||
<input type="text" v-model="userNm" ref="_userNm">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -42,19 +42,19 @@
|
||||
<tr class="tr_input">
|
||||
<th>휴대폰번호</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="mdn">
|
||||
<input type="text" v-model="mdn" ref="_phone">
|
||||
</td>
|
||||
<th class="center">이메일</th>
|
||||
<td colspan="2">
|
||||
<input type="text" v-model="email">
|
||||
<input type="text" v-model="email" ref="_email">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="w30">
|
||||
<th>잠금</th>
|
||||
<td colspan="2">
|
||||
<input type="radio" name="userStat" value="01" id="right_radio1" v-model="userStat">
|
||||
<input type="radio" name="userStat" value="01" id="right_radio1" v-model="stat">
|
||||
<label for="right_radio1">사용</label>
|
||||
<input type="radio" name="userStat" value="02" id="right_radio2" v-model="userStat">
|
||||
<input type="radio" name="userStat" value="02" id="right_radio2" v-model="stat">
|
||||
<label for="right_radio2">정지</label>
|
||||
</td>
|
||||
<th class="center">최종접속일</th>
|
||||
@@ -67,24 +67,34 @@
|
||||
|
||||
<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="memberUpdate();">저장</button>
|
||||
</div>
|
||||
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
|
||||
import lodash from "lodash";
|
||||
|
||||
export default {
|
||||
name: 'memberDetail',
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
row:{},
|
||||
@@ -102,6 +112,7 @@ export default {
|
||||
memo: '',
|
||||
mdn : '',
|
||||
email: '',
|
||||
stat:'',
|
||||
|
||||
}
|
||||
},
|
||||
@@ -141,7 +152,7 @@ export default {
|
||||
this.adminNm = result.data.adminNm;
|
||||
this.sendingLimit = result.data.sendingLimit;
|
||||
this.lineType = result.data.lineType;
|
||||
this.userStat = result.data.userStat;
|
||||
this.stat = result.data.userStat;
|
||||
this.lastLoginDt = result.data.lastLoginDt;
|
||||
this.memo = result.data.memo;
|
||||
this.mdn = result.data.mdn;
|
||||
@@ -154,10 +165,86 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
async memberUpdate(){
|
||||
if(!this.doValidate()){
|
||||
return false;
|
||||
}
|
||||
|
||||
this.row.userId = this.userId;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.stat;
|
||||
try {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 완료하였습니다.');
|
||||
this.toComplete();
|
||||
|
||||
} else {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
},
|
||||
// 저장 후 부모창 호출.
|
||||
toComplete(){
|
||||
this.$router.push({ name: 'memberList', params: this.row });
|
||||
},
|
||||
doValidate(){
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.$refs._userNm.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.email)){
|
||||
alert('이메일을 입력해주세요.');
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
alert("이메일 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.$refs._email.focus();
|
||||
//this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.mdn)){
|
||||
alert('휴대폰번호를 입력해주세요.');
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
alert("휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.$refs._phone.focus();
|
||||
//this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
//this.mdn = '';
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
//this.email = '';
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user