communitystatics_commiss.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  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. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style type="text/css">
  45. .layui-btn-sm { line-height: 34px;height: 34px; }
  46. .layui-btn-group .layui-btn:first-child {border-radius: 0;}
  47. .text-green { color: #15d2b9 !important; }
  48. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect {
  49. width: auto!important;
  50. }
  51. </style>
  52. </head>
  53. <body layadmin-themealias="default">
  54. <div class="layui-fluid">
  55. <div class="layui-card">
  56. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">团长佣金金额统计</span></div>
  57. <div class="layui-tab layui-tab-brief" >
  58. <ul class="layui-tab-title">
  59. <li <?php if( empty($_GPC['type']) || $_GPC['type']=='0' ){ ?>class="layui-this"<?php } ?>><a href="{:U('reports/communitystatics', array('type' => 0))}">团长销售额统计</a></li>
  60. <li <?php if( $_GPC['type']=='2' ){ ?>class="layui-this"<?php } ?> ><a href="{:U('reports/communitystatics_commiss', array('type' => 2))}">团长佣金金额统计</a></li>
  61. <li <?php if( $_GPC['type']=='3' ){ ?>class="layui-this"<?php } ?> ><a href="{:U('reports/communitystatics_order', array('type' => 3))}">团长订单统计</a></li>
  62. </ul>
  63. </div>
  64. <div class="layui-card-body" style="padding:15px;">
  65. <div class="page-content">
  66. <form action="" method="get" class="form-horizontal form-search layui-form" role="form" id="search">
  67. <input type="hidden" name="c" value="reports" />
  68. <input type="hidden" name="a" value="communitystatics_commiss" />
  69. <input type="hidden" name="type" value="{$_GPC['type']}" />
  70. <div class="page-toolbar">
  71. <div class="layui-form-item">
  72. <span class="layui-input-inline">
  73. <select name='searchtime' class='form-control' style="width:100px;padding:0 5px;" id="searchtime">
  74. <option value=''>不按时间<?php echo $gpc['searchtime'];?></option>
  75. <option value='create_time' <?php if( $_GPC['searchtime']=='create_time'){ ?>selected<?php } ?>>下单时间</option>
  76. </select>
  77. </span>
  78. <span class="layui-input-inline" style="width: 285px;">
  79. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
  80. </span>
  81. <div class="layui-input-inline">
  82. <input type="hidden" name="export" id="export" value="0">
  83. </div>
  84. <div class="layui-input-inline" style="width: 400px;margin-right: 0px;">
  85. <input type="text" class="layui-input" name='keyword' id="keyword" value="{$_GPC['keyword']}" placeholder="请输入团长昵称/团长姓名//社区昵称">
  86. </div>
  87. <div class="layui-btn-group">
  88. <button class="layui-btn btn-submit layui-btn-sm" data-export="0" type="submit"> 搜索</button>
  89. <button data-export="1" type="submit" class="layui-btn layui-btn-sm btn-submit layui-btn-primary">导出</button>
  90. </div>
  91. </div>
  92. </div>
  93. </form>
  94. <form action="" method="post" class="layui-form" role="form">
  95. <div class="row">
  96. <div class="col-md-12">
  97. <table class="layui-table" lay-skin="line" lay-size="lg">
  98. <thead>
  99. <tr>
  100. <th style="width:25px;">
  101. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  102. </th>
  103. <th style="width:50px;text-align:center;">ID</th>
  104. <th style="width: 200px;">团长昵称</th>
  105. <th style="width: 180px;">姓名/手机号</th>
  106. <th style="">下单佣金(元)</th>
  107. <th style="width: 120px;">退款佣金(元)</th>
  108. <th style="">下级下单佣金(元)</th>
  109. <th style="">下级退款佣金(元)</th>
  110. <th style="">净佣金(元)</th>
  111. <th style="">申请提现佣金(元)</th>
  112. <th style="">提现到帐佣金(元)</th>
  113. <th style="text-align:right;width: 150px;">操作</th>
  114. </tr>
  115. </thead>
  116. <tbody>
  117. <?php foreach($data as $item){ ?>
  118. <tr>
  119. <td style="width:25px;">
  120. <input type='checkbox' value="{$item['head_id']}" name="item_checkbox" lay-skin="primary" />
  121. </td>
  122. <td style="width:100px;text-align:center;">
  123. {$item['head_id']}
  124. </td>
  125. <td>
  126. {$item['username']}
  127. </td>
  128. <td>
  129. {$item['head_name']}<br/>
  130. {$item['head_mobile']}
  131. </td>
  132. <td>
  133. {$item['sum_order_commiss']}
  134. </td>
  135. <td>
  136. {$item['sum_order_refundcommiss']}
  137. </td>
  138. <td>
  139. {$item['childsum_order_commiss']}
  140. </td>
  141. <td>
  142. {$item['childsum_order_refundcommiss']}
  143. </td>
  144. <td>
  145. {$item['real_commiss_money']}
  146. </td>
  147. <td>
  148. {$item['dongmoney']}
  149. </td>
  150. <td>
  151. {$item['getmoney']}
  152. </td>
  153. <td style="overflow:visible;position:relative;text-align:right;">
  154. <?php if( isset($_GPC['searchtime']) && $_GPC['searchtime'] == 'create_time' ){ ?>
  155. <a class="layui-btn layui-btn-primary layui-btn-xs" href="{:U('communityhead/communityorder',array('head_id' => $item['head_id'],'time_end' => date('Y-m-d H:i', $endtime),'time_start'=>date('Y-m-d H:i', $starttime),'searchtime' => 'create_time','ok'=>1));}">
  156. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="查看订单明细">
  157. 查看订单明细
  158. </span>
  159. </a>
  160. <?php }else{ ?>
  161. <a class="layui-btn layui-btn-primary layui-btn-xs" href="{:U('communityhead/communityorder',array('head_id' => $item['head_id'],'ok'=>1));}">
  162. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="查看订单明细">
  163. 查看订单明细
  164. </span>
  165. </a>
  166. <?php } ?>
  167. </td>
  168. </tr>
  169. <?php } ?>
  170. </tbody>
  171. <tfoot>
  172. <tr>
  173. <td colspan="3" style="padding-left: 0;">
  174. <!-- <div class="page-table-header">
  175. <input type="checkbox">
  176. </div> -->
  177. </td>
  178. <td colspan="7" style="text-align: right">
  179. {$pager}
  180. </td>
  181. </tr>
  182. </tfoot>
  183. </table>
  184. </div>
  185. </div>
  186. </form>
  187. <div class="row">
  188. <blockquote class="layui-elem-quote layui-text">
  189. # 下单佣金<br/>
  190. - 为团长下面的会员下单产生的佣金<br/>
  191. # 退款佣金、<br/>
  192. - 为售后订单退款,佣金减少的记录<br/>
  193. # 下级下单佣金,下级退款佣金<br/>
  194. - 为团长推荐的别人成为团长的佣金<br/>
  195. </blockquote>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <script src="/layuiadmin/layui/layui.js"></script>
  201. <script>
  202. layui.config({
  203. base: '/layuiadmin/' //静态资源所在路径
  204. }).extend({
  205. index: 'lib/index' //主入口模块
  206. }).use('index');
  207. </script>
  208. <script>
  209. var layer = layui.layer;
  210. var $;
  211. layui.use(['jquery', 'layer','form'], function(){
  212. $ = layui.$;
  213. var form = layui.form;
  214. $('.deldom').click(function(){
  215. var s_url = $(this).attr('data-href');
  216. layer.confirm($(this).attr('data-confirm'), function(index){
  217. $.ajax({
  218. url:s_url,
  219. type:'post',
  220. dataType:'json',
  221. success:function(info){
  222. if(info.status == 0)
  223. {
  224. layer.msg(info.result.message,{icon: 1,time: 2000});
  225. }else if(info.status == 1){
  226. var go_url = location.href;
  227. if( info.result.hasOwnProperty("url") )
  228. {
  229. go_url = info.result.url;
  230. }
  231. layer.msg('操作成功',{time: 1000,
  232. end:function(){
  233. location.href = info.result.url;
  234. }
  235. });
  236. }
  237. }
  238. })
  239. });
  240. })
  241. $('.btn-operation').click(function(){
  242. var ids_arr = [];
  243. var obj = $(this);
  244. var s_toggle = $(this).attr('data-toggle');
  245. var s_url = $(this).attr('data-href');
  246. $("input[name=item_checkbox]").each(function() {
  247. if( $(this).prop('checked') )
  248. {
  249. ids_arr.push( $(this).val() );
  250. }
  251. })
  252. if(ids_arr.length < 1)
  253. {
  254. layer.msg('请选择要操作的内容');
  255. }else{
  256. var can_sub = true;
  257. if( s_toggle == 'batch-remove' )
  258. {
  259. can_sub = false;
  260. layer.confirm($(obj).attr('data-confirm'), function(index){
  261. $.ajax({
  262. url:s_url,
  263. type:'post',
  264. dataType:'json',
  265. data:{ids:ids_arr},
  266. success:function(info){
  267. if(info.status == 0)
  268. {
  269. layer.msg(info.result.message,{icon: 1,time: 2000});
  270. }else if(info.status == 1){
  271. var go_url = location.href;
  272. if( info.result.hasOwnProperty("url") )
  273. {
  274. go_url = info.result.url;
  275. }
  276. layer.msg('操作成功',{time: 1000,
  277. end:function(){
  278. location.href = info.result.url;
  279. }
  280. });
  281. }
  282. }
  283. })
  284. });
  285. }else{
  286. $.ajax({
  287. url:s_url,
  288. type:'post',
  289. dataType:'json',
  290. data:{ids:ids_arr},
  291. success:function(info){
  292. if(info.status == 0)
  293. {
  294. layer.msg(info.result.message,{icon: 1,time: 2000});
  295. }else if(info.status == 1){
  296. var go_url = location.href;
  297. if( info.result.hasOwnProperty("url") )
  298. {
  299. go_url = info.result.url;
  300. }
  301. layer.msg('操作成功',{time: 1000,
  302. end:function(){
  303. location.href = info.result.url;
  304. }
  305. });
  306. }
  307. }
  308. })
  309. }
  310. }
  311. })
  312. form.on('switch(statewsitch)', function(data){
  313. var s_url = $(this).attr('data-href')
  314. var s_value = 1;
  315. if(data.elem.checked)
  316. {
  317. s_value = 1;
  318. }else{
  319. s_value = 0;
  320. }
  321. $.ajax({
  322. url:s_url,
  323. type:'post',
  324. dataType:'json',
  325. data:{state:s_value},
  326. success:function(info){
  327. if(info.status == 0)
  328. {
  329. layer.msg(info.result.message,{icon: 1,time: 2000});
  330. }else if(info.status == 1){
  331. var go_url = location.href;
  332. if( info.result.hasOwnProperty("url") )
  333. {
  334. go_url = info.result.url;
  335. }
  336. layer.msg('操作成功',{time: 1000,
  337. end:function(){
  338. location.href = info.result.url;
  339. }
  340. });
  341. }
  342. }
  343. })
  344. });
  345. form.on('checkbox(checkboxall)', function(data){
  346. if(data.elem.checked)
  347. {
  348. $("input[name=item_checkbox]").each(function() {
  349. $(this).prop("checked", true);
  350. });
  351. $("input[name=checkall]").each(function() {
  352. $(this).prop("checked", true);
  353. });
  354. }else{
  355. $("input[name=item_checkbox]").each(function() {
  356. $(this).prop("checked", false);
  357. });
  358. $("input[name=checkall]").each(function() {
  359. $(this).prop("checked", false);
  360. });
  361. }
  362. form.render('checkbox');
  363. });
  364. //监听提交
  365. form.on('submit(formDemo)', function(data){
  366. $.ajax({
  367. url: data.form.action,
  368. type: data.form.method,
  369. data: data.field,
  370. dataType:'json',
  371. success: function (info) {
  372. if(info.status == 0)
  373. {
  374. layer.msg(info.result.message,{icon: 1,time: 2000});
  375. }else if(info.status == 1){
  376. var go_url = location.href;
  377. if( info.result.hasOwnProperty("url") )
  378. {
  379. go_url = info.result.url;
  380. }
  381. layer.msg('操作成功',{time: 1000,
  382. end:function(){
  383. location.href = info.result.url;
  384. }
  385. });
  386. }
  387. }
  388. });
  389. return false;
  390. });
  391. })
  392. </script>
  393. <script>
  394. $(function () {
  395. $('.btn-submit').click(function () {
  396. var e = $(this).data('export');
  397. if(e>0 ){
  398. if($('#keyword').val() !='' ){
  399. $('#export').val(e);
  400. $('#search').submit();
  401. }else if($('#searchtime').val()!=''){
  402. $('#export').val(e);
  403. $('#search').submit();
  404. }else{
  405. $('#export').val(e);
  406. $('#search').submit();
  407. }
  408. }else{
  409. $('#export').val(0);
  410. $('#search').submit();
  411. }
  412. })
  413. })
  414. </script>
  415. </body>
  416. </html>