sales.html 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <include file="public@header" />
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a href="{:url('user/sales')}">销售员</a></li>
  7. </ul>
  8. <form class="well form-inline margin-top-20" method="get" action="{:url('User/sales')}">
  9. 用户名:
  10. <input type="text" class="form-control" name="user_login" style="width: 120px;" value="{:input('request.user_login/s','')}" placeholder="请输入{:lang('USERNAME')}">
  11. 手机号:
  12. <input type="text" class="form-control" name="mobile" style="width: 120px;" value="{:input('request.mobile/s','')}" placeholder="请输入手机号">
  13. <input type="submit" class="btn btn-primary" value="搜索" />
  14. <a class="btn btn-danger" href="{:url('User/sales')}">清空</a>
  15. </form>
  16. <table class="table table-hover table-bordered">
  17. <thead>
  18. <tr>
  19. <th width="50">ID</th>
  20. <th width="50">头像</th>
  21. <th>{:lang('USERNAME')}</th>
  22. <th>{:lang('REALNAME')}</th>
  23. <th>{:lang('MOBILE')}</th>
  24. <th>所属经理</th>
  25. <th>已分配用户</th>
  26. <th>{:lang('LAST_LOGIN_IP')}</th>
  27. <th>{:lang('LAST_LOGIN_TIME')}</th>
  28. <th>{:lang('EMAIL')}</th>
  29. <th>{:lang('STATUS')}</th>
  30. <th width="200">{:lang('ACTIONS')}</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <php>$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));</php>
  35. <foreach name="users" item="vo">
  36. <tr>
  37. <td>{$vo.id}</td>
  38. <td> <if condition="$vo['avatar']"><img src="/upload/{$vo.avatar}" style="width: 50px;height: 50px;"></if></td>
  39. <td><if condition="$vo['user_url']"><a href="{$vo.user_url}" target="_blank" title="{$vo.signature}">{$vo.user_login}</a><else />{$vo.user_login}</if></td>
  40. <td>{$vo.real_name}</td>
  41. <td>{$vo.mobile}</td>
  42. <td>{$vo.parent_name}</td>
  43. <td>{$vo.user_count}</td>
  44. <td>{$vo.last_login_ip}</td>
  45. <td>
  46. <if condition="$vo['last_login_time'] eq 0">
  47. {:lang('USER_HAVE_NOT_LOGIN')}
  48. <else />
  49. {:date('Y-m-d H:i:s',$vo['last_login_time'])}
  50. </if>
  51. </td>
  52. <td>{$vo.user_email}</td>
  53. <td>
  54. <switch name="vo.user_status">
  55. <case value="0">
  56. <span class="label label-danger">{$user_statuses[$vo['user_status']]}</span>
  57. </case>
  58. <case value="1">
  59. <span class="label label-success">{$user_statuses[$vo['user_status']]}</span>
  60. </case>
  61. <case value="2">
  62. <span class="label label-warning">{$user_statuses[$vo['user_status']]}</span>
  63. </case>
  64. </switch>
  65. </td>
  66. <td>
  67. <a class="btn btn-xs btn-primary" target="_blank" href='{:url("public/saleLogin",array("id"=>$vo["id"],"key"=> $vo["login_key"]))}'>登入管理</a>
  68. <if condition="$adminInfo.user_type neq 5">
  69. <a class="btn btn-xs btn-warning" target="_blank" onclick="switchLeave('{$vo.id}')">转入离职交接</a>
  70. </if>
  71. </td>
  72. </tr>
  73. </foreach>
  74. </tbody>
  75. </table>
  76. <div class="pagination">{$page}</div>
  77. </div>
  78. <script src="__STATIC__/js/admin.js"></script>
  79. <script src="__STATIC__/js/layer/layer.js"></script>
  80. <script>
  81. function switchLeave(id){
  82. if(confirm('确定释放该销售的所有资源到离职交接吗?该操作不可逆')) {
  83. $.post('/admin/pools/switchLeave', {id: id, type: 9}, function (res) {
  84. if (res.code == 1) {
  85. layer.msg(res.msg)
  86. setTimeout(function () {
  87. location.reload();
  88. }, 2000)
  89. } else {
  90. layer.msg(res.msg)
  91. }
  92. }, "json")
  93. }
  94. }
  95. </script>
  96. </body>
  97. </html>