9d59a2e1c0ff5f15f96bc7870720be8b.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  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. <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>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. </style>
  94. </head>
  95. <body layadmin-themealias="default">
  96. <table id="demo" lay-filter="test"></table>
  97. <div class="layui-fluid">
  98. <div class="layui-card">
  99. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">佣金申请列表</span></div>
  100. <div class="layui-card-body" style="padding:15px;">
  101. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  102. <input type="hidden" name="c" value="orderdistribution" />
  103. <input type="hidden" name="a" value="withdrawallist" />
  104. <div class="layui-form-item">
  105. <div class="layui-inline">
  106. <div class="layui-input-inline" style="width:280px;">
  107. <?php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime),'sm'=>true, 'placeholder'=>'申请时间'),true);;?>
  108. </div>
  109. <div class="layui-input-inline" >
  110. <select name='comsiss_state' class='layui-input layui-unselect' style="width:80px;" >
  111. <option value=''>状态</option>
  112. <option value='0' <?php if( $_GPC['comsiss_state']=='0' ){ ?>selected<?php } ?>>未审核</option>
  113. <option value='1' <?php if( $_GPC['comsiss_state']=='1' ){ ?>selected<?php } ?>>已审核</option>
  114. <option value='2' <?php if( $_GPC['comsiss_state']=='2' ){ ?>selected<?php } ?>>拒绝通过</option>
  115. </select>
  116. </div>
  117. <div class="layui-input-inline" >
  118. <input type="text" class="layui-input" name="keyword" value="<?php echo ($_GPC['keyword']); ?>" placeholder="申请订单id"/>
  119. </div>
  120. <div class="layui-input-inline">
  121. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  122. <button type="submit" name="export" value="1" class="btn btn-success layui-btn layui-btn-sm">导出</button>
  123. </div>
  124. </div>
  125. <?php if($is_supply_status == 1){ ?>
  126. <div class="layui-inline">
  127. <span class="line-text">提现审核通过以后,请将对应的提现金额,通过线下转账的方式转给配送员!</span>
  128. </div>
  129. <?php } ?>
  130. </div>
  131. </form>
  132. <form action="" class="layui-form" lay-filter="example" method="post" >
  133. <div class="row">
  134. <div class="col-md-12">
  135. <div class="page-table-header">
  136. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  137. <div class="btn-group">
  138. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="<?php echo U('orderdistribution/agent_check_apply',array('state'=>1));?>" data-confirm='确认要审核通过,已打款?'>
  139. 审核通过
  140. </button>
  141. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="<?php echo U('orderdistribution/agent_check_apply',array('state'=>2));?>" data-confirm='确认要拒绝通过?'>
  142. 拒绝通过
  143. </button>
  144. </div>
  145. </div>
  146. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  147. <thead>
  148. <tr>
  149. <th style="width:25px;"></th>
  150. <th style="width:60px;">ID</th>
  151. <th style="">配送员姓名</th>
  152. <th style="">会员名称</th>
  153. <th style="">联系方式</th>
  154. <th style="">提现方式</br>提现账户</th>
  155. <th style=''>申请提现金额</br>手续费</br>到账金额</th>
  156. <th style="">申请时间</br>审核时间</th>
  157. <th style='width:170px;'>状态</th>
  158. </tr>
  159. </tr>
  160. </thead>
  161. <tbody>
  162. <?php foreach($list as $row){ ?>
  163. <tr>
  164. <td style="position: relative; ">
  165. <input type='checkbox' name="item_checkbox" class="checkone" lay-skin="primary" value="<?php echo ($row['id']); ?>"/>
  166. </td>
  167. <td>
  168. <?php echo ($row['id']); ?>
  169. </td>
  170. <td>
  171. <?php echo ($row['username']); ?>
  172. </td>
  173. <td style="overflow: visible">
  174. <div rel="pop" style="display: flex" >
  175. <img class="img-40" src="<?php echo tomedia($row['member_info']['avatar']);?>" style='border-radius:50%;border:1px solid #efefef;width: 40px;
  176. height: 40px;' />
  177. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  178. <span class="nickname">
  179. <?php if( empty($row['member_info']['username']) ){ ?>
  180. <?php }else{ ?>
  181. <?php echo ($row['member_info']['username']); ?>
  182. <?php } ?>
  183. </span>
  184. </span>
  185. </div>
  186. </td>
  187. <td>
  188. <?php echo ($row['member_info']['telephone']); ?>
  189. </td>
  190. <td>
  191. <?php if( $row['type'] == 1 ) { echo '余额'; }elseif( $row['type'] == 2 ){ echo '微信零钱'; }elseif($row['type'] == 4){ echo '银行卡'; } ?>
  192. <?php
  193. if($row['type'] == 3){ echo '支付宝'; ?>
  194. <br/>
  195. <text class='text-primary'>真实姓名:<?php echo ($row['bankusername']); ?></text><br/>
  196. <text class='text-danger'>账户:<?php echo ($row['bankaccount']); ?></text>
  197. <?php }else{ ?>
  198. <br/>
  199. <text class='text-primary'><?php echo ($row['bankaccount']); ?></text><br/>
  200. <text class='text-danger'><?php echo ($row['bankusername']); ?></text>
  201. <?php } ?>
  202. </td>
  203. <td>
  204. <?php echo ($row['money']); ?><br/><text class='text-primary'><?php echo ($row['service_charge']); ?></text><br/>
  205. <text class='text-danger'><?php echo $row['money']-$row['service_charge_money']; ?></text>
  206. </td>
  207. <td><?php echo date("Y-m-d",$row['addtime']);?><br/><?php echo date("H:i:s",$row['addtime']);?>
  208. <br/>
  209. <?php if( !empty($row['shentime']) ){ ?>
  210. <?php echo date("Y-m-d",$row['shentime']);?><br/><?php echo date("H:i:s",$row['shentime']);?>
  211. <?php } ?>
  212. </td>
  213. <td>
  214. <?php if( $row['state'] ==2 ){ ?>
  215. 已拒绝
  216. <?php }else if( $row['state'] ==1 ){ ?>
  217. <text class='text-danger'>已打款</text>
  218. <?php }else{ ?>
  219. <input type="checkbox" name="" lay-filter="statewsitch" tx_type="<?php echo $row['type'];?>" data-href="<?php echo U('orderdistribution/agent_check_apply',array('id'=>$row['id']));?>" <?php if( $row['state']==1 ){ ?>checked<?php } ?> lay-skin="switch" lay-text="已审核|未审核">
  220. <?php } ?>
  221. <br/>
  222. </td>
  223. </tr>
  224. <?php } ?>
  225. </tbody>
  226. <tfoot>
  227. <tr>
  228. <td colspan="5">
  229. <div class="page-table-header">
  230. <input type="checkbox" name="checkall" lay-skin="primary" lay-filter="checkboxall">
  231. <div class="btn-group">
  232. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="<?php echo U('orderdistribution/agent_check_apply',array('state'=>1));?>" data-confirm='确认要审核通过,已打款?'>
  233. 审核通过
  234. </button>
  235. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="<?php echo U('orderdistribution/agent_check_apply',array('state'=>2));?>" data-confirm='确认要拒绝通过?'>
  236. 拒绝通过
  237. </button>
  238. </div>
  239. </div>
  240. </td>
  241. <td colspan="4" style="text-align: right">
  242. <?php echo ($pager); ?>
  243. </td>
  244. </tr>
  245. </tfoot>
  246. </table>
  247. </div>
  248. </div>
  249. </form>
  250. </div>
  251. </div>
  252. </div>
  253. <script src="/layuiadmin/layui/layui.js"></script>
  254. <script>
  255. layui.config({
  256. base: '/layuiadmin/' //静态资源所在路径
  257. }).extend({
  258. index: 'lib/index' //主入口模块
  259. }).use('index');
  260. </script>
  261. <script>
  262. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  263. var layer = layui.layer;
  264. var $;
  265. layui.use(['jquery', 'layer','form'], function(){
  266. $ = layui.$;
  267. var form = layui.form;
  268. $('.deldom').click(function(){
  269. var s_url = $(this).attr('data-href');
  270. layer.confirm($(this).attr('data-confirm'), function(index){
  271. $.ajax({
  272. url:s_url,
  273. type:'post',
  274. dataType:'json',
  275. success:function(info){
  276. if(info.status == 0)
  277. {
  278. layer.msg(info.result.message,{icon: 1,time: 2000});
  279. }else if(info.status == 1){
  280. var go_url = location.href;
  281. if( info.result.hasOwnProperty("url") )
  282. {
  283. go_url = info.result.url;
  284. }
  285. layer.msg('操作成功',{time: 1000,
  286. end:function(){
  287. location.href = info.result.url;
  288. }
  289. });
  290. }
  291. }
  292. })
  293. });
  294. })
  295. $('.btn-operation').click(function(){
  296. var ids_arr = [];
  297. var obj = $(this);
  298. var s_toggle = $(this).attr('data-toggle');
  299. var s_url = $(this).attr('data-href');
  300. $(obj).attr('disabled',true);
  301. $("input[name=item_checkbox]").each(function() {
  302. if( $(this).prop('checked') )
  303. {
  304. ids_arr.push( $(this).val() );
  305. }
  306. })
  307. if(ids_arr.length < 1)
  308. {
  309. layer.msg('请选择要操作的内容');
  310. $(obj).attr('disabled',false);
  311. }else{
  312. var can_sub = true;
  313. if( s_toggle == 'batch-remove' )
  314. {
  315. can_sub = false;
  316. $(obj).attr('disabled',false);
  317. layer.confirm($(obj).attr('data-confirm'), function(index){
  318. $.ajax({
  319. url:s_url,
  320. type:'post',
  321. dataType:'json',
  322. data:{ids:ids_arr},
  323. success:function(info){
  324. if(info.status == 0)
  325. {
  326. layer.msg(info.result.message,{icon: 1,time: 2000});
  327. }else if(info.status == 1){
  328. var go_url = location.href;
  329. if( info.result.hasOwnProperty("url") )
  330. {
  331. go_url = info.result.url;
  332. }
  333. layer.msg('操作成功',{time: 1000,
  334. end:function(){
  335. location.href = info.result.url;
  336. }
  337. });
  338. }
  339. }
  340. })
  341. });
  342. }else{
  343. $.ajax({
  344. url:s_url,
  345. type:'post',
  346. dataType:'json',
  347. data:{ids:ids_arr},
  348. success:function(info){
  349. if(info.status == 0)
  350. {
  351. layer.msg(info.result.message,{icon: 1,time: 2000,
  352. end:function(){
  353. $(obj).attr('disabled',false);
  354. }});
  355. }else if(info.status == 1){
  356. var go_url = location.href;
  357. if( info.result.hasOwnProperty("url") )
  358. {
  359. go_url = info.result.url;
  360. }
  361. layer.msg('操作成功',{time: 1000,
  362. end:function(){
  363. location.href = info.result.url;
  364. }
  365. });
  366. }
  367. }
  368. })
  369. }
  370. }
  371. })
  372. form.on('switch(statewsitch)', function(data){
  373. var lock = false;
  374. var s_url = $(this).attr('data-href')
  375. var x=data.elem.checked;
  376. var tx_type = $(this).attr('tx_type');
  377. var tip_msg = '确认审核通过,已经打款?';
  378. if(tx_type == 1){
  379. //系统余额
  380. tip_msg = '确认审核通过,该会员个人中心余额会立即收到,只能用于小程序消费。';
  381. }else if(tx_type == 2){
  382. //1、微信零钱
  383. tip_msg = '确认审核通过,将立即从微信支付商户扣款打到该会员微信零钱中。';
  384. }else if(tx_type == 3){
  385. //支付宝
  386. tip_msg = '请确认已手动转账到对方支付宝账户。';
  387. }else if(tx_type == 4){
  388. //银行卡
  389. tip_msg = '请确认已手动转账到对方银行卡账户。';
  390. }
  391. layer.confirm(tip_msg,{
  392. btn:['确定','取消'],
  393. },function () {
  394. var s_value = 1;
  395. if (data.elem.checked) {
  396. s_value = 1;
  397. } else {
  398. s_value = 0;
  399. }
  400. if(!lock) {
  401. lock = true;
  402. $.ajax({
  403. url: s_url,
  404. type: 'post',
  405. dataType: 'json',
  406. data: {state: s_value},
  407. success: function (info) {
  408. if (info.status == 0) {
  409. layer.msg(info.result.message, {
  410. icon: 1, time: 2000,
  411. end: function () {
  412. location.href = location.href;
  413. }
  414. });
  415. } else if (info.status == 1) {
  416. var go_url = location.href;
  417. if (info.result.hasOwnProperty("url")) {
  418. go_url = info.result.url;
  419. }
  420. layer.msg('操作成功', {
  421. time: 1000,
  422. end: function () {
  423. location.href = info.result.url;
  424. }
  425. });
  426. }
  427. }
  428. })
  429. }
  430. },function(){
  431. data.elem.checked=!x;
  432. form.render();
  433. })
  434. });
  435. form.on('checkbox(checkboxall)', function(data){
  436. if(data.elem.checked)
  437. {
  438. $("input[name=item_checkbox]").each(function() {
  439. $(this).prop("checked", true);
  440. });
  441. $("input[name=checkall]").each(function() {
  442. $(this).prop("checked", true);
  443. });
  444. }else{
  445. $("input[name=item_checkbox]").each(function() {
  446. $(this).prop("checked", false);
  447. });
  448. $("input[name=checkall]").each(function() {
  449. $(this).prop("checked", false);
  450. });
  451. }
  452. form.render('checkbox');
  453. });
  454. //监听提交
  455. form.on('submit(formDemo)', function(data){
  456. $.ajax({
  457. url: data.form.action,
  458. type: data.form.method,
  459. data: data.field,
  460. dataType:'json',
  461. success: function (info) {
  462. if(info.status == 0)
  463. {
  464. layer.msg(info.result.message,{icon: 1,time: 2000});
  465. }else if(info.status == 1){
  466. var go_url = location.href;
  467. if( info.result.hasOwnProperty("url") )
  468. {
  469. go_url = info.result.url;
  470. }
  471. layer.msg('操作成功',{time: 1000,
  472. end:function(){
  473. location.href = info.result.url;
  474. }
  475. });
  476. }
  477. }
  478. });
  479. return false;
  480. });
  481. })
  482. </script>
  483. </body>