list.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. use common\services\xhUserService;
  3. use yii\widgets\LinkPager;
  4. ?>
  5. <style>
  6. .main_index_bg_today {
  7. background:white;
  8. margin-bottom:10px;
  9. padding-top:20px;
  10. padding-bottom:20px;
  11. }
  12. .main_index_bg_today .overview-item {
  13. width:33%;
  14. display:inline-block;
  15. text-align:center;
  16. height:50px;
  17. }
  18. .main_index_bg_today .overview-item .item-value{
  19. margin-top:10px;
  20. font-size:15px;
  21. font-weight:bold;
  22. }
  23. </style>
  24. <div class="main_index_bg_today" style="margin-top: 20px;">
  25. <div class="overview-item" style="border-right: 1px dashed #ccc;">
  26. <div class="item-title">
  27. <div><span>余额(元)</span>
  28. </div>
  29. </div>
  30. <div class="item-value">0</div>
  31. </div>
  32. <div class="overview-item" style="border-right: 1px dashed #ccc;">
  33. <div class="item-title">
  34. <div><span>待结算(元)</span>
  35. </div>
  36. </div>
  37. <div class="item-value">0</div>
  38. </div>
  39. <div class="overview-item" style="border-right: none;">
  40. <div class="item-title">
  41. <div><span>短信数(条)</span>
  42. </div>
  43. </div>
  44. <div class="item-value">0</div>
  45. </div>
  46. </div>
  47. <div class="panel panel-default">
  48. <div class="panel-body">
  49. <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  50. <div class="row">
  51. <form action="" method="GET">
  52. <div class="col-xs-6" style="width:90%;">
  53. <div class="dataTables_length">
  54. <label>支付方式: <select name="payWay" class="form-control">
  55. <option <?php if($_GET['payWay'] == -1 || isset($_GET['payWay']) == false){ echo 'selected';} ?> value="-1">全部</option>
  56. <option <?php if($_GET['payWay'] == '0'){ echo 'selected';} ?> value="0">微信</option>
  57. <option <?php if($_GET['payWay'] == 1){ echo 'selected';} ?> value="1">支付宝</option>
  58. <option <?php if($_GET['payWay'] == 2){ echo 'selected';} ?> value="2">余额</option>
  59. <option <?php if($_GET['payWay'] == 3){ echo 'selected';} ?> value="3">现金</option>
  60. </select>
  61. </label>
  62. <label>选择时间段:<input type="text" name="date" class="form-control" autocomplete="off" id="getDate"></label>
  63. <input class="btn btn-secondary btn-single" type="submit" name="" value="搜索">
  64. </div>
  65. </div>
  66. </form>
  67. </div>
  68. <div class="table-responsive">
  69. <table class="table table-bordered table-striped table-hover">
  70. <thead>
  71. <tr class="active">
  72. <th class="no-sorting hidden-xs"><input type="checkbox"></th>
  73. <th class="hidden-xs">ID</th>
  74. <th>姓名</th>
  75. <th>来源</th>
  76. <th>支付方式</th>
  77. <th>收支</th>
  78. <th>累计收入</th>
  79. <th>时间</th>
  80. <th>操作</th>
  81. </tr>
  82. </thead>
  83. <tbody class="middle-align">
  84. <?php foreach($models as $key => $val){?>
  85. <tr>
  86. <td class="hidden-xs"><input type="checkbox"></td>
  87. <td class="hidden-xs"><?= $val->id ?></td>
  88. <td>
  89. <?php
  90. if(!empty($val->userId)){
  91. $user = xhUserService::getById($val->userId);
  92. echo $user['userName'];
  93. }else{
  94. echo $val->userName;
  95. }
  96. ?>
  97. </td>
  98. <td><?= $val->event ?></td>
  99. <td><?= $payWay[$val->payWay] ?></td>
  100. <td><?php if($val->io == 1){ echo '+'; }else{ echo '-'; } ?><?= $val->amount ?></td>
  101. <td><?= $val->totalIncome ?></td>
  102. <td><?php echo date("Y-m-d H:i",strtotime($val->createTime)); ?></td>
  103. <td>
  104. <!--
  105. <a href="<?= $capitalTypeList[$val->capitalType]['link'] ?>?id=<?= $val->relateId ?>" class="btn btn-secondary btn-sm btn-icon icon-left">明细</a>
  106. -->
  107. </td>
  108. </tr>
  109. <?php } ?>
  110. </tbody>
  111. </table>
  112. </div>
  113. <div class="row">
  114. <div style="margin-left:20px;"><?php if($totalAmount>0){ ?>合计:<?= $totalAmount ?>元<?php } ?></div>
  115. <div>
  116. <!--
  117. <div style="display:inline-block;margin-left:15px;">
  118. <label><select name="example-1_length"
  119. aria-controls="example-1" class="form-control">
  120. <option value="0">批量操作</option>
  121. <option value="1">批量下架</option>
  122. <option value="2">批量删除</option>
  123. </select>
  124. </label>
  125. <input class="btn btn-secondary btn-single" type="submit" name="" value="确认" />
  126. </div>
  127. -->
  128. <div class="dataTables_paginate paging_simple_numbers" style="float:right;padding-top:0px;margin-right:15px;">
  129. <?= LinkPager::widget(['pagination' => $pages]); ?>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <!-- footer -->
  137. <?php
  138. use backend\widgets\FooterWidget;
  139. ?>
  140. <?= FooterWidget::widget()?>
  141. <!-- footer -->
  142. <script src="/js/layDate-v5.0.9/laydate.js"></script>
  143. <script>
  144. //执行一个laydate实例
  145. laydate.render({
  146. elem: '#getDate',
  147. range: true,
  148. value: '<?= $_GET['date'] ?>',
  149. });
  150. </script>