add.vm 12.3 KB
 #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>&nbsp;</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="--&gt;" />
##									</p>
##									<p>
##										<input id="a2" type="button" class="s1" value="--&gt;&gt;" />
##									</p>
##									<p>
##										<input id="a3" type="button" class="s1" value="&lt;--" />
##									</p>
##									<p>
##										<input id="a4" type="button" class="s1" value="&lt;&lt;--" />
##									</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>&nbsp;</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="--&gt;" /></p>
											<p><input id="b2" type="button"  class="s1" value="--&gt;&gt;" /></p>
											<p><input id="b3" type="button"  class="s1" value="&lt;--" /></p>
											<p><input id="b4" type="button"  class="s1" value="&lt;&lt;--" /></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>

						&nbsp; &nbsp; &nbsp; <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>