edit-create-account-list.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  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 active">账号创建权限</a>
  34. <a href="{php echo url('user/edit/edit_account_dateline', array('uid' => $_GPC['uid']))}" class="btn btn-default">账号使用期限</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. <div class="edit-account-num hidden">
  43. <div class="item">
  44. <div class="title">公众号</div>
  45. <div class="num">可创建总数 <span>{$user_permission_account['maxaccount']}</span></div>
  46. <div class="num">已创建 <span>{$user_permission_account['account_num']}</span></div>
  47. <div class="num">剩余可创建 <span>{$user_permission_account['account_limit']}</span></div>
  48. </div>
  49. <div class="item">
  50. <div class="title">微信小程序</div>
  51. <div class="num">可创建总数 <span>{$user_permission_account['maxwxapp']}</span></div>
  52. <div class="num">已创建 <span>{$user_permission_account['wxapp_num']}</span></div>
  53. <div class="num">剩余可创建 <span>{$user_permission_account['wxapp_limit']}</span></div>
  54. </div>
  55. <div class="item">
  56. <div class="title">PC</div>
  57. <div class="num">可创建总数 <span>{$user_permission_account['maxwebapp']}</span></div>
  58. <div class="num">已创建 <span>{$user_permission_account['webapp_num']}</span></div>
  59. <div class="num">剩余可创建 <span>{$user_permission_account['webapp_limit']}</span></div>
  60. </div>
  61. <div class="item">
  62. <div class="title">APP</div>
  63. <div class="num">可创建总数 <span>{$user_permission_account['maxphoneapp']}</span></div>
  64. <div class="num">已创建 <span>{$user_permission_account['phoneapp_num']}</span></div>
  65. <div class="num">剩余可创建 <span>{$user_permission_account['phoneapp_limit']}</span></div>
  66. </div>
  67. <div class="item">
  68. <div class="title">熊掌号</div>
  69. <div class="num">可创建总数 <span>{$user_permission_account['maxxzapp']}</span></div>
  70. <div class="num">已创建 <span>{$user_permission_account['xzapp_num']}</span></div>
  71. <div class="num">剩余可创建 <span>{$user_permission_account['xzapp_limit']}</span></div>
  72. </div>
  73. <div class="item">
  74. <div class="title">支付宝小程序</div>
  75. <div class="num">可创建总数 <span>{$user_permission_account['maxaliapp']}</span></div>
  76. <div class="num">已创建 <span>{$user_permission_account['aliapp_num']}</span></div>
  77. <div class="num">剩余可创建 <span>{$user_permission_account['aliapp_limit']}</span></div>
  78. </div>
  79. </div>
  80. <div class="panel we7-panel user-permission">
  81. <div class="panel-heading">
  82. <span>所属用户组:<span >{$user_permission_account['group_name']}</span></span>
  83. <span class="pull-right">
  84. <a href="javascript:;" ng-if="user.groupid != 0" class="color-default" ng-click="delUserGroup(group_info.id)">删除</a>
  85. <a href="javascript:;" class="color-default" data-toggle="modal" data-target="#group">修改</a>
  86. </span>
  87. </div>
  88. <div class="panel-body ">
  89. {if $user_permission_account['group_name']}
  90. <div class="we7-account-show we7-padding">
  91. <div class="name">{$user_permission_account['group_name']}</div>
  92. <div class="account-num-list">
  93. {if $user_permission_account['user_group_maxaccount']}
  94. <span class="account-num-item">
  95. <i class="wi wi-account" ></i> {$user_permission_account['user_group_maxaccount']}个
  96. </span>
  97. {/if}
  98. {if $user_permission_account['user_group_maxwxapp']}
  99. <span class="account-num-item">
  100. <i class="wi wi-wxapp" ></i> {$user_permission_account['user_group_maxwxapp']}个
  101. </span>
  102. {/if}
  103. <!-- <span class="account-num-item">
  104. <i class="wi wi-welcome" ></i> 6个
  105. </span> -->
  106. {if $user_permission_account['user_group_maxwebapp']}
  107. <span class="account-num-item">
  108. <i class="wi wi-pc" ></i> {$user_permission_account['user_group_maxwebapp']}个
  109. </span>
  110. {/if}
  111. {if $user_permission_account['user_group_maxphoneapp']}
  112. <span class="account-num-item">
  113. <i class="wi wi-app" ></i> {$user_permission_account['user_group_maxphoneapp']}个
  114. </span>
  115. {/if}
  116. {if $user_permission_account['user_group_maxxzapp']}
  117. <span class="account-num-item">
  118. <i class="wi wi-xzapp" ></i> {$user_permission_account['user_group_maxxzapp']}个
  119. </span>
  120. {/if}
  121. {if $user_permission_account['user_group_maxaliapp']}
  122. <span class="account-num-item">
  123. <i class="wi wi-aliapp" ></i> {$user_permission_account['user_group_maxaliapp']}个
  124. </span>
  125. {/if}
  126. {if $user_permission_account['user_group_maxtoutiaoapp']}
  127. <span class="account-num-item">
  128. <i class="wi wi-toutiaoapp" ></i> {$user_permission_account['user_group_maxtoutiaoapp']}个
  129. </span>
  130. {/if}
  131. {if $user_permission_account['user_group_maxbaiduapp']}
  132. <span class="account-num-item">
  133. <i class="wi wi-baiduapp" ></i> {$user_permission_account['user_group_maxbaiduapp']}个
  134. </span>
  135. {/if}
  136. </div>
  137. </div>
  138. {else}
  139. <div class="we7-empty-block ">
  140. 无用户组
  141. </div>
  142. {/if}
  143. </div>
  144. </div>
  145. <div class="panel we7-panel user-permission">
  146. <div class="panel-heading">
  147. <span>账号权限组名称</span>
  148. <div class=" pull-right">
  149. <we7-modal-account account="create_account_info" multiple="true" type="2" on-confirm="extraCreateGroup('group')">
  150. <a href="javascript:;" class="color-default">修改</a>
  151. </we7-modal-account>
  152. </div>
  153. </div>
  154. {if $user_permission_account['create_groups']}
  155. {loop $user_permission_account['create_groups'] $create_group}
  156. <div class="panel-body we7-padding">
  157. <div class="we7-account-show">
  158. <div class="name">{$create_group['group_name']}</div>
  159. <div class="account-num-list">
  160. {if $create_group['maxaccount']}
  161. <span class="account-num-item">
  162. <i class="wi wi-account" ></i> {$create_group['maxaccount']}个
  163. </span>
  164. {/if}
  165. {if $create_group['maxwxapp']}
  166. <span class="account-num-item">
  167. <i class="wi wi-wxapp" ></i> {$create_group['maxwxapp']}个
  168. </span>
  169. {/if}
  170. <!-- <span class="account-num-item">
  171. <i class="wi wi-welcome" ></i> 6个
  172. </span> -->
  173. {if $create_group['maxwebapp']}
  174. <span class="account-num-item">
  175. <i class="wi wi-pc" ></i> {$create_group['maxwebapp']}个
  176. </span>
  177. {/if}
  178. {if $create_group['maxphoneapp']}
  179. <span class="account-num-item">
  180. <i class="wi wi-app" ></i> {$create_group['maxphoneapp']}个
  181. </span>
  182. {/if}
  183. {if $create_group['maxxzapp']}
  184. <span class="account-num-item">
  185. <i class="wi wi-xzapp" ></i> {$create_group['maxxzapp']}个
  186. </span>
  187. {/if}
  188. {if $create_group['maxaliapp']}
  189. <span class="account-num-item">
  190. <i class="wi wi-aliapp" ></i> {$create_group['maxaliapp']}个
  191. </span>
  192. {/if}
  193. {if $create_group['maxtoutiaoapp']}
  194. <span class="account-num-item">
  195. <i class="wi wi-toutiaoapp" ></i> {$create_group['maxtoutiaoapp']}个
  196. </span>
  197. {/if}
  198. {if $create_group['maxbaiduapp']}
  199. <span class="account-num-item">
  200. <i class="wi wi-baiduapp" ></i> {$create_group['maxbaiduapp']}个
  201. </span>
  202. {/if}
  203. </div>
  204. </div>
  205. </div>
  206. {/loop}
  207. {else}
  208. <div class="we7-empty-block ">
  209. 无账号权限组
  210. </div>
  211. {/if}
  212. </div>
  213. {if user_is_founder($_W['uid']) || user_is_vice_founder($_W['uid'])}
  214. <div class="panel we7-panel user-permission">
  215. <div class="panel-heading">
  216. <span>附加权限</span>
  217. <div class=" pull-right">
  218. <we7-modal-account account="create_account_info" multiple="true" type="3" on-confirm="extraCreateGroup('numbers')"><a href="javascript:;" class="color-default">修改</a></we7-modal-account>
  219. </div>
  220. </div>
  221. {if $user_permission_account['extra_account'] || $user_permission_account['extra_wxapp'] || $user_permission_account['extra_webapp'] || $user_permission_account['extra_phoneapp'] || $user_permission_account['extra_xzapp'] || $user_permission_account['extra_aliapp'] || $user_permission_account['extra_toutiaoapp'] || $user_permission_account['extra_baiduapp']}
  222. <div class="panel-body we7-padding">
  223. <div class="we7-account-show">
  224. <div class="name">添加账号</div>
  225. <div class="account-num-list">
  226. {if $user_permission_account['extra_account']}
  227. <span class="account-num-item">
  228. <i class="wi wi-account" ></i> {$user_permission_account['extra_account']}个
  229. </span>
  230. {/if}
  231. {if $user_permission_account['extra_wxapp']}
  232. <span class="account-num-item">
  233. <i class="wi wi-wxapp" ></i> {$user_permission_account['extra_wxapp']}个
  234. </span>
  235. {/if}
  236. {if $user_permission_account['extra_webapp']}
  237. <span class="account-num-item">
  238. <i class="wi wi-pc" ></i> {$user_permission_account['extra_webapp']}个
  239. </span>
  240. {/if}
  241. {if $user_permission_account['extra_phoneapp']}
  242. <span class="account-num-item">
  243. <i class="wi wi-app" ></i> {$user_permission_account['extra_phoneapp']}个
  244. </span>
  245. {/if}
  246. {if $user_permission_account['extra_xzapp']}
  247. <span class="account-num-item">
  248. <i class="wi wi-xzapp" ></i> {$user_permission_account['extra_xzapp']}个
  249. </span>
  250. {/if}
  251. {if $user_permission_account['extra_aliapp']}
  252. <span class="account-num-item">
  253. <i class="wi wi-aliapp" ></i> {$user_permission_account['extra_aliapp']}个
  254. </span>
  255. {/if}
  256. {if $user_permission_account['extra_toutiaoapp']}
  257. <span class="account-num-item">
  258. <i class="wi wi-toutiaoapp" ></i> {$user_permission_account['extra_toutiaoapp']}个
  259. </span>
  260. {/if}
  261. {if $user_permission_account['extra_baiduapp']}
  262. <span class="account-num-item">
  263. <i class="wi wi-baiduapp" ></i> {$user_permission_account['extra_baiduapp']}个
  264. </span>
  265. {/if}
  266. </div>
  267. </div>
  268. </div>
  269. {else}
  270. <div class="we7-empty-block ">
  271. 无权限
  272. </div>
  273. {/if}
  274. </div>
  275. {/if}
  276. <div class="panel we7-panel user-permission">
  277. <div class="panel-heading">
  278. <span>商城购买账号权限</span>
  279. </div>
  280. {if $user_permission_account['store_buy_account'] || $user_permission_account['store_buy_wxapp']}
  281. <div class="panel-body we7-padding">
  282. <div class="we7-account-show">
  283. <div class="name">购买账号</div>
  284. <div class="account-num-list">
  285. {if $user_permission_account['store_buy_account']}
  286. <span class="account-num-item">
  287. <i class="wi wi-account" ></i> {$user_permission_account['store_buy_account']}个
  288. </span>
  289. {/if}
  290. {if $user_permission_account['store_buy_wxapp']}
  291. <span class="account-num-item">
  292. <i class="wi wi-wxapp" ></i> {$user_permission_account['store_buy_wxapp']}个
  293. </span>
  294. {/if}
  295. </div>
  296. </div>
  297. <div class="user-account-num-shop hidden">
  298. <div class="item media">
  299. <div class="media-left">
  300. <div class="media-object logo">
  301. <i class="wi wi-account"></i>
  302. </div>
  303. </div>
  304. <div class="media-body media-middle">
  305. <h4 class="media-heading num">数量:{$user_permission_account['store_buy_account']}</h4>
  306. <!--<p class="date">有效期:1个月 </p>-->
  307. </div>
  308. </div>
  309. <div class="item media">
  310. <div class="media-left">
  311. <div class="media-object logo">
  312. <i class="wi wi-wxapp"></i>
  313. </div>
  314. </div>
  315. <div class="media-body media-middle">
  316. <h4 class="media-heading num">数量:{$user_permission_account['store_buy_wxapp']}</h4>
  317. <!--<p class="date">有效期:1个月 </p>-->
  318. </div>
  319. </div>
  320. <!--<div class="item media">-->
  321. <!--<div class="media-left">-->
  322. <!--<div class="media-object logo">-->
  323. <!--<i class="wi wi-pc"></i>-->
  324. <!--</div>-->
  325. <!--</div>-->
  326. <!--<div class="media-body media-middle">-->
  327. <!--<h4 class="media-heading num">数量:1</h4>-->
  328. <!--<p class="date">有效期:1个月 </p>-->
  329. <!--</div>-->
  330. <!--</div>-->
  331. <!--<div class="item media">-->
  332. <!--<div class="media-left">-->
  333. <!--<div class="media-object logo">-->
  334. <!--<i class="wi wi-app"></i>-->
  335. <!--</div>-->
  336. <!--</div>-->
  337. <!--<div class="media-body media-middle">-->
  338. <!--<h4 class="media-heading num">数量:1</h4>-->
  339. <!--<p class="date">有效期:1个月 </p>-->
  340. <!--</div>-->
  341. <!--</div>-->
  342. <!--<div class="item media">-->
  343. <!--<div class="media-left">-->
  344. <!--<div class="media-object logo">-->
  345. <!--<i class="wi wi-xzapp"></i>-->
  346. <!--</div>-->
  347. <!--</div>-->
  348. <!--<div class="media-body media-middle">-->
  349. <!--<h4 class="media-heading num">数量:1</h4>-->
  350. <!--<p class="date">有效期:1个月 </p>-->
  351. <!--</div>-->
  352. <!--</div>-->
  353. <!--<div class="item media">-->
  354. <!--<div class="media-left">-->
  355. <!--<div class="media-object logo">-->
  356. <!--<i class="wi wi-aliapp"></i>-->
  357. <!--</div>-->
  358. <!--</div>-->
  359. <!--<div class="media-body media-middle">-->
  360. <!--<h4 class="media-heading num">数量:1</h4>-->
  361. <!--<p class="date">有效期:1个月 </p>-->
  362. <!--</div>-->
  363. <!--</div>-->
  364. <!--<div class="item media">-->
  365. <!--<div class="media-left">-->
  366. <!--<div class="media-object logo">-->
  367. <!--<i class="wi wi-account"></i>-->
  368. <!--</div>-->
  369. <!--</div>-->
  370. <!--<div class="media-body media-middle">-->
  371. <!--<h4 class="media-heading num">数量:1</h4>-->
  372. <!--<p class="date">有效期:1个月 </p>-->
  373. <!--</div>-->
  374. <!--</div>-->
  375. </div>
  376. </div>
  377. {else}
  378. <div class="we7-empty-block ">
  379. 无权限
  380. </div>
  381. {/if}
  382. </div>
  383. <div class="modal fade" id="group" role="dialog">
  384. <div class="we7-modal-dialog modal-dialog">
  385. <div class="modal-content">
  386. <div class="modal-header">
  387. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  388. <div class="modal-title">修改用户组</div>
  389. </div>
  390. <div class="modal-body">
  391. <div class="form-group">
  392. <select class="we7-select" ng-model="changeGroup">
  393. <option value="">请选择所属用户组</option>
  394. <option ng-value="group.id" ng-repeat="group in user_groups" ng-selected="group.id == group_info.id" ng-bind="group.name"></option>
  395. </select>
  396. <span class="help-block"></span>
  397. </div>
  398. </div>
  399. <div class="modal-footer">
  400. <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="httpChange('groupid')">确定</button>
  401. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. <script>
  408. require(['daterangepicker'], function() {
  409. angular.module('userManageApp').value('config', {
  410. uid : {php echo $_GPC['uid']},
  411. user: {php echo !empty($user) ? json_encode($user) : 'null'},
  412. wechats: {php echo !empty($account_detail['wechat']) ? json_encode($account_detail['wechat']) : 'null'},
  413. wxapps: {php echo !empty($account_detail['wxapp']) ? json_encode($account_detail['wxapp']) : 'null'},
  414. group_info: {php echo !empty($group_info) ? json_encode($group_info) : 'null'},
  415. webapps: {php echo !empty($account_detail['webapp']) ? json_encode($account_detail['webapp']) : 'null'},
  416. phoneapps: {php echo !empty($account_detail['phoneapp']) ? json_encode($account_detail['phoneapp']) : 'null'},
  417. xzapps : {php echo !empty($account_detail['xzapp']) ? json_encode($account_detail['xzapp']) : 'null'},
  418. profile: {php echo !empty($profile) ? json_encode($profile) : 'null'},
  419. create_account_info: {php echo json_encode($create_account)},
  420. user_groups: {php echo json_encode($user_groups)},
  421. links: {
  422. recycleUser: "{php echo url('user/display/operate', array('type' => 'recycle'))}",
  423. editGroup: "{php echo url('user/edit/edit_modules_tpl')}",
  424. editCreateAccountList: "{php echo url('user/edit/edit_create_account_list', array('uid' => $uid))}",
  425. deleteUserGroupUrl: "{php echo url('user/edit/delete_user_group')}",
  426. extra_create_account_url: "{php echo url('user/edit/edit_user_extra_group', array('uid' => $uid))}",
  427. },
  428. });
  429. angular.bootstrap($('#js-user-edit-account'), ['userManageApp']);
  430. });
  431. </script>
  432. {template 'common/footer'}