add.vm
12.3 KB
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
#set($page_title="编辑") #set($crumbs="首页:/home,编辑")
#set($url_save ="/user/save.do")
<script src="$!{webUtils.getAssetsPath('/date/WdatePicker.js')}"></script>
<div class="page-content">
<div class="page-header">
<span class="pull-right"> <a href="javascript:history.back()"
class="btn btn-white btn-default">返回</a>
</span>
<h1>
管理 <small> <i class="icon-double-angle-right"></i> 功能
</small>
</h1>
</div>
<!-- /.page-header -->
<link href="$!{webUtils.getAssetsPath("/css/i-layout.css")}" rel="stylesheet" type="text/css" />
<style type="text/css">
.width-100{width:344px !important}
</style>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<form id="userAdd" class="form-horizontal" role="form" method="post"
action="$url_save">
#if($model.id) <input type="hidden" value="$model.id" name="id">
#end
<div class="alert alert-success" role="alert">
<strong>密码规则:</strong>
<ul>
<li>大写字母,小写字母,数字,特殊字符任意3种或以上组合</li>
<li>长度8-20位</li>
</ul>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-1"> 用户名: </label>
<div class="col-xs-12 col-sm-4">
<input type="text" required="true" id="form-field-1"
placeholder="用户名" autocomplete="off" name="userName"
value="$!{model.userName}" #if($!{model.userName} !=$null)
readonly="true" #end class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-2"> 密码: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="password" id="form-field-2"
placeholder="密码" autocomplete="off" name="password"
value="$!{model.password}" class="width-100">
</div>
## <input type="button" value="填写密码" style="margin-top: 3px"
## onclick="showPopup(this, 'input[name=\'password\']');" />
</div>
## <div class="form-group">
## <label class="col-sm-3 control-label no-padding-right"
## for="form-field-2"> 确认密码: </label>
##
## <div class="col-xs-12 col-sm-4">
## <input required="true" type="password" id="form-field-7"
## placeholder="确认密码" autocomplete="off" name="passwordconfirm"
## value="$!{model.password}" class="width-100">
## </div>
## <input type="button" value="填写密码" style="margin-top: 3px"
## onclick="showPopup(this, 'input[name=\'passwordconfirm\']');" />
## </div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-7"> 0表示停用,1表示启用: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="text" id="form-field-7"
placeholder="0表示停用,1表示启用" name="status" value="$!{model.status}"
class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-8"> 1表示有效,2表示无效: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="text" id="form-field-8"
placeholder="1表示有效,2表示无效" name="yn" value="$!{model.yn}"
class="width-100">
</div>
</div> -->
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-9"> 真实姓名: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="text" id="form-field-9"
placeholder="真实姓名" autocomplete="off" name="realName"
value="$!{model.realName}" class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-10"> 用户编号: </label>
<div class="col-xs-12 col-sm-4">
<input type="text"
id="form-field-10" placeholder="用户编号" autocomplete="off"
name="serialNumber"
value="$!{model.serialNumber}"
class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-11"> 固定电话: </label>
<div class="col-xs-12 col-sm-4">
<input isPlane="true" type="text"
id="form-field-11" placeholder="固定电话" autocomplete="off"
name="fixedLineTelephone" value="$!{model.fixedLineTelephone}"
class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-12"> 手机号码: </label>
<div class="col-xs-12 col-sm-4">
<input isMobile="true" type="text"
id="form-field-12" placeholder="手机号码" autocomplete="off"
name="cellphone" value="$!{model.cellphone}" class="width-100">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-13"> 邮箱: </label>
<div class="col-xs-12 col-sm-4">
<input email="true" type="text" id="form-field-13"
placeholder="邮箱" autocomplete="off" name="email"
value="$!{model.email}" class="width-100">
</div>
</div>
## <div id="j1" class="form-group">
## <label class="col-sm-3 control-label no-padding-right"
## for="form-field-14"> 所属市场: </label>
## <div id="j3" class="col-xs-12 col-sm-4">
## <table id="jiaogedi" cellpadding="0" cellspacing="8">
## <tr>
## <td>备选市场</td>
## <td> </td>
## <td>已属市场</td>
## </tr>
## <tr>
## <td><input name="packUpAddressId"
## #if($model.packUpAddressId==$null)
## value="17"
## #else
## value="$model.packUpAddressId" #end type="hidden" />
## <input
## name="packUpAddress"
## #if($model.packUpAddress==$null)
## value="17" #else
## value="$model.packUpAddress" #end type="hidden" /> <select
## id="jiaoge1" name="jiaoge1"
## style="width: 150px; height: 220px;" multiple="multiple">
## #if($packAddress != $null) #foreach($address in $packAddress)
## <option val="$address.id">$address.pickName</option> #end #end
## </select></td>
## <td>
## <p>
## <input id="a1" type="button" class="s1" value="-->" />
## </p>
## <p>
## <input id="a2" type="button" class="s1" value="-->>" />
## </p>
## <p>
## <input id="a3" type="button" class="s1" value="<--" />
## </p>
## <p>
## <input id="a4" type="button" class="s1" value="<<--" />
## </p>
## </td>
## <td><select id="jiaoge2" autocomplete="off" name="jiaoge2"
## style="width: 150px; height: 220px;" multiple="multiple">
## #if($packAddressBelong != $null)
## #foreach($addressBeLong in $packAddressBelong)
## <option val="$addressBeLong.id">$addressBeLong.pickName</option>
## #end #end
## </select></td>
## </tr>
## </table>
## </div>
## </div>
<div id="d1" class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-14"> 用户角色: </label>
<div id="d3" class="col-xs-12 col-sm-4">
<table id="juese" cellpadding="0" cellspacing="8">
<tr>
<td>未有角色</td>
<td> </td>
<td>已有角色</td>
</tr>
<tr>
<td>
<select id="s1" name="s1" style="width:150px; height:220px;" multiple="multiple">
#foreach($role in $!{roles})
<option value="$!{role.id}">$!{role.roleName}</option>
#end
</select>
</td>
<td>
<p><input id="b1" type="button" class="s1" value="-->" /></p>
<p><input id="b2" type="button" class="s1" value="-->>" /></p>
<p><input id="b3" type="button" class="s1" value="<--" /></p>
<p><input id="b4" type="button" class="s1" value="<<--" /></p>
</td>
<td>
<input id="rolesId" name="rolesId" value="1" type="hidden"/>
<select id="s2" autocomplete="off" name="s2" style="width:150px;height:220px;" multiple="multiple">
#foreach($role in $!{rolesBelongToUser})
<option value="$!{role.id}">$!{role.roleName}</option>
#end
</select>
</td>
</tr>
</table>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-15"> 生效日期: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="text" name="validTimeBeginString" placeholder="生效日期" readonly="readonly"
class="form-control form-time width-100"
onclick="WdatePicker()"
## onclick="var d5222=$dp.$('d5222');WdatePicker({onpicked:function(){d5222.focus();},dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'d5222\')}'})"
value="$!{dateFormatUtils.format($!{model.validTimeBegin},'yyyy-MM-dd')}"
id="d5221"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right"
for="form-field-16"> 失效日期: </label>
<div class="col-xs-12 col-sm-4">
<input required="true" type="text" name="validTimeEndString" placeholder="失效日期" readonly="readonly"
class="form-control form-time width-100"
onclick="WdatePicker()"
## onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'d5221\')}'})"
value="$!{dateFormatUtils.format($!{model.validTimeEnd},'yyyy-MM-dd')}"
id="d5222"/>
</div>
</div>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<button class="btn btn-info" type="submit">
<i class="icon-ok bigger-110"></i> 提交
</button>
<a class="btn btn-info"
href="javascript:history.back()"> <i
class="icon-undo bigger-110"></i> 返回
</a>
</div>
</div>
</form>
</div>
</div>
</div>
<script type='text/javascript'>
// function showPopup(obj, inputStr){
// var innerHtmlString =
// '<div class="inner" style="text-align:center;"><div class="inner-pad">'
// +'<input type="password" id="passwordValue" style="margin-top:10px;width:200px;"/>'
// +'</div></div>';
// var title = null;
// if(jQuery("input[name='id']") && jQuery("input[name='id']").length > 0){
// //Update
// title = '修改密码';
// }else{
// //Insert
// title = '创建密码';
// }
// parent.Popup.start({
// title : title,
// content : innerHtmlString,
// width:300,
// height:150,
// saveFun : function(data){
// var parentDocumentObj = jQuery(parent.document);
// if(parentDocumentObj.find("#passwordValue").val() == '' || parentDocumentObj.find("#passwordValue").val() == ''){
// alert("请填写密码");
// return false;
// }
// $(inputStr).val(parent.hex_md5(parentDocumentObj.find("#passwordValue").val()).substring(6,24));
// $(inputStr).focus().blur();
// },
// hidefooterBar : 'false',
// btns : ['确定']
// });
// }
</script>
<script type="text/javascript" src="/static/module/ztree/js/lab2.js"></script>
<script src="$!{webUtils.getAssetsPath('/js/jquery.validate.min.js')}"></script>
<script src="$!{webUtils.getAssetsPath('/js/jquery.validate.extend.js')}"></script>