Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

users_edit.htm 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="overflow-y: scroll;">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. {empty name='$iframe'}
  7. {include file="member/left" /}
  8. <div class="page" style="min-width:auto;margin-left:100px;">
  9. {else /}
  10. <div class="page" style="min-width:auto;">
  11. {/empty}
  12. <div class="fixed-bar">
  13. <div class="item-title" style="margin: 0;padding-bottom: 12px;border: unset;">
  14. {if condition='$Request.param.layer == 1'}
  15. <a class="back_xin" href="javascript:void(0);" onclick="parent.layer.closeAll();" ><i class="iconfont e-fanhui"></i></a>
  16. {else /}
  17. <a class="back_xin" href="javascript:history.back();"><i class="iconfont e-fanhui"></i></a>
  18. {/if}
  19. <div class="subject">
  20. <h3>编辑会员</h3>
  21. <h5></h5>
  22. </div>
  23. <div class="right">
  24. <div class="fbutton">
  25. {eq name='$info.is_lock' value='-1'}
  26. <a onclick="change_is_lock(this);" data-value="0" class="duobt">恢复发言</a>
  27. {/eq}
  28. {eq name='$info.is_lock' value='-99'}
  29. <a onclick="change_is_lock(this);" data-value="0" class="duobt">移除黑名单</a>
  30. {else /}
  31. <a onclick="change_is_lock(this);" data-value="-99" class="duobt">加入黑名单</a>
  32. {/eq}
  33. <a class="duobt" data-url="{:url('Member/users_del')}" data-id="{$info.users_id}" data-admin_id="{$info.admin_id}" data-username="{$info.username}" onClick="usersdel(this);">删除</a>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="users-tabs-content">
  39. <div class="users-tabs-tabpane">
  40. <form class="" id="postForm" action="{:url('Member/users_edit')}" method="post">
  41. {:token('__token_users_edit__')}
  42. <input type="hidden" name="users_id" value="{$info.users_id}">
  43. <input type="hidden" name="nickname" id="nickname" value="{$info.nickname}">
  44. <input type="hidden" name="is_lock" id="is_lock" value="{$info.is_lock}">
  45. <div class="vip-detail-base">
  46. <div class="content">
  47. <div class="base">
  48. <div class="form-title hasMargin">
  49. 基本资料
  50. </div>
  51. <div class="user-image-r">
  52. <div class="user-image-p"
  53. onClick="GetUploadify(1,'','allimg','head_pic_call_back');">
  54. <input type="hidden" name="head_pic" id="head_pic" value="{$info.head_pic}"/>
  55. <img id="img_head_pic"
  56. src="{$info.head_pic|get_head_pic=###,false,$info['sex']}" title="修改头像"
  57. style="cursor: pointer;"/>
  58. </div>
  59. <div class="user-image-n">
  60. ID:{$info.users_id}
  61. </div>
  62. <div class="user-image-h"><i class="iconfont e-zhuye"></i><a
  63. href="{:url('Member/syn_users_login', ['users_id'=>$info.users_id, 'mca'=>'user/Users/index'])}"
  64. target="_blank">个人中心</a>
  65. </div>
  66. </div>
  67. <div class="base-information users-row">
  68. <div class="users-col">
  69. <div class="user">
  70. <div class="users-form-con">
  71. <div class="users-form-item">
  72. <label class="users-form-item-label">用户昵称:</label>
  73. <div class="users-form-item-content">
  74. <div class="text"><span class="n-name">{$info.nickname|html_msubstr=###,0,20,true}</span> <a onclick="edit_nickname();"><i class="iconfont e-bianji2"></i></a></div>
  75. </div>
  76. </div>
  77. <div class="users-form-item">
  78. <label class="users-form-item-label">用户名称:</label>
  79. <div class="users-form-item-content">
  80. <div class="text">{$info.username}</div>
  81. </div>
  82. </div>
  83. <div class="users-form-item">
  84. <label class="users-form-item-label">登录密码:</label>
  85. <div class="users-form-item-content">
  86. <input type="text" name="password" id="password"
  87. autocomplete="off" class="input-txt" placeholder="不修改留空">
  88. </div>
  89. </div>
  90. <div class="users-form-item">
  91. <label class="users-form-item-label">绑定信息:</label>
  92. <div class="users-form-item-content">
  93. <div class="source">
  94. <div class="users-tooltip">
  95. <div class="users-tooltip-rel" style=" display: table-cell; ">
  96. {eq name='$info.is_mobile' value='1'}
  97. <img src="__SKIN__/images/r_phone.png">
  98. {else /}
  99. <img src="__SKIN__/images/r_phone_no.png">
  100. {/eq}
  101. </div>
  102. </div>
  103. <div class="users-tooltip">
  104. <div class="users-tooltip-rel" style=" display: table-cell; ">
  105. {if condition="in_array($info['thirdparty'], [5]) || !empty($info['wxlogin']['openid'])"}
  106. <img src="__SKIN__/images/r_weixin.png">
  107. {else /}
  108. <img src="__SKIN__/images/r_weixin_no.png">
  109. {/if}
  110. </div>
  111. </div>
  112. <div class="users-tooltip">
  113. <div class="users-tooltip-rel" style=" display: table-cell; ">
  114. {if condition="in_array($info['thirdparty'], [6])"}
  115. <img src="__SKIN__/images/r_wechat.png">
  116. {else /}
  117. <img src="__SKIN__/images/r_wechat_no.png">
  118. {/if}
  119. </div>
  120. </div>
  121. <div class="users-tooltip">
  122. <div class="users-tooltip-rel" style=" display: table-cell; ">
  123. {if condition="!empty($info.qqlogin)"}
  124. <img src="__SKIN__/images/r_qq.png">
  125. {else /}
  126. <img src="__SKIN__/images/r_qq_no.png">
  127. {/if}
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="users-form-con">
  135. <div class="users-form-item">
  136. <label class="users-form-item-label">会员级别:</label>
  137. <div class="users-form-item-content">
  138. <select name="level" id="level" onchange="IsOpenDays(this);">
  139. {volist name='$level' id='vo'}
  140. <option value="{$vo.level_id}" {eq name="$info.level" value="$vo.level_id" }selected{/eq}>{$vo.level_name}</option>
  141. {/volist}
  142. </select>
  143. </div>
  144. </div>
  145. <div class="users-form-item" {eq name="$info.level" value="1"}style="display: none;"{/eq} id="users_days" >
  146. <label class="users-form-item-label">会员天数:</label>
  147. <div class="users-form-item-content">
  148. <input type="text" name="level_maturity_days_up"
  149. id="level_maturity_days"
  150. value="{$info.level_maturity_days_new|default='0'}"
  151. onkeyup="this.value=this.value.replace(/[^0-9]/g,'');"
  152. onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\[^0-9]/g,''));"
  153. maxlength="10" class="input-txt">
  154. <p class="notic">请填写会员有效期天数,不填写则会默认为注册会员!</p>
  155. </div>
  156. <input type="hidden" name="level_maturity_days_new" value="{$info.level_maturity_days_new}">
  157. <input type="hidden" name="level_maturity_days_old" value="{$info.level_maturity_days}">
  158. <input type="hidden" id="level_member_upgrade" value="1">
  159. </div>
  160. <div class="users-form-item">
  161. <label class="users-form-item-label">手机号码:</label>
  162. <div class="users-form-item-content">
  163. <input type="text" name="users_[mobile_1]" id="users__mobile_1" autocomplete="off"
  164. class="input-txt" value="{$info.mobile}">
  165. </div>
  166. </div>
  167. <div class="users-form-item">
  168. <label class="users-form-item-label">邮箱地址:</label>
  169. <div class="users-form-item-content">
  170. <input type="text" id="users__email_2" name="users_[email_2]" autocomplete="off"
  171. class="input-txt" value="{$info.email}">
  172. </div>
  173. </div>
  174. </div>
  175. <div class="users-form-con">
  176. <div class="users-form-item">
  177. <label class="users-form-item-label">注册时间:</label>
  178. <div class="users-form-item-content">
  179. <div class="text">{$info.reg_time|date='Y-m-d H:i:s',###}</div>
  180. </div>
  181. </div>
  182. <div class="users-form-item">
  183. <label class="users-form-item-label">最后登录:</label>
  184. <div class="users-form-item-content">
  185. <div class="text">{$info.last_login|date='Y-m-d H:i:s',###}</div>
  186. </div>
  187. </div>
  188. <div class="users-form-item">
  189. <label class="users-form-item-label">登录 IP:</label>
  190. <div class="users-form-item-content">
  191. <div class="text">{$info.last_ip}</div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. {notempty name='$users_para'}
  199. <div class="base-information users-row">
  200. <div class="users-col-z">
  201. <div class="user">
  202. {include file="member/users_field"/}
  203. </div>
  204. </div>
  205. </div>
  206. {/notempty}
  207. <div class="base-information users-row">
  208. <div class="users-col-z">
  209. <div class="footer-btn">
  210. <button type="button" class="black-l users-btn" onclick="checkForm();">
  211. <span>保存</span>
  212. </button>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="asset">
  218. <div class="form-title hasMargin">
  219. 财务信息
  220. </div>
  221. <div class="asset-information users-row">
  222. <div class="users-col users-col-span-4">
  223. <div class="asset-information-content">
  224. <div class="asset-head">
  225. <p class="title-l">余额</p>
  226. <div class="title-r">
  227. <button type="button" class="users-btn users-btn-text"
  228. href="javascript:void(0);"
  229. data-href="{:url('Member/users_edit_money',['users_id'=>$info.users_id])}"
  230. onclick="openFullframe(this, '余额充值', '640px', '430px');">
  231. <span>充值</span>
  232. </button>
  233. <button type="button" class="users-btn users-btn-text" onclick="openFullframe(this, '余额明细', '1150px', '720px');"
  234. data-href="{:url('Member/users_money_detail',['users_id'=>$info.users_id])}">
  235. <span>明细</span>
  236. </button>
  237. </div>
  238. </div>
  239. <div class="asset-con">
  240. <p class="data">¥{$info.users_money|floatval=###}</p>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="users-col users-col-span-4">
  245. <div class="asset-information-content">
  246. <div class="asset-head">
  247. <p class="title-l">积分</p>
  248. <div class="title-r">
  249. <button type="button" class="users-btn users-btn-text"
  250. href="javascript:void(0);"
  251. data-href="{:url('Member/users_edit_score',['users_id'=>$info.users_id])}"
  252. onclick="openFullframe(this, '积分充值', '640px', '430px');">
  253. <span>充值</span>
  254. </button>
  255. <button type="button" class="users-btn users-btn-text"
  256. onclick="openFullframe(this, '积分明细', '1150px', '720px');"
  257. data-href="{:url('Member/users_score_detail',['users_id'=>$info.users_id])}">
  258. <span>明细</span>
  259. </button>
  260. </div>
  261. </div>
  262. <div class="asset-con">
  263. <p class="data">{$info.scores|default='0'}</p>
  264. </div>
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. {if condition='1 == $usersConfig.shop_open && 1 == $usersConfig.pay_open'}
  270. <div class="deal">
  271. <div class="form-title hasMargin">
  272. 订单信息
  273. </div>
  274. <div class="deal-information users-row">
  275. <div class="users-col users-col-span-xxl-6">
  276. <div class="deal-information-content">
  277. <div class="tit-name">订单交易</div>
  278. <div class="flex-a-center flex-dir-row flex-just-between Statistics_center_left_item_list">
  279. <p class="flex-dir-column">
  280. <span class="column-shu sort_style" data-href="{:url('Shop/users_edit_order_index',['users_id'=>$info.users_id])}"
  281. onclick="openFullframe(this, '订单列表', '100%', '100%');">
  282. {$order_count.0.count|default=0}笔</span>
  283. <span class="column-biao">累计订单数</span>
  284. </p>
  285. <p class="flex-dir-column tr">
  286. <span class="column-shu">¥{$order_count.0.sum|default=0}</span>
  287. <span class="column-biao">累计成交额</span>
  288. </p>
  289. </div>
  290. </div>
  291. </div>
  292. <div class="users-col users-col-span-xxl-6">
  293. <div class="deal-information-content">
  294. <div class="tit-name">退款订单</div>
  295. <div class="flex-a-center flex-dir-row flex-just-between Statistics_center_left_item_list">
  296. <p class="flex-dir-column">
  297. <span class="column-shu sort_style" data-href="{:url('ShopService/users_edit_after_service',['users_id'=>$info.users_id])}"
  298. onclick="openFullframe(this, '退款订单列表', '100%', '100%');">
  299. {$refund_count.0.count|default=0}笔</span>
  300. <span class="column-biao">累计退款数</span>
  301. </p>
  302. <p class="flex-dir-column tr">
  303. <span class="column-shu">¥{$refund_count.0.sum|default=0}</span>
  304. <span class="column-biao">累计退款额</span>
  305. </p>
  306. </div>
  307. </div>
  308. </div>
  309. </div>
  310. </div>
  311. {/if}
  312. </div>
  313. </form>
  314. </div>
  315. </div>
  316. </div>
  317. <input type="hidden" name="security_ask_old" id="security_ask_old" value="{$global['security_ask']|default=''}">
  318. <script type="text/javascript">
  319. function edit_nickname() {
  320. layer.prompt({
  321. value: '{$info.nickname|default=""}',
  322. title: '修改昵称',
  323. }, function(value, index, elem){
  324. $('#nickname').val(value);
  325. checkForm();
  326. layer.close(index);
  327. });
  328. }
  329. function IsOpenDays(obj) {
  330. if (1 == $('#level_member_upgrade').val()) {
  331. var exptime = 0;
  332. var level_id = $(obj).val();
  333. if (1 == level_id) {
  334. $('#users_days').css('display', 'none');
  335. $('#level_maturity_days').val(exptime);
  336. } else {
  337. $.ajax({
  338. type: 'post',
  339. url : "{:url('Member/query_level_days')}",
  340. data: {level_id: level_id, '_ajax': 1},
  341. dataType: 'json',
  342. success: function (res) {
  343. layer.closeAll();
  344. if (res.code == 1) {
  345. exptime = parseInt(res.data);
  346. $('#level_maturity_days').val(exptime);
  347. } else {
  348. showErrorMsg(res.msg);
  349. }
  350. },
  351. error: function (e) {
  352. layer.closeAll();
  353. showErrorAlert(e.responseText);
  354. }
  355. });
  356. $('#users_days').css('display', '');
  357. $('#level_maturity_days').css('border-bottom', 'solid 1px rgba(51,152,204,0.8)').focus();
  358. }
  359. }
  360. }
  361. // 判断输入框是否为空
  362. function checkForm() {
  363. if (1 == $('#level_member_upgrade').val()) {
  364. if (1 != $('#level').val() && (!$('#level_maturity_days').val() || 0 == $('#level_maturity_days').val())) {
  365. showErrorMsg('请填写会员有效期天数!');
  366. $('#level_maturity_days').focus();
  367. return false;
  368. }
  369. }
  370. var password = $.trim($('#password').val());
  371. if (0 < password.length) {
  372. {$pwdJsCode|default=''}
  373. var security_verifyfunc = {$global['security_verifyfunc']|json_encode=###};
  374. if($.inArray('edit_pwd', security_verifyfunc) != -1){
  375. if (!ajax_isverify_answer()) {
  376. autoload_security();
  377. return false;
  378. }
  379. }
  380. }
  381. layer_loading('正在处理');
  382. setTimeout(function (){
  383. $.ajax({
  384. type: 'post',
  385. url: "{:url('Member/users_edit', ['_ajax'=>1])}",
  386. data: $('#postForm').serialize(),
  387. dataType: 'json',
  388. success: function (res) {
  389. layer.closeAll();
  390. if (res.code == 1) {
  391. layer.msg(res.msg, {icon: 1, time: 1000}, function () {
  392. window.location.reload();
  393. });
  394. } else {
  395. showErrorMsg(res.msg);
  396. }
  397. },
  398. error: function (e) {
  399. layer.closeAll();
  400. showErrorAlert(e.responseText);
  401. }
  402. });
  403. }, 1);
  404. }
  405. function head_pic_call_back(fileurl_tmp) {
  406. $("#head_pic").val(fileurl_tmp);
  407. $("#img_head_pic").attr('src', fileurl_tmp);
  408. }
  409. function change_is_lock(obj) {
  410. var value = $(obj).attr('data-value');
  411. $('#is_lock').val(value);
  412. if (-99 == value) {
  413. var msg = "加入黑名单将限制以下功能:<br/>1.禁止会员中心全部数据的提交。<br/>2.禁止问答发帖/回帖等数据提交。";
  414. layer.confirm(msg, {
  415. shade: layer_shade,
  416. area: ['480px', '230px'],
  417. move: false,
  418. title: '提示',
  419. btnAlign:'r',
  420. closeBtn: 3,
  421. btn: ['确定','取消'] ,//按钮
  422. success: function () {
  423. $(".layui-layer-content").css('text-align', 'left');
  424. }
  425. }, function(){
  426. checkForm();
  427. }, function(index){
  428. layer.close(index);
  429. });
  430. } else {
  431. checkForm();
  432. }
  433. }
  434. // 删除
  435. function usersdel(obj){
  436. var admin_id = $(obj).data('admin_id');
  437. if (0 < admin_id) {
  438. var title = "系统管理员前台ID,删除不可恢复?<br/>包含该会员数据有(订单、投稿、问答、留言等)";
  439. } else {
  440. var title = "确认彻底删除?<br/>包含该会员数据有(订单、投稿、问答、留言等)";
  441. }
  442. layer.confirm(title, {
  443. shade: layer_shade,
  444. area: ['480px', '190px'],
  445. move: false,
  446. title: '提示',
  447. btnAlign:'r',
  448. closeBtn: 3,
  449. btn: ['确定','取消'] ,//按钮
  450. success: function () {
  451. $(".layui-layer-content").css('text-align', 'left');
  452. }
  453. }, function(){
  454. layer_loading('正在处理');
  455. // 确定
  456. $.ajax({
  457. type : 'post',
  458. url : $(obj).attr('data-url'),
  459. data : {del_id:$(obj).attr('data-id'), _ajax:1},
  460. dataType : 'json',
  461. success : function(data){
  462. layer.closeAll();
  463. if(data.code == 1){
  464. layer.msg(data.msg, {icon: 1});
  465. window.location.href = "{:url('Member/users_index')}";
  466. }else{
  467. layer.alert(data.msg, {icon: 2, title:false});
  468. }
  469. }
  470. })
  471. }, function(index){
  472. layer.close(index);
  473. });
  474. return false;
  475. }
  476. </script>
  477. {include file="public/footer" /}