人人商城

edit-base.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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-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-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-base" ng-controller="UserProfileDisplay" ng-cloak>
  16. <div class="user-head-info clearfix" >
  17. <span class="icon pull-left"><i class="wi wi-user"></i></span>
  18. <img src="{{profile.avatar}}" class="img-circle user-avatar pull-left">
  19. <h3 class="pull-left" ng-bind="user.username"></h3>
  20. <div class="user-edit pull-right">
  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>
  26. <div class="btn-group we7-btn-group we7-padding-bottom">
  27. <a href="{php echo url('user/edit/edit_base', array('uid' => $_GPC['uid']))}" class="btn btn-default active">基础信息</a>
  28. {if empty($user['founder_groupid'])}
  29. <a href="{php echo url('user/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default">应用模板权限</a>
  30. <a href="{php echo url('user/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  31. {else}
  32. <a href="{php echo url('founder/edit/edit_account', array('uid' => $_GPC['uid']))}" class="btn btn-default">使用账号列表</a>
  33. <a href="{php echo url('founder/edit/edit_modules_tpl', array('uid' => $_GPC['uid']))}" class="btn btn-default">应用模板权限</a>
  34. {/if}
  35. </div>
  36. <table class="table we7-table table-hover table-form">
  37. <col width="140px " />
  38. <col />
  39. <col width="120px" />
  40. <tr>
  41. <th class="text-left" colspan="3">账户设置设置</th>
  42. </tr>
  43. <tr>
  44. <td class="table-label">头像</td>
  45. <td><img src="{{profile.avatar}}" class="img-circle" width="65px" height="65px" /></td>
  46. <td><div class="link-group"><a href="javascript:;" ng-click="changeAvatar()">修改</a></div></td>
  47. </tr>
  48. <tr>
  49. <td class="table-label">用户名</td>
  50. <td ng-bind="user.username"></td>
  51. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#name" ng-click="editInfo('username', user.username)">修改</a></div></td>
  52. </tr>
  53. <tr>
  54. <td class="table-label">密码</td>
  55. <td>******</td>
  56. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#pass">修改</a></div></td>
  57. </tr>
  58. <tr>
  59. <td class="table-label">到期时间</td>
  60. <td ng-bind="user.end"></td>
  61. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#endtime">修改</a></div></td>
  62. </tr>
  63. {if permission_check_account_user('see_user_edit_base_founder_name')}
  64. <tr>
  65. <td class="table-label">副创始人姓名</td>
  66. <td ng-bind="user.vice_founder_name"></td>
  67. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#vice_founder_name" ng-click="editInfo('vice_founder_name', user.vice_founder_name)">修改</a></div></td>
  68. </tr>
  69. {/if}
  70. {if !empty($user['founder_groupid'])}
  71. <tr>
  72. <td class="table-label">注册链接</td>
  73. <td>{$user['url']}</td>
  74. <td><div class="link-group"><a href="javascript:;" data-url="{$user['url']}" class="js-clip">复制链接</a></div></td>
  75. </tr>
  76. {/if}
  77. </table>
  78. <div class="modal fade" id="name" role="dialog">
  79. <div class="we7-modal-dialog modal-dialog">
  80. <div class="modal-content">
  81. <div class="modal-header">
  82. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  83. <div class="modal-title">修改用户名</div>
  84. </div>
  85. <div class="modal-body">
  86. <div class="form-group">
  87. <input type="text" ng-model="userOriginal.username" class="form-control" placeholder="用户名" />
  88. <span class="help-block"></span>
  89. </div>
  90. </div>
  91. <div class="modal-footer">
  92. <button type="button" class="btn btn-primary" ng-click="httpChange('username')">确定</button>
  93. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="modal fade" id="pass" role="dialog">
  99. <div class="we7-modal-dialog modal-dialog">
  100. <div class="modal-content">
  101. <div class="modal-header">
  102. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  103. <div class="modal-title">修改密码</div>
  104. </div>
  105. <div class="modal-body text-center">
  106. <div class="we7-form" style="width: 450px; margin: 0 auto;">
  107. <div class="form-group">
  108. <label for="" class="control-label col-sm-2">新密码</label>
  109. <div class="form-controls col-sm-10">
  110. <input type="password" value="" class="form-control new-password">
  111. </div>
  112. </div>
  113. <div class="form-group">
  114. <label for="" class="control-label col-sm-2">确认新密码</label>
  115. <div class="form-controls col-sm-10">
  116. <input type="password" value="" class="form-control renew-password">
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="modal-footer">
  122. <button type="button" class="btn btn-primary" ng-click="httpChange('password')">确定</button>
  123. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div class="modal fade" id="endtime" role="dialog">
  129. <div class="we7-modal-dialog modal-dialog">
  130. <div class="modal-content">
  131. <div class="modal-header">
  132. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  133. <div class="modal-title">设置到期时间</div>
  134. </div>
  135. <div class="modal-body">
  136. <div class="form-group">
  137. <input type="radio" id="endtype-1" name="endtype" value="2" ng-model="user.endtype" ng-checked="user.endtime != 0"><label class="radio-inline" for="endtype-1">设置期限</label>
  138. <input type="radio" id="endtype-2" name="endtype" value="1" ng-model="user.endtype" ng-checked="user.endtime == 0"><label class="radio-inline" for="endtype-2">永久</label>
  139. </div>
  140. <div class="form-group" ng-show="user.endtype == 2">
  141. {php echo tpl_form_field_date('endtime', $user['endtime']);}
  142. </div>
  143. </div>
  144. <div class="modal-footer">
  145. <button type="button" class="btn btn-primary" ng-click="httpChange('endtime')">确定</button>
  146. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. <table class="table we7-table table-hover table-form">
  152. <col width="140px " />
  153. <col />
  154. <col width="100px" />
  155. <tr>
  156. <th class="text-left" colspan="3">基础信息</th>
  157. </tr>
  158. <tr>
  159. <td class="table-label">真实姓名</td>
  160. <td ng-bind="profile.realname"></td>
  161. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#realname" ng-click="editInfo('realname', profile.realname)">修改</a></div></td>
  162. </tr>
  163. <tr>
  164. <td class="table-label">出生年月日</td>
  165. <td ng-bind="profile.births"></td>
  166. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#birth">修改</a></div></td>
  167. </tr>
  168. <tr>
  169. <td class="table-label">QQ</td>
  170. <td ng-bind="profile.qq"></td>
  171. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#qq" ng-click="editInfo('qq', profile.qq)">修改</a></div></td>
  172. </tr>
  173. <tr>
  174. <td class="table-label">手机号</td>
  175. <td ng-bind="profile.mobile"></td>
  176. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#mobile" ng-click="editInfo('mobile', profile.mobile)">修改</a></div></td>
  177. </tr>
  178. <tr>
  179. <td class="table-label">邮寄地址</td>
  180. <td ng-bind="profile.address"></td>
  181. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#address" ng-click="editInfo('address', profile.address)">修改</a></div></td>
  182. </tr>
  183. <tr>
  184. <td class="table-label">居住地址</td>
  185. <td ng-bind="profile.resides"></td>
  186. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#reside">修改</a></div></td>
  187. </tr>
  188. <tr ng-repeat="field in extra_fields">
  189. <td class="table-label" ng-bind="field.title"></td>
  190. <td ng-bind="profile[field.field]"></td>
  191. <td></td>
  192. </tr>
  193. <tr>
  194. <td class="table-label">上次登录时间</td>
  195. <td ng-bind="user.last_visit"></td>
  196. <td></td>
  197. </tr>
  198. <tr>
  199. <td class="table-label">上次登录IP</td>
  200. <td ng-bind="user.lastip"></td>
  201. <td></td>
  202. </tr>
  203. <tr>
  204. <td class="table-label">注册时间</td>
  205. <td ng-bind="user.joindate"></td>
  206. <td></td>
  207. </tr>
  208. {if $_W['isfounder'] && !user_is_vice_founder()}
  209. <tr>
  210. <td class="table-label">备注</td>
  211. <td ng-bind="user.remark"></td>
  212. <td><div class="link-group"><a href="javascript:;" data-toggle="modal" data-target="#remark" ng-click="editInfo('remark', user.remark)">修改</a></div></td>
  213. </tr>
  214. {/if}
  215. </table>
  216. <table class="table we7-table table-hover table-form">
  217. <col />
  218. <col />
  219. <col />
  220. <tr>
  221. <th class="text-left" colspan="3">公众号使用权限</th>
  222. </tr>
  223. <tr>
  224. <td class="table-label">可创建总数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.maxaccount || 0"></strong></td>
  225. <td class="table-label">已创建个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.uniacid_num || 0"></strong></td>
  226. <td class="table-label">可创建剩余个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.uniacid_limit || 0"></strong></td>
  227. </tr>
  228. </table>
  229. <table class="table we7-table table-hover table-form">
  230. <col />
  231. <col />
  232. <col />
  233. <tr>
  234. <th class="text-left" colspan="3">小程序使用权限</th>
  235. </tr>
  236. <tr>
  237. <td class="table-label">可创建总数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.maxwxapp || 0"></strong></td>
  238. <td class="table-label">已创建个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.wxapp_num || 0"></strong></td>
  239. <td class="table-label">可创建剩余个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.wxapp_limit || 0"></strong></td>
  240. </tr>
  241. </table>
  242. <table class="table we7-table table-hover table-form">
  243. <col />
  244. <col />
  245. <col />
  246. <tr>
  247. <th class="text-left" colspan="3">PC使用权限</th>
  248. </tr>
  249. <tr>
  250. <td class="table-label">可创建总数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.maxwebapp || 0"></strong></td>
  251. <td class="table-label">已创建个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.webapp_num || 0"></strong></td>
  252. <td class="table-label">可创建剩余个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.webapp_limit || 0"></strong></td>
  253. </tr>
  254. </table>
  255. <table class="table we7-table table-hover table-form">
  256. <col />
  257. <col />
  258. <col />
  259. <tr>
  260. <th class="text-left" colspan="3">APP使用权限</th>
  261. </tr>
  262. <tr>
  263. <td class="table-label">可创建总数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.maxphoneapp || 0"></strong></td>
  264. <td class="table-label">已创建个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.phoneapp_num || 0"></strong></td>
  265. <td class="table-label">可创建剩余个数&nbsp;&nbsp;&nbsp;&nbsp;<strong ng-bind="account_num.phoneapp_limit || 0"></strong></td>
  266. </tr>
  267. </table>
  268. <div class="modal fade" id="realname" role="dialog">
  269. <div class="we7-modal-dialog modal-dialog">
  270. <div class="modal-content">
  271. <div class="modal-header">
  272. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  273. <div class="modal-title">修改真实姓名</div>
  274. </div>
  275. <div class="modal-body">
  276. <div class="form-group">
  277. <input type="text" class="form-control" ng-model="userOriginal.realname">
  278. <span class="help-block">请填写真实姓名</span>
  279. </div>
  280. </div>
  281. <div class="modal-footer">
  282. <button type="button" class="btn btn-primary" ng-click="httpChange('realname')">确定</button>
  283. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  284. </div>
  285. </div>
  286. </div>
  287. </div>
  288. <div class="modal fade" id="birth" role="dialog">
  289. <div class="we7-modal-dialog modal-dialog">
  290. <div class="modal-content">
  291. <div class="modal-header">
  292. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  293. <div class="modal-title">修改出生年月日</div>
  294. </div>
  295. <div class="modal-body">
  296. <div class="form-group">
  297. {php echo tpl_fans_form('birth',$profile['birth']);}
  298. </div>
  299. </div>
  300. <div class="modal-footer">
  301. <button type="button" class="btn btn-primary" ng-click="httpChange('birth')">确定</button>
  302. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <div class="modal fade" id="address" role="dialog">
  308. <div class="we7-modal-dialog modal-dialog">
  309. <div class="modal-content">
  310. <div class="modal-header">
  311. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  312. <div class="modal-title">修改邮寄地址</div>
  313. </div>
  314. <div class="modal-body">
  315. <div class="form-group">
  316. <input class="form-control" type="text" ng-model="userOriginal.address">
  317. <span class="help-block">请填写详细地址</span>
  318. </div>
  319. </div>
  320. <div class="modal-footer">
  321. <button type="button" class="btn btn-primary" ng-click="httpChange('address')">确定</button>
  322. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. <div class="modal fade" id="reside" role="dialog">
  328. <div class="we7-modal-dialog modal-dialog">
  329. <div class="modal-content">
  330. <div class="modal-header">
  331. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  332. <div class="modal-title">修改居住地址</div>
  333. </div>
  334. <div class="modal-body">
  335. <div class="form-group">
  336. {php echo tpl_fans_form('reside',$profile['reside']);}
  337. </div>
  338. </div>
  339. <div class="modal-footer">
  340. <button type="button" class="btn btn-primary" ng-click="httpChange('reside')">确定</button>
  341. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  342. </div>
  343. </div>
  344. </div>
  345. </div>
  346. <div class="modal fade" id="qq" role="dialog">
  347. <div class="we7-modal-dialog modal-dialog">
  348. <div class="modal-content">
  349. <div class="modal-header">
  350. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  351. <div class="modal-title">修改QQ</div>
  352. </div>
  353. <div class="modal-body">
  354. <div class="form-group">
  355. <input type="text" ng-model="userOriginal.qq" class="form-control" placeholder="qq" />
  356. <span class="help-block"></span>
  357. </div>
  358. </div>
  359. <div class="modal-footer">
  360. <button type="button" class="btn btn-primary" ng-click="httpChange('qq')">确定</button>
  361. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  362. </div>
  363. </div>
  364. </div>
  365. </div>
  366. <div class="modal fade" id="remark" role="dialog">
  367. <div class="we7-modal-dialog modal-dialog">
  368. <div class="modal-content">
  369. <div class="modal-header">
  370. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  371. <div class="modal-title">修改备注</div>
  372. </div>
  373. <div class="modal-body">
  374. <div class="form-group">
  375. <input type="text" ng-model="userOriginal.remark" class="form-control" placeholder="备注" />
  376. <span class="help-block"></span>
  377. </div>
  378. </div>
  379. <div class="modal-footer">
  380. <button type="button" class="btn btn-primary" ng-click="httpChange('remark')" ng-click="editInfo('remark', user.remark)">确定</button>
  381. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  382. </div>
  383. </div>
  384. </div>
  385. </div>
  386. <div class="modal fade" id="mobile" role="dialog">
  387. <div class="we7-modal-dialog modal-dialog">
  388. <div class="modal-content">
  389. <div class="modal-header">
  390. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  391. <div class="modal-title">修改手机号</div>
  392. </div>
  393. <div class="modal-body">
  394. <div class="form-group">
  395. <input type="text" ng-model="userOriginal.mobile" class="form-control" placeholder="mobile" />
  396. <span class="help-block"></span>
  397. </div>
  398. </div>
  399. <div class="modal-footer">
  400. <button type="button" class="btn btn-primary" ng-click="httpChange('mobile')">确定</button>
  401. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. <div class="modal fade" id="vice_founder_name" role="dialog">
  407. <div class="we7-modal-dialog modal-dialog">
  408. <div class="modal-content">
  409. <div class="modal-header">
  410. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  411. <div class="modal-title">修改副创始人姓名</div>
  412. </div>
  413. <div class="modal-body">
  414. <div class="form-group">
  415. <input type="text" ng-model="userOriginal.vice_founder_name" class="form-control" placeholder="副创始人姓名" />
  416. <span class="help-block"></span>
  417. </div>
  418. </div>
  419. <div class="modal-footer">
  420. <button type="button" class="btn btn-primary" ng-click="httpChange('vice_founder_name')">确定</button>
  421. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. <script>
  428. require(['underscore'], function(){
  429. angular.module('userProfile').value('config', {
  430. user: {php echo !empty($user) ? json_encode($user) : 'null'},
  431. profile: {php echo !empty($profile) ? json_encode($profile) : 'null'},
  432. account_num: {php echo !empty($account_num) ? json_encode($account_num) : 'null'},
  433. extra_fields: {php echo !empty($extra_fields) ? json_encode($extra_fields) : 'null'},
  434. links: {
  435. userPost: "{php echo url('user/profile/post')}",
  436. recycleUser: "{php echo url('user/display/operate', array('type' => 'recycle'))}",
  437. },
  438. });
  439. angular.bootstrap($('#js-user-edit-base'), ['userProfile']);
  440. });
  441. </script>
  442. {template 'common/footer'}