人人商城

group-post.html 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {template 'common/header'}
  2. <div class="new-keyword" id="js-user-group-post" ng-controller="UserGroupPost" ng-cloak>
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{php echo url('user/group/display')}"><i class="wi wi-back-circle"></i> </a>
  5. <li><a href="{php echo url('user/group/display')}">用户组管理</a></li>
  6. <li>添加用户组</li>
  7. </ol>
  8. <form class="we7-form user-group-edit" method="post" action="">
  9. <div class="form-group">
  10. <label for="" class="control-label col-sm-2">用户权限组名</label>
  11. <div class="form-controls col-sm-8">
  12. <input type="text" name="name" class="form-control" ng-model="groupInfo.name">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label for="" class="control-label col-sm-2">创建公众号数量</label>
  17. <div class="form-controls col-sm-8">
  18. <input type="text" name="maxaccount" class="form-control" ng-model="groupInfo.maxaccount">
  19. <span class="help-block">限制公众号的数量,为0则不允许添加。</span>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label for="" class="control-label col-sm-2">创建微信小程序数量</label>
  24. <div class="form-controls col-sm-8">
  25. <input type="text" name="maxwxapp" class="form-control" ng-model="groupInfo.maxwxapp">
  26. <span class="help-block">限制微信小程序的数量,为0则不允许添加。</span>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label for="" class="control-label col-sm-2">创建PC数量</label>
  31. <div class="form-controls col-sm-8">
  32. <input type="text" name="maxwebapp" class="form-control" ng-model="groupInfo.maxwebapp">
  33. <span class="help-block">限制PC的数量,为0则不允许添加。</span>
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label for="" class="control-label col-sm-2">创建APP数量</label>
  38. <div class="form-controls col-sm-8">
  39. <input type="text" name="maxphoneapp" class="form-control" ng-model="groupInfo.maxphoneapp">
  40. <span class="help-block">限制APP的数量,为0则不允许添加。</span>
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label for="" class="control-label col-sm-2">创建熊掌号数量</label>
  45. <div class="form-controls col-sm-8">
  46. <input type="text" name="maxxzapp" class="form-control" ng-model="groupInfo.maxxzapp">
  47. <span class="help-block">限制熊掌号的数量,为0则不允许添加。</span>
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label for="" class="control-label col-sm-2">创建支付宝小程序数量</label>
  52. <div class="form-controls col-sm-8">
  53. <input type="text" name="maxaliapp" class="form-control" ng-model="groupInfo.maxaliapp">
  54. <span class="help-block">限制支付宝小程序的数量,为0则不允许添加。</span>
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <label for="" class="control-label col-sm-2">有效期</label>
  59. <div class="form-controls col-sm-8">
  60. <div class="input-group">
  61. <input type="text" name="timelimit" class="form-control" ng-model="groupInfo.timelimit">
  62. <span class="input-group-addon font-default">天</span>
  63. </div>
  64. <span class="help-block">设置用户组的有效期限。0为不限制期限。到期后,该用户下的所有公众号只能使用 "基础服务"</span>
  65. </div>
  66. </div>
  67. <div class="panel we7-panel">
  68. <div class="panel-heading">
  69. 选择应用权限套餐组
  70. <a href="{php echo url('module/group/post')}" class="color-default pull-right">新建应用权限套餐组</a>
  71. </div>
  72. <div class="panel-heading">
  73. <style>
  74. .btn-group-item{margin: 5px 10px 5px auto;}
  75. .hover-border-color{color: #888;}
  76. .hover-border-color:hover{border-color: #e7e7eb;}
  77. .remove-hover:hover{background-color: white;border-color: #e7e7eb}
  78. </style>
  79. <div class="btn-group btn-group-item" role="group" ng-repeat="item in checkedGroup">
  80. <span class="btn btn-default remove-hover">{{item.name}}</span>
  81. <input type="hidden" name="package[]" value="{{item.id}}"/>
  82. <span type="button" class="btn btn-default hover-border-color" ng-click="removeCheckedGroupItem(item.id)">x</span>
  83. </div>
  84. </div>
  85. <div class="panel-heading">
  86. <div class="input-group" style="width: 400px;">
  87. <input class="form-control" ng-model="searchKeywords" type="text" placeholder="输入套餐组名">
  88. <div class="input-group-btn" ng-click="loadMore('', 1)">
  89. <span class="btn btn-primary"><i class="fa fa-search"></i></span>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="panel-body user-permission">
  94. {if permission_check_account_user('see_account_manage_module_tpl_all_permission')}
  95. <div ng-hide="hideCheckAll">
  96. <div class="permission-heading">
  97. <input id="checkbox-0" type="checkbox" value="-1" name='' ng-checked="groupInfo.check_all" ng-click="checkAllGroup($event)">
  98. <label for="checkbox-0">所有服务</label>
  99. <div class="pull-right permission-edit">
  100. <a href="javascript:;" class="color-default js-unfold" data-toggle="collapse" data-target="#demo-0" ng-click="changeText($event)">展开</a>
  101. </div>
  102. </div>
  103. <div class="collapse" id="demo-0">
  104. <table class="table we7-table table-hover">
  105. <col width="90px" />
  106. <col />
  107. <tr class="permission-apply">
  108. <td class="vertical-middle">应用</td>
  109. <td><ul><li><span class="label label-danger">系统所有模块</span></li></ul></td>
  110. </tr>
  111. <tr class="permission-template">
  112. <td class="vertical-middle">模板</td>
  113. <td><ul><li><span class="label label-danger">系统所有模板</span></li></ul></td>
  114. </tr>
  115. </table>
  116. </div>
  117. </div>
  118. {/if}
  119. <div ng-repeat="pack in packages">
  120. <div class="permission-heading">
  121. <input id="checkbox-{{pack.id}}" type="checkbox" name='' value="{{pack.id}}" ng-checked="pack.checked" ng-click="pushCheckedGroupItem(pack, $event)">
  122. <label for="checkbox-{{pack.id}}" ng-bind="pack.name"></label>
  123. <div class="pull-right permission-edit">
  124. <a href="javascript:;" class="color-default js-unfold" data-toggle="collapse" data-target="#demo-{{pack.id}}" ng-click="changeText($event)">展开</a>
  125. </div>
  126. </div>
  127. <div class="collapse" id="demo-{{pack.id}}">
  128. <table class="table we7-table table-hover">
  129. <col width="90px" />
  130. <col />
  131. <tr class="permission-apply">
  132. <td class="vertical-middle">公众号应用</td>
  133. <td>
  134. <ul>
  135. <li ng-repeat="module in pack.modules" class="col-sm-2 text-over text-left">
  136. <div ng-if="module.name != 'all'">
  137. <img ng-src="{{ module.logo }}" alt="">
  138. {{ module.title }}
  139. </div>
  140. </li>
  141. </ul>
  142. </td>
  143. </tr>
  144. <tr class="permission-apply">
  145. <td class="vertical-middle">小程序应用</td>
  146. <td>
  147. <ul>
  148. <li ng-repeat="wxapp in pack.wxapp">
  149. <span class="label label-info" ng-bind="wxapp.title"></span>
  150. </li>
  151. </ul>
  152. </td>
  153. </tr>
  154. <tr class="permission-apply">
  155. <td class="vertical-middle">PC应用</td>
  156. <td>
  157. <ul>
  158. <li ng-repeat="pc in pack.pc">
  159. <span class="label label-info" ng-bind="pc.title"></span>
  160. </li>
  161. </ul>
  162. </td>
  163. </tr>
  164. <tr class="permission-apply">
  165. <td class="vertical-middle">熊掌号应用</td>
  166. <td>
  167. <ul>
  168. <li ng-repeat="pc in pack.xzapp">
  169. <span class="label label-info" ng-bind="pc.title"></span>
  170. </li>
  171. </ul>
  172. </td>
  173. </tr>
  174. <tr class="permission-apply">
  175. <td class="vertical-middle">支付宝小程序应用</td>
  176. <td>
  177. <ul>
  178. <li ng-repeat="aliapp in pack.aliapp">
  179. <span class="label label-info" ng-bind="aliapp.title"></span>
  180. </li>
  181. </ul>
  182. </td>
  183. </tr>
  184. <tr class="permission-template">
  185. <td class="vertical-middle">模板</td>
  186. <td><ul><li ng-repeat="tpl in pack.templates"><span class="label label-info" ng-bind="tpl.title"></span></li></ul></td>
  187. </tr>
  188. </table>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <div class="pull-left">
  194. <input type="submit" name="submit" value="保存" class="btn btn-primary" ng-style="{'padding': '6px 50px'}" />
  195. <input type="hidden" name="token" value="{$_W['token']}">
  196. </div>
  197. <div class="pull-right js-pager">
  198. {$pager}
  199. </div>
  200. </form>
  201. </div>
  202. <script>
  203. angular.module('userGroup').value('config', {
  204. groupInfo: {php echo !empty($group_info) ? json_encode($group_info) : 'null'},
  205. packages: {php echo !empty($packages) ? json_encode($packages) : 'null'},
  206. checkedGroup: {php echo !empty($checked_groups) ? json_encode($checked_groups) : '[]'},
  207. pagesize: {$pagesize},
  208. });
  209. angular.bootstrap($('#js-user-group-post'), ['userGroup']);
  210. </script>
  211. {template 'common/footer'}