refill.order.exception.php 15 KB

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