refill.order.index.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <style>
  2. th label { display: inline-block;width: 60px; }
  3. </style>
  4. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  5. <div class="page">
  6. <div class="fixed-bar">
  7. <div class="item-title">
  8. <h3>订单列表</h3>
  9. <ul class="tab-base">
  10. <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
  11. </ul>
  12. </div>
  13. </div>
  14. <div class="fixed-empty"></div>
  15. <form method="get" action="index.php" name="formSearch" id="formSearch">
  16. <input type="hidden" name="act" value="merchant"/>
  17. <input type="hidden" name="op" value="refill_order"/>
  18. <table class="tb-type1 noborder search">
  19. <tbody>
  20. <tr>
  21. <th><label>订单号</label></th>
  22. <td><input class="txt2" type="text" name="order_sn" value="<?php echo $_GET['order_sn']; ?>"/></td>
  23. <th><label>机构号</label></th>
  24. <td><input class="txt2" type="text" name="mchid" value="<?php echo $_GET['mchid']; ?>"/></td>
  25. <th><label>充值卡卡号</label></th>
  26. <td><input class="txt2" type="text" name="card_no" value="<?php echo $_GET['card_no']; ?>"/></td>
  27. <th><label>渠道单号</label></th>
  28. <td><input class="txt2" type="text" name="ch_trade_no" value="<?php echo $_GET['ch_trade_no']; ?>"/></td>
  29. <th><label>商家单号</label></th>
  30. <td><input class="txt2" type="text" name="mch_order" value="<?php echo $_GET['mch_order']; ?>"/></td>
  31. </tr>
  32. <tr>
  33. <th><label for="query_start_time">下单时间</label></th>
  34. <td><input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
  35. id="query_start_time" name="query_start_time">
  36. <label for="query_start_time">~</label>
  37. <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
  38. id="query_end_time" name="query_end_time"/></td>
  39. <th><label>订单状态</label></th>
  40. <td>
  41. <select name="order_state" class="querySelect">
  42. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  43. <option value="10"
  44. <?php if ($_GET['order_state'] == '10'){ ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
  45. <option value="20"
  46. <?php if ($_GET['order_state'] == '20'){ ?>selected<?php } ?>><?php echo $lang['order_state_pay']; ?></option>
  47. <option value="30"
  48. <?php if ($_GET['order_state'] == '30'){ ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
  49. <option value="40"
  50. <?php if ($_GET['order_state'] == '40'){ ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
  51. <option value="0"
  52. <?php if ($_GET['order_state'] == '0'){ ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
  53. </select>
  54. </td>
  55. <th><label>充值卡类型</label></th>
  56. <td>
  57. <select name="card_type" class="querySelect">
  58. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  59. <option value="1"
  60. <?php if ($_GET['card_type'] == '1'){ ?>selected<?php } ?>>中石油</option>
  61. <option value="2"
  62. <?php if ($_GET['card_type'] == '2'){ ?>selected<?php } ?>>中石化</option>
  63. <option value="4"
  64. <?php if ($_GET['card_type'] == '4'){ ?>selected<?php } ?>>中国移动</option>
  65. <option value="5"
  66. <?php if ($_GET['card_type'] == '5'){ ?>selected<?php } ?>>中国联通</option>
  67. <option value="6"
  68. <?php if ($_GET['card_type'] == '6'){ ?>selected<?php } ?>>中国电信</option>
  69. <option value="oil"
  70. <?php if ($_GET['card_type'] == 'oil'){ ?>selected<?php } ?>>油费</option>
  71. <option value="phone"
  72. <?php if ($_GET['card_type'] == 'phone'){ ?>selected<?php } ?>>手机费</option>
  73. </select>
  74. </td>
  75. <th><label>充值额度</label></th>
  76. <td>
  77. <select name="refill_amount" class="querySelect">
  78. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  79. <option value="10"
  80. <?php if ($_GET['refill_amount'] == '10'){ ?>selected<?php } ?>>10</option>
  81. <option value="20"
  82. <?php if ($_GET['refill_amount'] == '20'){ ?>selected<?php } ?>>20</option>
  83. <option value="30"
  84. <?php if ($_GET['refill_amount'] == '30'){ ?>selected<?php } ?>>30</option>
  85. <option value="50"
  86. <?php if ($_GET['refill_amount'] == '50'){ ?>selected<?php } ?>>50</option>
  87. <option value="100"
  88. <?php if ($_GET['refill_amount'] == '100'){ ?>selected<?php } ?>>100</option>
  89. <option value="200"
  90. <?php if ($_GET['refill_amount'] == '200'){ ?>selected<?php } ?>>200</option>
  91. <option value="300"
  92. <?php if ($_GET['refill_amount'] == '300'){ ?>selected<?php } ?>>300</option>
  93. <option value="500"
  94. <?php if ($_GET['refill_amount'] == '500'){ ?>selected<?php } ?>>500</option>
  95. <option value="1000"
  96. <?php if ($_GET['refill_amount'] == '1000'){ ?>selected<?php } ?>>1000</option>
  97. <option value="2000"
  98. <?php if ($_GET['refill_amount'] == '2000'){ ?>selected<?php } ?>>2000</option>
  99. </select>
  100. </td>
  101. <th><label>充值耗时</label></th>
  102. <td>
  103. <select name="time" class="querySelect">
  104. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  105. <option value="1"
  106. <?php if ($_GET['time'] == '1'){ ?>selected<?php } ?>>耗时半小时</option>
  107. <option value="2"
  108. <?php if ($_GET['time'] == '2'){ ?>selected<?php } ?>>耗时一小时</option>
  109. </select>
  110. </td>
  111. <td>
  112. <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
  113. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  114. </a>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td></td>
  119. <td>
  120. <a href="#" class="btns" onclick="hCopyChannel(event)">
  121. <span><i class="icon-edit"></i>拷贝渠道单号</span>
  122. </a>
  123. <a href="#" class="btns" onclick="hCopyCardNo(event)">
  124. <span><i class="icon-edit"></i>拷贝充值卡号</span>
  125. </a>
  126. </td>
  127. </tr>
  128. </tbody>
  129. </table>
  130. </form>
  131. <table class="table tb-type2" id="prompt">
  132. <tbody>
  133. <tr class="space odd">
  134. <th colspan="12"><div class="title"><h5>
  135. 金额统计</h5><span class="arrow"></span></div></th>
  136. </tr>
  137. <tr>
  138. <td>
  139. <ul>
  140. <li>总计充值金额:<?php echo $output['stat']['refill_amounts'] ?? 0?></li>
  141. <!-- <li>总计渠道扣款金额:--><?php //echo $output['stat']['channel_amounts'] ?? 0?><!--</li>-->
  142. <li>总计机构扣款金额:<?php echo $output['stat']['mch_amounts'] ?? 0?></li>
  143. <li>总计订单数量:<?php echo $output['stat']['order_count'] ?? 0?></li>
  144. <li>超过半小时订单数量:<?php echo $output['count']['half_count'] ?? 0?></li>
  145. <li>超过一小时订单数量:<?php echo $output['count']['hour_count'] ?? 0?></li>
  146. </ul>
  147. </td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <table class="table tb-type2 nobdb">
  152. <thead>
  153. <tr class="thead">
  154. <th class="align-center">编号</th>
  155. <th class="align-center">订单号</th>
  156. <th class="align-center">机构编号</th>
  157. <th class="align-center">机构名称</th>
  158. <th class="align-center">充值卡号</th>
  159. <th class="align-center">充值卡类型</th>
  160. <th class="align-center">充值额度</th>
  161. <th class="align-right">下单日期</th>
  162. <th class="align-right">耗时</th>
  163. <th class="align-center">订单状态</th>
  164. <th class="align-center">运营商流水号</th>
  165. <th class="align-center">失败原因</th>
  166. <th class="align-center">商家单号</th>
  167. <th class="align-center">扣款金额</th>
  168. <th class="align-center">渠道单号</th>
  169. <th class="align-center">渠道名称</th>
  170. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  171. </tr>
  172. </thead>
  173. <tbody id="tbody">
  174. <?php if (count($output['order_list']) > 0) { ?>
  175. <?php
  176. foreach ($output['order_list'] as $key => $order) { ?>
  177. <tr class="hover">
  178. <td class="align-center"><?php echo $key+1;?></td>
  179. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  180. <td class="align-center"><?php echo $order['mchid']; ?></td>
  181. <td class="align-center"><?php echo $order['mch_name']; ?></td>
  182. <td class="align-left"><?php echo $order['card_no']; ?></td>
  183. <td class="align-center"><?php echo $order['card_type_text']; ?></td>
  184. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  185. <td class="align-right"><?php echo date('Y-m-d H:i:s', $order['order_time']); ?></td>
  186. <td class="align-right">
  187. <?php if(empty($order['notify_time'])) {
  188. if($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
  189. ?>
  190. <span style="color: #fd9d0e"><?php echo $order['diff_time_text']?></span>
  191. <?php }elseif($order['diff_time'] > 3600) {?>
  192. <span style="color: #f30707"><?php echo $order['diff_time_text']?></span>
  193. <?php }else{?>
  194. <?php echo $order['diff_time_text']?>
  195. <?php }?>
  196. <?php }else{?>
  197. <?php echo $order['diff_time_text']?>
  198. <?php }?>
  199. </td>
  200. <td class="align-center"><?php echo orderState($order); ?></td>
  201. <td class="align-left"><?php echo $order['official_sn']; ?></td>
  202. <td class="align-left"><?php echo $order['err_msg']; ?></td>
  203. <td class="align-left"><?php echo $order['mch_order']; ?></td>
  204. <td class="align-center"><?php echo $order['mch_amount']; ?></td>
  205. <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
  206. <td class="align-center"><?php echo $order['channel_name']; ?></td>
  207. <td class="w144 align-center">
  208. <a href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
  209. 回调</a>
  210. </td>
  211. </tr>
  212. <?php } ?>
  213. <?php } else { ?>
  214. <tr class="no_data">
  215. <td colspan="15"><?php echo $lang['nc_no_record']; ?></td>
  216. </tr>
  217. <?php } ?>
  218. </tbody>
  219. <tfoot>
  220. <tr class="tfoot">
  221. <td colspan="15" id="dataFuncs">
  222. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  223. </td>
  224. </tr>
  225. </tfoot>
  226. </table>
  227. </div>
  228. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  229. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  230. charset="utf-8"></script>
  231. <link rel="stylesheet" type="text/css"
  232. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  233. <script type="text/javascript">
  234. $(function () {
  235. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  236. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  237. $('#ncsubmit').click(function () {
  238. $('input[name="op"]').val('refill_order');
  239. $('#formSearch').submit();
  240. });
  241. });
  242. function hCopyChannel(e) {
  243. let str = ''
  244. $('#tbody tr').each(function () {
  245. let res = $(this).find('td').eq(14).text()
  246. str += res + '\n'
  247. })
  248. let oInput = document.createElement("textarea");
  249. oInput.style.border = "0 none";
  250. oInput.style.color = "transparent";
  251. oInput.value = str;
  252. document.body.appendChild(oInput);
  253. oInput.select(); // 选择对象
  254. document.execCommand("Copy"); // 执行浏览器复制命令
  255. oInput.parentNode.removeChild(oInput)
  256. }
  257. function hCopyCardNo(e) {
  258. let str = ''
  259. $('#tbody tr').each(function () {
  260. let res = $(this).find('td').eq(4).text()
  261. str += res + '\n'
  262. })
  263. let oInput = document.createElement("textarea");
  264. oInput.style.border = "0 none";
  265. oInput.style.color = "transparent";
  266. oInput.value = str;
  267. document.body.appendChild(oInput);
  268. oInput.select(); // 选择对象
  269. document.execCommand("Copy"); // 执行浏览器复制命令
  270. oInput.parentNode.removeChild(oInput)
  271. }
  272. </script>