monitor_transfer.php 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <style>
  2. th label {
  3. display: inline-block;
  4. min-width: 60px;
  5. }
  6. .lineLi {
  7. display: inline-block;
  8. min-width: 120px;
  9. font-size: 14px;
  10. }
  11. .page .fixed-bar .item-title h3 {
  12. margin-top:18px !important;
  13. margin-bottom:10px !important;
  14. font-weight:700 !important;
  15. }
  16. .tab-base li span {
  17. font-size:12px !important;
  18. }
  19. .layui-form-select .layui-input {
  20. height:23px;
  21. padding-left: 11px;
  22. padding-right: 0!important;
  23. }
  24. input::placeholder{
  25. color:#333;
  26. }
  27. .layui-form-selected dl {
  28. display: flex!important;
  29. flex-wrap: wrap!important;
  30. }
  31. .layui-form-select dl {
  32. top: 29px !important;
  33. left: 4px!important;
  34. min-width: 802%!important;
  35. max-height: 280px!important;
  36. padding: 14px 0!important;
  37. }
  38. .layui-form-select dl dd.layui-this{
  39. display: none;
  40. }
  41. .layui-form-select dl dd {
  42. cursor: pointer;
  43. width: 130px;
  44. }
  45. .lefto {
  46. margin-left: 6px;
  47. }
  48. .db-right {
  49. padding-right: 134px!important;
  50. border-bottom: 1px solid #ccc;
  51. }
  52. .db-center {
  53. padding: 9px 0;
  54. border-bottom: 1px solid #ccc;
  55. }
  56. .db-top {
  57. padding: 0 30px;
  58. }
  59. .tab-base{
  60. overflow: visible;
  61. }
  62. .tab-base a {
  63. position: relative;
  64. }
  65. </style>
  66. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  67. <div class="page">
  68. <div class="fixed-bar">
  69. <div class="item-title">
  70. <h3>问题订单监控</h3>
  71. <ul class="tab-base">
  72. <li><a href="index.php?act=ordersendlist&op=index"><span>商户超时订单监控</span></a></li>
  73. <li><a href="index.php?act=ordersendlist&op=monitor_notify"><span>渠道回调超时监控</span></a></li>
  74. <li><a href="index.php?act=ordersendlist&op=neterr_order"><span>网络错误订单监控</span></a></li>
  75. <li><a href="index.php?act=ordersendlist&op=notify_err_order"><span>未回调订单监控</span></a></li>
  76. <li><a href="index.php?act=ordersendlist&op=refill_detail_monitor"><span>接单记录监控</span></a></li>
  77. <li><a href="index.php?act=ordersendlist&op=query_err"><span>机构查单错误列表</span></a></li>
  78. <li><a href="index.php?act=ordersendlist&op=order_exception"><span>异常订单监控</span></a></li>
  79. <li><a href="JavaScript:void(0);" class="current"><span>补单监控</span></a></li>
  80. </ul>
  81. </div>
  82. </div>
  83. <div class="fixed-empty"></div>
  84. <form method="get" action="index.php" name="formSearch" id="formSearch">
  85. <input type="hidden" name="act" value="OrderSendList"/>
  86. <input type="hidden" name="op" value="monitor_transfer"/>
  87. <input type="hidden" name="order_query" value=""/>
  88. <input type="hidden" name="export" value=""/>
  89. <table class="tb-type1 noborder search">
  90. <tr>
  91. <th><label>客户名称</label></th>
  92. <td class="layui-form">
  93. <select name="mchid" class="querySelect" lay-verify="" lay-search>
  94. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  95. <?php foreach ($output['merchant_list'] as $merchant) { ?>
  96. <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>
  97. <?php } ?>
  98. </select>
  99. </td>
  100. <th><label for="query_start_time">下单时间</label></th>
  101. <td>
  102. <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
  103. id="startTime" name="query_start_time" autocomplete="off" style="width:120px" />
  104. <label for="query_start_time">~</label>
  105. <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
  106. id="endTime" name="query_end_time" autocomplete="off" style="width:120px" />
  107. </td>
  108. <th><label>近期时间(小时内)</label></th>
  109. <td>
  110. <select name="time" class="querySelect">
  111. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  112. <?php for ($i = 1; $i<=3; $i++) { ?>
  113. <option value="<?php echo $i; ?>"<?php if ($_GET['time'] == $i){ ?>selected<?php } ?>><?php echo $i;?>小时</option>
  114. <?php } ?>
  115. </select>
  116. </td>
  117. <th><label>订单状态</label></th>
  118. <td>
  119. <select name="order_state" class="querySelect order_state">
  120. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  121. <option value="-1" <?php if ($_GET['order_state'] == '-1') { ?>selected<?php } ?>><?php echo $lang['nc_all']; ?></option>
  122. <option value="30" <?php if ($_GET['order_state'] == '30') { ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
  123. <option value="40" <?php if ($_GET['order_state'] == '40') { ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
  124. <option value="0" <?php if ($_GET['order_state'] == '0') { ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
  125. <option value="-2" <?php if ($_GET['order_state'] == '-2') { ?>selected<?php } ?>><?php echo $lang['order_state_buyback']; ?></option>
  126. </select>
  127. </td>
  128. <th><label>充值类型</label></th>
  129. <td>
  130. <select name="card_type" class="querySelect">
  131. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  132. <option value="1"
  133. <?php if ($_GET['card_type'] == '1'){ ?>selected<?php } ?>>中石油
  134. </option>
  135. <option value="2"
  136. <?php if ($_GET['card_type'] == '2'){ ?>selected<?php } ?>>中石化
  137. </option>
  138. <option value="4"
  139. <?php if ($_GET['card_type'] == '4'){ ?>selected<?php } ?>>中国移动
  140. </option>
  141. <option value="5"
  142. <?php if ($_GET['card_type'] == '5'){ ?>selected<?php } ?>>中国联通
  143. </option>
  144. <option value="6"
  145. <?php if ($_GET['card_type'] == '6'){ ?>selected<?php } ?>>中国电信
  146. </option>
  147. <option value="7"
  148. <?php if ($_GET['card_type'] == '7'){ ?>selected<?php } ?>>增值业务
  149. </option>
  150. <option value="oil"
  151. <?php if ($_GET['card_type'] == 'oil'){ ?>selected<?php } ?>>油费
  152. </option>
  153. <option value="phone"
  154. <?php if ($_GET['card_type'] == 'phone'){ ?>selected<?php } ?>>手机费
  155. </option>
  156. </select>
  157. </td>
  158. <th><label>交易面额</label></th>
  159. <td>
  160. <select name="refill_amount" class="querySelect">
  161. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  162. <option value="10" <?php if ($_GET['refill_amount'] == '10') { ?>selected<?php } ?>>10</option>
  163. <option value="20" <?php if ($_GET['refill_amount'] == '20') { ?>selected<?php } ?>>20</option>
  164. <option value="30" <?php if ($_GET['refill_amount'] == '30') { ?>selected<?php } ?>>30</option>
  165. <option value="50" <?php if ($_GET['refill_amount'] == '50') { ?>selected<?php } ?>>50</option>
  166. <option value="100" <?php if ($_GET['refill_amount'] == '100') { ?>selected<?php } ?>>100</option>
  167. <option value="200" <?php if ($_GET['refill_amount'] == '200') { ?>selected<?php } ?>>200</option>
  168. <option value="300" <?php if ($_GET['refill_amount'] == '300') { ?>selected<?php } ?>>300</option>
  169. <option value="500" <?php if ($_GET['refill_amount'] == '500') { ?>selected<?php } ?>>500</option>
  170. <option value="1000" <?php if ($_GET['refill_amount'] == '1000') { ?>selected<?php } ?>>1000</option>
  171. <option value="2000" <?php if ($_GET['refill_amount'] == '2000') { ?>selected<?php } ?>>2000</option>
  172. </select>
  173. </td>
  174. <td>
  175. <a style="margin-left:15px;" href="javascript:void(0);" id="ncsubmit" class="btn-search "
  176. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  177. </a>
  178. </td>
  179. </tr>
  180. </table>
  181. <table class="tb-type1 noborder search">
  182. <tr>
  183. <td>
  184. <a href="javascript:void(0);" id="order_query" class="btns" style="margin-right: 60px;">
  185. <span><i class="icon-edit"></i>更新待收货订单状态</span>
  186. </a>
  187. <a href="#" class="btns" onclick="hCopyOrder(event)">
  188. <span><i class="icon-edit"></i>拷贝我方订单号</span>
  189. </a>
  190. <a href="#" class="btns" onclick="hCopyMchOrder(event)">
  191. <span><i class="icon-edit"></i>拷贝商家单号</span>
  192. </a>
  193. <a href="#" class="btns" onclick="hCopyChannel(event)">
  194. <span><i class="icon-edit"></i>拷贝渠道单号</span>
  195. </a>
  196. <a href="#" class="btns" onclick="hCopyCardNo(event)">
  197. <span><i class="icon-edit"></i>拷贝充值卡号</span>
  198. </a>
  199. <a href="javascript:void(0);" id="ncexport" class="btns" style="margin: 0 60px;">
  200. <span><i class="icon-edit"></i>导出Excel</span>
  201. </a>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td>
  206. <a href="#" class="btns readd" >
  207. <span><i class="icon-edit"></i>批量补充</span>
  208. </a>
  209. </td>
  210. <td>
  211. <a href="#" class="btns qreadd">
  212. <span><i class="icon-edit"></i>批量快补</span>
  213. </a>
  214. </td>
  215. </tr>
  216. </table>
  217. </form>
  218. <table class="table tb-type2" id="prompt">
  219. <tbody>
  220. <tr class="space odd" id="autoClick">
  221. <th colspan="12">
  222. <div class="title" style="margin-top: 4px;"><h5>
  223. 金额统计</h5><span class="arrow"></span>
  224. </div>
  225. <ul>
  226. <li class="lineLi" style="color:#000;">总计订单数量:<?php echo $output['stat']['order_count'] ?? 0 ?></li>
  227. <li class="lineLi" style="color:#000;">总计充值金额:<?php echo $output['stat']['refill_amounts'] ?? 0 ?></li>
  228. <li class="lineLi" style="color:#000;">超过30分钟订单数量:<?php echo $output['count'][0] ?? 0 ?></li>
  229. <li class="lineLi" style="color:#000;">超过1小时订单数量:<?php echo $output['count'][1] ?? 0 ?></li>
  230. <?php if ($_GET['time'] == 3) { ?>
  231. <li class="lineLi" style="color:#000;">超过3分钟订单数量:<?php echo $output['count'][2] ?? 0 ?></li>
  232. <?php } elseif ($_GET['time'] == 4) { ?>
  233. <li class="lineLi" style="color:#000;">超过5分钟订单数量:<?php echo $output['count'][2] ?? 0 ?></li>
  234. <?php } elseif ($_GET['time'] == 5) { ?>
  235. <li class="lineLi" style="color:#000;">超过10分钟订单数量:<?php echo $output['count'][2] ?? 0 ?></li>
  236. <?php } elseif ($_GET['time'] == 6) { ?>
  237. <li class="lineLi" style="color:#000;">超过15分钟订单数量:<?php echo $output['count'][2] ?? 0 ?></li>
  238. <?php } elseif ($_GET['time'] == 7) { ?>
  239. <li class="lineLi" style="color:#000;">超过两小时订单数量:<?php echo $output['count'][2] ?? 0 ?></li>
  240. <?php } ?>
  241. </ul>
  242. </th>
  243. </tr>
  244. <tr>
  245. <td>
  246. <ul id="merchant_stat">
  247. <?php if(!empty($output['merchant_stat'])) {
  248. foreach ($output['merchant_stat'] as $stat){
  249. ?>
  250. <li class="lineLi" style="color:#000;"><?php
  251. $name = $stat['company_name'] ??$stat['name'];
  252. echo "{$name} :{$stat['order_count']}";
  253. ?></li>
  254. <?php }}?>
  255. </ul>
  256. </td>
  257. </tr>
  258. </tbody>
  259. </table>
  260. <table class="table tb-type2 nobdb">
  261. <thead>
  262. <tr class="thead">
  263. <th class="align-center" id="selectAll"><input type="checkbox" name="chbox" value=""></th>
  264. <th class="align-center">编号</th>
  265. <th class="align-left">机构编号</th>
  266. <th class="align-left">机构名称</th>
  267. <th class="align-center">订单号</th>
  268. <th class="align-left">充值卡号</th>
  269. <th class="align-center">充值卡类型</th>
  270. <th class="align-center">充值额度</th>
  271. <th class="align-center">下单日期</th>
  272. <th class="align-center">超时</th>
  273. <th class="align-center">当前耗时</th>
  274. <th class="align-center">总耗时</th>
  275. <th class="align-center">订单状态</th>
  276. <th class="align-center">返销状态</th>
  277. <th class="align-center">通道质量</th>
  278. <th class="align-left">失败原因</th>
  279. <th class="align-left">商家单号</th>
  280. <th class="align-left">扣款金额</th>
  281. <th class="align-left">渠道单号</th>
  282. <th class="align-left">渠道名称</th>
  283. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  284. </tr>
  285. </thead>
  286. <tbody id="tbody">
  287. <?php if (count($output['order_list']) > 0) { ?>
  288. <?php
  289. foreach ($output['order_list'] as $key => $order) { ?>
  290. <tr class="hover trFlex" id="dataColor" data-timeout_State="<?php echo $order['time_out_state'];?>">
  291. <td class="align-center"><input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['order_id'];?>"></td>
  292. <td class="align-center"><?php echo $key + 1; ?></td>
  293. <td class="align-left"><?php echo $order['mchid']; ?></td>
  294. <td class="align-left"><?php echo $order['mch_name']; ?></td>
  295. <td class="align-center"><?php echo $order['order_sn']; ?></td>
  296. <td class="align-left"><?php echo $order['card_no']; ?></td>
  297. <td class="align-center"><?php echo $order['card_type_text']; ?></td>
  298. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  299. <td class="align-center">
  300. <span class="doubleclick" data-order="<?php echo $order['order_sn'];?>">
  301. <?php echo date('Y-m-d H:i:s', $order['order_time']); ?>
  302. </span>
  303. </td>
  304. <td class="align-center">
  305. <?php if (empty($order['notify_time'])) {
  306. if ($order['mtime_out'] > 180) {
  307. ?>
  308. <span style="color: #f30707"><?php echo $order['mtime_out_text'] ?></span>
  309. <?php } else { ?>
  310. <?php echo $order['mtime_out_text'] ?>
  311. <?php } ?>
  312. <?php } else { ?>
  313. <?php echo $order['mtime_out_text'] ?>
  314. <?php } ?>
  315. </td>
  316. <td class="align-center">
  317. <?php if (empty($order['notify_time'])) {
  318. if ($order['diff_time'] > 180) {
  319. ?>
  320. <span style="color: #f30707"><?php echo $order['diff_time_text'] ?></span>
  321. <?php } else { ?>
  322. <?php echo $order['diff_time_text'] ?>
  323. <?php } ?>
  324. <?php } else { ?>
  325. <?php echo $order['diff_time_text'] ?>
  326. <?php } ?>
  327. </td>
  328. <td class="align-center">
  329. <?php if (empty($order['notify_time'])) {
  330. if ($order['total_diff_time'] > 180) {
  331. ?>
  332. <span style="color: #f30707"><?php echo $order['total_diff_time_text'] ?></span>
  333. <?php } else {
  334. ?>
  335. <?php echo $order['total_diff_time_text'] ?>
  336. <?php } ?>
  337. <?php } else { ?>
  338. <?php echo $order['total_diff_time_text'] ?>
  339. <?php } ?>
  340. </td>
  341. <td class="align-center"><?php echo orderState($order); ?></td>
  342. <td class="align-center"><?php echo $order['buyback'] === true ? '已返销': '/';?></td>
  343. <td class="align-center"><?php echo $order['quality_text']; ?></td>
  344. <td class="align-left"><?php echo $order['err_msg']; ?></td>
  345. <td class="align-left"><?php echo $order['mch_order']; ?></td>
  346. <td class="align-left"><?php echo $order['mch_amount']; ?></td>
  347. <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
  348. <td class="align-left"><?php echo $order['channel_name']; ?></td>
  349. <td class="w144 align-center">
  350. <a href="index.php?act=merchant&op=readd&quality=0&order_id=<?php echo $order['order_id']; ?>">重新补充</a> |
  351. <a href="index.php?act=merchant&op=readd&quality=2&order_id=<?php echo $order['order_id']; ?>">快补</a>
  352. </td>
  353. </tr>
  354. <?php } ?>
  355. <?php } else { ?>
  356. <tr class="no_data">
  357. <td colspan="20"><?php echo $lang['nc_no_record']; ?></td>
  358. </tr>
  359. <?php } ?>
  360. </tbody>
  361. <tfoot>
  362. <tr class="tfoot">
  363. <td colspan="20" id="dataFuncs">
  364. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  365. </td>
  366. </tr>
  367. </tfoot>
  368. </table>
  369. <!-- 预警提示 -->
  370. <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
  371. </div>
  372. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  373. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  374. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  375. charset="utf-8"></script>
  376. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  377. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
  378. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/moment-with-locales.js"></script>
  379. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
  380. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
  381. <link rel="stylesheet" type="text/css"
  382. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  383. <script type="text/javascript">
  384. $(function () {
  385. $('#ncsubmit').click(function () {
  386. $('#formSearch').submit();
  387. });
  388. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  389. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  390. // 日期选择器
  391. laydate.render({
  392. elem: '#startTime',
  393. type: 'datetime'
  394. });
  395. laydate.render({
  396. elem: '#endTime',
  397. type: 'datetime'
  398. });
  399. //双击
  400. $('.doubleclick').dblclick(function() {
  401. let order_sn = $(this).attr('data-order')
  402. $.get('index.php?act=refill_order&op=showOrders', {
  403. order_sn:order_sn
  404. }, function(data) {
  405. data = JSON.parse(data)
  406. if (data.state == 1) {
  407. let order_item = data.data
  408. let html = '';
  409. for (let i = 0; i < order_item.length; i++) {
  410. var item = order_item[i];
  411. html += `
  412. <tr>
  413. <td class="db-center">${item.order_sn}</td>
  414. <td class="db-center">${item.commit_time_text}</td>
  415. <td class="db-center">${item.notify_time_text}</td>
  416. <td class="db-center">${item.diff_time_text}</td>
  417. <td class="db-center">${item.order_state_text}</td>
  418. <td class="db-center">${item.channel_name}</td>
  419. <td class="db-center">${item.err_msg}</td>
  420. <td class="db-center">${item.close_reason}</td>
  421. <td class="db-center">${item.quality_text}</td>
  422. <tr>`
  423. }
  424. let content = `<table>
  425. <thead>
  426. <tr>
  427. <th class="db-right">订单号</th>
  428. <th class="db-right">下单日期</th>
  429. <th class="db-right">回调日期</th>
  430. <th class="db-right">耗时</th>
  431. <th class="db-right">订单状态</th>
  432. <th class="db-right">供方名称</th>
  433. <th class="db-right">错误原因(充值)</th>
  434. <th class="db-right">错误原因(订单)</th>
  435. <th class="db-right">订单质量</th>
  436. </tr>
  437. </thead>
  438. <tbody>${html}</tbody>
  439. </table>`
  440. layer.open({
  441. title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
  442. content: content
  443. });
  444. } else {
  445. alert("没有此订单");
  446. }
  447. })
  448. })
  449. //全选
  450. $('#selectAll').click(function () {
  451. if ($("input[name='chbox']").is(':checked')) {
  452. $("input[name='checkbox']").each(function () {
  453. this.checked = true;
  454. })
  455. } else {
  456. $("input[name='checkbox']").each(function () {
  457. this.checked = false;
  458. })
  459. }
  460. })
  461. //批量补充
  462. $('.readd').click(function() {
  463. layer.confirm('您确定要批量补充', {
  464. btn: ['确定', '取消'],
  465. title: '批量补充'
  466. }, function () {
  467. let arr = [];
  468. $("input:checkbox:checked").each(function (i) {
  469. arr[i] = $(this).val();
  470. })
  471. let str = arr.join(",");
  472. let strr = str.substring(0, 1);
  473. let number = Number(strr);
  474. if (isNaN(number)) {
  475. let strrr = str.substring(1, str.length);
  476. window.location.href = `index.php?act=merchant&op=readd_batch&order_ids= ${strrr ? strrr : ''}`
  477. } else if(!isNaN(number) && str !== '') {
  478. window.location.href = `index.php?act=merchant&op=readd_batch&order_ids= ${str ? str : ''}`
  479. } else {
  480. layer.msg('请还没有任何操作,请先选择');
  481. }
  482. }, function () {layer.msg('批量补充操作成功');});
  483. })
  484. //批量快补
  485. $('.qreadd').click(function() {
  486. layer.confirm('您确定要用快速通道批量补充', {
  487. btn: ['确定', '取消'],
  488. title: '批量快补'
  489. }, function () {
  490. let arr = [];
  491. $("input:checkbox:checked").each(function (i) {
  492. arr[i] = $(this).val();
  493. })
  494. let str = arr.join(",");
  495. let strr = str.substring(0, 1);
  496. let number = Number(strr);
  497. if (isNaN(number)) {
  498. let strrr = str.substring(1, str.length);
  499. window.location.href = `index.php?act=merchant&op=readd_batch&quality=2&order_ids= ${strrr ? strrr : ''}`
  500. } else if(!isNaN(number) && str !== '') {
  501. window.location.href = `index.php?act=merchant&op=readd_batch&quality=2&order_ids= ${str ? str : ''}`
  502. } else {
  503. layer.msg('请还没有任何操作,请先选择');
  504. }
  505. }, function () {layer.msg('批量补充操作成功');});
  506. })
  507. let isWring = '<?php echo $output['count'][1];?>';
  508. let setTimer
  509. let num
  510. //if (Number(isWring) > 0) {
  511. // window.clearTimeout(setTimer)
  512. // setTimer = setTimeout(function () {
  513. // $("#auto")[0].play();
  514. // // $("#auto").attr("src", '<?php //echo RESOURCE_SITE_URL; ?>///warning.mp3');
  515. // }, 1000);
  516. // window.clearTimeout(num)
  517. // num = setTimeout(function () {
  518. // window.location.reload();
  519. // }, 60000);
  520. //}
  521. // 表格hover时背景
  522. $('.trFlex').each(function () {
  523. let data_color = $(this).attr('data-timeout_State');
  524. if (data_color == 1) {
  525. $(this).css('background', '#f1dde6')
  526. } else if (data_color == 2) {
  527. $(this).css('background', '#f2f3c6')
  528. } else if (data_color == 3) {
  529. $(this).css('background', '#ff7575')
  530. } else if (data_color == 4) {
  531. $(this).css('background', '#81C0C0')
  532. } else {
  533. $(this).css('background', '#fff')
  534. }
  535. $(this).hover(function () {
  536. $(this)[0].style.backgroundColor = '#cbe9f3'
  537. }, function () {
  538. let data_color = $(this).attr('data-timeout_State');
  539. if (data_color == 1) {
  540. $(this).css('background', '#f1dde6')
  541. } else if (data_color == 2) {
  542. $(this).css('background', '#f2f3c6')
  543. } else if (data_color == 3) {
  544. $(this).css('background', '#ff7575')
  545. } else if (data_color == 4) {
  546. $(this).css('background', '#81C0C0')
  547. } else {
  548. $(this).css('background', '#fff')
  549. }
  550. })
  551. })
  552. // 供方名称颜色
  553. $('.textColor').each(function () {
  554. let color = $(this).attr('data-color')
  555. if (color == '1') {
  556. $(this).css('color', 'green')
  557. } else {
  558. $(this).css('color', 'red')
  559. }
  560. })
  561. // 更新待收货状态
  562. $('#order_query').click(function () {
  563. $('input[name="order_query"]').val('1');
  564. $('input[name="op"]').val('index');
  565. $('#formSearch').submit();
  566. $('input[name="order_query"]').val('');
  567. var ii = layer.load();
  568. setTimeout(function(){
  569. layer.close(ii);
  570. }, 800);
  571. });
  572. // 导出
  573. $('#ncexport').click(function () {
  574. const $export = $('input[name="export"]');
  575. $export.val('1');
  576. $('#formSearch').submit();
  577. $export.val('');
  578. let ii = layer.load();
  579. setTimeout(function () {
  580. layer.close(ii);
  581. }, 800);
  582. });
  583. //近期时间
  584. $("select[name='time']").change(function () {
  585. let startTime = "";
  586. const selectedValue = $(this).val();
  587. if (selectedValue === "") {
  588. startTime = moment().startOf('day').format('YYYY-MM-DD HH:mm:ss');
  589. } else {
  590. const date = new Date();
  591. const selectedValue = $(this).val();
  592. const leftTime = parseInt(selectedValue);
  593. const time = date.getTime() - 3600000 * leftTime;
  594. startTime = moment(time).format("YYYY-M-DD HH:mm:ss");
  595. }
  596. $("input[name='query_start_time']").val(startTime);
  597. $("input[name='query_end_time']").val("");
  598. });
  599. });
  600. function hCopyOrder(e) {
  601. let str = ''
  602. $('#tbody tr').each(function () {
  603. let res = $(this).find('td').eq(4).text()
  604. str += res + '\n'
  605. })
  606. let oInput = document.createElement("textarea");
  607. oInput.style.border = "0 none";
  608. oInput.style.color = "transparent";
  609. oInput.value = str;
  610. document.body.appendChild(oInput);
  611. oInput.select(); // 选择对象
  612. document.execCommand("Copy"); // 执行浏览器复制命令
  613. oInput.parentNode.removeChild(oInput)
  614. }
  615. function hCopyChannel(e) {
  616. let str = ''
  617. $('#tbody tr').each(function () {
  618. let res = $(this).find('td').eq(18).text()
  619. str += res + '\n'
  620. })
  621. let oInput = document.createElement("textarea");
  622. oInput.style.border = "0 none";
  623. oInput.style.color = "transparent";
  624. oInput.value = str;
  625. document.body.appendChild(oInput);
  626. oInput.select(); // 选择对象
  627. document.execCommand("Copy"); // 执行浏览器复制命令
  628. oInput.parentNode.removeChild(oInput)
  629. }
  630. function hCopyCardNo(e) {
  631. let str = ''
  632. $('#tbody tr').each(function () {
  633. let res = $(this).find('td').eq(5).text()
  634. str += res + '\n'
  635. })
  636. let oInput = document.createElement("textarea");
  637. oInput.style.border = "0 none";
  638. oInput.style.color = "transparent";
  639. oInput.value = str;
  640. document.body.appendChild(oInput);
  641. oInput.select(); // 选择对象
  642. document.execCommand("Copy"); // 执行浏览器复制命令
  643. oInput.parentNode.removeChild(oInput)
  644. }
  645. function hCopyMchOrder(e) {
  646. let str = ''
  647. $('#tbody tr').each(function () {
  648. let res = $(this).find('td').eq(16).text()
  649. str += res + '\n'
  650. })
  651. let oInput = document.createElement("textarea");
  652. oInput.style.border = "0 none";
  653. oInput.style.color = "transparent";
  654. oInput.value = str;
  655. document.body.appendChild(oInput);
  656. oInput.select(); // 选择对象
  657. document.execCommand("Copy"); // 执行浏览器复制命令
  658. oInput.parentNode.removeChild(oInput)
  659. }
  660. </script>