detail.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <style>
  37. .selection_box
  38. {
  39. padding: 5px;
  40. font-size: 12px;
  41. background-color: #009688;
  42. color: #fff;
  43. }
  44. </style>
  45. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  46. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  47. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  48. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  49. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  50. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  51. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  52. <link href="/static/css/snailfish.css" rel="stylesheet">
  53. </head>
  54. <body layadmin-themealias="default">
  55. <div class="layui-fluid">
  56. <div class="layui-card">
  57. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">会员详情</span></div>
  58. <div class="layui-card-body" style="padding:15px;">
  59. <form action="" method="post" class="layui-form" lay-filter="component-layui-form-item" enctype="multipart/form-data" >
  60. <input type="hidden" name="is_showform" value="<?php echo $is_showform; ?>" />
  61. <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  62. <ul class="layui-tab-title">
  63. <li class="<?php if($is_showform ==0){ ?>layui-this<?php } ?>">会员详情</li>
  64. <?php if($member['is_writecommiss_form'] == 1){ ?>
  65. <li class="<?php if($is_showform ==1){ ?>layui-this<?php } ?>">分销表单</li>
  66. <?php } ?>
  67. </ul>
  68. <div class="layui-tab-content" >
  69. <div class="layui-tab-item <?php if($is_showform ==0){ ?>layui-show<?php } ?>" id="member_detail">
  70. <!--- begin -->
  71. <div class="layui-form-item">
  72. <label class="layui-form-label">用户</label>
  73. <div class="layui-input-block">
  74. <img class="radius50" src="{$member['avatar']}" style='width:50px;height:50px;padding:1px;border:1px solid #ccc' />
  75. {$member['username']}
  76. </div>
  77. </div>
  78. <div class="layui-form-item">
  79. <label class="layui-form-label">OPENID</label>
  80. <div class="layui-input-block">
  81. <div class="form-control-static js-clip text-primary" data-url="{$member['openid']}">{$member['openid']}</div>
  82. </div>
  83. </div>
  84. <div class="layui-form-item">
  85. <label class="layui-form-label">会员等级</label>
  86. <div class="layui-input-block">
  87. <select name='data[level_id]' class='form-control'>
  88. <option value=''>普通会员</option>
  89. <?php foreach( $level_list as $level ){ ?>
  90. <option value='{$level['id']}' <?php if( $member['level_id']==$level['id']){ ?>selected<?php } ?>>{$level['levelname']}</option>
  91. <?php } ?>
  92. </select>
  93. </div>
  94. </div>
  95. <div class="layui-form-item">
  96. <label class="layui-form-label">会员分组</label>
  97. <div class="layui-input-block">
  98. <select name='data[groupid]' class='form-control select2' placeholder="无分组">
  99. <option value='' <?php if( empty($group['id'])){ ?>selected<?php } ?>>默认分组</option>
  100. <?php foreach( $group_list as $group ){ ?>
  101. <option value='{$group['id']}' <?php if( $group['id'] == $member['groupid'] ){ ?>selected<?php } ?>>{$group['groupname']}</option>
  102. <?php } ?>
  103. </select>
  104. </div>
  105. </div>
  106. <?php if($commiss_level > 0){ ?>
  107. <div class="layui-form-item">
  108. <label class="layui-form-label must">上级分销商</label>
  109. <div class="layui-input-block">
  110. <div class="input-group " style="margin: 0;">
  111. <input type="text" disabled value="{$member['agentid']}" class="form-control valid" name="data[agentid]" placeholder="" id="member_id">
  112. <span class="input-group-btn">
  113. <span data-input="#member_id" id="chose_member_id" class="btn btn-default">选择会员</span>
  114. </span>
  115. </div>
  116. <?php if($saler){ ?>
  117. <div class="input-group " style="margin: 0;">
  118. <div class="layadmin-text-center choose_user">
  119. <img style="" src="{$saler['avatar']}">
  120. <div class="layadmin-maillist-img" style="">{$saler['nickname']}</div>
  121. <button type="button" class="layui-btn layui-btn-sm" onclick="cancle_bind(this,'member_id')"><i class="layui-icon">&#xe640;</i></button>
  122. </div>
  123. </div>
  124. <?php } ?>
  125. </div>
  126. </div>
  127. <?php } ?>
  128. <div class="layui-form-item">
  129. <label class="layui-form-label">真实姓名</label>
  130. <div class="layui-input-block">
  131. <input type="text" name="data[realname]" class="form-control" value="{$member['realname']}"/>
  132. </div>
  133. </div>
  134. <div class="layui-form-item">
  135. <label class="layui-form-label">手机号</label>
  136. <div class="layui-input-block">
  137. <input type="text" name="data[telephone]" class="form-control" value="{$member['telephone']}"/>
  138. </div>
  139. </div>
  140. <input type="hidden" name="member_id" value="777">
  141. <div class="layui-form-item">
  142. <label class="layui-form-label">积分</label>
  143. <div class="layui-input-block">
  144. <div class='form-control-static'>{$member['score']}&nbsp;&nbsp;
  145. <a class="selection_box ajaxModal " data-href="{:U('user/recharge', array('type'=> 'score','id'=>$member['member_id']))}" style="padding-left: 5px;cursor:pointer;">充值</a>&nbsp;&nbsp;
  146. <a class="text-primary ajaxModal" style="color:blue;" href="{:U('user/integral_flow', array('id'=>$member['member_id']))}"title=''>积分流水</a>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="layui-form-item">
  151. <label class="layui-form-label">余额</label>
  152. <div class="layui-input-block">
  153. <div class='form-control-static'>{$member['account_money']}&nbsp;&nbsp;
  154. <a class="selection_box ajaxModal" data-href="{:U('user/recharge', array('type'=> 'account_money','id'=>$member['member_id']))}" style="padding-left: 5px;cursor:pointer;">充值</a>&nbsp;&nbsp;
  155. <a class="text-primary ajaxModal" style="color:blue;" href="{:U('user/recharge_flow', array('id'=>$member['member_id']))}"title=''>余额流水</a>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="layui-form-item">
  160. <label class="layui-form-label">付费会员</label>
  161. <div class="layui-input-block">
  162. <div class='form-control-static'>
  163. <?php if($member['card_id'] > 0){?>
  164. <span>会员卡名称:</span>
  165. <span class="text-primary"><?php echo $member['cardname']; ?></span>
  166. &nbsp;&nbsp;&nbsp;&nbsp;
  167. <?php if($member['card_end_time'] > time()){ ?>
  168. <span style="color:#c31d0c;">有效期内</span>
  169. &nbsp;&nbsp;&nbsp;&nbsp;
  170. <span>到期时间:<?php echo date('Y-m-d',$member['card_end_time']); ?></span>
  171. &nbsp;&nbsp;&nbsp;&nbsp;
  172. <?php }else{ ?>
  173. <span style="color:#c31d0c;">已到期</span>
  174. &nbsp;&nbsp;&nbsp;&nbsp;
  175. <span style="color:#c31d0c;">到期时间:<?php echo date('Y-m-d',$member['card_end_time']); ?></span>
  176. &nbsp;&nbsp;&nbsp;&nbsp;
  177. <?php } ?>
  178. <a class="layui-btn layui-btn-xs actbtn" href="javascript:void(0)" data-href="{:U('user/edit_expiretime', array('id'=>$member['member_id']))}" data-title="修改到期时间" title="修改到期时间">修改到期时间</a>
  179. <?php }else{ ?>
  180. <span class="text-primary">非会员</span>
  181. &nbsp;&nbsp;&nbsp;&nbsp;
  182. <a class="layui-btn layui-btn-xs actbtn" href="javascript:void(0)" data-href="{:U('user/query_card', array('id'=>$member['member_id']))}" data-title="开通会员" title="开通会员">开通会员</a>
  183. <?php } ?>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="layui-form-item">
  188. <label class="layui-form-label">注册时间</label>
  189. <div class="layui-input-block">
  190. <div class='form-control-static'>{:date("Y-m-d H:i:s",$member['create_time'])}</div>
  191. </div>
  192. </div>
  193. <?php if(!empty($member['comsiss_time'])){ ?>
  194. <div class="layui-form-item">
  195. <label class="layui-form-label">成为分销商时间</label>
  196. <div class="layui-input-block">
  197. <div class='form-control-static'>{:date("Y-m-d H:i:s",$member['comsiss_time'])}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  198. <?php if($member['is_writecommiss_form'] == 1){ ?>
  199. <a class="layui-btn layui-btn-xs " href="javascript:void(0)" title="">
  200. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="表单">
  201. <i class='icow icow-bianji2'></i>表单
  202. </span>
  203. </a>
  204. <?php } ?>
  205. <?php if($member['is_share_tj'] == 1){ ?>
  206. <a class="layui-btn layui-btn-xs " href="javascript:void(0)" title="">
  207. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="分享">
  208. <i class='icow icow-bianji2'></i>分享
  209. </span>
  210. </a>
  211. <?php } ?>
  212. </div>
  213. </div>
  214. </div>
  215. <?php } ?>
  216. <div class="layui-form-item">
  217. <label class="layui-form-label">是否禁用</label>
  218. <div class="layui-input-block">
  219. <label class="radio-inline"><input type="radio" name="data[isblack]" value="1" <?php if( $member['isblack']==1){ ?>checked<?php } ?> title="禁用" ></label>
  220. <label class="radio-inline" ><input type="radio" name="data[isblack]" value="0" <?php if( $member['isblack']==0){ ?>checked<?php } ?> title="启用" ></label>
  221. <span class="help-block">设置禁用后,此会员无法访问商城</span>
  222. </div>
  223. </div>
  224. <?php if($is_user_shenhe == 1){ ?>
  225. <div class="layui-form-item">
  226. <label class="layui-form-label">是否审核</label>
  227. <div class="layui-input-block">
  228. <label class="radio-inline"><input type="radio" name="data[is_apply_state]" value="1" <?php if( $member['is_apply_state']==1){ ?>checked<?php } ?> title="审核通过" ></label>
  229. <label class="radio-inline"><input type="radio" name="data[is_apply_state]" value="0" <?php if( $member['is_apply_state']==0 ){ ?>checked<?php } ?> title="未审核" ></label>
  230. <label class="radio-inline" ><input type="radio" name="data[is_apply_state]" value="2" <?php if( $member['is_apply_state']==2){ ?>checked<?php } ?> title="拒绝审核" ></label>
  231. <span class="help-block">设置未审核、拒绝审核后,此会员无法下单</span>
  232. </div>
  233. </div>
  234. <?php } ?>
  235. <?php if($is_get_formdata == 1){ ?>
  236. <div class="layui-form-item">
  237. <label class="layui-form-label">会员表单</label>
  238. <div class="layui-input-block">
  239. <div class='form-control-static'>
  240. <?php if($member['is_write_form'] == 0) { ?>
  241. <span>未填写 </span><br/>
  242. <?php }else{ ?>
  243. <?php if( !empty($member['form_info']) ){ ?>
  244. <span>姓名:{$member['form_info']['username']} </span><br/>
  245. <span>电话:{$member['form_info']['mobile']} </span><br/>
  246. <?php }else{ ?>
  247. <span>姓名:-- </span><br/>
  248. <span>电话:-- </span><br/>
  249. <?php } ?>
  250. <?php } ?>
  251. </div>
  252. </div>
  253. </div>
  254. <?php } ?>
  255. <div class="layui-form-item">
  256. <label class="layui-form-label">成交订单数</label>
  257. <div class="layui-input-block">
  258. <div class='form-control-static'>{:round($member['self_ordercount'],0)} </div>
  259. </div>
  260. </div>
  261. <div class="layui-form-item">
  262. <label class="layui-form-label">成交金额</label>
  263. <div class="layui-input-block">
  264. <div class='form-control-static'>{:round($member['self_ordermoney'],2)} 元</div>
  265. </div>
  266. </div>
  267. <div class="layui-form-item">
  268. <label class="layui-form-label">备注</label>
  269. <div class="layui-input-block">
  270. <textarea name="data[content]" class='form-control' rows="5">{$member['content']}</textarea>
  271. </div>
  272. </div>
  273. </div>
  274. <!-- end -->
  275. <?php if($member['is_writecommiss_form'] == 1){ ?>
  276. <div class="layui-tab-item <?php if($is_showform ==1){ ?>layui-show<?php } ?>" id="member_distribution">
  277. <!-- 分销表单 -->
  278. <?php
  279. if( $member['is_writecommiss_form'] == 1 ){ ?>
  280. <?php if( !empty($member['commiss_formcontent']) ){ ?>
  281. <div class="region-goods-details ">
  282. <?php foreach($member['commiss_formcontent'] as $val){ ?>
  283. <?php if( in_array($val['type'], array('text','textarea','select','radio') ) ){ ?>
  284. <div class="layui-form-item">
  285. <label class="layui-form-label"><?php echo $val['name']; ?></label>
  286. <div class="layui-input-block">
  287. <input type="text" name="<?php echo $val['name'].'_'.$val['type']; ?>" class="form-control commiss_formcontent" value="<?php echo $val['value']; ?>"/>
  288. </div>
  289. </div>
  290. <?php } ?>
  291. <?php if( in_array($val['type'], array('checkbox') ) ){ ?>
  292. <div class="layui-form-item">
  293. <label class="layui-form-label"><?php echo $val['name']; ?></label>
  294. <div class="layui-input-block">
  295. <?php
  296. $ck_val = "";
  297. foreach($val['value'] as $vv){
  298. $ck_val .= $vv.' ';
  299. }
  300. ?>
  301. <input type="text" name="<?php echo $val['name'].'_'.$val['type']; ?>" class="form-control commiss_formcontent" value="<?php echo $ck_val; ?>"/>
  302. </div>
  303. </div>
  304. <?php } ?>
  305. <?php } ?>
  306. </div>
  307. <?php }else{ ?>
  308. <div class="region-goods-details ">
  309. <p>暂无内容</p>
  310. </div>
  311. <?php } ?>
  312. <?php } ?>
  313. <!-- 分销表单 -->
  314. </div>
  315. <?php } ?>
  316. </div>
  317. </div>
  318. <div class="layui-form-item">
  319. <label class="layui-form-label"> </label>
  320. <div class="layui-input-block">
  321. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  322. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  323. <a class="btn btn-default" style='margin-left:10px;' onclick="history.go(-1)">返回列表</a>
  324. </div>
  325. </div>
  326. </form>
  327. </div>
  328. </div>
  329. </div>
  330. <script src="/layuiadmin/layui/layui.js"></script>
  331. <script>
  332. layui.config({
  333. base: '/layuiadmin/' //静态资源所在路径
  334. }).extend({
  335. index: 'lib/index' //主入口模块
  336. }).use('index');
  337. </script>
  338. <script>
  339. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  340. var layer = layui.layer;
  341. var $;
  342. var cur_open_div;
  343. layui.use(['jquery', 'layer','form'], function(){
  344. $ = layui.$;
  345. var form = layui.form;
  346. $('#chose_member_id').click(function(){
  347. cur_open_div = $(this).attr('data-input');
  348. $.post("{:U('user/zhenquery_commission', array('ok' => 1))}", {}, function(shtml){
  349. layer.open({
  350. type: 1,
  351. area: '930px',
  352. content: shtml //注意,如果str是object,那么需要字符拼接。
  353. });
  354. });
  355. })
  356. form.on('radio(linktype)', function(data){
  357. if (data.value == 2) {
  358. $('#typeGroup').show();
  359. } else {
  360. $('#typeGroup').hide();
  361. }
  362. });
  363. $('#chose_link').click(function(){
  364. cur_open_div = $(this).attr('data-input');
  365. $.post("{:U('util.selecturl', array('ok' => 1))}", {}, function(shtml){
  366. layer.open({
  367. type: 1,
  368. area: '930px',
  369. content: shtml //注意,如果str是object,那么需要字符拼接。
  370. });
  371. });
  372. })
  373. //监听提交
  374. form.on('submit(formDemo)', function(data){
  375. $.ajax({
  376. url: data.form.action,
  377. type: data.form.method,
  378. data: data.field,
  379. dataType:'json',
  380. success: function (info) {
  381. if(info.status == 0)
  382. {
  383. layer.msg(info.result.message,{icon: 1,time: 2000});
  384. }else if(info.status == 1){
  385. var go_url = location.href;
  386. if( info.result.hasOwnProperty("url") )
  387. {
  388. go_url = info.result.url;
  389. }
  390. layer.msg('操作成功',{time: 1000,
  391. end:function(){
  392. location.href = info.result.url;
  393. }
  394. });
  395. }
  396. }
  397. });
  398. return false;
  399. });
  400. $('.actbtn').click(function(){
  401. var url = $(this).attr('data-href');
  402. var title = $(this).attr('data-title');
  403. $.post(url, {}, function(shtml){
  404. layer.open({
  405. type: 1,
  406. title: title,
  407. area: '930px',
  408. content: shtml //注意,如果str是object,那么需要字符拼接。
  409. });
  410. });
  411. })
  412. })
  413. function cancle_bind(obj,sdiv)
  414. {
  415. $('#'+sdiv).val('');
  416. $(obj).parent().parent().remove();
  417. }
  418. </script>
  419. <script>
  420. var ajax_url = "";
  421. $(function(){
  422. $(".ajaxModal").click(function () {
  423. var s_url = $(this).attr('data-href');
  424. ajax_url = s_url;
  425. $.ajax({
  426. url:s_url,
  427. type:"get",
  428. success:function(shtml){
  429. $('#ajaxModal').html(shtml);
  430. $("#ajaxModal").modal();
  431. }
  432. })
  433. });
  434. $(document).delegate(".modal-footer .btn-primary","click",function(){
  435. var s_data = $('#ajaxModal form').serialize();
  436. $.ajax({
  437. url:ajax_url,
  438. type:'post',
  439. dataType:'json',
  440. data:s_data,
  441. success:function(info){
  442. if(info.status == 0)
  443. {
  444. layer.msg(info.result.message,{icon: 1,time: 2000});
  445. }else if(info.status == 1){
  446. var go_url = location.href;
  447. if( info.result.hasOwnProperty("url") )
  448. {
  449. go_url = info.result.url;
  450. }
  451. layer.msg('操作成功',{time: 1000,
  452. end:function(){
  453. location.href = info.result.url;
  454. }
  455. });
  456. }
  457. }
  458. })
  459. return false;
  460. })
  461. //
  462. })
  463. </script>
  464. <div id="ajaxModal" class="modal fade" style="display: none;">
  465. </div>
  466. <script type="text/javascript">
  467. $(function () {
  468. $(".btn-maxcredit").unbind('click').click(function () {
  469. var val = $(this).val();
  470. if(val==1){
  471. $(".maxcreditinput").css({'display':'inline-block'});
  472. }else{
  473. $(".maxcreditinput").css({'display':'none'});
  474. }
  475. });
  476. })
  477. </script>
  478. </body>