income.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. use yii\widgets\LinkPager;
  3. ?>
  4. <?php
  5. use backend\widgets\TabWidget;
  6. echo TabWidget::widget(['list' => $this->context->menuList, 'currentMenu' => $this->context->id]);
  7. ?>
  8. <div class="panel panel-default">
  9. <?php
  10. use backend\widgets\SubTabWidget;
  11. echo SubTabWidget::widget(['list' => $this->context->subMenuList, 'currentMenu' => $this->context->action->id]);
  12. ?>
  13. <div class="panel-body">
  14. <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  15. <div class="table-responsive">
  16. <table class="table table-bordered table-striped table-hover">
  17. <thead>
  18. <tr class="active">
  19. <th class="no-sorting hidden-xs"><input type="checkbox"></th>
  20. <th class="hidden-xs">日期</th>
  21. <th>收入</th>
  22. <th class="hidden-xs">微信</th>
  23. <th>支付宝</th>
  24. <th>余额</th>
  25. <th>现金</th>
  26. <th>累计收入</th>
  27. <th>对帐</th>
  28. <th>操作</th>
  29. </tr>
  30. </thead>
  31. <tbody class="middle-align">
  32. <?php if (!empty($list)) {
  33. foreach ($list as $key => $val) { ?>
  34. <tr>
  35. <td class="hidden-xs"><input type="checkbox"></td>
  36. <td class="hidden-xs"><?= date("Y-m-d", $val['time']); ?></td>
  37. <td><?= $val['amount'] ?></td>
  38. <td><?= $val['weixin']; ?></td>
  39. <td><?= $val['alipay']; ?></td>
  40. <td><?= $val['balancePay']; ?></td>
  41. <td><?= $val['cash'] ?></td>
  42. <td><?= $val['totalAmount'] ?></td>
  43. <td id="show">
  44. <?php if ($val['checkUp'] == 1) {
  45. echo '<a href="javascript:void(0)" style="color:#68b828;"><i class="fa fa-check"></i></a>';
  46. } ?>
  47. </td>
  48. <td>
  49. <?php if ($val['checkUp'] == 0) {
  50. echo '<a href="javascript:void(0)" onclick="checkUp(' . $val['id'] . ',this)" class="btn btn-secondary btn-sm btn-icon icon-left">对帐</a>';
  51. } ?>
  52. </td>
  53. </tr>
  54. <?php }
  55. } ?>
  56. </tbody>
  57. </table>
  58. </div>
  59. <div class="row">
  60. <div>
  61. <div class="dataTables_paginate paging_simple_numbers" style="float:right;padding-top:0px;margin-right:15px;">
  62. <?= LinkPager::widget(['pagination' => $pages]); ?>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <!-- footer -->
  70. <?php
  71. use backend\widgets\FooterWidget;
  72. ?>
  73. <?= FooterWidget::widget() ?>
  74. <!-- footer -->
  75. <script>
  76. function checkUp(id, o) {
  77. var that = $(o);
  78. $.ajax({
  79. type: "GET",
  80. url: '/stat/check-up?id=' + id,
  81. async: false,
  82. dataType: 'json',
  83. success: function (data) {
  84. xhPopMsg(data.msg, 1300);
  85. if (data.code == 1) {
  86. that.parent().html('').prev().html('<a href="javascript:void(0)" style="color:#68b828;"><i class="fa fa-check"></i></a>');
  87. }
  88. }
  89. });
  90. }
  91. </script>