pushList.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>推送名单</title>
  7. <meta name="description" content="">
  8. <meta name="keywords" content="">
  9. <link href="/css/ims/base.css" rel="stylesheet">
  10. <link rel="stylesheet" type="text/css" href="/css/ims/bootstrap.min.css"/>
  11. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  12. <style>
  13. .red {
  14. color: red;
  15. }
  16. .yellow {
  17. color: #FF9900;
  18. }
  19. .ims-box {
  20. margin: 20px;
  21. }
  22. .screen > div {
  23. margin-right: 5px;
  24. }
  25. .screen button {
  26. padding: 4px 12px;
  27. }
  28. .table-box {
  29. margin-top: 30px;
  30. }
  31. .table-box table,
  32. .table-box table th {
  33. text-align: center;
  34. }
  35. .table-box button {
  36. margin-right: 5px;
  37. }
  38. .stop-layer-box, .resubmit-layer-box, .delete-layer-box {
  39. line-height: 140px;
  40. text-align: center;
  41. }
  42. .resubmit-layer-box input {
  43. line-height: 20px;
  44. }
  45. .urge-layer-box {
  46. margin-top: 30px;
  47. margin-left: 30px;
  48. }
  49. .urge-layer-box textarea {
  50. margin-left: 15px;
  51. vertical-align: top;
  52. }
  53. .alert-msg {
  54. text-align: center;
  55. vertical-align: top;
  56. }
  57. </style>
  58. </head>
  59. <body>
  60. <div class="ims-box">
  61. <form action="<?php echo Yii::app()->createUrl('imsSale/pushList'); ?>" method="get">
  62. <div class="screen">
  63. <div class="diy_select select-clazz">
  64. <input type="hidden" id="clazzId" name="clazzId" class="diy_select_input" value="0">
  65. <div class="diy_select_txt">班级</div>
  66. <div class="diy_select_btn"></div>
  67. <ul class="diy_select_list" style="display: none;width:570px">
  68. <li val="0">班级</li>
  69. <?php if (isset($classList)): ?>
  70. <?php foreach ($classList as $item): ?>
  71. <li val="<?php echo $item['clazzId'] ?>"><?php echo $item['clazzName'] ?></li>
  72. <?php endforeach; ?>
  73. <?php else: ?>
  74. <li val="0">暂无商品</li>
  75. <?php endif; ?>
  76. </ul>
  77. </div>
  78. <div class="diy_select select-pay">
  79. <input type="hidden" id="isPay" name="isPay" class="diy_select_input" value="0">
  80. <div class="diy_select_txt">是否下单</div>
  81. <div class="diy_select_btn"></div>
  82. <ul class="diy_select_list" style="display: none;">
  83. <li val="0">是否下单</li>
  84. <li val="2">是</li>
  85. <li val="1">否</li>
  86. </ul>
  87. </div>
  88. <input type="hidden" name="orderId" value="<?php echo $_GET['orderId']?>">
  89. <button type="submit" class="label-primary-s bth-s">查询</button>
  90. <a class="label-primary-s bth-s download-excel">导出</a>
  91. </div>
  92. </form>
  93. <div class="table-box">
  94. <table id="formalOrderTable"
  95. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  96. style="font-size:12px">
  97. <thead>
  98. <tr>
  99. <th>学生姓名</th>
  100. <th>年级</th>
  101. <th>班级</th>
  102. <th>是否下单</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. <?php if ($list): ?>
  107. <?php foreach ($list as $item): ?>
  108. <tr >
  109. <td><?php echo $item['studentName']; ?></td>
  110. <td><?php echo $item['gradeName']; ?></td>
  111. <td><?php echo $item['clazzName']; ?></td>
  112. <td><?php if($item['isPay']){echo '是';}else{echo '否';} ?></td>
  113. </tr>
  114. <?php endforeach; ?>
  115. <?php endif; ?>
  116. </tbody>
  117. </table>
  118. <?php if ($page): ?>
  119. <div class="col-sm-12">
  120. <ul class="pagination">
  121. <?php
  122. $params = array();
  123. if (isset($_GET['orderId']) && $_GET['orderId']) {
  124. $params['orderId'] = $_GET['orderId'];
  125. }
  126. if (isset($_GET['clazzId']) && $_GET['clazzId']) {
  127. $params['clazzId'] = $_GET['clazzId'];
  128. }
  129. if (isset($_GET['isPay']) && $_GET['isPay']) {
  130. $params['isPay'] = $_GET['isPay'];
  131. }
  132. if (isset($_GET['page'])) {
  133. $params['page'] = $_GET['page'];
  134. }else{
  135. $params['page'] = 1;
  136. }
  137. echo formatPage($page, 'imsSale/pushList', $params)
  138. ?>
  139. </ul>
  140. </div>
  141. <?php endif; ?>
  142. </div>
  143. </div>
  144. <script src="/js/productset/jquery.min.js"></script>
  145. <script src="/js/ims/layer/layer.js"></script>
  146. <script src="/js/ims/xsgl.js"></script>
  147. <script>
  148. $(document).ready(function () {
  149. function studentType() {
  150. $(".student-type").each(function (index) {
  151. if ($(this).attr('status') == 1) {
  152. $(this).addClass("green");
  153. } else {
  154. $(this).addClass("red");
  155. }
  156. })
  157. }
  158. function setSubjectType() {
  159. $(".subject-type").each(function (index) {
  160. if ($(this).attr('status') == '1') {
  161. $(this).addClass("green");
  162. } else if ($(this).attr('status') == '2') {
  163. $(this).addClass("red");
  164. } else if ($(this).attr('status') == '3') {
  165. $(this).addClass("grey");
  166. } else {
  167. $(this).addClass("yellow");
  168. }
  169. })
  170. }
  171. studentType();
  172. setSubjectType();
  173. //筛选条件赋值
  174. <?php if(isset($_GET['clazzId']) && $_GET['clazzId']>0):?>
  175. var clazzId = "<?php echo $_GET['clazzId'];?>";
  176. $('#clazzId').val(clazzId);
  177. var txt = $('.select-clazz li[val=' + clazzId + ']').html();
  178. $('.select-clazz .diy_select_txt').html(txt);
  179. <?php endif;?>
  180. <?php if(isset($_GET['isPay']) && $_GET['isPay']):?>
  181. var isPay = "<?php echo $_GET['isPay'];?>";
  182. $('#isPay').val(isPay);
  183. var txt = $('.select-pay li[val=' + isPay + ']').html();
  184. $('.select-pay .diy_select_txt').html(txt);
  185. <?php endif;?>
  186. //导出excel
  187. $(".download-excel").on("click", function () {
  188. var orderId = "<?php echo isset($_GET['orderId'])?$_GET['orderId']:'';?>";
  189. var clazzId = "<?php echo isset($_GET['clazzId'])?$_GET['clazzId']:'';?>";
  190. var isPay = "<?php echo isset($_GET['isPay'])?$_GET['isPay']:'';?>";
  191. $.ajax({
  192. type: 'post',
  193. url: "<?php echo Yii::app()->createUrl('imsSale/pushListExport');?>",
  194. data: {
  195. orderId: orderId,
  196. clazzId:clazzId,
  197. isPay:isPay
  198. },
  199. dataType: 'json',
  200. success: function (result) {
  201. if (result.status == 1) {
  202. window.location.href = result.data;
  203. } else {
  204. layer.msg(result.data);
  205. }
  206. },
  207. error: function () {
  208. return;
  209. }
  210. })
  211. });
  212. });
  213. </script>
  214. </body>
  215. </html>