92c2a9518b9323ca7265390a9ea208a4.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. <?php if (!defined('THINK_PATH')) exit();?><!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': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_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' : <?php echo 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="<?php echo ($member['avatar']); ?>" style='width:50px;height:50px;padding:1px;border:1px solid #ccc' />
  75. <?php echo ($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="<?php echo ($member['openid']); ?>"><?php echo ($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='<?php echo ($level['id']); ?>' <?php if( $member['level_id']==$level['id']){ ?>selected<?php } ?>><?php echo ($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='<?php echo ($group['id']); ?>' <?php if( $group['id'] == $member['groupid'] ){ ?>selected<?php } ?>><?php echo ($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="<?php echo ($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="<?php echo ($saler['avatar']); ?>">
  120. <div class="layadmin-maillist-img" style=""><?php echo ($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="<?php echo ($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="<?php echo ($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'><?php echo ($member['score']); ?>&nbsp;&nbsp;
  145. <a class="selection_box ajaxModal " data-href="<?php echo 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="<?php echo 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'><?php echo ($member['account_money']); ?>&nbsp;&nbsp;
  154. <a class="selection_box ajaxModal" data-href="<?php echo 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="<?php echo 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="<?php echo 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="<?php echo 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'><?php echo 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'><?php echo 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>姓名:<?php echo ($member['form_info']['username']); ?> </span><br/>
  245. <span>电话:<?php echo ($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'><?php echo 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'><?php echo 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"><?php echo ($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 if( $member['is_writecommiss_form'] == 1 ){ ?>
  279. <?php if( !empty($member['commiss_formcontent']) ){ ?>
  280. <div class="region-goods-details ">
  281. <?php foreach($member['commiss_formcontent'] as $val){ ?>
  282. <?php if( in_array($val['type'], array('text','textarea','select','radio') ) ){ ?>
  283. <div class="layui-form-item">
  284. <label class="layui-form-label"><?php echo $val['name']; ?></label>
  285. <div class="layui-input-block">
  286. <input type="text" name="<?php echo $val['name'].'_'.$val['type']; ?>" class="form-control commiss_formcontent" value="<?php echo $val['value']; ?>"/>
  287. </div>
  288. </div>
  289. <?php } ?>
  290. <?php if( in_array($val['type'], array('checkbox') ) ){ ?>
  291. <div class="layui-form-item">
  292. <label class="layui-form-label"><?php echo $val['name']; ?></label>
  293. <div class="layui-input-block">
  294. <?php $ck_val = ""; foreach($val['value'] as $vv){ $ck_val .= $vv.' '; } ?>
  295. <input type="text" name="<?php echo $val['name'].'_'.$val['type']; ?>" class="form-control commiss_formcontent" value="<?php echo $ck_val; ?>"/>
  296. </div>
  297. </div>
  298. <?php } ?>
  299. <?php } ?>
  300. </div>
  301. <?php }else{ ?>
  302. <div class="region-goods-details ">
  303. <p>暂无内容</p>
  304. </div>
  305. <?php } ?>
  306. <?php } ?>
  307. <!-- 分销表单 -->
  308. </div>
  309. <?php } ?>
  310. </div>
  311. </div>
  312. <div class="layui-form-item">
  313. <label class="layui-form-label"> </label>
  314. <div class="layui-input-block">
  315. <input type="submit" value="提交" lay-submit lay-filter="formDemo" class="btn btn-primary" />
  316. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  317. <a class="btn btn-default" style='margin-left:10px;' onclick="history.go(-1)">返回列表</a>
  318. </div>
  319. </div>
  320. </form>
  321. </div>
  322. </div>
  323. </div>
  324. <script src="/layuiadmin/layui/layui.js"></script>
  325. <script>
  326. layui.config({
  327. base: '/layuiadmin/' //静态资源所在路径
  328. }).extend({
  329. index: 'lib/index' //主入口模块
  330. }).use('index');
  331. </script>
  332. <script>
  333. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  334. var layer = layui.layer;
  335. var $;
  336. var cur_open_div;
  337. layui.use(['jquery', 'layer','form'], function(){
  338. $ = layui.$;
  339. var form = layui.form;
  340. $('#chose_member_id').click(function(){
  341. cur_open_div = $(this).attr('data-input');
  342. $.post("<?php echo U('user/zhenquery_commission', array('ok' => 1));?>", {}, function(shtml){
  343. layer.open({
  344. type: 1,
  345. area: '930px',
  346. content: shtml //注意,如果str是object,那么需要字符拼接。
  347. });
  348. });
  349. })
  350. form.on('radio(linktype)', function(data){
  351. if (data.value == 2) {
  352. $('#typeGroup').show();
  353. } else {
  354. $('#typeGroup').hide();
  355. }
  356. });
  357. $('#chose_link').click(function(){
  358. cur_open_div = $(this).attr('data-input');
  359. $.post("<?php echo U('util.selecturl', array('ok' => 1));?>", {}, function(shtml){
  360. layer.open({
  361. type: 1,
  362. area: '930px',
  363. content: shtml //注意,如果str是object,那么需要字符拼接。
  364. });
  365. });
  366. })
  367. //监听提交
  368. form.on('submit(formDemo)', function(data){
  369. $.ajax({
  370. url: data.form.action,
  371. type: data.form.method,
  372. data: data.field,
  373. dataType:'json',
  374. success: function (info) {
  375. if(info.status == 0)
  376. {
  377. layer.msg(info.result.message,{icon: 1,time: 2000});
  378. }else if(info.status == 1){
  379. var go_url = location.href;
  380. if( info.result.hasOwnProperty("url") )
  381. {
  382. go_url = info.result.url;
  383. }
  384. layer.msg('操作成功',{time: 1000,
  385. end:function(){
  386. location.href = info.result.url;
  387. }
  388. });
  389. }
  390. }
  391. });
  392. return false;
  393. });
  394. $('.actbtn').click(function(){
  395. var url = $(this).attr('data-href');
  396. var title = $(this).attr('data-title');
  397. $.post(url, {}, function(shtml){
  398. layer.open({
  399. type: 1,
  400. title: title,
  401. area: '930px',
  402. content: shtml //注意,如果str是object,那么需要字符拼接。
  403. });
  404. });
  405. })
  406. })
  407. function cancle_bind(obj,sdiv)
  408. {
  409. $('#'+sdiv).val('');
  410. $(obj).parent().parent().remove();
  411. }
  412. </script>
  413. <script>
  414. var ajax_url = "";
  415. $(function(){
  416. $(".ajaxModal").click(function () {
  417. var s_url = $(this).attr('data-href');
  418. ajax_url = s_url;
  419. $.ajax({
  420. url:s_url,
  421. type:"get",
  422. success:function(shtml){
  423. $('#ajaxModal').html(shtml);
  424. $("#ajaxModal").modal();
  425. }
  426. })
  427. });
  428. $(document).delegate(".modal-footer .btn-primary","click",function(){
  429. var s_data = $('#ajaxModal form').serialize();
  430. $.ajax({
  431. url:ajax_url,
  432. type:'post',
  433. dataType:'json',
  434. data:s_data,
  435. success:function(info){
  436. if(info.status == 0)
  437. {
  438. layer.msg(info.result.message,{icon: 1,time: 2000});
  439. }else if(info.status == 1){
  440. var go_url = location.href;
  441. if( info.result.hasOwnProperty("url") )
  442. {
  443. go_url = info.result.url;
  444. }
  445. layer.msg('操作成功',{time: 1000,
  446. end:function(){
  447. location.href = info.result.url;
  448. }
  449. });
  450. }
  451. }
  452. })
  453. return false;
  454. })
  455. //
  456. })
  457. </script>
  458. <div id="ajaxModal" class="modal fade" style="display: none;">
  459. </div>
  460. <script type="text/javascript">
  461. $(function () {
  462. $(".btn-maxcredit").unbind('click').click(function () {
  463. var val = $(this).val();
  464. if(val==1){
  465. $(".maxcreditinput").css({'display':'inline-block'});
  466. }else{
  467. $(".maxcreditinput").css({'display':'none'});
  468. }
  469. });
  470. })
  471. </script>
  472. </body>