refill.order.send.index.php 28 KB

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