paymentList.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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/jquery.datetimepicker.css"/>
  12. <link rel="stylesheet" type="text/css" href="/css/ims/ace.min.css"/>
  13. <style>
  14. .green {
  15. color: green;
  16. }
  17. .red {
  18. color: red;
  19. }
  20. .ims-box {
  21. margin: 20px;
  22. }
  23. .screen > div {
  24. float: left;
  25. margin-right: 8px;
  26. }
  27. .screen .date > input {
  28. height: 30px;
  29. border-radius: 4px;
  30. border: 1px solid #ccc;
  31. box-shadow: none;
  32. text-indent: 10px;
  33. }
  34. .screen .purposeOrderNo > input {
  35. height: 30px;
  36. border-radius: 4px;
  37. border: 1px solid #ccc;
  38. box-shadow: none;
  39. text-indent: 10px;
  40. }
  41. .screen button {
  42. padding: 4px 12px;
  43. }
  44. .table-box {
  45. margin-top: 30px;
  46. }
  47. .btn-formal-order {
  48. cursor: pointer;
  49. }
  50. .application-number-box {
  51. margin-top: 50px;
  52. text-align: center;
  53. }
  54. .application-number-box span {
  55. margin-right: 20px;
  56. }
  57. .layui-layer-btn .layui-layer-btn0 {
  58. border-color: #15ae68 !important;
  59. background-color: #15ae68 !important;
  60. color: #fff;
  61. }
  62. .btn-date_show{
  63. display: inline-block;width: 170px;overflow: hidden; text-overflow:ellipsis; white-space: nowrap;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="ims-box">
  69. <form action="<?php echo Yii::app()->createUrl('imsSale/payment'); ?>" method="get">
  70. <div class="screen">
  71. <select name="grade" id="grade" style="width: 100px;">
  72. <option value="0">年级</option>
  73. <option value="1" <?php if(isset($params['grade']) && $params['grade']==1) echo 'selected';?>>高一</option>
  74. <option value="2" <?php if(isset($params['grade']) && $params['grade']==2) echo 'selected';?>>高二</option>
  75. <option value="3" <?php if(isset($params['grade']) && $params['grade']==3) echo 'selected';?>>高三</option>
  76. </select>
  77. <select name="schoolYearId" id="schoolYearId" style="width: 100px;">
  78. <option value="0">学年</option>
  79. <?php if(isset($schoolYear) && $schoolYear):?>
  80. <?php foreach ($schoolYear as $key => $value): ?>
  81. <option value="<?php echo $value['schoolYearId']; ?>" <?php if(isset($params['schoolYearId']) && $params['schoolYearId']==$value['schoolYearId']) echo 'selected';?> ><?php echo $value['schoolYearName']; ?></option>
  82. <?php endforeach; ?>
  83. <?php endif;?>
  84. </select>
  85. <select name="goodsId" id="goodsId" style="width: 100px;">
  86. <option value="0">商品</option>
  87. <?php if ($goodList): ?>
  88. <?php foreach ($goodList as $good): ?>
  89. <option value="<?php echo $good['goodsId'] ?>" <?php if(isset($params['goodsId']) && $params['goodsId']==$good['goodsId']) echo 'selected';?>><?php echo $good['goodsName'] ?></option>
  90. <?php endforeach; ?>
  91. <?php endif; ?>
  92. </select>
  93. <select name="semester" id="semester" style="width: 100px;">
  94. <option value="0">学期</option>
  95. <option value="1" <?php if(isset($params['semester']) && ($params['semester']+1)==1) echo 'selected';?>>上学期</option>
  96. <option value="2" <?php if(isset($params['semester']) && ($params['semester']+1)==2) echo 'selected';?>>下学期</option>
  97. <option value="3" <?php if(isset($params['semester']) && ($params['semester']+1)==3) echo 'selected';?>>跨学期</option>
  98. </select>
  99. <span>收费时间:</span>
  100. <input type="text" readonly name="startTime" class="some_class" value="<?php if(isset($params['startTime'])) echo $params['startTime'];?>" id="some_class_1"/> --
  101. <input type="text" readonly name="endTime" class="some_class" value="<?php if(isset($params['endTime'])) echo $params['endTime'];?>" id="some_class_2"/>
  102. <button type="submit" class="label-primary-s bth-s">查询</button>
  103. <a href="<?php echo $this->createUrl('imsSale/newPayment')?>" class="label-primary-s bth-s">新建</a>
  104. </div>
  105. </form>
  106. <div class="table-box">
  107. <table id="intention-table"
  108. class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable"
  109. style="font-size:12px">
  110. <thead>
  111. <tr>
  112. <th>反馈编号</th>
  113. <th>学年</th>
  114. <th>学期</th>
  115. <th>年级</th>
  116. <th>商品</th>
  117. <th>收费单价(元)</th>
  118. <th>上学期收费人数</th>
  119. <th>下学期收费人数</th>
  120. <th>上学期收费金额(元)</th>
  121. <th>下学期收费金额(元)</th>
  122. <th>收费时间</th>
  123. <th>汇款时间</th>
  124. <th>备注</th>
  125. <th>创建人</th>
  126. <th>操作</th>
  127. </tr>
  128. </thead>
  129. <tbody>
  130. <?php if ($list): ?>
  131. <?php foreach ($list as $item): ?>
  132. <tr>
  133. <td><?php echo $item['bcNo'];?></td>
  134. <td><?php echo $item['schoolYearName'];?></td>
  135. <td><?php echo $item['semesterName'];?></td>
  136. <td><?php echo $item['gradeName'];?></td>
  137. <td><?php echo $item['goodsName'];?></td>
  138. <td><?php echo sprintf("%.2f",$item['price']);?></td>
  139. <td><?php echo $item['feeNumUp'];?></td>
  140. <td><?php echo $item['feeNumDown'];?></td>
  141. <td><?php echo sprintf("%.2f",$item['priceSumUp']);?></td>
  142. <td><?php echo sprintf("%.2f",$item['priceSumDown']);?></td>
  143. <td><?php echo date('Y-m-d',strtotime($item['feeTime']));?></td>
  144. <td><?php echo date('Y-m-d',strtotime($item['remitDate']));?></td>
  145. <td><?php echo $item['remark'];?></td>
  146. <td><?php echo $item['coachName'];?></td>
  147. <td>
  148. <a href="<?php echo $this->createUrl('imsSale/editPayment',array('id'=>$item['bcId']))?>">编辑</a>
  149. </td>
  150. </tr>
  151. <?php endforeach; ?>
  152. <?php endif; ?>
  153. </tbody>
  154. </table>
  155. <?php if ($page): ?>
  156. <div class="col-sm-12">
  157. <ul class="pagination">
  158. <?php
  159. $params = array();
  160. if (isset($_GET['schoolYearId']) && $_GET['schoolYearId']) {
  161. $params['schoolYearId'] = $_GET['schoolYearId'];
  162. }
  163. if (isset($_GET['goodsId']) && $_GET['goodsId']) {
  164. $params['goodsId'] = $_GET['goodsId'];
  165. }
  166. if (isset($_GET['semester']) && $_GET['semester']) {
  167. $params['semester'] = $_GET['semester'];
  168. }
  169. if (isset($_GET['startTime']) && $_GET['startTime']) {
  170. $params['startTime'] = $_GET['startTime'];
  171. }
  172. if (isset($_GET['startTime']) && $_GET['startTime']) {
  173. $params['startTime'] = $_GET['startTime'];
  174. }
  175. if (isset($_GET['grade']) && $_GET['grade']) {
  176. $params['grade'] = $_GET['grade'];
  177. }
  178. if (isset($_GET['page'])) {
  179. $params['page'] = $_GET['page'];
  180. }else{
  181. $params['page'] = 1;
  182. }
  183. echo formatPage($page, 'imsSale/payment', $params);
  184. ?>
  185. </ul>
  186. </div>
  187. <?php endif; ?>
  188. </div>
  189. </div>
  190. <script src="/js/productset/jquery.min.js"></script>
  191. <script src="/js/ims/jquery.datetimepicker.js"></script>
  192. <script src="/js/ims/xsgl.js"></script>
  193. <script src="/js/layer/layer.js"></script>
  194. <script>
  195. $(document).ready(function () {
  196. //筛选条件赋值
  197. <?php if(isset($_GET['beginTime'])):?>
  198. $("#some_class_1").attr("value","<?php echo $_GET['beginTime']?>");
  199. $("#some_class_2").attr("value", "<?php echo $_GET['endTime']?>");
  200. <?php endif;?>
  201. <?php if(isset($_GET['goodsId']) && $_GET['goodsId']):?>
  202. var goodsId = "<?php echo $_GET['goodsId'];?>";
  203. $('#goodsId').val(goodsId);
  204. var txt = $('.goods li[val='+goodsId+']').html();
  205. $('.goods .diy_select_txt').html(txt);
  206. <?php endif;?>
  207. <?php if(isset($_GET['schoolYearId']) && $_GET['schoolYearId']):?>
  208. var schoolYearId = "<?php echo $_GET['schoolYearId'];?>";
  209. $('#schoolYearId').val(schoolYearId);
  210. var txt = $('.year li[val='+schoolYearId+']').html();
  211. $('.year .diy_select_txt').html(txt);
  212. <?php endif;?>
  213. $('.some_class').datetimepicker({
  214. format: "Y-m-d", //格式化日期
  215. timepicker: false //关闭时间选项
  216. });
  217. $(".btn-date_show").on("click", function () {
  218. layer.alert($(this).text(), {
  219. title: '使用月份',
  220. area: ['420px', '240px']
  221. });
  222. });
  223. $(".btn-formal-order").on("click", function () {
  224. var quantity= parseInt($(this).attr('a1'));
  225. var adjustNum = parseInt($(this).attr('a2'));
  226. var applyOfficialNum = parseInt($(this).attr('a3'));
  227. var officialNum2 = parseInt($(this).attr('a4'));
  228. var orderId = $(this).attr('orderId');
  229. var flag = true;
  230. layer.open({
  231. type: 1,
  232. title: '转财务订单',
  233. btn: ['确定', '取消'],
  234. area: ['420px', '240px'], //宽高
  235. btnAlign: 'c',
  236. content: '<div class="application-number-box"><p style="color: red;display: none;" class="alert-msg"></p><span>申请人数</span> <input type="number" id="applicationNumber" ></div>',
  237. yes: function (index, layero) {
  238. //提交
  239. var officialNum =$('#applicationNumber').val();
  240. if (officialNum>0) {
  241. if((officialNum>(quantity+adjustNum-applyOfficialNum-officialNum2))){
  242. $('.alert-msg').html("填写数额超出额度").fadeIn();
  243. }else{
  244. if (flag){
  245. flag = false;
  246. $.ajax({
  247. type: 'post',
  248. url: "<?php echo Yii::app()->createUrl('imsSale/toOfficial') ;?>",
  249. data: {'orderId':orderId, 'officialNum':officialNum},
  250. dataType: 'json',
  251. success: function (data) {
  252. if (data.status){
  253. location.reload();
  254. } else{
  255. flag = true;
  256. layer.msg(data.msg);
  257. }
  258. },
  259. error: function () {
  260. flag = true;
  261. layer.msg("异常错误");
  262. }
  263. });
  264. }
  265. }
  266. }else{
  267. layer.msg("请填写数量");
  268. }
  269. },
  270. btn2: function (index, layero) {
  271. //return false 开启该代码可禁止点击该按钮关闭
  272. }
  273. });
  274. return false;
  275. });
  276. });
  277. $('body').on('focus', '#applicationNumber', function () {
  278. $('.alert-msg').css("display",'none');
  279. });
  280. </script>
  281. </body>
  282. </html>