monitor_transfer.php 29 KB

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