<!--{include file="<!--{$salepath}-->public/header.tpl"}-->
	<body>
		<form class="layui-form column-content-detail">
					<div class="layui-tab">
						
						<div class="layui-tab-content">
							<div class="layui-tab-item layui-show">
                            	<div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label"><span style="color: red;">*</span>登录帐号：</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="adminname" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" >4-16个字符，只能由中文、字母、数字和下横线组成
                                        </div>
                                    </div>
								</div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label"><span style="color: red;">*</span>登录密码：</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="password" required lay-verify="required" placeholder="4-16个字符" autocomplete="off" class="layui-input" >
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label"><span style="color: red;">*</span>确认密码：</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="confirmpassword" required lay-verify="required" placeholder="确认密码" autocomplete="off" class="layui-input" >
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label"><span style="color: red;">*</span>帐号设置：</label>
                                        <div class="layui-input-inline">
                                            <input type="radio" title="正常" name="flag" value="1" checked />
                                            <input type="radio" title="锁定" name="flag" value="0" />
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
            							<label class="layui-form-label">分配角色：</label>
            							<div class="layui-input-inline">
                                            <select name="groupid"  lay-verify="required">
                                                <option value="0">超级管理员</option>
                                                <!--{foreach $data as $vo}-->
                                                <option value="<!--{$vo.groupid}-->"><!--{$vo.groupname}--></option>
                                                <!--{/foreach}-->
                                            </select>
            							</div>
                                    </div>
								</div>  
                                <input type="hidden" name="opmode" value="add">
                                                                                    
                                <div class="layui-form-item">
									<label class="layui-form-label">备注：</label>
									<div class="layui-input-block">
										<textarea placeholder="请输入备注" class="layui-textarea" name="memo"></textarea>
									</div>
								</div>                                  
							</div>
						</div>
					</div>
					<div class="layui-form-item" style="padding-left: 10px;">
						<div class="layui-input-block">
							<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
	
		
		<script src="<!--{$salepath}-->static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="<!--{$salepath}-->static/js/common.js" type="text/javascript" charset="utf-8"></script>
                <script src="<!--{$salepath}-->static/js/jquery-3.2.1.js" type="text/javascript" charset="utf-8"></script>

                 <script type="text/javascript">
          			layui.use(['form', 'layedit', 'laydate'], function() {
                    var form = layui.form(),
					layer = layui.layer;
                    form.on('submit(formDemo)', function(data) {   
                                $.ajax({
                                    type: 'POST',
                                    url:"sale.php?c=Admin&a=saveadd",
                                    async:true,
                                    data:data.field,
                                    dataType : "json",
                                    success:function(data){
                                        layer.msg(data.msg);
                                        if(data.code=='1'){                                                           
                                            setTimeout(function(){
                                                parent.location.reload(true);
                                                layer.closeAll();
                                              //  document.frames("iframe7").location.reload(true); 
                                              //  parent.location.reload(true);
                                               // window.frames["iframe7"].location.reload();
                                              //     layer.closeAll();
                                            }, 1500);
                                        }
                                        return false;
                                    },
                                    error:function(e){
                                        return false;
                                    }
                                });

                            return false;
                    });
                                     
			});
			
		</script>
        <script>
                //执行一个laydate实例
                laydate.render({
                elem: '#test1' //指定元素
                });
        </script>
	</body>
</html>
