cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>个人中心</title>
[#include "/business/pages/include/static.html" /]
[#include "/business/pages/include/header.html" /]
<script type="text/javascript">
$(document).ready(function() {
        
        $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
            
           document.getElementById("myform").target = window.top.openDialog("0","操作",
                         {},
                         {"width":40,"height":40,"noclose":true},
                         [{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         
            return true;
            
        }});
        
        $("#zsxm").formValidator({empty: false, onShow:"请输入真实姓名!",onFocus: "请输入真实姓名"}).inputValidator({min: 3,max:20, onError: "真实姓名至少两个汉字或3个英文字符"});
        $("#age").formValidator({empty:true,onFocus:"1-99岁之间"}).inputValidator({min: 1,max:2, onError: "年龄为1到99"})
           .regexValidator({regExp:"intege1", dataType:"enum", onError:"年龄格式不正确"});
  });
 
</script>
</head>
<body class="fullscreen">
<nav class="fs_nav">
    <div class="fsnav_con">
        <h3 >个人中心</h3>
        <a class="focus" ><span>我的资料</span></a>
        <a id="pwd"><span>修改密码</span></a>
        <a><span>第三方认证</span></a>
        <a><span>修改桌面类型</span></a>
    </div>
</nav>
<div class="tabcon">
 
<form method="post" action="saveAccount.html" enctype="multipart/form-data" id="myform" name="myform">
<input type="hidden" name="remind_type" id="remind_type">
<div class="fs_navtitle" id="fsNavtitle">
    <div class="fs_navtitle_con">
        <div class="fsnt_btn">
           <a class="fb_submit fb_save" id="btOk" onclick="javascript:save();"><span>保存</span></a> 
         <a class="mainbtn close" id="btReset" onclick="reset();"><span>取消</span></a> 
        </div>
    </div>
</div>
<div class="fs_main bind_account modify_padssword clearfix">
    <div class="ba_tips bind_third"><h3>新增人员,默认密码为<span class="yellow_txt">88888888</span>,系统会在人员第一次登录时,要求更新密码</h3></div>
    <table class="edit_layout">
        <tr><th><label class="required">登录名:</label></th><td><input class="general" type="text" value="${user.LOGINNAME}" disabled="disabled"/></td>
        <th><label class="required">真实姓名:</label></th><td><input class="general" type="text" value="${user.ZSXM}" name="zsxm" id="zsxm"/>
        <div id="zsxmTip" style="display:inline-block;"></div></td></tr>
        <tr><th><label>年龄:</label></th><td><input class="general" type="text" name="age"id="age" value="${user.AGE}" /><div id="ageTip" style="display:inline-block;"></div></td>
        <th><label>性别:</label></th><td>
        <input  type="radio" name="sex" id="sex" value="1" [#if user.XINGB=='男'||user.XINGB=='']checked[/#if]/>&nbsp;&nbsp;男&nbsp;&nbsp;&nbsp;&nbsp;
        <input  type="radio" name="sex" id="sex" value="2" [#if user.XINGB=='女']checked[/#if]/>&nbsp;&nbsp;女
        </td></tr>
        <tr><th><label>手机号:</label></th><td><input class="general" type="text" value="${user.SJHM}" name="sjhm" id="sjhm" />
        <div id="sjhmTip" style="display:inline-block;"></div></td>
        <th><label>Email:</label></th><td><input class="general" type="text" value="${user.EMAIL}" name="email" id="email" />
        <div id="emailTip" style="display:inline-block;"></div></td></tr>
        <tr><th><label>桌面头像:</label></th>
        <td>
        <input type="file" name="photopathUrl" id="photopath" accept=".jpg,.jpeg,.png"/>
        [#if user.ZHAOP??]
        <img src="${base}${user.ZHAOP}" width="80px" height="80px;"/>
         <input type="hidden" value="${user.ZHAOP}" name="photopath"/>
        [/#if]
        </td>
        <th>接收提醒方式:</th>
        <td>
         <input  type="checkbox" name="remind"  value="1" [#if user.msg=='1']checked[/#if]/>&nbsp;&nbsp;短信
         <input  type="checkbox" name="remind"  value="2" [#if user.mail=='1']checked[/#if]/>&nbsp;&nbsp;邮箱
         <input  type="checkbox" name="remind"  value="3" [#if user.wei=='1']checked[/#if]/>&nbsp;&nbsp;微信
        </td>
        </tr>
        <tr><th class="postop"><label>备注:</label></th><td colspan="3"><textarea class="general" name="note" id="note">${user.BEIZ}</textarea></td></tr>
    </table>
</div>
 </form>
 </div>
<div class="tabcon"></div>
<div class="tabcon" id="thirdConfirm"></div>
<div class="tabcon" id="changeDesk"></div>
<script type="text/javascript">
var shownum = '${RequestParameters.shownum}';
    $(function(){
        $('div.tabcon').hide();
        $('div.tabcon').eq(0).show();
        if(shownum == 1){
           $('div.tabcon').hide();
            $("div.fsnav_con a").removeClass("focus");
            $("#pwd").addClass("focus");
            $('div.tabcon').eq(shownum).show();
            $.get("${base}/business/pages/loginuser/repassword.html",{},function(data){
                $('div.tabcon').eq(1).html(data);
            });
        
        }
        $("div.fsnav_con a").click(function(){
            var num = $("div.fsnav_con a").index(this);
            $('div.tabcon').hide();
            $("div.fsnav_con a").removeClass("focus");
            $(this).addClass("focus");
            $('div.tabcon').eq(num).show();
            switch(num){
                
                case 1:
                $.get("${base}/business/pages/loginuser/repassword.html",{},function(data){
                    $('div.tabcon').eq(1).html(data);
                });
                break;
                case 2:
                queryBindMsg();
                break;
                
                case 3:
                $("#changeDesk").load("${base}/business/pages/loginuser/changeDesk.html",{});
                break;
            }
        });
        
         $('#btn').click(function(){
            $('#photopath').click();
         });
    });
    
  function save(){
    var $types = $(":checkbox");
    var remind_type = "";
    if($types.length>0) {
        $types.each(function() {
            if($(this).is(":checked")){
              remind_type += "1";
            }else{
              remind_type += "0";
            }
        })
        $("#remind_type").val(remind_type);
    }
    $("#myform").submit();
  }
  function reset(){
      document.getElementById("myform").reset();
  }
    
    function refreshDetail(){
        window.location.reload();
    }
    
    function queryBindMsg() {
        $.post("${base}/business/pages/loginuser/userBind.html",{},function(data){
                    $('div.tabcon').eq(2).html(data);
        });
    }
    
    function bindPhone(){
        window.top.openDialog("0","手机绑定",
                         {},
                         {"width":50,"height":50},
                         [{btnId:"btnSure", btnName:"绑定", btnStyle:"bluebtn"}],
                         "${base}/business/pages/loginuser/phoneBind.html");
    }
    //邮箱绑定
    function bindEmail(){
        window.top.openDialog("0","邮箱绑定",
                         {},
                         {"width":50,"height":50},
                         [{btnId:"btnSure", btnName:"绑定", btnStyle:"bluebtn"}],
                         "${base}/business/pages/loginuser/emailBind.html");
    }    
    
    //email取消绑定
    function cancelEmail(){
        window.top.confirmInfo('提示','确定取消邮箱绑定吗?', function(){
        $.post("${base}/business/pages/loginuser/cancelEmail.html",{},function(data){
            if(data=='${SysConstants.Ajax_login_Time_Out_Key}') {
                window.location.href="${base}/business/login.html";
            } else {
                if(data==1){
                    window.top.popupTips("解除绑定成功");
                    $.post("${base}/business/pages/loginuser/userBind.html",{},function(data){
                        $('#thirdConfirm').html(data);
                    });
                    
                }
            }
        });
      });
    }
    //phone取消绑定
    function cancelPhone(){
        window.top.confirmInfo('提示','确定取消电话号码绑定吗?', function(){
        $.post("${base}/business/pages/loginuser/cancelPhone.html",{},function(data){
            if(data=='${SysConstants.Ajax_login_Time_Out_Key}') {
                        window.location.href="${base}/business/login.html";
                    } else {
                if(data==1){
                    window.top.popupTips("解除绑定成功");
                    $.post("${base}/business/pages/loginuser/userBind.html",{},function(data){
                        $('#thirdConfirm').html(data);
                    });
                }
            }
        });
       });
    }
    
    function bindwei(){
      window.top.openDialog("0","微信绑定",
                         {},
                         {"width":40,"height":50},
                         [],
                         "${base}/business/pages/loginuser/weiBind.html");
    
    }
    //微信取消绑定
    function unbindWechat() {
        window.top.confirmInfo('提示','确定解除微信绑定吗?', function(){
        $.post("${base}/business/pages/loginuser/cancelWechat.html",{},function(data){
            if(data==1){
                window.top.popupTips("解除绑定成功");
                $.post("${base}/business/pages/loginuser/userBind.html",{},function(data){
                    $('#thirdConfirm').html(data);
                });
            }
        });
       });
    }
    //qq取消绑定
    function cancelQq(){
        window.top.confirmInfo('提示','确定取消QQ绑定吗?', function(){
        $.post("${base}/business/pages/loginuser/cancelQq.html",{},function(data){
            if(data=='${SysConstants.Ajax_login_Time_Out_Key}') {
                        window.location.href="${base}/business/login.html";
                    } else {
                    if(data==1){
                        window.top.popupTips("解除绑定成功");
                        $.post("${base}/business/pages/loginuser/userBind.html",{},function(data){
                            $('#thirdConfirm').html(data);
                        });
                    }
                }
        });
       });
    }
    
</script> 
 [#include "/business/pages/include/footer.html" /] 
</body>
</html>