set.cancel.order.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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=refill_order_manual&op=index"><span> 订单强制处理</span></a></li>
  74. <li><a href="index.php?act=refill_order_manual&op=refill_order_batch"><span>订单批量处理</span></a></li>
  75. <li><a href="JavaScript:void(0);" class="current"><span>拦截订单</span></a></li>
  76. <li><a href="index.php?act=refill_order_manual&op=transfer_order"><span>预回调订单转快充</span></a></li>
  77. <li><a href="index.php?act=refill_order_manual&op=transfer_order_recharge"><span>预回调订单补充</span></a></li>
  78. <li><a href="index.php?act=refill_order_manual&op=refill_buyback"><span>订单手动操作记录</span></a></li>
  79. </ul>
  80. </div>
  81. </div>
  82. <div class="fixed-empty"></div>
  83. <form method="get" action="index.php" name="formSearch" id="formSearch">
  84. <input type="hidden" name="act" value="refill_order_manual"/>
  85. <input type="hidden" name="op" value="set_cancel_order"/>
  86. <table class="tb-type1 noborder search">
  87. <tr>
  88. <th><label>客户名称</label></th>
  89. <td class="layui-form">
  90. <select name="mchid" class="querySelect" lay-verify="" lay-search>
  91. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  92. <?php foreach ($output['merchant_list'] as $merchant) { ?>
  93. <option value="<?php echo $merchant['mchid'] ?>"<?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name']; ?></option>
  94. <?php } ?>
  95. </select>
  96. </td>
  97. <th><label class="query_ors">商家单号(多行查询)</label></th>
  98. <td><textarea name="mch_orders" id="mch_orders" cols="30" rows="10"><?php echo $_GET['mch_orders'];?></textarea></td>
  99. <td>
  100. <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
  101. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  102. </a>
  103. </td>
  104. </tr>
  105. </table>
  106. <table class="tb-type1 noborder search">
  107. <tr>
  108. <td>
  109. <a href="#" class="btns" id="hFail">
  110. <span><i class="icon-edit"></i>批量拦截</span>
  111. </a>
  112. </td>
  113. </tr>
  114. </table>
  115. </form>
  116. <table class="table tb-type2 nobdb">
  117. <thead>
  118. <tr class="thead">
  119. <th class="align-center" id="selectAll">
  120. <input type="checkbox" name="chbox" value="">
  121. </th>
  122. <th class="align-center">编号</th>
  123. <th class="align-center">机构编号</th>
  124. <th class="align-center">机构名称</th>
  125. <th class="align-center">商家单号</th>
  126. <th class="align-center">充值卡号</th>
  127. <th class="align-center">充值面值</th>
  128. <th class="align-right">下单日期</th>
  129. <th class="align-right">耗时</th>
  130. <th class="align-center">订单状态</th>
  131. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  132. </tr>
  133. </thead>
  134. <tbody id="tbody">
  135. <?php if(count($output['noexist_mch_order']) > 0) { ?>
  136. <?php
  137. foreach ($output['noexist_mch_order'] as $key => $value) { ?>
  138. <tr class="hover trFlex">
  139. <td></td>
  140. <td></td>
  141. <td></td>
  142. <td></td>
  143. <td class="align-center"><?php echo $value;?></td>
  144. <td></td>
  145. <td></td>
  146. <td></td>
  147. <td></td>
  148. <td class="align-center">订单不存在</td>
  149. <td></td>
  150. </tr>
  151. <?php } ?>
  152. <?php }?>
  153. <?php if (count($output['list']) > 0) { ?>
  154. <?php
  155. foreach ($output['list'] as $key => $order) { ?>
  156. <tr class="hover trFlex">
  157. <td class="align-center">
  158. <?php if($order['can_cancel']){?>
  159. <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['order_id'];?>">
  160. <?php }?>
  161. </td>
  162. <td class="align-center"><?php echo $key+1;?></td>
  163. <td class="align-center"><?php echo $order['mchid']; ?></td>
  164. <td class="align-center"><?php echo $order['mch_name'];?></td>
  165. <td class="align-center"><?php echo $order['mch_order']; ?></td>
  166. <td class="align-center"><?php echo $order['card_no']; ?></td>
  167. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  168. <td class="align-right"><?php echo date('Y-m-d H:i:s', $order['order_time']) ?? '/'; ?></td>
  169. <td class="align-right">
  170. <?php if(empty($order['notify_time'])) {
  171. if($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
  172. ?>
  173. <span style="color: #fd9d0e"><?php echo $order['diff_time_text']?></span>
  174. <?php }elseif($order['diff_time'] > 3600) {?>
  175. <span style="color: #f30707"><?php echo $order['diff_time_text']?></span>
  176. <?php }else{?>
  177. <?php echo $order['diff_time_text']?>
  178. <?php }?>
  179. <?php }else{?>
  180. <?php echo $order['diff_time_text']?>
  181. <?php }?>
  182. </td>
  183. <td class="align-center"><?php echo orderState($order); ?></td>
  184. <td class="align-center">
  185. <input type="hidden" value="<?php echo $order['can_cancel'];?>">
  186. <?php if($order['can_cancel']){?>
  187. <a href="index.php?act=refill_order_manual&op=order_cancel_dispose&order_ids=<?php echo $order['order_id']; ?>" id="hdFail">
  188. 拦截</a>
  189. <?php }?>
  190. </td>
  191. </tr>
  192. <?php } ?>
  193. <?php } else { ?>
  194. <tr class="no_data">
  195. <td colspan="11"><?php echo $lang['nc_no_record']; ?></td>
  196. </tr>
  197. <?php } ?>
  198. </tbody>
  199. <tfoot>
  200. <tr class="tfoot">
  201. <td colspan="11" id="dataFuncs">
  202. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  203. </td>
  204. </tr>
  205. </tfoot>
  206. </table>
  207. <!-- 预警提示 -->
  208. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  209. </div>
  210. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  211. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  212. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  213. charset="utf-8"></script>
  214. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  215. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
  216. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
  217. <link rel="stylesheet" type="text/css"
  218. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  219. <script type="text/javascript">
  220. $(function () {
  221. $('#ncsubmit').click(function () {
  222. $('#formSearch').submit();
  223. });
  224. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  225. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  226. // 日期选择器
  227. laydate.render({
  228. elem: '#startTime',
  229. type: 'datetime'
  230. });
  231. laydate.render({
  232. elem: '#endTime',
  233. type: 'datetime'
  234. });
  235. //全选
  236. $('#selectAll').click(function () {
  237. if ($("input[name='chbox']").is(':checked')) {
  238. $("input[name='checkbox']").each(function () {
  239. this.checked = true;
  240. })
  241. } else {
  242. $("input[name='checkbox']").each(function () {
  243. this.checked = false;
  244. })
  245. }
  246. })
  247. //过滤
  248. $("#mch_orders").blur(function () {
  249. let test_mch = $("#mch_orders").val();
  250. let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
  251. $(this).val(result)
  252. })
  253. //批量
  254. $('#hFail').click(function () {
  255. layer.confirm('您确定要批量拦截', {
  256. btn: ['确定', '取消'],
  257. title: '批量拦截'
  258. }, function () {
  259. let arr = [];
  260. $("input:checkbox:checked").each(function (i) {
  261. arr[i] = $(this).val();
  262. })
  263. let str = arr.join(",");
  264. let strr = str.substring(0, 1);
  265. let number = Number(strr);
  266. if (isNaN(number)) {
  267. let strrr = str.substring(1, str.length);
  268. window.location.href = `index.php?act=refill_order_manual&op=order_cancel_dispose&order_ids= ${strrr ? strrr : ''}`
  269. } else if(!isNaN(number) && str !== '') {
  270. window.location.href = `index.php?act=refill_order_manual&op=order_cancel_dispose&order_ids= ${str ? str : ''}`
  271. } else {
  272. layer.msg('请还没有任何操作,请先选择');
  273. }
  274. }, function () {});
  275. })
  276. // 表格hover时背景
  277. $('.trFlex').each(function () {
  278. let data_color = $(this).attr('data-timeout_State');
  279. $(this).css('background', '#fff')
  280. $(this).hover(function () {
  281. $(this)[0].style.backgroundColor = '#cbe9f3'
  282. }, function () {
  283. $(this).css('background', '#fff')
  284. })
  285. })
  286. });
  287. </script>