사용자>회원정보수정
생년월일이 null인 경우 주민등록번호 7자리 정보로 생년월일 수정 (IPIN 또는 핸드폰 인증회원이 아닌 경우 - 관리자등록)
This commit is contained in:
parent
da22394d87
commit
5cefc62514
|
|
@ -118,6 +118,7 @@ namespace NP.Base.Controllers
|
|||
telno.Length == 9 ? string.Format("{0}-{1}-{2}", telno.Substring(0, 2), telno.Substring(2, 3), telno.Substring(5, 4)) :
|
||||
telno.Length == 8 ? string.Format("{0}-{1}", telno.Substring(0, 4), telno.Substring(4, 4)) :
|
||||
telno.Length == 7 ? string.Format("{0}-{1}", telno.Substring(0, 3), telno.Substring(3, 4)) : u.telno;
|
||||
u.birthday = u.birthday != null && u.birthday.Length == 8 ? (u.birthday ?? "").Substring(0, 4) + "-" + (u.birthday ?? "").Substring(4, 2) + "-" + (u.birthday ?? "").Substring(6, 2) : null;
|
||||
var check = Dao.Get<int>("users.checkuser", new Hashtable() { { "usernonot", SUserInfo.UserNo }, { "email", u.email }, { "mobile", u.mobile } }).First();
|
||||
if (check < 9)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@
|
|||
<Content Include="js\exam.js" />
|
||||
<Content Include="js\jquery.mmenu.js" />
|
||||
<Content Include="js\kakao.js" />
|
||||
<Content Include="js\moment.js" />
|
||||
<Content Include="js\naveridlogin_js_sdk_2.0.0.js" />
|
||||
<Content Include="js\study.js" />
|
||||
<Content Include="js\jquery-1.8.3.min.js" />
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
}
|
||||
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
|
||||
<script src="~/js/site.js"></script>
|
||||
<script src="~/js/moment.js"></script>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
|
|
@ -41,14 +42,18 @@
|
|||
<text>
|
||||
if ("@(RSLT_NAME)" == $(opener.document).find("#mform").find("#username").val()) {
|
||||
$(opener.document).find("#mform").find("#authplatform").val("@(AuthPlatform.IPIN.GetHashCode())");
|
||||
$(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)");
|
||||
$(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)");
|
||||
$(opener.document).find("#mform").find("#di").val("@(DI)");
|
||||
$(opener.document).find("#mform").find("#ci").val("@(CI)");
|
||||
$(opener.document).find("#mform").find("#vssn").val("@(VSSN)");
|
||||
$(opener.document).find("#mform").find("#authPlatform_IPIN").show();
|
||||
$(opener.document).find("#mform").find("#authPlatform_IPIN").css("padding-bottom","0px");
|
||||
$(opener.document).find("#mform").find("#authPlatform_IPIN_Name").text("I-PIN 인증");
|
||||
$(opener.document).find("#mform").find("#authPlatform_Mobile").hide();
|
||||
$(opener.document).find("#mform").find("#authPlatform_Mobile").hide();
|
||||
try {
|
||||
$(opener.document).find("#mform").find("#txtbirthday").text(moment("@(RSLT_BIRTHDAY)").format('YYYY.MM.DD'));
|
||||
} catch (error) {
|
||||
}
|
||||
alert("인증완료");
|
||||
} else {
|
||||
alert("입력한 정보와 일치하지 않습니다.\n 재인증해주세요.");
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
var RETURN_MSG = (ViewBag.result ?? "").Split(':')[13];
|
||||
}
|
||||
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
|
||||
|
||||
<script src="~/js/moment.js"></script>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
|
|
@ -59,12 +59,16 @@
|
|||
$(opener.document).find("#mform").find("#authPlatform_IPIN").hide();
|
||||
$(opener.document).find("#mform").find("#authPlatform_Mobile").show();
|
||||
$(opener.document).find("#mform").find("#authPlatform_Mobile_Name").text("휴대폰 인증");
|
||||
$(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)");
|
||||
$(opener.document).find("#mform").find("#birthday").val("@(RSLT_BIRTHDAY)");
|
||||
$(opener.document).find("#mform").find("#di").val("@(DI)");
|
||||
$(opener.document).find("#mform").find("#ci").val("@(CI)");
|
||||
$(opener.document).find("#mform").find("#mobile").val("@(TEL_NO)".replaceAll("-", ""));
|
||||
$(opener.document).find("#mform").find("#mobile").prop("readonly", true);
|
||||
$(opener.document).find("#mform").find("#mobilestr").text("@(TEL_NO)".replaceAll("-", ""));
|
||||
try {
|
||||
$(opener.document).find("#mform").find("#txtbirthday").text(moment("@(RSLT_BIRTHDAY)").format('YYYY.MM.DD'));
|
||||
} catch (error) {
|
||||
}
|
||||
alert("인증완료");
|
||||
} else {
|
||||
alert("입력한 정보와 일치하지 않습니다.\n 재인증해주세요.");
|
||||
|
|
|
|||
|
|
@ -78,10 +78,12 @@
|
|||
<tr>
|
||||
<th>생년월일</th>
|
||||
<td>
|
||||
<p id="txtbirthday">
|
||||
@if (!string.IsNullOrEmpty(u.birthday))
|
||||
{
|
||||
<p>@(u.birthday.Replace("-", "."))</p>
|
||||
@(u.birthday.Replace("-", "."))
|
||||
}
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -222,6 +224,7 @@
|
|||
@Html.Partial("./Partial/ScriptPost")
|
||||
}
|
||||
@section scripts{
|
||||
<script src="~/js/moment.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#ccposition").on("change", function () {
|
||||
|
|
@ -253,7 +256,51 @@
|
|||
$("#btnassign").css("background-color", "#fff");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#userpno2").on("keyup", function () {
|
||||
setbirthday(val("userpno1") + val("userpno2"));
|
||||
});
|
||||
});
|
||||
function setbirthday(userpno) {
|
||||
var birthday = "";
|
||||
if (userpno.length == 13 && moment(userpno.substr(0, 6), 'YYMMDD', true).isValid() && userpno.substr(6, 1) > 0)
|
||||
{
|
||||
switch (userpno.substr(6, 1))
|
||||
{
|
||||
case "1":
|
||||
birthday = "19";
|
||||
break;
|
||||
case "2":
|
||||
birthday = "19";
|
||||
break;
|
||||
case "3":
|
||||
birthday = "20";
|
||||
break;
|
||||
case "4":
|
||||
birthday = "20";
|
||||
break;
|
||||
case "5":
|
||||
birthday = "19";
|
||||
break;
|
||||
case "6":
|
||||
birthday = "19";
|
||||
break;
|
||||
case "7":
|
||||
birthday = "20";
|
||||
break;
|
||||
case "8":
|
||||
birthday = "20";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
birthday += userpno.substr(0, 2) + "-" + userpno.substr(2, 2) + "-" + userpno.substr(4, 2);
|
||||
}
|
||||
if (val("birthday") == "" && birthday != "") {
|
||||
$("#txtbirthday").text(birthday.replace(/-/gi, "."));
|
||||
}
|
||||
}
|
||||
function setemail2() {
|
||||
setv("email2", val("email3"));
|
||||
}
|
||||
|
|
@ -262,7 +309,7 @@
|
|||
$("#asname").text(v.split(':')[1]);
|
||||
}
|
||||
function save(idx) {
|
||||
if (idx == 1) {
|
||||
if (idx == 1) {
|
||||
setv("userpass", val("userpass").replace(/ /, '').replace(/ /, ''));
|
||||
setv("userpass2", val("userpass2").replace(/ /, '').replace(/ /, ''));
|
||||
setv("username", val("username").replace(/ /, '').replace(/ /, ''));
|
||||
|
|
@ -273,6 +320,12 @@
|
|||
setv("mobile", val("mobile").replace(/ /, '').replace(/ /, ''));
|
||||
setv("mobile", formatmobile(val("mobile")));
|
||||
setv("userpno", val("userpno1") + val("userpno2"));
|
||||
if (val("birthday") == "") {
|
||||
var birthday = $("#txtbirthday").text().replace(/./gi, "-");
|
||||
if (birthday != "") {
|
||||
setv("birthday", birthday);
|
||||
}
|
||||
}
|
||||
setv("ccjobs", (($("#ccjobs1").prop("checked") ? ",12" : "") + ($("#ccjobs2").prop("checked") ? ",13" : "") + ($("#ccjobs3").prop("checked") ? ",14" : "") + ($("#ccjobs4").prop("checked") ? ",15" : "") + ($("#ccjobs5").prop("checked") ? ",16" : "") + ($("#ccjobs6").prop("checked") ? ",17" : "") + ($("#ccjobs7").prop("checked") ? ",18" : "")).substring(1));
|
||||
setv("edus", ($("#edus1").prop("checked") ? "1" : "0") + ($("#edus2").prop("checked") ? "1" : "0") + ($("#edus3").prop("checked") ? "1" : "0") + ($("#edus4").prop("checked") ? "1" : "0") + ($("#edus5").prop("checked") ? "1" : "0"));
|
||||
if (val("userpass") != "" && check("userpass", null, "비밀번호를 입력해주세요.")) { }
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue