edit-account-dateline.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. {template 'common/header'}
  2. {if empty($user['founder_groupid'])}
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{url 'user/display'}"><i class="wi wi-back-circlewi wi-back-circle"></i> </a>
  5. <li><a href="{url 'user/display'}">用户管理</a></li>
  6. <li>编辑用户详情</li>
  7. </ol>
  8. {else}
  9. <ol class="breadcrumb we7-breadcrumb">
  10. <a href="{url 'founder/display'}"><i class="wi wi-back-circlewi wi-back-circle"></i> </a>
  11. <li><a href="{url 'founder/display'}">副创始人管理</a></li>
  12. <li>编辑副创始人详情</li>
  13. </ol>
  14. {/if}
  15. <div id="js-user-edit-account" ng-controller="UserEditAccount" ng-cloak>
  16. <div class="user-head-info" >
  17. <img ng-src="{{profile.avatar || ''}}" class="img-circle user-avatar ">
  18. <div class="info">
  19. <h3 class="title" ng-bind="user.username"></h3>
  20. </div>
  21. {if $user['founder_groupid'] != ACCOUNT_MANAGE_GROUP_VICE_FOUNDER}
  22. <a href="javascript:;" class="btn btn-primary" ng-click="recycleUser()">禁用</a>
  23. {/if}
  24. </div>
  25. <div class="btn-group we7-btn-group we7-padding-bottom">
  26. <a href="{php echo url('user/edit/edit_base', array('uid' => $_GPC['uid']))}" class="btn btn-default">基础信息</a>
  27. {if empty($user['founder_groupid'])}
  28. <a href="{php echo url('user/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default">应用模板权限</a>
  29. {/if}
  30. {if !empty($user['founder_groupid'])}
  31. <a href="{php echo url('founder/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default">应用模板权限</a>
  32. {/if}
  33. <a href="{php echo url('user/edit/edit_create_account_list', array('uid' => $_GPC['uid']))}" class="btn btn-default">账号创建权限</a>
  34. <a href="{php echo url('user/edit/edit_account_dateline', array('uid' => $_GPC['uid']))}" class="btn btn-default active">账号使用期限</a>
  35. {if empty($user['founder_groupid'])}
  36. <a href="{php echo url('user/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  37. {/if}
  38. {if !empty($user['founder_groupid'])}
  39. <a href="{php echo url('founder/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  40. {/if}
  41. </div>
  42. <table class="table we7-table ">
  43. <tr>
  44. <th>账户使用期限</th>
  45. <th class="text-left">总有效天数:{$total_timelimit} </th>
  46. <th class="text-right">有效期至:{$endtime}</th>
  47. </tr>
  48. <tr>
  49. <td>所属用户组:{{ group_info.name }}</td>
  50. <td class="text-left">有 效 天 数:
  51. <span ng-if="!group_info"> 0 </span>
  52. <span ng-if="group_info && group_info.timelimit == 0"> 永久 </span>
  53. <span ng-if="group_info && group_info.timelimit != 0"> {{ group_info.timelimit }} </span>
  54. </td>
  55. <td class="text-right">
  56. <a href="javascript:;" ng-if="user.groupid != 0" class="color-default" ng-click="delUserGroup(group_info.id)">删除</a>
  57. <a href="javascript:;" class="color-default" data-toggle="modal" data-target="#group">修改</a>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>附加权限</td>
  62. <td class="text-left">有 效 天 数:{{ extra_limit_info.timelimit * 1 }} </td>
  63. <td class="text-right">
  64. <a href="#date" class="color-default" data-toggle="modal" data-target="#date" >修改</a>
  65. </td>
  66. </tr>
  67. </table>
  68. <div class="modal fade" id="group" role="dialog">
  69. <div class="we7-modal-dialog modal-dialog">
  70. <div class="modal-content">
  71. <div class="modal-header">
  72. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  73. <div class="modal-title">应用权限组</div>
  74. </div>
  75. <div class="modal-body">
  76. <div class="alert we7-page-alert">
  77. <i class="wi wi-info"></i> 此处仅可选择已有用户权限组且享有组内的有效时间,如需修改请到用户权限组修改
  78. <a href="{php echo url('user/group')}" class="color-default">去修改</a>
  79. </div>
  80. <div class="form-group">
  81. <div class="dropdown nice-select" style="width: 500px !important; margin: 0 auto;">
  82. <div data-toggle="dropdown" data-target="#" class="current">
  83. {{group_info.name || '请选择所属用户组'}}
  84. </div>
  85. <ul class="list dropdown">
  86. <li data-value="" class="option" ng-click="changeGroupId('')" ng-class="{'selected': group_info.id == ''}">请选择所属用户组</li>
  87. <li data-value="{{group.id}}" class="option" ng-repeat="group in groups" ng-class="{'selected': group.id == group_info.id}" ng-click="changeGroupId(group.id)" data-content="{{group.timelimit > 0 ? group.timelimit : '永久'}}">
  88. {{group.name}}
  89. </li>
  90. </ul>
  91. </div>
  92. <!-- <select class="we7-select" ng-model="groupid">
  93. <option value="">请选择所属用户组</option>
  94. <option ng-value="group.id" ng-repeat="group in groups" ng-selected="group.id == group_info.id" ng-bind="group.name"></option>
  95. </select> -->
  96. <span class="help-block"></span>
  97. </div>
  98. </div>
  99. <div class="modal-footer">
  100. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="changeGroup()">确定</button>
  101. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="modal fade" id="date" role="dialog">
  107. <div class="we7-modal-dialog modal-dialog">
  108. <div class="modal-content">
  109. <div class="modal-header">
  110. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  111. <div class="modal-title">附加天数</div>
  112. </div>
  113. <div class="modal-body">
  114. <div class="form-group">
  115. <div class="input-group">
  116. <input type="text" class="form-control" ng-change="changeTime()" ng-model="extra_limit_info.timelimit">
  117. <div class="input-group-addon" we7-date-range-picker ng-model="dateRange" enabletimepicker={{datePickerConfig}}>
  118. <i class="fa fa-calendar"></i> 选择日期
  119. </div>
  120. </div>
  121. </div>
  122. <div class="text-center color-gray">
  123. 到期时间:{{ dateRange.startDate }}
  124. </div>
  125. </div>
  126. <div class="modal-footer">
  127. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="chageExtraTimelimit()" >确定</button>
  128. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <script>
  135. require(['daterangepicker'], function() {
  136. angular.module('userManageApp').value('config', {
  137. uid : {php echo $_GPC['uid']},
  138. user: {php echo !empty($user) ? json_encode($user) : 'null'},
  139. profile: {php echo !empty($profile) ? json_encode($profile) : 'null'},
  140. group_info: {php echo !empty($group_info) ? json_encode($group_info) : 'null'},
  141. extra_limit_info: {php echo !empty($extra_limit_info) ? json_encode($extra_limit_info) : 'null'},
  142. groups: {php echo !empty($groups) ? json_encode($groups) : 'null'},
  143. links: {
  144. recycleUser: "{php echo url('user/display/operate', array('type' => 'recycle'))}",
  145. editUserGroup: "{php echo url('user/edit/edit_user_group', array('uid' => $uid))}",
  146. deleteUserGroupUrl: "{php echo url('user/edit/delete_user_group')}",
  147. chageExtraTimelimit: "{php echo url('user/edit/edit_user_extra_limit', array('uid' => $uid))}",
  148. },
  149. });
  150. angular.bootstrap($('#js-user-edit-account'), ['userManageApp']);
  151. });
  152. </script>
  153. {template 'common/footer'}