refill.order.send.index.php 34 KB

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