어드민 고객 정보 수정 (화면 구성 변경 및 사용자 라인 타입 수정)

This commit is contained in:
kubo8
2022-11-08 16:20:26 +09:00
parent 22408a2178
commit a131c45400
11 changed files with 207 additions and 81 deletions

View File

@@ -42,6 +42,16 @@
<td><input type="email" v-model.trim="email" ref="_email" @keypress="onlyEmail" @input="onlyEmail"
maxlength="100"></td>
</tr>
<tr>
<th>라인타입</th>
<td>
<select name="" id="" v-model="lineType">
<option value="NORMAL">일반</option>
<option value="BATCH">배치</option>
<option value="REAL">실시간</option>
</select>
</td>
</tr>
<tr>
<th class="center">상태</th>
<td>
@@ -106,6 +116,7 @@ export default {
userPwd1: "",
userPwd2: "",
code: "",
lineType:"",
userStat: "",
}
},
@@ -122,6 +133,7 @@ export default {
this.userNm = result.data.userNm;
this.email = result.data.email;
this.mdn = result.data.mdn;
this.lineType = result.data.lineType;
this.userStat = result.data.userStat;
} else {
this.row.title = '청약고객관리';
@@ -153,6 +165,7 @@ export default {
this.row.userNm = this.userNm;
this.row.userEmail = this.email;
this.row.mdn = this.mdn;
this.row.lineType = this.lineType;
this.row.userStat = this.userStat;
try {
const response = await custMgtApi.updateUser(this.row);

View File

@@ -21,24 +21,28 @@
<col style="width: auto" />
</colgroup>
<tbody>
<tr>
<tr class="tr_input w30">
<th>이름</th>
<td colspan="2">{{ userNm }}</td>
</tr>
<tr>
<th>등록일</th>
<td colspan="2">{{ regDt }}</td>
<td colspan="2"><input type="text" v-model="userNm" /></td>
<th>구분</th>
<td colspan="2">{{ userType }}</td>
<td colspan="2">&nbsp;&nbsp;&nbsp;{{ userType }}</td>
</tr>
<tr>
<tr class="tr_input w30">
<th>등록일</th>
<td colspan="2">&nbsp;&nbsp;&nbsp;{{ regDt }}</td>
<th>휴대폰번호</th>
<td colspan="2">
<input type="text" v-model.trim="mdn" @keypress="onlyNum" @input="onlyNum" maxlength="11" />
</td>
</tr>
<tr class="tr_input w75">
<th>ID</th>
<td colspan="2">
{{ userId }}
&nbsp;&nbsp;&nbsp;{{ userId }}
<button type="button" class="button grey btn-a" @click="homeLogin">로그인</button>
</td>
<th>관리자명</th>
<td colspan="2">{{ adminId }} / {{ adminNm }}</td>
<th>이메일</th>
<td colspan="2"><input type="text" v-model="email" /></td>
</tr>
<tr class="tr_input w30">
<th>발송한도 설정</th>
@@ -46,14 +50,7 @@
<input type="text" v-model="sendingLimit" ref="_sendingLimit" disabled />
</td>
<td colspan="2" v-if="sendingLimit != '0'">
<input
type="text"
v-model.trim="sendingLimit"
ref="_sendingLimit"
@keypress="onlyNum"
@input="onlyNum"
maxlength="20"
/>
<input type="text" v-model.trim="sendingLimit" ref="_sendingLimit" @keypress="onlyNum" @input="onlyNum" maxlength="20" />
</td>
<th>라인타입</th>
<td colspan="2">
@@ -65,14 +62,14 @@
</td>
</tr>
<tr class="w30">
<th>ID 잠금</th>
<th>상태</th>
<td colspan="2">
<input type="radio" name="userStat" value="01" id="right_radio1" v-model="userStat" />
<label for="right_radio1">사용</label>
<input type="radio" name="userStat" value="02" id="right_radio2" v-model="userStat" />
<label for="right_radio2">미사용</label>
<label for="right_radio2">정지</label>
</td>
<th class="center">마지막 접속일</th>
<th>최종 접속일</th>
<td colspan="2">{{ lastLoginDt }}</td>
</tr>
<tr>
@@ -336,20 +333,87 @@ export default {
this.$refs.commmonModal.alertModalOpen(this.row);
}
},
fnPhoneDash(e) {
const pattern_notNumber = /[^-0-9]/g; // 숫자가 아닌것 체크
// 숫자 외 입력시
if (pattern_notNumber.test(e.target.value)) {
alert("휴대폰번호는 숫자만 입력 가능 합니다.");
this.userInfo.hpNo = e.target.value.replace(/[^0-9]/g, "");
}
},
/** 저장 */
async updateAdminInfoTotal() {
this.row = {};
this.row.userId = this.adminId;
this.row.sendingLimit = this.sendingLimit;
this.row.lineType = this.lineType;
this.row.userStat = this.userStat;
if(this.memo != this.oldMemo){
this.row.memo = this.memo;
} else {
this.row.memo = '';
if(this.userNm == ""){
this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.mdn == ""){
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}else{
let regExp = /^01([0|1|6|7|8|9])?([0-9]{3,4})?([0-9]{4})$/;
if (!regExp.test(this.mdn)) {
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰 번호를 올바르게 입력하여 주십시오.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
if(this.email == ""){
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}else{
let regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i;
if (!regExp.test(this.email)) {
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 올바르게 입력하여 주십시오.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}
if(this.sendingLimit == ""){
this.row.title = '청약고객관리';
this.row.msg1 = '발송한도 설정을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
this.info = {};
if(this.memo != this.oldMemo){
if(this.memo == "" || this.memo == null){
this.row.title = '청약고객관리';
this.row.msg1 = '변경 내용에 대한 메모를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
this.info.memo = this.memo;
}else{
if(this.memo == "" || this.memo == null || this.memo == this.oldMemo){
this.row.title = '청약고객관리';
this.row.msg1 = '변경 내용에 대한 메모를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
this.info.memo = this.memo;
}
this.info.userId = this.adminId;
this.info.userNm = this.userNm;
this.info.hpNo = this.mdn;
this.info.email = this.email;
this.info.sendingLimit = this.sendingLimit;
this.info.lineType = this.lineType;
this.info.userStat = this.userStat;
try {
const response = await custMgtApi.updateAdminInfoTotal(this.row);
const response = await custMgtApi.updateAdminInfoTotal(this.info);
const result = response.data;
if (result != null && result.retCode == '0000') {
this.row.title = '청약고객관리';

View File

@@ -26,41 +26,49 @@
<td colspan="2">
<input type="text" v-model="userNm" ref="_userNm" />
</td>
</tr>
<tr>
<th>등록일</th>
<td colspan="2">{{ regDt }}</td>
<th class="center">관리자 ID</th>
<td colspan="2">{{ adminId }}</td>
</tr>
<tr>
<th>ID</th>
<td colspan="2">
{{ userId }}
<button type="button" class="button grey btn-a" @click="homeLogin">로그인</button>
</td>
<th class="center">구분</th>
<td colspan="2">{{ userType }}</td>
<th>구분</th>
<td colspan="2">&nbsp;&nbsp;&nbsp;{{ userType }}</td>
</tr>
<tr class="tr_input">
<th>등록일</th>
<td colspan="2">&nbsp;&nbsp;&nbsp;{{ regDt }}</td>
<th>휴대폰번호</th>
<td colspan="2">
<input type="text" v-model="mdn" ref="_phone" />
<input type="text" v-model="mdn" ref="_phone" @input="onlyNum" maxlength="11"/>
</td>
<th class="center">이메일</th>
</tr>
<tr class="tr_input">
<th>ID</th>
<td colspan="2">
&nbsp;&nbsp;&nbsp;{{ userId }}
<button type="button" class="button grey btn-a" @click="homeLogin">로그인</button>
</td>
<th>이메일</th>
<td colspan="2">
<input type="text" v-model="email" ref="_email" />
</td>
</tr>
<tr class="tr_input w30">
<th>관리자 ID</th>
<td colspan="2">&nbsp;&nbsp;&nbsp;{{ adminId }}</td>
<th>라인타입</th>
<td colspan="2">
<select name="" id="" v-model="lineType">
<option value="NORMAL">일반</option>
<option value="BATCH">배치</option>
<option value="REAL">실시간</option>
</select>
</td>
</tr>
<tr class="w30">
<th>잠금</th>
<th>상태</th>
<td colspan="2">
<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="stat" />
<label for="right_radio2">정지</label>
</td>
<th class="center">최종접속일</th>
<th>최종접속일</th>
<td colspan="2">{{ lastLoginDt }}</td>
</tr>
</tbody>
@@ -177,11 +185,12 @@ export default {
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;
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;
this.row.lineType = this.lineType;
try {
const response = await custMgtApi.updateUser(this.row);
const result = response.data;
@@ -221,16 +230,15 @@ export default {
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus();
return false;
}
const email = this.email;
if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) {
this.row.title = '청약고객관리';
this.row.msg1 = '이메일 형식이 잘못되었습니다. 확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus();
//this.$refs.validationConfirmPopModal.validationEmailOpen();
return false;
}else{
let regExp = /^[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,3}$/i;
if (!regExp.test(this.email)) {
this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 올바르게 입력하여 주십시오.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus();
return false;
}
}
if (this.isNull(this.mdn)) {
@@ -243,11 +251,9 @@ export default {
const hp = this.mdn;
if (!this.isNull(hp) && !this.isMobile(hp)) {
this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
this.row.msg1 = '휴대폰 번호를 올바르게 입력하여 주십시오.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus();
//this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
return false;
}

View File

@@ -6,7 +6,7 @@
<p class="breadcrumb">고객관리 &gt; 청약정보조회 &gt; 청약고객관리</p>
</div>
<div class="info">
<div class="title">기본정보</div>
<div class="title">고객정보</div>
</div>
<div class="table table_form">
<!-- <form autocomplete="off">-->
@@ -62,7 +62,7 @@
<!-- </form>-->
</div>
<div class="info">
<div class="title">사용정보</div>
<div class="title">청약정보</div>
</div>
<div class="table table_form">
<table>
@@ -110,7 +110,7 @@
</table>
</div>
<div class="info">
<div class="title">담당자 데이터</div>
<div class="title">담당자 정보</div>
</div>
<div class="table table_form">
<form autocomplete="off">
@@ -125,16 +125,21 @@
</colgroup>
<tbody>
<tr class="tr_input w75">
<th>서비스 ID</th>
<td colspan="2"><input type="text" disabled v-model="serviceId" /></td>
<th>이용권한</th>
<th>담당자명</th>
<td colspan="2">
<div class="input-double button-double">
<input type="text" disabled v-model="serviceId" />
<input type="text" disabled v-model="userNm" />
</div>
</td>
<th>구분</th>
<td colspan="2"><input type="text" disabled v-model="useAuth" /></td>
</tr>
<tr class="tr_input w75">
<th>담당자명</th>
<td colspan="2"><input type="text" disabled v-model="userNm" /></td>
<th>휴대폰 번호</th>
<td colspan="2"><input type="text" disabled v-model="mdn" /></td>
<th>이메일</th>
<td colspan="2"><input type="text" disabled v-model="email" /></td>
</tr>
<tr class="tr_input w75">
<th>이월누적금액</th>
@@ -211,6 +216,7 @@ export default {
useAuth: '',
userNm: '',
mdn: '',
email: '',
carryOver: '',
userCnt: '',
saveConfirm: false,
@@ -304,6 +310,7 @@ export default {
this.useAuth = result.data.useAuth;
this.userNm = result.data.userNm;
this.mdn = result.data.mdn;
this.email = result.data.email;
this.carryOver = result.data.carryOver;
this.userCnt = result.data.userCnt;
if (this.bregNo != '' && this.bregNo != null) {

View File

@@ -73,6 +73,8 @@ public interface CustMgtMapper {
String selectAdminId(String adminId);
int updateAdminInfoTotal(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
int updateMemberInfo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);
int insertMemo(UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto);

View File

@@ -918,7 +918,7 @@ public class CustMgtService {
Map<String, Object> rstAmtMap = new HashMap<String, Object>();
try {
// 1. 사용자 정보 update
custMgtMapper.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
custMgtMapper.updateMemberInfo(updateAdminInfoTotalReqDto);
// 2. 메모정보 insert
if(StringUtils.isNotEmpty(updateAdminInfoTotalReqDto.getMemo())) {

View File

@@ -29,6 +29,8 @@ public class MemberDetailRes implements Serializable {
private String mdn;
@ApiModelProperty(example = "이메일", name = "이메일", dataType = "String")
private String email;
@ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String")
private String lineType;
/** 홈페이지 로그인 url */
@ApiModelProperty(hidden = true)

View File

@@ -51,6 +51,8 @@ public class SubsDetail implements Serializable {
private String userNm;
@ApiModelProperty(example = "휴대폰번호", name = "휴대폰번호", dataType = "String")
private String mdn;
@ApiModelProperty(example = "이메일", name = "이메일", dataType = "String")
private String email;
@ApiModelProperty(example = "이월누적금액", name = "이월누적금액", dataType = "String")
private String carryOver;
@ApiModelProperty(example = "사용자ID개수", name = "사용자ID개수", dataType = "String")

View File

@@ -12,6 +12,15 @@ public class UpdateAdminInfoTotalReqDto implements Serializable {
@ApiModelProperty(example = "사용자ID", name = "사용자ID", dataType = "String")
private String userId;
@ApiModelProperty(example = "사용자명", name = "사용자명", dataType = "String")
private String userNm;
@ApiModelProperty(example = "핸드폰번호", name = "핸드폰번호", dataType = "String")
private String hpNo;
@ApiModelProperty(example = "이메일", name = "이메일", dataType = "String")
private String email;
@ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String")
private String userStat;

View File

@@ -23,5 +23,7 @@ public class UpdateUserReqDto implements Serializable {
private String userEmail;
@ApiModelProperty(example = "사용자 상태", name = "사용자 상태", dataType = "String")
private String userStat;
@ApiModelProperty(example = "라인타입", name = "라인타입", dataType = "String")
private String lineType;
}

View File

@@ -373,6 +373,7 @@
esu.USER_ID as SERVICE_ID,
esu.USER_SEQ,
esu.HP_NO as mdn,
esu.EMAIL,
(
SELECT
DTL_CD_NM
@@ -421,8 +422,7 @@
<update id="updateUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto">
/* custMgt-mapper.xml(updateUserInfo) */
UPDATE hubez_common.EZ_SVC_USER
SET
UPDATE hubez_common.EZ_SVC_USER SET
CHG_ID = #{userId}
,CHG_DT = NOW()
<if test="userNm != null and userNm != ''">
@@ -440,7 +440,11 @@
<if test="userEmail != null and userEmail != ''">
,EMAIL = #{userEmail}
</if>
WHERE USER_ID = #{userId}
<if test="lineType != null and lineType != ''">
,LINE_TP_CD = #{lineType}
</if>
WHERE
USER_ID = #{userId}
</update>
<select id="selectCarryOverList" parameterType="kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.CarryOver">
@@ -562,6 +566,7 @@
,DATE_FORMAT(esu.LAST_LOGIN_DT, '%Y-%m-%d %H:%i:%s') AS LAST_LOGIN_DT
,esu.HP_NO AS MDN
,esu.EMAIL
,LINE_TP_CD AS LINE_TYPE
FROM hubez_common.EZ_SVC_USER esu
WHERE esu.USER_ID = #{userId}
</select>
@@ -864,6 +869,20 @@
</if>
WHERE USER_ID = #{userId}
</update>
<update id="updateMemberInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
/* custMgt-mapper.xml(updateMemberInfo) */
UPDATE hubez_common.EZ_SVC_USER SET
USER_NM = #{userNm},
HP_NO = #{hpNo},
EMAIL = #{email},
USER_STTUS_CD = #{userStat},
LINE_TP_CD = #{lineType},
CHG_ID = #{userId},
CHG_DT = NOW()
WHERE
USER_ID = #{userId}
</update>
<insert id="insertMemo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto">
/* custMgt-mapper.xml(insertMemo) */