refill.order.exception.php 11 KB

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