|
|
@ -206,7 +206,7 @@
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="row justify-content-end">
|
|
|
|
<div class="row justify-content-end">
|
|
|
|
<div class="col-sm-3">
|
|
|
|
<div class="col-sm-3">
|
|
|
|
<button type="button" onclick="saveUser();" class="btn btn-primary">저장</button>
|
|
|
|
<button type="button" onclick="userCtrl.saveUser();" class="btn btn-primary">저장</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -237,10 +237,10 @@
|
|
|
|
<script src="/resources/js/base/fimsFormFields.js"></script>
|
|
|
|
<script src="/resources/js/base/fimsFormFields.js"></script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
var userFields = new FimsFormFields("#user-form");
|
|
|
|
var userFields = new FimsFormFields("#user-form");
|
|
|
|
var userControl = newUserControl();
|
|
|
|
var userCtrl = newUserControl();
|
|
|
|
|
|
|
|
|
|
|
|
userControl.setInfo = obj => {
|
|
|
|
userCtrl.setInfo = obj => {
|
|
|
|
userFields.set(userControl,obj);
|
|
|
|
userFields.set(userCtrl,obj);
|
|
|
|
|
|
|
|
|
|
|
|
let create = isEmpty(obj.USER_ACNT);
|
|
|
|
let create = isEmpty(obj.USER_ACNT);
|
|
|
|
if(!create){
|
|
|
|
if(!create){
|
|
|
@ -262,21 +262,21 @@ userControl.setInfo = obj => {
|
|
|
|
let input = $(this),
|
|
|
|
let input = $(this),
|
|
|
|
name = input.attr("data-map"),
|
|
|
|
name = input.attr("data-map"),
|
|
|
|
val = input.val();
|
|
|
|
val = input.val();
|
|
|
|
userControl.setValue(name, val);
|
|
|
|
userCtrl.setValue(name, val);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.onEnterPress(saveUser);
|
|
|
|
.onEnterPress(userCtrl.saveUser);
|
|
|
|
|
|
|
|
|
|
|
|
document.querySelector("#user-form input[name='" + (create ? "account" : "name") + "']").focus();
|
|
|
|
document.querySelector("#user-form input[name='" + (create ? "account" : "name") + "']").focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
userControl.onModify = (changed) => {
|
|
|
|
userCtrl.onModify = (changed) => {
|
|
|
|
if (["USER_NM", "EML_ADRS", "MBL_TELNO"].filter(e => changed.includes(e)).length < 1)
|
|
|
|
if (["USER_NM", "EML_ADRS", "MBL_TELNO"].filter(e => changed.includes(e)).length < 1)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
userControl.dataset.setState();
|
|
|
|
userCtrl.dataset.setState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function saveUser() {
|
|
|
|
userCtrl.saveUser = () => {
|
|
|
|
if (!$("#user-form").find("input,select").validInputs()) return;
|
|
|
|
if (!$("#user-form").find("input,select").validInputs()) return;
|
|
|
|
|
|
|
|
|
|
|
|
let match = Array.from(document.querySelectorAll("#user-form input[type='password']"))
|
|
|
|
let match = Array.from(document.querySelectorAll("#user-form input[type='password']"))
|
|
|
@ -295,12 +295,12 @@ function saveUser() {
|
|
|
|
dialog.alert({
|
|
|
|
dialog.alert({
|
|
|
|
content:"현재 사용자 정보를 저장하시겠습니까?",
|
|
|
|
content:"현재 사용자 정보를 저장하시겠습니까?",
|
|
|
|
onOK:() => {
|
|
|
|
onOK:() => {
|
|
|
|
save(userFields.get());
|
|
|
|
userCtrl.save(userFields.get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function save(info){
|
|
|
|
userCtrl.save = (info) => {
|
|
|
|
var create = isEmpty(info.id)
|
|
|
|
var create = isEmpty(info.id)
|
|
|
|
|
|
|
|
|
|
|
|
if(create && "${cntnSeCd}" == "02"){
|
|
|
|
if(create && "${cntnSeCd}" == "02"){
|
|
|
@ -366,7 +366,7 @@ if(userInfo.USER_ID == null && "${cntnSeCd}" == "02"){
|
|
|
|
userInfo.USER_SE_CD = "21";
|
|
|
|
userInfo.USER_SE_CD = "21";
|
|
|
|
userInfo.CNTN_SE_CD = "02";
|
|
|
|
userInfo.CNTN_SE_CD = "02";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userControl.setInfo(userInfo);
|
|
|
|
userCtrl.setInfo(userInfo);
|
|
|
|
|
|
|
|
|
|
|
|
wctx.csrf = window.opener.wctx.csrf;
|
|
|
|
wctx.csrf = window.opener.wctx.csrf;
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|