admintixianlist.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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. </head>
  45. <body layadmin-themealias="default">
  46. <div class="layui-fluid">
  47. <div class="layui-card">
  48. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">供应商提现列表</span></div>
  49. <div class="layui-card-body" style="padding:15px;">
  50. <form action="" class="layui-form" lay-filter="example" method="post" >
  51. <div class="page-table-header">
  52. <div class="btn-group">
  53. <a class='btn btn-default btn-sm btn-op btn-operation' data-toggle='batch' data-href="{:U('supply/agent_tixian',array('state'=>1))}" data-confirm='确认要审核通过,确定已经打款给供应商?'>
  54. <i class="icow icow-shenhetongguo"></i>审核通过
  55. </a>
  56. <a class='btn btn-default btn-sm btn-op btn-operation' data-toggle='batch' data-href="{:U('supply/agent_tixian',array('state'=>0))}" data-confirm='确认要取消审核,申请中的金额将退回供应商账户?'>
  57. <i class="icow icow-yiquxiao"></i>取消审核</a>
  58. </div>
  59. </div>
  60. <div class="row">
  61. <div class="col-md-12">
  62. <table class="layui-table" lay-skin="line" lay-size="lg">
  63. <thead class="navbar-inner">
  64. <tr>
  65. <th style="width:25px;">
  66. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  67. </th>
  68. <th style="width:60px;">ID</th>
  69. <th style="">供应商</th>
  70. <th style="">提现方式<br/>提现账户</th>
  71. <th style="">
  72. <span style="font-size:12px;">申请提现金额</span><br/>
  73. <span style="font-size:12px;">提现手续费</span><br/>
  74. <span style="font-size:12px;">到账金额</span>
  75. </th>
  76. <th style=''>提现申请时间<br/>提现处理时间</th>
  77. <th style='width:200px;'>状态</th>
  78. <th style='width:300px;'>操作</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <?php foreach( $list as $row ){ ?>
  83. <tr>
  84. <td style="position: relative; ">
  85. <input type='checkbox' value="{$row['id']}" name="item_checkbox" lay-skin="primary"/>
  86. </td>
  87. <td>
  88. {$row['id']}
  89. </td>
  90. <td >
  91. {$row['supper_info']['shopname']}
  92. </td>
  93. <td>
  94. <?php
  95. if( $row['supply_apply_type'] == 3 )
  96. {
  97. echo '银行卡:'.$row['bankname'];
  98. }else{
  99. echo '转账类型:'.$row['bankname'] ;
  100. }
  101. ?>
  102. <br/>
  103. <?php if( $row['supply_apply_type'] == 1 ){ ?>
  104. 微信真实姓名:<br/>
  105. <a href='javascript:;' data-toggle='ajaxEdit' data-href="{:U('supply/changename',array('type'=>'bankaccount','id'=>$row['id']))}" >
  106. <text class='text-primary'>{$row['bankaccount']}</text>
  107. </a>
  108. <br/>
  109. <?php }else{ ?>
  110. <?php echo '账户:'.$row['bankaccount']; ?><br/>
  111. <?php } ?>
  112. <?php echo empty($row['bankusername']) ? '': '持卡人姓名:'.$row['bankusername']; ?><br/>
  113. </td>
  114. <td >
  115. <span>{$row['money']}</span><br/>
  116. <span style="color:green;">{$row['service_charge']}</span><br/>
  117. <span style="color:red;"><?php echo round( $row['money']- $row['service_charge'], 2); ?></span>
  118. </td>
  119. <td>
  120. {:date('Y-m-d H:i:s', $row['addtime'])}<br/>
  121. <?php echo empty($row['shentime']) ? '': date('Y-m-d H:i:s', $row['shentime']); ?><br/>
  122. </td>
  123. <td>
  124. <?php if( $row['state'] ==2 ){ ?>
  125. 拒绝提现
  126. <?php }elseif($row['state'] ==1){ ?>
  127. <text class='text-danger'>提现成功,已打款</text>
  128. <?php }else{ ?>
  129. <input type="checkbox" name="" lay-filter="statewsitch" tx_type="<?php echo $row['supply_apply_type'];?>" data-href="{:U('supply/agent_tixian',array('state'=>1,'id'=>$row['id']))}" <?php if( $row['state']==1){ ?>checked<?php }else{ ?><?php } ?> lay-skin="switch" lay-text="审核通过?已经打款给供应商|通过?已经打款?">
  130. <input type="checkbox" name="" lay-filter="statewsitchunable" data-href="{:U('supply/agent_tixian',array('state'=>2,'id'=>$row['id']))}" <?php if( $row['state']==1 ){ ?>checked <?php } ?> lay-skin="switch" lay-text="已经拒绝|点击拒绝审核">
  131. <?php } ?>
  132. </td>
  133. <td>
  134. <a href="{:U('order/index',array('searchfield'=>'supply_name','keyword'=>$row['supper_info']['shopname']))}" style="color:#32b4e8;">相关订单记录</a>
  135. &nbsp;&nbsp;&nbsp;&nbsp;
  136. <a href="{:U('supply/admintixianlist',array('supply_id'=>$row['supper_info']['id']))}" style="color:#32b4e8;">提现记录</a>
  137. </td>
  138. </tr>
  139. <?php } ?>
  140. </tbody>
  141. <tfoot>
  142. <tr>
  143. <td colspan="8" style="text-align: right">
  144. {$pager}
  145. </td>
  146. </tr>
  147. </tfoot>
  148. </table>
  149. </div>
  150. </div>
  151. </form>
  152. </div>
  153. </div>
  154. </div>
  155. <script src="/layuiadmin/layui/layui.js"></script>
  156. <script>
  157. layui.config({
  158. base: '/layuiadmin/' //静态资源所在路径
  159. }).extend({
  160. index: 'lib/index' //主入口模块
  161. }).use('index');
  162. </script>
  163. <script>
  164. var layer = layui.layer;
  165. var $;
  166. layui.use(['jquery', 'layer','form'], function(){
  167. $ = layui.$;
  168. var form = layui.form;
  169. $('.deldom').click(function(){
  170. var s_url = $(this).attr('data-href');
  171. layer.confirm($(this).attr('data-confirm'), function(index){
  172. $.ajax({
  173. url:s_url,
  174. type:'post',
  175. dataType:'json',
  176. success:function(info){
  177. if(info.status == 0)
  178. {
  179. layer.msg(info.result.message,{icon: 1,time: 2000});
  180. }else if(info.status == 1){
  181. var go_url = location.href;
  182. if( info.result.hasOwnProperty("url") )
  183. {
  184. go_url = info.result.url;
  185. }
  186. layer.msg('操作成功',{time: 1000,
  187. end:function(){
  188. location.href = info.result.url;
  189. }
  190. });
  191. }
  192. }
  193. })
  194. });
  195. })
  196. $(document).on("click", '[data-toggle="ajaxEdit"]', function(e) {
  197. var obj = $(this),
  198. url = obj.data('href') || obj.attr('href'),
  199. data = obj.data('set') || {},
  200. html = $.trim(obj.text()),
  201. required = obj.data('required') || true,
  202. edit = obj.data('edit') || 'input';
  203. var oldval = $.trim($(this).text());
  204. e.preventDefault();
  205. submit = function() {
  206. e.preventDefault();
  207. var val = $.trim(input.val());
  208. if (required) {
  209. if (val == '') {
  210. layer.msg(tip.lang.empty);
  211. return
  212. }
  213. }
  214. if (val == html) {
  215. input.remove(), obj.html(val).show();
  216. return
  217. }
  218. if (url) {
  219. $.post(url, {
  220. value: val
  221. }, function(ret) {
  222. ret = eval("(" + ret + ")");
  223. if (ret.status == 1) {
  224. obj.html(val).show()
  225. } else {
  226. layer.msg(ret.result.message, ret.result.url)
  227. }
  228. input.remove()
  229. }).fail(function() {
  230. input.remove(), layer.msg(tip.lang.exception)
  231. })
  232. } else {
  233. input.remove();
  234. obj.html(val).show()
  235. }
  236. obj.trigger('valueChange', [val, oldval])
  237. }, obj.hide().html('<i class="fa fa-spinner fa-spin"></i>');
  238. var input = $('<input type="text" class="form-control input-sm" style="width: 80%;display: inline;" />');
  239. if (edit == 'textarea') {
  240. input = $('<textarea type="text" class="form-control" style="resize:none" rows=3 ></textarea>')
  241. }
  242. obj.after(input);
  243. input.val(html).select().blur(function() {
  244. submit(input)
  245. }).keypress(function(e) {
  246. if (e.which == 13) {
  247. submit(input)
  248. }
  249. })
  250. })
  251. form.on('switch(statewsitch)', function(data){
  252. var s_url = $(this).attr('data-href')
  253. var lock = false;
  254. var s_value = 1;
  255. if(data.elem.checked)
  256. {
  257. s_value = 1;
  258. }else{
  259. s_value = 0;
  260. }
  261. if(!lock) {
  262. lock = true;
  263. $.ajax({
  264. url: s_url,
  265. type: 'post',
  266. dataType: 'json',
  267. data: {value: s_value},
  268. success: function (info) {
  269. if (info.status == 0) {
  270. var go_url = location.href;
  271. layer.msg(info.result.message, {
  272. icon: 1, time: 2000, end: function () {
  273. location.href = go_url;
  274. }
  275. });
  276. } else if (info.status == 1) {
  277. var go_url = location.href;
  278. if (info.result.hasOwnProperty("url")) {
  279. go_url = info.result.url;
  280. }
  281. layer.msg('操作成功', {
  282. time: 1000,
  283. end: function () {
  284. location.href = info.result.url;
  285. }
  286. });
  287. }
  288. }
  289. })
  290. }
  291. });
  292. form.on('switch(statewsitchunable)', function(data){
  293. var x = data.elem.checked;
  294. var s_url = $(this).attr('data-href')
  295. var s_value = 2;
  296. layer.confirm('确认拒绝审核?',{
  297. btn:['确定','取消'],
  298. cancel:function(index, layero){
  299. data.elem.checked=!x;
  300. form.render();
  301. }
  302. },function () {
  303. $.ajax({
  304. url:s_url,
  305. type:'post',
  306. dataType:'json',
  307. data:{state:s_value},
  308. success:function(info){
  309. if(info.status == 0)
  310. {
  311. var go_url = location.href;
  312. layer.msg(info.result.message,{icon: 1,time: 2000,end:function(){
  313. location.href = go_url;
  314. }}
  315. );
  316. }else if(info.status == 1){
  317. var go_url = location.href;
  318. if( info.result.hasOwnProperty("url") )
  319. {
  320. go_url = info.result.url;
  321. }
  322. layer.msg('操作成功',{time: 1000,
  323. end:function(){
  324. location.href = info.result.url;
  325. }
  326. });
  327. }
  328. }
  329. })
  330. },function(){
  331. data.elem.checked=!x;
  332. form.render();
  333. });
  334. });
  335. $('.btn-operation').click(function(){
  336. var ids_arr = [];
  337. var obj = $(this);
  338. var s_toggle = $(this).attr('data-toggle');
  339. var s_url = $(this).attr('data-href');
  340. $(obj).attr('disabled',true);
  341. $("input[name=item_checkbox]").each(function() {
  342. if( $(this).prop('checked') )
  343. {
  344. ids_arr.push( $(this).val() );
  345. }
  346. })
  347. if(ids_arr.length < 1)
  348. {
  349. layer.msg('请选择要操作的内容');
  350. $(obj).attr('disabled',false);
  351. }else{
  352. var can_sub = true;
  353. if( s_toggle == 'batch-remove' )
  354. {
  355. can_sub = false;
  356. $(obj).attr('disabled',false);
  357. layer.confirm($(obj).attr('data-confirm'), function(index){
  358. $.ajax({
  359. url:s_url,
  360. type:'post',
  361. dataType:'json',
  362. data:{ids:ids_arr},
  363. success:function(info){
  364. if(info.status == 0)
  365. {
  366. layer.msg(info.result.message,{icon: 1,time: 2000});
  367. }else if(info.status == 1){
  368. var go_url = location.href;
  369. if( info.result.hasOwnProperty("url") )
  370. {
  371. go_url = info.result.url;
  372. }
  373. layer.msg('操作成功',{time: 1000,
  374. end:function(){
  375. location.href = info.result.url;
  376. }
  377. });
  378. }
  379. }
  380. })
  381. });
  382. }else{
  383. $.ajax({
  384. url:s_url,
  385. type:'post',
  386. dataType:'json',
  387. data:{ids:ids_arr},
  388. success:function(info){
  389. if(info.status == 0)
  390. {
  391. layer.msg(info.result.message,{icon: 1,time: 2000,
  392. end:function(){
  393. $(obj).attr('disabled',false);
  394. }});
  395. }else if(info.status == 1){
  396. var go_url = location.href;
  397. if( info.result.hasOwnProperty("url") )
  398. {
  399. go_url = info.result.url;
  400. }
  401. layer.msg('操作成功',{time: 1000,
  402. end:function(){
  403. location.href = info.result.url;
  404. }
  405. });
  406. }
  407. }
  408. })
  409. }
  410. }
  411. })
  412. form.on('switch(statewsitch)', function(data){
  413. var s_url = $(this).attr('data-href');
  414. var x=data.elem.checked;
  415. var tx_type = $(this).attr('tx_type');
  416. var lock = false;
  417. var tip_msg = '确认审核通过,已经打款?';
  418. if(tx_type == 0){
  419. //系统余额
  420. tip_msg = '确认审核通过,该会员个人中心余额会立即收到,只能用于小程序消费。';
  421. }else if(tx_type == 1 || tx_type == 4){
  422. //1、微信余额 4、微信私下转
  423. tip_msg = '确认审核通过,将立即从微信支付商户扣款打到该会员微信零钱中。';
  424. }else if(tx_type == 2){
  425. //支付宝
  426. tip_msg = '请确认已手动转账到对方支付宝账户。';
  427. }else if(tx_type == 3){
  428. //银行卡
  429. tip_msg = '请确认已手动转账到对方银行卡账户。';
  430. }
  431. layer.confirm(tip_msg,{
  432. btn:['确定','取消'],
  433. cancel:function(index, layero){
  434. data.elem.checked=!x;
  435. form.render();
  436. }
  437. },function () {
  438. var s_value = 1;
  439. if(data.elem.checked)
  440. {
  441. s_value = 1;
  442. }else{
  443. s_value = 0;
  444. }
  445. if(!lock) {
  446. lock = true;
  447. $.ajax({
  448. url: s_url,
  449. type: 'post',
  450. dataType: 'json',
  451. data: {state: s_value},
  452. success: function (info) {
  453. if (info.status == 0) {
  454. var go_url = location.href;
  455. layer.msg(info.result.message, {
  456. icon: 1, time: 2000, end: function () {
  457. location.href = go_url;
  458. }
  459. }
  460. );
  461. } else if (info.status == 1) {
  462. var go_url = location.href;
  463. if (info.result.hasOwnProperty("url")) {
  464. go_url = info.result.url;
  465. }
  466. layer.msg('操作成功', {
  467. time: 1000,
  468. end: function () {
  469. location.href = info.result.url;
  470. }
  471. });
  472. }
  473. }
  474. })
  475. }
  476. },function(){
  477. data.elem.checked=!x;
  478. form.render();
  479. });
  480. });
  481. form.on('checkbox(checkboxall)', function(data){
  482. if(data.elem.checked)
  483. {
  484. $("input[name=item_checkbox]").each(function() {
  485. $(this).prop("checked", true);
  486. });
  487. $("input[name=checkall]").each(function() {
  488. $(this).prop("checked", true);
  489. });
  490. }else{
  491. $("input[name=item_checkbox]").each(function() {
  492. $(this).prop("checked", false);
  493. });
  494. $("input[name=checkall]").each(function() {
  495. $(this).prop("checked", false);
  496. });
  497. }
  498. form.render('checkbox');
  499. });
  500. //监听提交
  501. form.on('submit(formDemo)', function(data){
  502. $.ajax({
  503. url: data.form.action,
  504. type: data.form.method,
  505. data: data.field,
  506. dataType:'json',
  507. success: function (info) {
  508. if(info.status == 0)
  509. {
  510. layer.msg(info.result.message,{icon: 1,time: 2000});
  511. }else if(info.status == 1){
  512. var go_url = location.href;
  513. if( info.result.hasOwnProperty("url") )
  514. {
  515. go_url = info.result.url;
  516. }
  517. layer.msg('操作成功',{time: 1000,
  518. end:function(){
  519. location.href = info.result.url;
  520. }
  521. });
  522. }
  523. }
  524. });
  525. return false;
  526. });
  527. })
  528. </script>
  529. </body>
  530. </html>