123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <style>
- .addborder{border:1px solid #ccc}
- .addheight{height:30px;border-radius:2px;}
- .addheight:focus{border-color: #66afe9;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);outline: 0 none;}
- .ace{position:relative;top:0px !important;left:0px !important;}
- label{font-weight:100 !important;}
- </style>
- <link rel="stylesheet" href="/css/assist/successPage.css">
- <div class="hgc_layout">
- <div class="hgc_content">
- <div class="module backModule">
- <h2>
- <span>人员信息</span>
- <a href="javascript:history.back(-1);" class="backIcon"><img src="/images/assist/icon_hgc_backPrev.svg" /> 返回</a>
- </h2>
- </div>
- </div>
- </div>
- <div class="main-content-inner">
- <div class="page-content" style="margin-top:15px;">
- <div class="row" style="margin:0px">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <form class="form-horizontal" action="<?php echo $this->createUrl('assistHome/edit')?>" method="post" id="userInfoSubmit">
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">人员姓名<span class="errorMessage">*</span>:</label>
- <div class="col-xs-12 col-sm-9">
- <input type="text" name="real_name" id="admin-real_name" class="col-xs-10 col-sm-3 addborder addheight" value="<?php echo $user['real_name']?>" placeholder="请填写人员姓名">
- <span class="real-name-tips"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">登录账号:</label>
- <div class="col-sm-9" style="line-height:32px">
- <input type="text" name="user_name" id="admin-user_name" class="col-xs-10 col-sm-3 addborder addheight" placeholder="请填写11位有效手机号" value="<?php echo $user['user_name']?>">
- <span class="user-name-tips"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">登录密码:</label>
- <div class="col-sm-9">
- <?php if($user['password']=='da53c62a8c460e2b3393781663760521'):?>
- <input type="text" name="password" class="col-xs-10 col-sm-3 addborder addheight" value="123456">
- <?php else:?>
- <input type="text" name="password" class="col-xs-10 col-sm-3 addborder addheight" value="">
- <?php endif;?>
- <span class="password-tips"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">确认密码:</label>
- <div class="col-sm-9">
- <?php if($user['password']=='da53c62a8c460e2b3393781663760521'):?>
- <input type="text" name="re_password" class="col-xs-10 col-sm-3 addborder addheight" value="123456">
- <?php else:?>
- <input type="text" name="re_password" class="col-xs-10 col-sm-3 addborder addheight" value="">
- <?php endif;?>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">用户状态:</label>
- <div class="col-sm-9 mt6">
- <span class="inline blue">
- <input type="radio" name="status" value="1" <?php if($user['status']==1) echo 'checked'; ?> >
- <span class="lbl middle"> 有效</span>
- </span>
-
- <span class="inline blue">
- <input type="radio" name="status" value="0" <?php if($user['status']==0) echo 'checked'; ?>>
- <span class="lbl middle"> 冻结</span>
- </span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">性别:</label>
- <div class="col-sm-9 mt6">
- <span class="inline blue">
- <input type="radio" name="sex" value="1" <?php if($user['sex']==1) echo 'checked'; ?>>
- <span class="lbl middle"> 男</span>
- </span>
-
- <span class="inline blue">
- <input type="radio" name="sex" value="0" <?php if($user['sex']==0) echo 'checked'; ?>>
- <span class="lbl middle"> 女</span>
- </span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-xs-12 col-sm-3 no-padding-right">用户权限:</label>
- <div class="col-sm-9 mt6">
- <span class="inline blue">
- <input type="checkbox" name="cutting_limit" value="1" <?php if($user['cutting_limit']==1) echo 'checked'; ?> >
- <span class="lbl middle"> 素材切割</span>
- </span>
-
- <span class="inline blue">
- <input type="checkbox" name="scan_limit" value="1" <?php if($user['scan_limit']==1) echo 'checked'; ?>>
- <span class="lbl middle"> 扫描处理</span>
- </span>
- </div>
- </div>
- <div class="clearfix form-actions">
- <div class="col-md-offset-3 col-md-9">
- <button class="btn btn-success btn-sm" type="submit" id="schoolSubmit">
- <i class="ace-icon fa fa-check bigger-110"></i>
- 提交
- </button>
- <input type="hidden" name="lid" value="<?php echo $user['user_id'] ?>">
- </div>
- </div>
- </form>
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(function() {
- $('#schoolSubmit').click(function(){
- var real_name=$('#admin-real_name').val(),
- user_name=$('#admin-user_name').val(),
- password=$('input[name=password]').val(),
- re_password=$('input[name=re_password]').val();
- if(real_name==''){
- $('.real-name-tips').html('请输入人员姓名 ').show();
- return false;
- }
- if(getByteLen(real_name)>10){
- $('.real-name-tips').html('人员姓名长度不超过10位 ').show();
- return false;
- }
- if(user_name==''){
- $('.user-name-tips').html('请输入11位手机号 ').show();
- return false;
- }
- if(!isPhoneNo(user_name)){
- $('.user-name-tips').html('手机号格式不正确 ').show();
- return false;
- }
- if(password!='' || re_password!=''){
- if(password!=re_password){
- $('.password-tips').html('两次输入密码不一致').show();
- return false;
- }
- }
- });
- function getByteLen(val) {
- var len = 0;
- for (var i = 0; i < val.length; i++) {
- var a = val.charAt(i);
- if (a.match(/[^\x00-\xff]/ig) != null)
- {
- len += 1;
- }
- else
- {
- len += 1;
- }
- }
- return len;
- }
- function isPhoneNo(phone) {
- var pattern = /^1[345789]\d{9}$/;
- return pattern.test(phone);
- }
- })
- </script>
|