refill.order.exception.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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>
  79. <a href="JavaScript:void(0);" class="current"><span>异常订单监控</span>
  80. <?php if($output['except_stat'] > 0){?>
  81. <span class="badge"><?php echo $output['except_stat'];?></span>
  82. <?php }?>
  83. </a>
  84. </li>
  85. </ul>
  86. </div>
  87. </div>
  88. <div class="fixed-empty"></div>
  89. <form method="get" action="index.php" name="formSearch" id="formSearch">
  90. <input type="hidden" name="act" value="ordersendlist" />
  91. <input type="hidden" name="op" value="order_exception" />
  92. <table class="tb-type1 noborder search">
  93. <tr>
  94. <th><label class="query_ors">订单号(多行查询)</label></th>
  95. <td><textarea name="order_sns" id="order_sns" cols="30" rows="10"><?php echo $_GET['order_sns']; ?></textarea></td>
  96. <th><label>异常状态</label></th>
  97. <td>
  98. <select name="except_state" class="querySelect">
  99. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  100. <option value="0" <?php if ($_GET['except_state'] == '0') { ?>selected<?php } ?>>未处理
  101. </option>
  102. <option value="1" <?php if ($_GET['except_state'] == '1') { ?>selected<?php } ?>>已处理
  103. </option>
  104. </select>
  105. </td>
  106. <td>
  107. <a href="javascript:void(0);" id="ncsubmit" class="btn-search" title="<?php echo $lang['nc_query']; ?>">&nbsp;
  108. </a>
  109. </td>
  110. </tr>
  111. </table>
  112. <table class="tb-type1 noborder search">
  113. <tr>
  114. <td>
  115. <a href="#" class="btns" onclick="hCopyOrder(event)">
  116. <span><i class="icon-edit"></i>拷贝订单号</span>
  117. </a>
  118. <a href="#" class="btns" id="hHandled">
  119. <span><i class="icon-edit"></i>批量标记为已处理</span>
  120. </a>
  121. </td>
  122. </tr>
  123. </table>
  124. </form>
  125. <table class="table tb-type2 nobdb">
  126. <thead>
  127. <tr class="thead">
  128. <th class="align-center" id="selectAll">
  129. <input type="checkbox" name="chbox" value="">
  130. </th>
  131. <th class="align-left">编号</th>
  132. <th class="align-left">机构编号</th>
  133. <th class="align-left">机构名称</th>
  134. <th class="align-left">通道名称</th>
  135. <th class="align-left">订单号</th>
  136. <th class="align-left">异常事件</th>
  137. <th class="align-left">异常信息</th>
  138. <th class="align-left">生成日期</th>
  139. <th class="align-left">更新日期</th>
  140. <th class="align-center">异常状态</th>
  141. <th class="align-left">处理人</th>
  142. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  143. </tr>
  144. </thead>
  145. <tbody id="tbody">
  146. <?php if (count($output['list']) > 0) { ?>
  147. <?php
  148. foreach ($output['list'] as $key => $order) { ?>
  149. <tr class="hover trFlex">
  150. <td class="align-center">
  151. <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['except_id']; ?>">
  152. </td>
  153. <td class="align-left"><?php echo $key + 1; ?></td>
  154. <td class="align-left"><?php echo $order['mchid']; ?></td>
  155. <td class="align-left"><?php echo $output['merchant_list'][$order['mchid']]['company_name']; ?></td>
  156. <td class="align-left"><?php echo $order['store_name']; ?></td>
  157. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  158. <td class="align-left"><?php echo $order['title']; ?></td>
  159. <td class="align-left"><?php echo $order['except_desc']; ?></td>
  160. <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['add_time']) ?? '/'; ?></td>
  161. <td class="align-left"><?php echo !empty($order['oper_time']) ? date('Y-m-d H:i:s', $order['oper_time']) : '/'; ?></td>
  162. <td class="align-center">
  163. <?php if ($order['except_state'] == '0') { ?>
  164. <span style="color: #E53737">未处理</span>
  165. <?php } ?><?php if ($order['except_state'] == '1') { ?>
  166. <span style="color: #48975A">已处理</span>
  167. <?php } ?>
  168. </td>
  169. <td class="align-left"><?php echo $order['admin_name']; ?></td>
  170. <td class="align-center">
  171. <?php if ($order['except_state'] == 0) { ?>
  172. <a href="index.php?act=ordersendlist&op=order_exception_handled&except_ids=<?php echo $order['except_id']; ?>">
  173. 设置为已处理</a>
  174. <?php } ?>
  175. </td>
  176. </tr>
  177. <?php } ?>
  178. <?php } else { ?>
  179. <tr class="no_data">
  180. <td colspan="13"><?php echo $lang['nc_no_record']; ?></td>
  181. </tr>
  182. <?php } ?>
  183. </tbody>
  184. <tfoot>
  185. <tr class="tfoot">
  186. <td colspan="13" id="dataFuncs">
  187. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  188. </td>
  189. </tr>
  190. </tfoot>
  191. </table>
  192. <!-- 预警提示 -->
  193. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  194. </div>
  195. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  196. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  197. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
  198. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/layer.js"></script>
  199. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/layui.js"></script>
  200. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css" />
  201. <link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css" />
  202. <script type="text/javascript">
  203. $(function() {
  204. $('#ncsubmit').click(function() {
  205. $('#formSearch').submit();
  206. });
  207. $('#query_start_time').datepicker({
  208. dateFormat: 'yy-mm-dd'
  209. });
  210. $('#query_end_time').datepicker({
  211. dateFormat: 'yy-mm-dd'
  212. });
  213. // 日期选择器
  214. laydate.render({
  215. elem: '#startTime',
  216. type: 'datetime'
  217. });
  218. laydate.render({
  219. elem: '#endTime',
  220. type: 'datetime'
  221. });
  222. //全选
  223. $('#selectAll').click(function() {
  224. if ($("input[name='chbox']").is(':checked')) {
  225. $("input[name='checkbox']").each(function() {
  226. this.checked = true;
  227. })
  228. } else {
  229. $("input[name='checkbox']").each(function() {
  230. this.checked = false;
  231. })
  232. }
  233. })
  234. $("#order_sns").blur(function() {
  235. let test_mch = $("#order_sns").val();
  236. let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
  237. $(this).val(result)
  238. })
  239. let get_sel_id = function() {
  240. let arr = [];
  241. $("input:checkbox:checked").each(function() {
  242. let sel_id = $(this).val();
  243. if (sel_id !== '') {
  244. arr.push(sel_id);
  245. }
  246. })
  247. if (arr.length <= 0) {
  248. return
  249. }
  250. return arr.join(",")
  251. }
  252. //批量失败
  253. $('#hHandled').click(function() {
  254. layer.confirm('您确定要批量处理', {
  255. btn: ['确定', '取消'],
  256. title: '批量失败'
  257. }, function() {
  258. const batch = get_sel_id();
  259. window.location.href = `index.php?act=ordersendlist&op=order_exception_handled&except_ids= ${batch ? batch : ''}`
  260. }, function() {
  261. layer.msg('取消成功')
  262. });
  263. })
  264. // 表格hover时背景
  265. $('.trFlex').each(function() {
  266. let data_color = $(this).attr('data-timeout_State');
  267. $(this).css('background', '#fff')
  268. $(this).hover(function() {
  269. $(this)[0].style.backgroundColor = '#cbe9f3'
  270. }, function() {
  271. $(this).css('background', '#fff')
  272. })
  273. })
  274. });
  275. function hCopyOrder(e) {
  276. let str = ''
  277. $('#tbody tr').each(function() {
  278. let res = $(this).find('td').eq(5).text()
  279. str += res + '\n'
  280. })
  281. let oInput = document.createElement("textarea");
  282. oInput.style.border = "0 none";
  283. oInput.style.color = "transparent";
  284. oInput.value = str;
  285. document.body.appendChild(oInput);
  286. oInput.select(); // 选择对象
  287. document.execCommand("Copy"); // 执行浏览器复制命令
  288. oInput.parentNode.removeChild(oInput)
  289. }
  290. </script>