records.blade.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', trans('提现列表'))
  4. <style>
  5. .loadEffect {
  6. display: none;
  7. width: 100px;
  8. height: 100px;
  9. position: absolute;
  10. left: 50%;
  11. margin: 0 auto;
  12. margin-top: 100px;
  13. }
  14. .loadEffect span {
  15. display: inline-block;
  16. width: 16px;
  17. height: 16px;
  18. border-radius: 50%;
  19. background: lightgreen;
  20. position: absolute;
  21. -webkit-animation: load 1.04s ease infinite;
  22. }
  23. @-webkit-keyframes load {
  24. 0% {
  25. opacity: 1;
  26. }
  27. 100% {
  28. opacity: 0.2;
  29. }
  30. }
  31. .loadEffect span:nth-child(1) {
  32. left: 0;
  33. top: 50%;
  34. margin-top: -8px;
  35. -webkit-animation-delay: 0.13s;
  36. }
  37. .loadEffect span:nth-child(2) {
  38. left: 14px;
  39. top: 14px;
  40. -webkit-animation-delay: 0.26s;
  41. }
  42. .loadEffect span:nth-child(3) {
  43. left: 50%;
  44. top: 0;
  45. margin-left: -8px;
  46. -webkit-animation-delay: 0.39s;
  47. }
  48. .loadEffect span:nth-child(4) {
  49. top: 14px;
  50. right: 14px;
  51. -webkit-animation-delay: 0.52s;
  52. }
  53. .loadEffect span:nth-child(5) {
  54. right: 0;
  55. top: 50%;
  56. margin-top: -8px;
  57. -webkit-animation-delay: 0.65s;
  58. }
  59. .loadEffect span:nth-child(6) {
  60. right: 14px;
  61. bottom: 14px;
  62. -webkit-animation-delay: 0.78s;
  63. }
  64. .loadEffect span:nth-child(7) {
  65. bottom: 0;
  66. left: 50%;
  67. margin-left: -8px;
  68. -webkit-animation-delay: 0.91s;
  69. }
  70. .loadEffect span:nth-child(8) {
  71. bottom: 14px;
  72. left: 14px;
  73. -webkit-animation-delay: 1.04s;
  74. }
  75. </style>
  76. <div class="right-titpos">
  77. @include('layouts.tabs')
  78. </div>
  79. {{--<form action="" method="post" class="form-horizontal">--}}
  80. <form action="" method="get" class="form-horizontal" id="form1">
  81. <input type="hidden" name="c" value="site"/>
  82. <input type="hidden" name="a" value="entry"/>
  83. <input type="hidden" name="m" value="yun_shop"/>
  84. <input type="hidden" name="do" value="5201"/>
  85. <input type="hidden" name="export" value="0" id="isExport"/>
  86. <input type="hidden" name="route" value="{{ \YunShop::request()->route }}" id="route"/>
  87. <div class="panel panel-info">
  88. <div class="panel-body">
  89. <input type="hidden" name="search[status]" value="{{$search['status']}}">
  90. <div class="form-group col-xs-12 col-sm-8 col-lg-11">
  91. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员ID</label>
  92. <div class="col-xs-12 col-sm-8 col-lg-9">
  93. <input class="form-control" name="search[member_id]" id="" type="text"
  94. value="{{$search['member_id']}}" placeholder="会员ID">
  95. </div>
  96. </div>
  97. <div class="form-group col-xs-12 col-sm-8 col-lg-11">
  98. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">会员信息</label>
  99. <div class="col-xs-12 col-sm-8 col-lg-9">
  100. <input class="form-control" name="search[member]" id="" type="text"
  101. value="{{$search['member']}}" placeholder="昵称/姓名/手机">
  102. </div>
  103. </div>
  104. <div class="form-group col-xs-12 col-sm-8 col-lg-11">
  105. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">提现编号</label>
  106. <div class="col-xs-12 col-sm-8 col-lg-9">
  107. <input class="form-control" name="search[withdraw_sn]" id="" type="text"
  108. value="{{$search['withdraw_sn']}}" placeholder="提现编号">
  109. </div>
  110. </div>
  111. <div class="form-group">
  112. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">收入类型:</label>
  113. <div class="col-xs-12 col-sm-8 col-lg-9">
  114. <select name='search[type]' class='form-control'>
  115. <option value='' @if($search['type']=='') selected @endif>全部</option>
  116. @foreach($types as $type)
  117. <option value='{{$type['class']}}'
  118. @if($search['type']==$type['class']) selected @endif>{{$type['title']}}</option>
  119. @endforeach
  120. </select>
  121. </div>
  122. </div>
  123. <div class="form-group">
  124. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">提现方式:</label>
  125. <div class="col-xs-12 col-sm-8 col-lg-9">
  126. <select name='search[pay_way]' class='form-control'>
  127. <option value='' @if(empty($search['pay_way'])) selected @endif>不搜索</option>
  128. <option value='wechat' @if($search['pay_way']=='wechat') selected @endif >提现到微信</option>
  129. <option value='alipay' @if($search['pay_way']=='alipay') selected @endif >提现到支付宝</option>
  130. <option value='balance' @if($search['pay_way']=='balance') selected @endif >提现到余额</option>
  131. @if(app('plugins')->isEnabled('eup_pay'))
  132. <option value='eup_pay' @if($search['pay_way']=='eup_pay') selected @endif >提现到EUP</option>
  133. @endif
  134. @if(app('plugins')->isEnabled('huanxun'))
  135. <option value='huanxun' @if($search['pay_way']=='huanxun') selected @endif >提现到银行卡</option>
  136. @endif
  137. @if(app('plugins')->isEnabled('yee-pay'))
  138. <option value='yee_pay' @if($search['pay_way']=='yee_pay') selected @endif >提现到易宝代付</option>
  139. @endif
  140. <option value='manual' @if($search['pay_way']=='manual') selected @endif >提现到{{\Setting::get('shop.lang.zh_cn.income.manual_withdrawal') ?: '手动打款'}}</option>
  141. @if(app('plugins')->isEnabled('converge_pay'))
  142. <option value='converge_pay' @if($search['pay_way']=='converge_pay') selected @endif >提现到银行卡-HJ</option>
  143. @endif
  144. @if(app('plugins')->isEnabled('high-light'))
  145. <option value='high_light_wechat' @if($search['pay_way']=='high_light_wechat') selected @endif >提现到微信-高灯</option>
  146. <option value='high_light_alipay' @if($search['pay_way']=='high_light_alipay') selected @endif >提现到支付宝-高灯</option>
  147. <option value='high_light_bank' @if($search['pay_way']=='high_light_bank') selected @endif >提现到银行卡-高灯</option>
  148. @endif
  149. @if(app('plugins')->isEnabled('worker-withdraw'))
  150. <option value='worker_withdraw_wechat' @if($search['pay_way']=='worker_withdraw_wechat') selected @endif >提现到微信-好灵工</option>
  151. <option value='worker_withdraw_alipay' @if($search['pay_way']=='worker_withdraw_alipay') selected @endif >提现到支付宝-好灵工</option>
  152. <option value='worker_withdraw_bank' @if($search['pay_way']=='worker_withdraw_bank') selected @endif >提现到银行卡-好灵工</option>
  153. @endif
  154. @if(app('plugins')->isEnabled('eplus-pay'))
  155. <option value='eplus_withdraw_bank' @if($search['pay_way']=='eplus_withdraw_bank') selected @endif >提现到银行卡-智E+</option>
  156. @endif
  157. </select>
  158. </div>
  159. </div>
  160. <div class="form-group">
  161. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">提现时间:</label>
  162. <div class="col-sm-2">
  163. <select name='search[searchtime]' class='form-control'>
  164. <option value='' @if(empty($search['searchtime'])) selected @endif>不搜索</option>
  165. <option value='1' @if($search['searchtime']==1) selected @endif >搜索</option>
  166. </select>
  167. </div>
  168. <div class="col-sm-7 col-lg-7 col-xs-12">
  169. {!! app\common\helpers\DateRange::tplFormFieldDateRange('search[time]', [
  170. 'starttime'=>date('Y-m-d H:i', strtotime($search['time']['start']) ?: strtotime('-1 month')),
  171. 'endtime'=>date('Y-m-d H:i',strtotime($search['time']['end']) ?: time()),
  172. 'start'=>0,
  173. 'end'=>0
  174. ], true) !!}
  175. </div>
  176. </div>
  177. <div class="form-group col-xs-12 col-sm-4">
  178. <div style="width: 110px;margin: auto;">
  179. <input type="button" class="btn btn-success" id="export" value="导出">
  180. <input type="button" class="btn btn-success pull-right" id="search" value="搜索">
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. </form>
  186. @if (1 == YunShop::request()->search['status'])
  187. <div class='panel panel-default'>
  188. <div class="loadEffect">
  189. <span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span>
  190. </div>
  191. <div class='panel-body' style="padding-bottom: 15px">
  192. <input type="hidden" name="pay_way" value="2">
  193. <input type="button" class="btn btn-success" id="batch_alipay" value="支付宝批量打款">
  194. <label style="color:#ff0000;">批量打款所选的订单收入类型必须保持一致,收入类型分为余额提现和收入提现</label>
  195. </div>
  196. <div class='panel-body' style="padding-bottom: 15px">
  197. <input type="hidden" name="pay_way" value="2">
  198. <input type="submit" class="btn btn-success batch_withdraw_alipay" value="支付宝余额提现一键打款" data-type="1">
  199. <input type="submit" class="btn btn-success batch_withdraw_alipay" value="支付宝收入提现一键打款" data-type="2">
  200. <label style="color:#ff0000;">一键打款每次最大批次数上限为800</label>
  201. </div>
  202. </div>
  203. @endif
  204. <div class='panel panel-default'>
  205. <div class='panel-body'>
  206. <table class="table">
  207. <thead>
  208. <tr style="font-weight: bold;text-align:center">
  209. {{--<td style='width:8%;'><input id="all" type="checkbox" value="0"> 全选</td>--}}
  210. <td style='width:15%;'>申请时间</td>
  211. <td style='width:20%;'>提现编号</td>
  212. <td style='width:15%;'>粉丝</td>
  213. <td style='width:10%;'>姓名</br>手机</td>
  214. <td style='width:10%;'>收入类型</td>
  215. <td style='width:10%;'>提现方式</td>
  216. <td style='width:10%;'>申请金额</td>
  217. <td style='width:10%;'>提现状态</td>
  218. <td style='width:10%;'>操作</td>
  219. </tr>
  220. </thead>
  221. <tbody>
  222. @foreach($records as $row)
  223. <tr style="text-align:center">
  224. {{--<td><input type="checkbox" name="chk_withdraw" value="{{$row->id}}"></td>--}}
  225. <td>{{$row->created_at}}</td>
  226. <td title="{{$row->withdraw_sn}}" class="tip">{{$row->withdraw_sn}}</td>
  227. <td><img src="{{tomedia($row->hasOneMember['avatar'])}}"
  228. style="width: 30px; height: 30px;border:1px solid #ccc;padding:1px;">
  229. <br/>
  230. @if(!empty($row->hasOneMember['uid']))
  231. <a href="{{yzWebUrl('member.member.detail',['id' => $row->hasOneMember['uid']])}}" target="_blank">
  232. [{{$row->hasOneMember['uid']}}]{{$row->hasOneMember['nickname']}}
  233. </a>
  234. @else
  235. <a>&nbsp</a>
  236. @endif
  237. </td>
  238. <td>{{$row->hasOneMember['realname']}}<br/>{{$row->hasOneMember['mobile']}}</td>
  239. <td>{{$row->type_name}}</td>
  240. <td>{{$row->pay_way_name}}</td>
  241. <td>{{$row->amounts}}</td>
  242. <td>
  243. @if($row->status == -1)
  244. <span class='label label-default'>{{ $row->status_name }}</span>
  245. @elseif($row->status == 1)
  246. <span class='label label-danger'>{{ $row->status_name }}</span>
  247. @elseif($row->status == 2)
  248. <span class='label label-success'>{{ $row->status_name }}</span>
  249. @elseif($row->status == 3)
  250. <span class='label label-warning'>{{ $row->status_name }}</span>
  251. @elseif($row->status == 4)
  252. <span class='label label-info'>{{ $row->status_name }}</span>
  253. @else
  254. <span class='label label-primary'>{{ $row->status_name }}</span>
  255. @endif
  256. </td>
  257. <td>
  258. @if($row->type == 'balance')
  259. <a class='btn btn-default'
  260. href="{{yzWebUrl('finance.balance-withdraw.detail', ['id' => $row->id])}}">详情</a>
  261. @elseif($row->type == 'auction_prepayment')
  262. <a class='btn btn-default'
  263. href="{{yzWebUrl('finance.prepayment-withdraw.detail', ['id' => $row->id])}}">详情</a>
  264. @else
  265. <a class='btn btn-default'
  266. href="{{yzWebUrl('withdraw.detail.index', ['id' => $row->id])}}">详情</a>
  267. @endif
  268. </td>
  269. </tr>
  270. @endforeach
  271. </tbody>
  272. </table>
  273. {!! $page !!}
  274. </div>
  275. </div>
  276. <!-- Modal -->
  277. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  278. <div class="modal-dialog" role="document">
  279. <div class="modal-content">
  280. <div class="modal-header">
  281. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
  282. </button>
  283. <h4 class="modal-title" id="myModalLabel">支付宝提现</h4>
  284. </div>
  285. <div class="modal-body">
  286. 提现打款是否成功?
  287. </div>
  288. <div class="modal-footer">
  289. <button type="button" class="btn btn-default" data-dismiss="modal">失败</button>
  290. <button type="button" class="btn btn-primary withdraw_success">成功</button>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <script language='javascript'>
  296. $(function () {
  297. $('#export').click(function () {
  298. $('#isExport').val("1");
  299. $('#form1').submit();
  300. $('#isExport').val("0");
  301. });
  302. $('#search').click(function () {
  303. $('#form1').submit();
  304. });
  305. $('#all').change(function () {
  306. $(this).parents('.table').find('input[type="checkbox"]').prop('checked', $(this).prop('checked'));
  307. });
  308. //批量打款
  309. $(document).on('click', '#batch_alipay', function () {
  310. var total = 0;
  311. var balance = 0;
  312. var error = 0;
  313. var ids = []
  314. $(document).find('.batch_alipay').remove();
  315. $('input[type="checkbox"]').each(function () {
  316. if ($(this).prop('checked') && $(this).val() != 0) {
  317. total++;
  318. ids.push($(this).val());
  319. if ($(this).parent().siblings().eq(4).text() != '提现到支付宝') {
  320. error++;
  321. }
  322. if ($(this).parent().siblings().eq(3).text() == '余额提现') {
  323. balance++;
  324. }
  325. }
  326. });
  327. if (error > 0) {
  328. alert('提现方式错误');
  329. return false;
  330. }
  331. if (balance == 0 || balance == total) {
  332. var myform = $('<form class="batch_alipay" method="post" target="_blank"><input type="hidden" name="ids" value="' + ids + '" /></form>');
  333. $(document.body).append(myform);
  334. if (balance == 0) { //收入提现
  335. myform.attr('action', '{!! yzWebUrl("finance.withdraw.batchAlipay") !!}');
  336. } else { //余额提现
  337. myform.attr('action', '{!! yzWebUrl("finance.balance-withdraw.batchAlipay") !!}');
  338. }
  339. myform.submit();
  340. } else {
  341. alert('订单收入类型不一致');
  342. return false;
  343. }
  344. });
  345. //一键打款
  346. $(document).on('click', '.batch_withdraw_alipay', function () {
  347. $(document).find('.batch_alipay_form').remove();
  348. var _that = this;
  349. var myform = '';
  350. var action = '';
  351. var withdraw_type = $(this).data('type');
  352. switch (withdraw_type) {
  353. case 1:
  354. action = '{!! yzWebUrl("finance.balance-withdraw.batchAlipay") !!}';
  355. break;
  356. case 2:
  357. action = '{!! yzWebUrl("finance.withdraw.batchAlipay") !!}';
  358. break;
  359. }
  360. $.ajax({
  361. url: '{!! yzWebUrl('finance.withdraw.getAllWithdraw') !!}',
  362. type: 'POST',
  363. data: {type: withdraw_type},
  364. dataType: 'json',
  365. beforeSend: function () {
  366. $('.loadEffect').show();
  367. $(_that).attr('disabled', "true");
  368. }
  369. }).done(function (json) {
  370. if (json.status == 0 || json.status == -1) {
  371. //alert(json.msg)
  372. return false;
  373. }
  374. if (json.status == 1) {
  375. myform = $('<form class="batch_alipay_form" method="post" target="_blank"><input type="hidden" name="ids" value="' + json.ids + '" /></form>');
  376. $(myform).attr('action', action);
  377. $(document.body).append(myform);
  378. $(myform).submit();
  379. }
  380. }).fail(function (message) {
  381. console.log('fail:', message)
  382. }).always(function () {
  383. $('.loadEffect').hide();
  384. $('#myModal').modal();
  385. $(_that).removeAttr('disabled');
  386. });
  387. });
  388. $('.withdraw_success').click(function () {
  389. var process_id = $(document).find('.batch_alipay_form input[name="ids"]').val();
  390. if (typeof (process_id) != 'undefined' || process_id != '' || process_id != 0) {
  391. $('#myModal').modal('hide');
  392. $.ajax({
  393. url: '{!! yzWebUrl('finance.withdraw.updateWidthdrawOrderStatus') !!}',
  394. type: 'get',
  395. data: {ids: process_id},
  396. dataType: 'json',
  397. beforeSend: function () {
  398. $('.loadEffect').show();
  399. }
  400. }).done(function (json) {
  401. if (json.status == 1) {
  402. // alert('更新订单状态成功');
  403. location.reload();
  404. } else {
  405. alert('更新订单状态失败');
  406. }
  407. }).fail(function (message) {
  408. console.log(message);
  409. }).always(function () {
  410. $('.loadEffect').hide();
  411. })
  412. }
  413. });
  414. });
  415. </script>
  416. @endsection