b436c82e865e70b59ffe4b256f4e0d62.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <?php /*a:5:{s:69:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\agent\agent_manage\stair.php";i:1596607428;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="zh-CN">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
  8. <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
  9. <?php endif; ?>
  10. <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
  11. <link href="/system/css/layui-admin.css" rel="stylesheet">
  12. <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
  13. <link href="/system/frame/css/animate.min.css" rel="stylesheet">
  14. <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
  15. <script src="/system/frame/js/jquery.min.js"></script>
  16. <script src="/system/frame/js/bootstrap.min.js"></script>
  17. <script src="/static/plug/layui/layui.all.js"></script>
  18. <script>
  19. $eb = parent._mpApi;
  20. window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
  21. window.module="<?php echo app('http')->getName();?>";
  22. </script>
  23. <title></title>
  24. <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
  25. <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
  26. <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
  27. <script>
  28. var hostname = location.hostname;
  29. if(location.port) hostname += ':' + location.port;
  30. requirejs.config({
  31. map: {
  32. '*': {
  33. 'css': '/static/plug/requirejs/require-css.js'
  34. }
  35. },
  36. shim:{
  37. 'iview':{
  38. deps:['css!iviewcss']
  39. },
  40. 'layer':{
  41. deps:['css!layercss']
  42. }
  43. },
  44. baseUrl:'//'+hostname+'/',
  45. paths: {
  46. 'static':'static',
  47. 'system':'system',
  48. 'vue':'static/plug/vue/dist/vue.min',
  49. 'axios':'static/plug/axios.min',
  50. 'iview':'static/plug/iview/dist/iview.min',
  51. 'iviewcss':'static/plug/iview/dist/styles/iview',
  52. 'lodash':'static/plug/lodash',
  53. 'layer':'static/plug/layer/layer',
  54. 'layercss':'static/plug/layer/theme/default/layer',
  55. 'jquery':'static/plug/jquery/jquery.min',
  56. 'moment':'static/plug/moment',
  57. 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
  58. 'formCreate':'/static/plug/form-create/form-create.min',
  59. },
  60. basket: {
  61. excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  62. // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  63. }
  64. });
  65. </script>
  66. <script type="text/javascript" src="/system/util/mpFrame.js"></script>
  67. </head>
  68. <body class="gray-bg">
  69. <div class="wrapper wrapper-content">
  70. <div class="layui-fluid">
  71. <div class="layui-row layui-col-space15" id="app" v-cloak="">
  72. <!--搜索条件-->
  73. <div class="layui-col-md12">
  74. <div class="layui-card">
  75. <div class="layui-card-header">搜索条件</div>
  76. <div class="layui-card-body">
  77. <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
  78. <div class="layui-card-body">
  79. <div class="layui-row layui-col-space10 layui-form-item">
  80. <div class="layui-col-lg12">
  81. <label class="layui-form-label">时间选择:</label>
  82. <div class="layui-input-block" data-type="data" v-cloak="">
  83. <button class="layui-btn layui-btn-sm" type="button" v-for="item in dataList" @click="setData(item)" :class="{'layui-btn-primary':where.data!=item.value}">{{item.name}}</button>
  84. <button class="layui-btn layui-btn-sm" type="button" ref="time" @click="setData({value:'zd',is_zd:true})" :class="{'layui-btn-primary':where.data!='zd'}">自定义</button>
  85. <button type="button" class="layui-btn layui-btn-sm layui-btn-primary" v-show="showtime==true" ref="date_time"><?php echo htmlentities($year['0']); ?> - <?php echo htmlentities($year['1']); ?></button>
  86. </div>
  87. </div>
  88. <div class="layui-col-lg12">
  89. <label class="layui-form-label">用户类型:</label>
  90. <div class="layui-input-block" v-cloak="">
  91. <button class="layui-btn layui-btn-sm" :class="{'layui-btn-primary':where.type!=item.value}" @click="where.type = item.value" type="button" v-for="item in spread_type">{{item.name}}
  92. <span v-if="item.count!=undefined" class="layui-badge layui-bg-gray">{{item.count}}</span></button>
  93. </div>
  94. </div>
  95. <div class="layui-col-lg12">
  96. <label class="layui-form-label">用户昵称:</label>
  97. <div class="layui-input-block">
  98. <input type="text" name="nickname" style="width: 50%" v-model="where.nickname" placeholder="请输入姓名、电话、UID" class="layui-input">
  99. </div>
  100. </div>
  101. <div class="layui-col-lg12">
  102. <div class="layui-input-block">
  103. <button @click="search" type="button" class="layui-btn layui-btn-sm layui-btn-normal">
  104. <i class="layui-icon layui-icon-search"></i>搜索</button>
  105. <button @click="refresh" type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
  106. <i class="layui-icon layui-icon-refresh" ></i>刷新</button>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <!--end-->
  116. <!-- 中间详细信息-->
  117. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col +' layui-col-xs'+item.col:'layui-col-sm4 layui-col-md3'" v-for="item in badge" v-cloak="" v-if="item.count > 0">
  118. <div class="layui-card">
  119. <div class="layui-card-header">
  120. {{item.name}}
  121. <span class="layui-badge layuiadmin-badge" :class="item.background_color">{{item.field}}</span>
  122. </div>
  123. <div class="layui-card-body">
  124. <p class="layuiadmin-big-font">{{item.count}}</p>
  125. <p v-show="item.content!=undefined">
  126. {{item.content}}
  127. <span class="layuiadmin-span-color">{{item.sum}}<i :class="item.class"></i></span>
  128. </p>
  129. </div>
  130. </div>
  131. </div>
  132. <!--enb-->
  133. </div>
  134. <div class="layui-row layui-col-space15">
  135. <div class="layui-col-md12">
  136. <div class="layui-card">
  137. <div class="layui-card-header">分销员列表</div>
  138. <div class="layui-card-body">
  139. <div class="layui-btn-container">
  140. <!-- <div class="layui-btn-group conrelTable">-->
  141. <!-- <button class="layui-btn layui-btn-sm layui-btn-normal" type="button" data-type="refresh"><i class="layui-icon layui-icon-refresh" ></i>刷新</button>-->
  142. <!-- </div>-->
  143. </div>
  144. <table class="layui-hide" id="userList" lay-filter="userList"></table>
  145. <script type="text/html" id="avatar">
  146. <img style="cursor: pointer" lay-event='open_image' src="{{d.avatar}}">
  147. </script>
  148. <!--用户信息-->
  149. <script type="text/html" id="userinfo">
  150. 昵称:{{d.nickname==null ? '暂无信息':d.nickname}}
  151. <br>姓名:{{d.real_name==null ? '暂无信息':d.real_name}}
  152. <br>电话:{{d.phone==null ? '暂无信息':d.phone}}
  153. </script>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <script src="/system/js/layuiList.js"></script>
  160. <script>
  161. var action={
  162. refresh:function () {
  163. layList.reload();
  164. }
  165. },uid = <?php echo htmlentities($uid); ?>;
  166. layList.form.render();
  167. layList.tableList('userList',"<?php echo Url('get_stair_list',['uid'=>$uid]); ?>",function () {
  168. return [
  169. {field: 'uid', title: 'UID',width:'10%'},
  170. {field: 'avatar', title: '头像',templet:'#avatar'},
  171. {field: 'real_name', title: '用户信息',templet:'#userinfo',width:'22%'},
  172. {field: 'promoter_name', title: '是否推广员'},
  173. {field: 'spread_count', title: '推广人数',sort: true},
  174. {field: 'order_count', title: '订单数',sort: true},
  175. {field: 'add_time', title: '关注时间',width:'10%',sort: true},
  176. ];
  177. });
  178. layList.date({elem: '#start_time', theme: '#393D49', type: 'datetime'});
  179. layList.date({elem: '#end_time', theme: '#393D49', type: 'datetime'});
  180. layList.search('search',function(where){
  181. if(where.start_time!='' && where.end_time=='') return layList.msg('请选择结束时间');
  182. if(where.end_time!='' && where.start_time=='') return layList.msg('请选择开始时间');
  183. layList.reload(where,true);
  184. });
  185. $('.conrelTable').find('button').each(function () {
  186. var type=$(this).data('type');
  187. $(this).on('click',function () {
  188. action[type] && action[type]();
  189. })
  190. })
  191. require(['vue'],function(Vue) {
  192. new Vue({
  193. el: "#app",
  194. data: {
  195. badge: [],
  196. dataList: [
  197. {name: '全部', value: ''},
  198. {name: '昨天', value: 'yesterday'},
  199. {name: '今天', value: 'today'},
  200. {name: '最近7天', value: 'lately7'},
  201. {name: '最近30天', value: 'lately30'},
  202. {name: '本月', value: 'month'},
  203. {name: '本年', value: 'year'},
  204. ],
  205. spread_type:[
  206. {name:'全部',value:''},
  207. {name:'一级推广人',value:'1'},
  208. {name:'二级推广人',value:'2'},
  209. ],
  210. where:{
  211. data:'',
  212. nickname: '',
  213. type:'',
  214. uid:uid
  215. },
  216. showtime: false,
  217. },
  218. watch:{
  219. },
  220. methods:{
  221. getBadge:function(){
  222. var that=this;
  223. layList.baseGet(layList.Url({a:'get_stair_badge',q:that.where}),function (rem) {
  224. that.badge=rem.data;
  225. });
  226. },
  227. setData:function(item){
  228. var that=this;
  229. if(item.is_zd==true){
  230. that.showtime=true;
  231. this.where.data=this.$refs.date_time.innerText;
  232. }else{
  233. this.showtime=false;
  234. this.where.data=item.value;
  235. }
  236. },
  237. search:function () {
  238. this.where.excel=0;
  239. this.getBadge();
  240. layList.reload(this.where,true);
  241. },
  242. refresh:function () {
  243. layList.reload();
  244. this.getBadge();
  245. }
  246. },
  247. mounted:function () {
  248. that = this;
  249. this.getBadge();
  250. layList.laydate.render({
  251. elem:this.$refs.date_time,
  252. trigger:'click',
  253. eventElem:this.$refs.time,
  254. range:true,
  255. change:function (value){
  256. that.where.data=value;
  257. }
  258. });
  259. }
  260. })
  261. });
  262. </script>
  263. </div>
  264. </body>
  265. </html>