refill.order.exception.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <style>
  2. th label {
  3. display: inline-block;
  4. width: 60px;
  5. margin-left: 10px;
  6. }
  7. .lineLi {
  8. display: inline-block;
  9. min-width: 150px;
  10. font-size: 14px;
  11. }
  12. .page .fixed-bar .item-title h3 {
  13. margin-top: 18px !important;
  14. margin-bottom: 10px !important;
  15. font-weight: 700 !important;
  16. }
  17. .tab-base li span {
  18. font-size: 12px !important;
  19. }
  20. .layui-form-select .layui-input {
  21. height: 23px;
  22. padding-left: 11px;
  23. padding-right: 0 !important;
  24. }
  25. input::placeholder {
  26. color: #333;
  27. }
  28. .layui-form-selected dl {
  29. display: flex !important;
  30. flex-wrap: wrap !important;
  31. }
  32. .layui-form-select dl {
  33. top: 29px !important;
  34. left: 4px !important;
  35. min-width: 802% !important;
  36. max-height: 280px !important;
  37. padding: 14px 0 !important;
  38. }
  39. .layui-form-select dl dd.layui-this {
  40. display: none;
  41. }
  42. .layui-form-select dl dd {
  43. cursor: pointer;
  44. width: 130px;
  45. }
  46. .lefto {
  47. margin-left: 6px;
  48. }
  49. .db-right {
  50. padding-right: 134px !important;
  51. border-bottom: 1px solid #ccc;
  52. }
  53. .db-center {
  54. padding: 9px 0;
  55. border-bottom: 1px solid #ccc;
  56. }
  57. .db-top {
  58. padding: 0 30px;
  59. }
  60. #selectAll {
  61. cursor: pointer;
  62. }
  63. .query_ors {
  64. width: 140px;
  65. }
  66. </style>
  67. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  68. <div class="page">
  69. <div class="fixed-bar">
  70. <div class="item-title">
  71. <h3>问题订单监控</h3>
  72. <ul class="tab-base">
  73. <li><a href="index.php?act=ordersendlist&op=index"><span>商户超时订单监控</span></a></li>
  74. <li><a href="index.php?act=ordersendlist&op=monitor_notify"><span>渠道回调超时监控</span></a></li>
  75. <li><a href="index.php?act=ordersendlist&op=neterr_order"><span>网络错误订单监控</span></a></li>
  76. <li><a href="index.php?act=ordersendlist&op=notify_err_order"><span>未回调订单监控</span></a></li>
  77. <li><a href="index.php?act=ordersendlist&op=refill_detail_monitor"><span>接单记录监控</span></a></li>
  78. <li><a href="index.php?act=ordersendlist&op=query_err"><span>机构查单错误列表</span></a></li>
  79. <li>
  80. <a href="JavaScript:void(0);" class="current"><span>异常订单监控</span>
  81. <?php if($output['except_stat'] > 0){?>
  82. <span class="badge"><?php echo $output['except_stat'];?></span>
  83. <?php }?>
  84. </a>
  85. </li>
  86. </ul>
  87. </div>
  88. </div>
  89. <div class="fixed-empty"></div>
  90. <form method="get" action="index.php" name="formSearch" id="formSearch">
  91. <input type="hidden" name="act" value="ordersendlist" />
  92. <input type="hidden" name="op" value="order_exception" />
  93. <table class="tb-type1 noborder search">
  94. <tr>
  95. <th><label class="query_ors">订单号(多行查询)</label></th>
  96. <td><textarea name="order_sns" id="order_sns" cols="30" rows="10"><?php echo $_GET['order_sns']; ?></textarea></td>
  97. <th><label>异常状态</label></th>
  98. <td>
  99. <select name="except_state" class="querySelect">
  100. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  101. <option value="0" <?php if ($_GET['except_state'] == '0') { ?>selected<?php } ?>>未处理
  102. </option>
  103. <option value="1" <?php if ($_GET['except_state'] == '1') { ?>selected<?php } ?>>已处理
  104. </option>
  105. </select>
  106. </td>
  107. <th><label>异常类型</label></th>
  108. <td>
  109. <select name="except_type" class="querySelect">
  110. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  111. <option value="<?php echo refill_exception_type::EUnKnown?>" <?php if ($_GET['except_type'] === refill_exception_type::EUnKnown) { ?>selected<?php } ?>>不确定的
  112. </option>
  113. <option value="<?php echo refill_exception_type::EOfficialSN?>" <?php if ($_GET['except_type'] === refill_exception_type::EOfficialSN) { ?>selected<?php } ?>>错误的流水号
  114. </option>
  115. <option value="<?php echo refill_exception_type::ERefundOrder?>" <?php if ($_GET['except_type'] === refill_exception_type::ERefundOrder) { ?>selected<?php } ?>>统付返销
  116. </option>
  117. <option value="<?php echo refill_exception_type::EqualOfficialSN?>" <?php if ($_GET['except_type'] === refill_exception_type::EqualOfficialSN) { ?>selected<?php } ?>>相同流水号
  118. </option>
  119. </select>
  120. </td>
  121. <td>
  122. <a href="javascript:void(0);" id="ncsubmit" class="btn-search" title="<?php echo $lang['nc_query']; ?>">&nbsp;
  123. </a>
  124. </td>
  125. </tr>
  126. </table>
  127. <table class="tb-type1 noborder search">
  128. <tr>
  129. <td>
  130. <a href="#" class="btns" onclick="hCopyOrder(event)">
  131. <span><i class="icon-edit"></i>拷贝订单号</span>
  132. </a>
  133. <a href="#" class="btns" id="hHandled">
  134. <span><i class="icon-edit"></i>批量标记为已处理</span>
  135. </a>
  136. </td>
  137. </tr>
  138. </table>
  139. </form>
  140. <table class="table tb-type2 nobdb">
  141. <thead>
  142. <tr class="thead">
  143. <th class="align-center" id="selectAll">
  144. <input type="checkbox" name="chbox" value="">
  145. </th>
  146. <th class="align-left">编号</th>
  147. <th class="align-left">机构编号</th>
  148. <th class="align-left">机构名称</th>
  149. <th class="align-left">通道名称</th>
  150. <th class="align-left">订单号</th>
  151. <th class="align-left">充值卡号</th>
  152. <th class="align-left">异常事件</th>
  153. <th class="align-left">异常信息</th>
  154. <th class="align-left">订单日期</th>
  155. <th class="align-left">生成日期</th>
  156. <th class="align-left">更新日期</th>
  157. <th class="align-center">异常状态</th>
  158. <th class="align-left">处理人</th>
  159. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  160. </tr>
  161. </thead>
  162. <tbody id="tbody">
  163. <?php if (count($output['list']) > 0) { ?>
  164. <?php
  165. foreach ($output['list'] as $key => $order) { ?>
  166. <tr class="hover trFlex">
  167. <td class="align-center">
  168. <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['except_id']; ?>">
  169. </td>
  170. <td class="align-left"><?php echo $key + 1; ?></td>
  171. <td class="align-left"><?php echo $order['mchid']; ?></td>
  172. <td class="align-left"><?php echo $output['merchant_list'][$order['mchid']]['company_name']; ?></td>
  173. <td class="align-left"><?php echo $order['store_name']; ?></td>
  174. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  175. <td class="align-left"><?php echo $order['card_no']; ?></td>
  176. <td class="align-left"><?php echo $order['title']; ?></td>
  177. <td class="align-left"><?php echo $order['except_desc']; ?></td>
  178. <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['order_time']) ?? '/'; ?></td>
  179. <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['add_time']) ?? '/'; ?></td>
  180. <td class="align-left"><?php echo !empty($order['oper_time']) ? date('Y-m-d H:i:s', $order['oper_time']) : '/'; ?></td>
  181. <td class="align-center">
  182. <?php if ($order['except_state'] == '0') { ?>
  183. <span style="color: #E53737">未处理</span>
  184. <?php } ?><?php if ($order['except_state'] == '1') { ?>
  185. <span style="color: #48975A">已处理</span>
  186. <?php } ?>
  187. </td>
  188. <td class="align-left"><?php echo $order['admin_name']; ?></td>
  189. <td class="align-center">
  190. <?php if ($order['except_state'] == 0) { ?>
  191. <a href="index.php?act=ordersendlist&op=order_exception_handled&except_ids=<?php echo $order['except_id']; ?>">
  192. 设置为已处理</a>
  193. <?php } ?>
  194. </td>
  195. </tr>
  196. <?php } ?>
  197. <?php } else { ?>
  198. <tr class="no_data">
  199. <td colspan="13"><?php echo $lang['nc_no_record']; ?></td>
  200. </tr>
  201. <?php } ?>
  202. </tbody>
  203. <tfoot>
  204. <tr class="tfoot">
  205. <td colspan="13" id="dataFuncs">
  206. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  207. </td>
  208. </tr>
  209. </tfoot>
  210. </table>
  211. <!-- 预警提示 -->
  212. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  213. </div>
  214. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  215. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  216. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
  217. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/layer.js"></script>
  218. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/layui.js"></script>
  219. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css" />
  220. <link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css" />
  221. <script type="text/javascript">
  222. $(function() {
  223. $('#ncsubmit').click(function() {
  224. $('#formSearch').submit();
  225. });
  226. $('#query_start_time').datepicker({
  227. dateFormat: 'yy-mm-dd'
  228. });
  229. $('#query_end_time').datepicker({
  230. dateFormat: 'yy-mm-dd'
  231. });
  232. // 日期选择器
  233. laydate.render({
  234. elem: '#startTime',
  235. type: 'datetime'
  236. });
  237. laydate.render({
  238. elem: '#endTime',
  239. type: 'datetime'
  240. });
  241. //全选
  242. $('#selectAll').click(function() {
  243. if ($("input[name='chbox']").is(':checked')) {
  244. $("input[name='checkbox']").each(function() {
  245. this.checked = true;
  246. })
  247. } else {
  248. $("input[name='checkbox']").each(function() {
  249. this.checked = false;
  250. })
  251. }
  252. })
  253. $("#order_sns").blur(function() {
  254. let test_mch = $("#order_sns").val();
  255. let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
  256. $(this).val(result)
  257. })
  258. let get_sel_id = function() {
  259. let arr = [];
  260. $("input:checkbox:checked").each(function() {
  261. let sel_id = $(this).val();
  262. if (sel_id !== '') {
  263. arr.push(sel_id);
  264. }
  265. })
  266. if (arr.length <= 0) {
  267. return
  268. }
  269. return arr.join(",")
  270. }
  271. //批量失败
  272. $('#hHandled').click(function() {
  273. layer.confirm('您确定要批量处理', {
  274. btn: ['确定', '取消'],
  275. title: '批量失败'
  276. }, function() {
  277. const batch = get_sel_id();
  278. window.location.href = `index.php?act=ordersendlist&op=order_exception_handled&except_ids= ${batch ? batch : ''}`
  279. }, function() {
  280. layer.msg('取消成功')
  281. });
  282. })
  283. // 表格hover时背景
  284. $('.trFlex').each(function() {
  285. let data_color = $(this).attr('data-timeout_State');
  286. $(this).css('background', '#fff')
  287. $(this).hover(function() {
  288. $(this)[0].style.backgroundColor = '#cbe9f3'
  289. }, function() {
  290. $(this).css('background', '#fff')
  291. })
  292. })
  293. });
  294. function hCopyOrder(e) {
  295. let str = ''
  296. $('#tbody tr').each(function() {
  297. let res = $(this).find('td').eq(5).text()
  298. str += res + '\n'
  299. })
  300. let oInput = document.createElement("textarea");
  301. oInput.style.border = "0 none";
  302. oInput.style.color = "transparent";
  303. oInput.value = str;
  304. document.body.appendChild(oInput);
  305. oInput.select(); // 选择对象
  306. document.execCommand("Copy"); // 执行浏览器复制命令
  307. oInput.parentNode.removeChild(oInput)
  308. }
  309. </script>