123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <div class="row">
- <div class="col-md-12 col-sm-12 col-xs-12">
- <div class="x_panel">
- <div class="x_title">
- <h2>后台操作人员管理 </h2>
- <div class="clearfix"></div>
- </div>
- <div class="x_content">
- <div class="row">
- <div class="col-sm-6">
- </div>
- <div class="col-sm-6">
- <div id="datatable_filter" class="dataTables_filter fr">
- <label>
- <button type="button" onclick="location.href='<?php echo $this->createUrl('assistHome/add');?>'">添加人员
- </button>
- </label>
- </div>
- </div>
- </div>
- <table id="datatable" class="table table-striped table-bordered" style="margin-bottom: 0px;">
- <thead>
- <tr>
- <th>序号</th>
- <th>姓名</th>
- <th>账号</th>
- <th>性别</th>
- <th>最后编辑时间</th>
- <th>类别</th>
- <th>用户权限</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <?php $i = 1; if ($dataList):foreach ($dataList as $loop): ?>
- <tr>
- <td><?php echo $i ?></td>
- <td><?php echo $loop['real_name'] ?></td>
- <td><?php echo $loop['user_name'] ?></td>
- <td><?php
- if($loop['sex']==1){
- echo '男';
- }else{
- echo '女';
- }
- ?></td>
- <td><?php echo date('Y-m-d H:i:s',$loop['update_time']) ?></td>
- <td><?php
- if($loop['user_origin']==1){
- echo '后台专员';
- }else{
- echo '学管';
- }
- ?>
- </td>
- <td><?php
- $userLimit=array();
- if($loop['cutting_limit']==1){
- $userLimit[]= '素材切割';
- }
- if($loop['scan_limit']==1){
- $userLimit[]= '扫描处理';
- }
- echo implode(',',$userLimit);
- ?>
- </td>
- <td><?php if($loop['status'] == 1 ){echo '启用';}else{echo '<font color="red">停用</font>';} ?></td>
- <td>
- <a style="color:#337ab7" href="<?php echo $this->createUrl('assistHome/edit');?>?lid=<?php echo $loop['user_id']?>">编辑</a>
- <a style="color:#337ab7" href="javascript:void(0);" onclick="removeLessee(<?php echo $loop['user_id'] ?>, '<?php echo $loop['user_name'] ?>')">删除
- </td>
- </tr>
- <?php ++$i;endforeach;endif; ?>
- </tbody>
- </table>
- <div class="dataTables_paginate paging_simple_numbers" id="datatable-checkbox_paginate">
- <div class="row" style="padding-top:10px;">
- <div class="col-xs-7">
-
- </div>
- <div class="col-xs-5" style="font-size: 16px">
- <div class="dataTables_paginate paging_simple_numbers" style="vertical-align:sub;">
- <ul id="yw0" class="yiiPager">
- <?php
- if($page>1){
- echo '<li class="previous"><a href="'.$this->createUrl('assistHome/index').'?page='.($page-1).'">上一页</a></li>';
- }
- for($i=1;$i<=$pages['totalPage'];$i++){
- $url=$this->createUrl('assistHome/index')."?page=".$i;
- if($page==$i){
- echo '<li class="page selected"><a href="#">'.$i.'</a></li>';
- }else{
- echo '<li class="page"><a href="'.$url.'">'.$i.'</a></li>';
- }
- }
- if($page<$pages['totalPage']){
- echo '<li class="next"><a href="'.$this->createUrl('assistHome/index').'?page='.($page+1).'">下一页</a></li>';
- }
- ?>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- function removeLessee(lesseeId, lesseeName) {
- if (!lesseeId) return;
- layer.confirm('对'+lesseeName+'执行删除操作请确认!',{
- btn:['确定', '取消'],
- }, function(){
- $.post('<?php echo $this->createUrl('assistHome/remove');?>', {lesseeId:lesseeId}, function(response){
- if (response.status) {
- location.reload();
- } else {
- console.log(response)
- if(response.msg!=undefined){
- layer.msg(response.msg)
- }else{
- layer.msg('删除失败');
- }
- }
- },'json');
- });
- }
- </script>
|