123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <!--<div class="ibox-title">-->
- <!--<h5>{$meta_title}</h5>-->
- <!--<div class="ibox-tools">-->
- <!--<a class="toback" href="{:url('index')}">-->
- <!--返回上一页-->
- <!--</a>-->
- <!--</div>-->
- <!--</div>-->
- <input type="hidden" id="is_first" value="{$info['id']|default='0'}">
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['user_id']|default='0'}">
- <div class="tabs-container">
- <ul class="nav nav-tabs">
- <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 基本信息</a></li>
- <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">证件照信息</a></li>
- <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false">详细介绍</a></li>
- </ul>
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- <div class="panel-body" style="min-height: 450px">
- <div class="form-group">
- <label class="col-sm-2 control-label">账号<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="account" value="{$info.account|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">姓名<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="real_name" value="{$info.real_name|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">密码</label>
- <div class="col-sm-6">
- <input type="password" class="form-control" name="password" placeholder="新增时必填,不修改不用填" value="">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">手机号</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="mobile" value="{$info.mobile|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">所在科室/部门<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="depId" class="form-control">
- <option value="0">选择科室/部门</option>
- {volist name="deps" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">角色<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="rolesId" class="form-control">
- <option value="0">选择角色</option>
- {volist name="roles" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">头像<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- {:widget('common/upimg',['name'=>'head_image','multi'=>0,'val'=>isset($info)?$info.head_image:''])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">身份证号<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="card" value="{$info.card|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">开始工作日期</label>
- <div class="col-sm-6">
- <input type="text" readonly class="form-control" id="date" name="work" value="{$info.work|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">是否推荐</label>
- <div class="col-sm-6">
- <label class="cr-inline">
- <input type="radio" value="0" name="recommend">未推荐
- </label>
- <label class="cr-inline">
- <input type="radio" value="1" name="recommend">推荐
- </label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">是否禁用</label>
- <div class="col-sm-6">
- <label class="cr-inline">
- <input type="radio" value="0" name="enable">禁用
- </label>
- <label class="cr-inline">
- <input type="radio" value="1" name="enable">否
- </label>
- </div>
- </div>
- </div>
- </div>
- <div id="tab-4" class="tab-pane">
- <div class="panel-body" style="min-height: 450px">
- <div class="form-group">
- <label class="col-sm-2 control-label">身份证正反面照片</label>
- <div class="col-sm-6">
- {:widget('common/upimg',['name'=>'card_imgs','max'=>2,'multi'=>1,'val'=>isset($info)?$info.card_imgs:''])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">证件照片</label>
- <div class="col-sm-6">
- {:widget('common/upimg',['name'=>'id_imgs','multi'=>1,'max'=>20,'val'=>isset($info)?$info.id_imgs:''])}
- </div>
- </div>
- </div>
- </div>
- <div id="tab-5" class="tab-pane">
- <div class="panel-body" style="min-height: 450px">
- <div class="form-group">
- <!-- <label class="col-sm-2 control-label">详细介绍<span class="text-danger">*</span></label>-->
- <div class="col-sm-8">
- {:widget('common/ueditor',['name'=>'content','height'=>300,'val'=>isset($info)?$info['content']:''])}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
- <button class="btn cancel-btn btn-default" type="button">取 消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- $(document).ready(function(){
- formSetValue("gender", {$info.gender|default=1});
- formSetValue("recommend", {$info.recommend|default=0});
- formSetValue("enable", {$info.enable|default=1});
- formSetValue("depId", {$info.dep_id|default=0});
- formSetValue("rolesId", {$info.roles_id|default=0});
- });
- laydate.render({
- elem: '#date',
- type:'date',
- trigger: 'click' ,
- theme: '#337ab7',
- });
- function checkAll() {
- var checkbox=document.getElementById('allInput');//获取div
- var checked=checkbox.getElementsByTagName('input');//获取div下的input
- var allCheck=document.getElementById('all');//获取div
- var allChecked=allCheck.getElementsByTagName('input');//获取div下的input
- for(i=0;i<checked.length;i++){
- if(checked[i].className=='check'){
- checked[i].checked = allChecked[0].checked;
- }
- }
- }
- $(function () {
- var checkbox=document.getElementById('allInput');//获取div
- var checked=checkbox.getElementsByTagName('input');//获取div下的input
- $(document).on('click','.check',function () {
- var all = false;
- var count = 0;
- for(i=0;i<checked.length;i++){
- if(checked[i].className=='check'){
- if(checked[i].checked){
- all = true;
- count++;
- }
- }
- }
- var allCheck=document.getElementById('all');//获取div
- var allChecked=allCheck.getElementsByTagName('input');//获取div下的input
- if(!all){
- for(i=0;i<allChecked.length;i++){
- allChecked[i].checked = false;
- }
- }
- if(all && parseInt(count)*2===checked.length){
- for(i=0;i<allChecked.length;i++){
- allChecked[i].checked = true;
- }
- }
- if(all && parseInt(count)*2!==checked.length){
- for(i=0;i<allChecked.length;i++){
- allChecked[i].checked = false;
- }
- }
- })
- })
- </script>
- {/block}
|