withdrawal.php 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <?php
  2. session_start();
  3. if (isset($_SESSION["username"])) {
  4. ?>
  5. <?php require_once('common/header.php'); ?>
  6. <!--页面主要内容-->
  7. <main class="lyear-layout-content">
  8. <div class="container-fluid">
  9. <div class="row">
  10. <div class="col-lg-12">
  11. <div class="card">
  12. <div class="card-toolbar clearfix">
  13. <form class="pull-right search-bar" method="get" action="" role="form">
  14. <div class="input-group">
  15. <div class="input-group-btn">
  16. <input type="hidden" name="search_field" id="search-field" value="name">
  17. <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
  18. 姓名查询 <span class="caret"></span>
  19. </button>
  20. <ul class="dropdown-menu">
  21. <!--<li> <a tabindex="-1" href="javascript:void(0)" data-field="title">渠道来源</a> </li>-->
  22. <li> <a tabindex="-1" href="javascript:void(0)" data-field="name">姓名查询</a> </li>
  23. <li> <a tabindex="-1" href="javascript:void(0)" data-field="phone">收货人号码</a> </li>
  24. <li> <a tabindex="-1" href="javascript:void(0)" data-field="order_id ">订单号查询</a> </li>
  25. </ul>
  26. </div>
  27. <input type="text" class="form-control" value="" name="keyword" placeholder="请输入查询信息">
  28. </div>
  29. </form>
  30. <div class="toolbar-btn-action">
  31. <a class="btn btn-info m-r-5" href="#">提现列表</a>
  32. </div>
  33. </div>
  34. <div class="card-body">
  35. <div class="table-responsive">
  36. <form name="form1" id="form1" method="post" action="controller/deleteall.php">
  37. <table class="table table-bordered">
  38. <?php
  39. include_once("../untils/conn.php");
  40. mysqli_query($con, "set names utf8");
  41. if ($con) {
  42. if ($db) {
  43. //获取数据总行数
  44. $sql = "select * from withdrawal";
  45. $data = mysqli_query($con, $sql);
  46. $maxrows = mysqli_num_rows($data);
  47. //计算总页数
  48. $page_size = 10; //每页显示数
  49. if ($maxrows % $page_size == 0) {
  50. $maxpage = (int)($maxrows / $page_size);
  51. } else {
  52. $maxpage = (int)($maxrows / $page_size) + 1;
  53. }
  54. //获取当前页
  55. if (isset($_GET['curpage'])) {
  56. $page = $_GET['curpage'];
  57. } else {
  58. $page = 1;
  59. }
  60. //分段取出数据
  61. $start = $page_size * ($page - 1);
  62. $get_sql = "select * from withdrawal order by id desc limit $start,$page_size";
  63. //得到数据显示
  64. $data = mysqli_query($con, $get_sql);
  65. ?>
  66. <thead>
  67. <tr>
  68. <th>ID</th>
  69. <th>提现账号</th>
  70. <th>提现方式</th>
  71. <th>姓名</th>
  72. <th>账号</th>
  73. <th>银行</th>
  74. <th>支行</th>
  75. <th>提现金额</th>
  76. <th>打款金额</th>
  77. <th>税额</th>
  78. <th>申请状态</th>
  79. <th>申请时间</th>
  80. <th>处理时间</th>
  81. <th>备注说明</th>
  82. <th>操作</th>
  83. </tr>
  84. </thead>
  85. <tbody>
  86. <?php
  87. while ($row = mysqli_fetch_array($data)) {
  88. ?>
  89. <tr>
  90. <td style="width:1%;">
  91. <?php echo $row["id"] ?>
  92. </td>
  93. <td style="width:1%;">
  94. <?php echo $row["proxy_acc"] ?>
  95. </td>
  96. <td style="width:5%;">
  97. <?php
  98. if($row["tx_type"] == 0){
  99. echo "微信";
  100. }elseif($row["tx_type"] == 1){
  101. echo "支付宝";
  102. }elseif($row["tx_type"] == 2){
  103. echo "银行卡";
  104. }
  105. ?>
  106. </td>
  107. <td style="width:10%;"><?php echo $row["tx_name"] ?>
  108. </td>
  109. <td style="width:5%;"><?php echo $row["tx_acc"] ?>
  110. </td>
  111. <td style="width:10%;"><?php echo $row["tx_bank_name"] ?>
  112. </td>
  113. <td style="width:10%;"><?php echo $row["tx_bank_zh"] ?>
  114. </td>
  115. <td style="width:5%;">¥<?php echo $row["tx_price"] ?>
  116. </td>
  117. <td style="width:5%;">¥<?php echo $row["dk_price"] ?>
  118. </td>
  119. <td style="width:5%;"><?php echo $row["tax"] . "%" ?>
  120. </td>
  121. <td style="width:5%;">
  122. <?php
  123. if ($row["state"] == 0) {
  124. echo "待审核";
  125. } elseif ($row["state"] == 1) {
  126. echo "已打款";
  127. } elseif ($row["state"] == 2) {
  128. echo "审核失败";
  129. } else {
  130. echo "未知状态";
  131. }
  132. ?>
  133. </td>
  134. <td style="width:5%;"><?php echo $date = date('Y-m-d H:i:s', $row["cr_time"]) ?>
  135. </td>
  136. <td style="width:5%;"><?php echo $date = date('Y-m-d H:i:s', $row["cl_time"]) ?>
  137. </td>
  138. <td style="width:10%;"><?php echo $row["notes"] ?>
  139. </td>
  140. <td style="width:5%;">
  141. <?php if ($row["state"] == 0): ?>
  142. <a href="upwith.php?id=<?php echo $row['id'] ?>" class="btn btn-primary btn-sm">审核打款</a>
  143. <?php elseif ($row["state"] == 1): ?>
  144. <a href="#" class="btn btn-info btn-sm">已打款</a>
  145. <?php elseif ($row["state"] == 2): ?>
  146. <a href="upwith.php?id=<?php echo $row['id'] ?>" class="btn btn-danger btn-sm">重新审核</a>
  147. <?php endif; ?>
  148. </td>
  149. </tr>
  150. <?php
  151. }
  152. ?>
  153. </tbody>
  154. <tfoot>
  155. <tr>
  156. <td colspan="12" style="text-align: right;">
  157. <?php
  158. echo "<p>共 $maxpage 页&nbsp;&nbsp;";
  159. echo "每页 $page_size 项&nbsp;&nbsp;";
  160. //设置上一页
  161. if ($page > 1) {
  162. $prepage = $page - 1;
  163. echo "<a href='?curpage=$prepage'>上一页</a>&nbsp;&nbsp;";
  164. }
  165. //设置下一页
  166. if ($page < $maxpage) {
  167. $nextpage = $page + 1;
  168. echo "<a href='?curpage=$nextpage'>下一页</a>&nbsp;&nbsp;";
  169. }
  170. echo "&nbsp;&nbsp;第 $page 页</p>";
  171. }
  172. }
  173. ?>
  174. </td>
  175. </tr>
  176. </tfoot>
  177. </table>
  178. </form>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. <script>
  187. $(document).ready(function(){
  188. $('.update-btn').click(function(e){
  189. e.preventDefault();
  190. var id = $(this).data('id');
  191. $.ajax({
  192. url: 'updatesta.php',
  193. type: 'GET',
  194. data: {id: id},
  195. success: function(data){
  196. alert('状态处理成功!');
  197. },
  198. error: function(jqXHR, textStatus, errorThrown){
  199. console.log(textStatus);
  200. }
  201. });
  202. });
  203. });
  204. </script>
  205. </main>
  206. <!--End 页面主要内容-->
  207. <?php require_once('common/footer.php'); ?>
  208. <?php
  209. } else {
  210. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  211. }