edit-base.html 18 KB

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