set.cancel.order.php 12 KB

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