refill.order.exception.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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="exc_state" class="querySelect">
  92. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  93. <option value="0"
  94. <?php if ($_GET['exc_state'] == '0'){ ?>selected<?php } ?>>未处理
  95. </option>
  96. <option value="1"
  97. <?php if ($_GET['exc_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-center">异常状态</th>
  135. <th class="align-left">异常信息</th>
  136. <th class="align-left">处理人</th>
  137. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  138. </tr>
  139. </thead>
  140. <tbody id="tbody">
  141. <?php if (count($output['list']) > 0) { ?>
  142. <?php
  143. foreach ($output['list'] as $key => $order) { ?>
  144. <tr class="hover trFlex">
  145. <td class="align-center">
  146. <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['exc_id'];?>">
  147. </td>
  148. <td class="align-left"><?php echo $key+1;?></td>
  149. <td class="align-left"><?php echo $order['exc_title']; ?></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['order_sn']; ?></td>
  153. <td class="align-left"><?php echo date('Y-m-d H:i:s', $order['create_time']) ?? '/'; ?></td>
  154. <td class="align-left"><?php echo !empty($order['update_time']) ? date('Y-m-d H:i:s', $order['update_time']) : '/'; ?></td>
  155. <td class="align-center">
  156. <?php if ($order['exc_state'] == '0') { ?>
  157. <span style="color: #E53737">未处理</span>
  158. <?php } ?><?php if ($order['exc_state'] == '1') { ?>
  159. <span style="color: #48975A">已处理</span>
  160. <?php } ?>
  161. </td>
  162. <td class="align-left"><?php echo $order['exc_desc']; ?></td>
  163. <td class="align-left"><?php echo $order['admin_name']; ?></td>
  164. <td class="align-center">
  165. <?php if($order['exc_state'] == 0){?>
  166. <a href="index.php?act=ordersendlist&op=order_exception_handled&exc_ids=<?php echo $order['exc_id']; ?>">
  167. 处理</a>
  168. <?php }?>
  169. </td>
  170. </tr>
  171. <?php } ?>
  172. <?php } else { ?>
  173. <tr class="no_data">
  174. <td colspan="11"><?php echo $lang['nc_no_record']; ?></td>
  175. </tr>
  176. <?php } ?>
  177. </tbody>
  178. <tfoot>
  179. <tr class="tfoot">
  180. <td colspan="11" id="dataFuncs">
  181. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  182. </td>
  183. </tr>
  184. </tfoot>
  185. </table>
  186. <!-- 预警提示 -->
  187. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  188. </div>
  189. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  190. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  191. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  192. charset="utf-8"></script>
  193. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  194. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
  195. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
  196. <link rel="stylesheet" type="text/css"
  197. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  198. <script type="text/javascript">
  199. $(function () {
  200. $('#ncsubmit').click(function () {
  201. $('#formSearch').submit();
  202. });
  203. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  204. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  205. // 日期选择器
  206. laydate.render({
  207. elem: '#startTime',
  208. type: 'datetime'
  209. });
  210. laydate.render({
  211. elem: '#endTime',
  212. type: 'datetime'
  213. });
  214. //全选
  215. $('#selectAll' ).click ( function () {
  216. if ($("input[name='chbox']").is(':checked')) {
  217. $("input[name='checkbox']").each(function() {
  218. this.checked = true;
  219. })
  220. } else {
  221. $("input[name='checkbox']").each(function() {
  222. this.checked = false;
  223. })
  224. }
  225. })
  226. let get_sel_id = function (){
  227. let arr = [];
  228. $("input:checkbox:checked").each(function () {
  229. let sel_id = $(this).val();
  230. if(sel_id !== '') {
  231. arr.push(sel_id);
  232. }
  233. })
  234. if (arr.length <= 0) { return}
  235. return arr.join(",")
  236. }
  237. //批量失败
  238. $('#hHandled').click(function () {
  239. layer.confirm('您确定要批量处理', {
  240. btn: ['确定', '取消'],
  241. title: '批量失败'
  242. }, function () {
  243. const batch = get_sel_id();
  244. window.location.href = `index.php?act=ordersendlist&op=order_exception_handled&exc_ids= ${batch ? batch : ''}`
  245. }, function () {
  246. layer.msg('取消成功')
  247. });
  248. })
  249. // 表格hover时背景
  250. $('.trFlex').each(function () {
  251. let data_color = $(this).attr('data-timeout_State');
  252. $(this).css('background', '#fff')
  253. $(this).hover(function () {
  254. $(this)[0].style.backgroundColor = '#cbe9f3'
  255. }, function () {
  256. $(this).css('background', '#fff')
  257. })
  258. })
  259. });
  260. function hCopyOrder(e) {
  261. let str = ''
  262. $('#tbody tr').each(function () {
  263. let res = $(this).find('td').eq(4).text()
  264. str += res + '\n'
  265. })
  266. let oInput = document.createElement("textarea");
  267. oInput.style.border = "0 none";
  268. oInput.style.color = "transparent";
  269. oInput.value = str;
  270. document.body.appendChild(oInput);
  271. oInput.select(); // 选择对象
  272. document.execCommand("Copy"); // 执行浏览器复制命令
  273. oInput.parentNode.removeChild(oInput)
  274. }
  275. </script>