refill.order.notify.err.index.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <style>
  2. th label {
  3. display: inline-block;
  4. width: 60px;
  5. }
  6. .lineLi {
  7. display: inline-block;
  8. min-width: 150px;
  9. font-size: 14px;
  10. }
  11. .page .fixed-bar .item-title h3 {
  12. margin-top:18px !important;
  13. margin-bottom:10px !important;
  14. font-weight:700 !important;
  15. }
  16. .tab-base li span {
  17. font-size:12px !important;
  18. }
  19. .layui-form-select .layui-input {
  20. height:23px;
  21. padding-left: 11px;
  22. padding-right: 0!important;
  23. }
  24. input::placeholder{
  25. color:#333;
  26. }
  27. .layui-form-selected dl {
  28. display: flex!important;
  29. flex-wrap: wrap!important;
  30. }
  31. .layui-form-select dl {
  32. top: 29px !important;
  33. left: 4px!important;
  34. min-width: 802%!important;
  35. max-height: 280px!important;
  36. padding: 14px 0!important;
  37. }
  38. .layui-form-select dl dd.layui-this{
  39. display: none;
  40. }
  41. .layui-form-select dl dd {
  42. cursor: pointer;
  43. width: 130px;
  44. }
  45. .lefto {
  46. margin-left: 6px;
  47. }
  48. </style>
  49. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  50. <div class="page">
  51. <div class="fixed-bar">
  52. <div class="item-title">
  53. <h3>问题订单监控</h3>
  54. <ul class="tab-base">
  55. <li><a href="index.php?act=ordersendlist&op=index"><span>超时订单监控</span></a></li>
  56. <li><a href="index.php?act=ordersendlist&op=neterr_order"><span>网络错误订单监控</span></a></li>
  57. <li><a href="JavaScript:void(0);" class="current"><span>未回调订单监控</span></a></li>
  58. </ul>
  59. </div>
  60. </div>
  61. <div class="fixed-empty"></div>
  62. <form method="get" action="index.php" name="formSearch" id="formSearch">
  63. <input type="hidden" name="act" value="OrderSendList"/>
  64. <input type="hidden" name="op" value="notify_err_order"/>
  65. <table class="tb-type1 noborder search">
  66. <tr>
  67. <th><label class="lefto">近期时间(小时内)</label></th>
  68. <td class="layui-form">
  69. <select name="time" class="querySelect" id="time_id" lay-verify="" lay-search lay-filter="time_id">
  70. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  71. <?php for ($i = 1; $i<=12; $i++) { ?>
  72. <option value="<?php echo $i; ?>" <?php if ($_GET['time'] == $i){ ?>selected<?php } ?>><?php echo $i;?>小时
  73. </option>
  74. <?php } ?>
  75. </select>
  76. </td>
  77. <th>回调时间</th>
  78. <td>
  79. <select name="notify_time" class="querySelect" id="arrangeClass">
  80. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  81. <option value="1"
  82. <?php if ($_GET['notify_time'] == '1'){ ?>selected<?php } ?>>1秒</option>
  83. <option value="15"
  84. <?php if ($_GET['notify_time'] == '15'){ ?>selected<?php } ?>>15秒</option>
  85. <?php for ($i = 1; $i <= 5; $i++){?>
  86. <option value="<?php echo $i*60;?>"
  87. <?php if ($_GET['notify_time'] == $i*60){ ?>selected<?php } ?>><?php echo $i;?>分钟</option>
  88. <?php }?>
  89. <option value="600"
  90. <?php if ($_GET['notify_time'] == '600'){ ?>selected<?php } ?>>10分钟</option>
  91. <option value="900"
  92. <?php if ($_GET['notify_time'] == '900'){ ?>selected<?php } ?>>15分钟</option>
  93. </select>
  94. </td>
  95. <td>
  96. <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
  97. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  98. </a>
  99. </td>
  100. </tr>
  101. </table>
  102. <table class="tb-type1 noborder search">
  103. <tr>
  104. <td>
  105. <a href="#" class="btns" onclick="hCopyChannel(event)">
  106. <span><i class="icon-edit"></i>拷贝订单号</span>
  107. </a>
  108. <a href="#" class="btns" onclick="hCopyCardNo(event)">
  109. <span><i class="icon-edit"></i>拷贝充值卡号</span>
  110. </a>
  111. <a href="#" id="btn_time" class="btns">
  112. <span><i class="icon-edit"></i>批量回调</span>
  113. </a>
  114. </td>
  115. </tr>
  116. </table>
  117. </form>
  118. <table class="table tb-type2 nobdb">
  119. <thead>
  120. <tr class="thead">
  121. <th class="align-center">编号</th>
  122. <th class="align-center">订单号</th>
  123. <th class="align-center">机构编号</th>
  124. <th class="align-center">机构名称</th>
  125. <th class="align-center">充值卡号</th>
  126. <th class="align-center">充值卡类型</th>
  127. <th class="align-center">充值额度</th>
  128. <th class="align-right">下单日期</th>
  129. <th class="align-right">耗时</th>
  130. <th class="align-center">订单状态</th>
  131. <th class="align-center">通道质量</th>
  132. <th class="align-center">失败原因</th>
  133. <th class="align-center">商家单号</th>
  134. <th class="align-center">扣款金额</th>
  135. <th class="align-center">渠道单号</th>
  136. <th class="align-center">渠道名称</th>
  137. <th class="align-center">回调状态</th>
  138. <th class="align-center">回调次数</th>
  139. </tr>
  140. </thead>
  141. <tbody id="tbody">
  142. <?php if (count($output['order_list']) > 0) { ?>
  143. <?php
  144. foreach ($output['order_list'] as $key => $order) { ?>
  145. <tr class="hover trFlex">
  146. <td class="align-center"><?php echo $key + 1; ?></td>
  147. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  148. <td class="align-center"><?php echo $order['mchid']; ?></td>
  149. <td class="align-center"><?php echo $order['mch_name']; ?></td>
  150. <td class="align-left"><?php echo $order['card_no']; ?></td>
  151. <td class="align-center"><?php echo $order['card_type_text']; ?></td>
  152. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  153. <td class="align-right"><?php echo date('Y-m-d H:i:s', $order['order_time']); ?></td>
  154. <td class="align-right">
  155. <?php if (empty($order['notify_time'])) {
  156. if ($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
  157. ?>
  158. <span style="color: #fd9d0e"><?php echo $order['diff_time_text'] ?></span>
  159. <?php } elseif ($order['diff_time'] > 3600) { ?>
  160. <span style="color: #f30707"><?php echo $order['diff_time_text'] ?></span>
  161. <?php } else {
  162. ?>
  163. <?php echo $order['diff_time_text'] ?>
  164. <?php } ?>
  165. <?php } else { ?>
  166. <?php echo $order['diff_time_text'] ?>
  167. <?php } ?>
  168. </td>
  169. <td class="align-center"><?php echo orderState($order); ?></td>
  170. <td class="align-left"><?php echo $order['quality_text']; ?></td>
  171. <td class="align-left"><?php echo $order['err_msg']; ?></td>
  172. <td class="align-left"><?php echo $order['mch_order']; ?></td>
  173. <td class="align-center"><?php echo $order['mch_amount']; ?></td>
  174. <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
  175. <td class="align-center"><?php echo $order['channel_name']; ?></td>
  176. <td class="align-center">
  177. <?php if($order['mch_notify_state'] == 0){?>
  178. 回调未确认
  179. <?php }elseif($order['mch_notify_state'] == 1){?>
  180. 回调已确认
  181. <?php }elseif($order['mch_notify_state'] == 2){?>
  182. 已停止回调
  183. <?php }?>
  184. </td>
  185. <td class="align-center"><?php echo $order['mch_notify_times']; ?></td>
  186. </tr>
  187. <?php } ?>
  188. <?php } else { ?>
  189. <tr class="no_data">
  190. <td colspan="15"><?php echo $lang['nc_no_record']; ?></td>
  191. </tr>
  192. <?php } ?>
  193. </tbody>
  194. <tfoot>
  195. <tr class="tfoot">
  196. <td colspan="15" id="dataFuncs">
  197. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  198. </td>
  199. </tr>
  200. </tfoot>
  201. </table>
  202. <!-- 预警提示 -->
  203. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  204. </div>
  205. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  206. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  207. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  208. charset="utf-8"></script>
  209. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  210. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
  211. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
  212. <link rel="stylesheet" type="text/css"
  213. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  214. <script type="text/javascript">
  215. $(function () {
  216. $('#ncsubmit').click(function () {
  217. $('#formSearch').submit();
  218. });
  219. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  220. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  221. // 日期选择器
  222. laydate.render({
  223. elem: '#startTime',
  224. type: 'datetime'
  225. });
  226. laydate.render({
  227. elem: '#endTime',
  228. type: 'datetime'
  229. });
  230. //批量回调
  231. $('#btn_time').click(() => {
  232. let time1 = $("#time_id option:selected").val()
  233. let time2 = $("#arrangeClass option:selected").val()
  234. console.log(time1, time2);
  235. window.location.href =`index.php?act=OrderSendList&op=notifyerr_all_notify&time= ${time1 ? time1 : ''} &notify_time= ${time2 ? time2 : ''}`
  236. })
  237. layui.use(['form'], function(){
  238. var form = layui.form;
  239. form.on('select(time_id)', function (data) {
  240. const time3 = data.value;
  241. console.log(time3);
  242. form.render('select')
  243. $("select[name='notify_time']").blur(function(){
  244. const time4 = $(this).val()
  245. console.log(time4)
  246. $('#btn_time').click(() =>{
  247. console.log(time3, time4);
  248. window.location.href = `index.php?act=OrderSendList&op=notifyerr_all_notify&time= ${time3} &notify_time= ${time4}`
  249. })
  250. });
  251. })
  252. })
  253. let isWring = '<?php echo $output['count'][1];?>';
  254. // console.log('isWring', Number(isWring));
  255. let setTimer
  256. let num
  257. if (Number(isWring) > 0) {
  258. window.clearTimeout(setTimer)
  259. setTimer = setTimeout(function () {
  260. $("#auto")[0].play();
  261. // $("#auto").attr("src", '<?php echo RESOURCE_SITE_URL; ?>/warning.mp3');
  262. }, 1000);
  263. window.clearTimeout(num)
  264. num = setTimeout(function () {
  265. window.location.reload();
  266. }, 60000);
  267. }
  268. // 表格hover时背景
  269. $('.trFlex').each(function () {
  270. $(this).hover(function () {
  271. $(this)[0].style.backgroundColor = '#cbe9f3'
  272. }, function () {
  273. $(this)[0].style.backgroundColor = '#fff'
  274. })
  275. })
  276. // 供方名称颜色
  277. $('.textColor').each(function () {
  278. let color = $(this).attr('data-color')
  279. if (color == '1') {
  280. $(this).css('color', 'green')
  281. } else {
  282. $(this).css('color', 'red')
  283. }
  284. })
  285. });
  286. function hCopyChannel(e) {
  287. let str = ''
  288. $('#tbody tr').each(function () {
  289. let res = $(this).find('td').eq(1).text()
  290. str += res + '\n'
  291. })
  292. let oInput = document.createElement("textarea");
  293. oInput.style.border = "0 none";
  294. oInput.style.color = "transparent";
  295. oInput.value = str;
  296. document.body.appendChild(oInput);
  297. oInput.select(); // 选择对象
  298. document.execCommand("Copy"); // 执行浏览器复制命令
  299. oInput.parentNode.removeChild(oInput)
  300. }
  301. function hCopyCardNo(e) {
  302. let str = ''
  303. $('#tbody tr').each(function () {
  304. let res = $(this).find('td').eq(4).text()
  305. str += res + '\n'
  306. })
  307. let oInput = document.createElement("textarea");
  308. oInput.style.border = "0 none";
  309. oInput.style.color = "transparent";
  310. oInput.value = str;
  311. document.body.appendChild(oInput);
  312. oInput.select(); // 选择对象
  313. document.execCommand("Copy"); // 执行浏览器复制命令
  314. oInput.parentNode.removeChild(oInput)
  315. }
  316. </script>