refill.order.index.php 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. <style>
  2. th label {
  3. display: inline-block;
  4. width: 60px;
  5. }
  6. .lineLi {
  7. min-width: 150px;
  8. font-size: 12px;
  9. color: #000;
  10. }
  11. #prompt ul .noLineLi {
  12. background: none;
  13. }
  14. #prompt div {
  15. display: inline-block;
  16. background: none
  17. }
  18. #prompt ul .lineLi {
  19. color: #000;
  20. }
  21. #select_nc {
  22. width: 220px
  23. }
  24. #denomination {
  25. width: 220px
  26. }
  27. tbody {
  28. font-size: 12px;
  29. }
  30. .layui-form-select .layui-input {
  31. padding: 13px 5px;
  32. }
  33. #mchid_td .layui-form-selected dl {
  34. display: flex !important;
  35. flex-wrap: wrap !important;
  36. }
  37. #mchid_td .layui-form-select dl {
  38. top: 29px !important;
  39. left: 4px !important;
  40. min-width: 883% !important;
  41. max-height: 280px !important;
  42. padding: 14px 0 !important;
  43. }
  44. #mchid_td .layui-form-select .layui-input {
  45. padding-right: 0 !important;
  46. cursor: pointer;
  47. width: 124%;
  48. }
  49. .layui-form-select {
  50. width: 45%;
  51. }
  52. .layui-select-title {
  53. width: 100%;
  54. }
  55. .layui-form-select .layui-input {
  56. padding-left: 4px;
  57. }
  58. .page .fixed-bar .item-title h3 {
  59. margin-top: 18px !important;
  60. margin-bottom: 10px !important;
  61. font-weight: 700 !important;
  62. }
  63. .tab-base li span {
  64. font-size: 12px !important;
  65. }
  66. .layui-form-select .layui-input {
  67. height: 26px;
  68. }
  69. input::placeholder {
  70. color: #333;
  71. }
  72. .xm-tips {
  73. color: #333 !important;
  74. font-size: 12px;
  75. }
  76. .layui-form-select dl dd.layui-this {
  77. /* display: none; */
  78. background: #099ACF !important;
  79. }
  80. #mchid_td .layui-form-select dl dd {
  81. cursor: pointer;
  82. width: 130px;
  83. }
  84. #mchid_td .layui-form-select .layui-edge {
  85. right: -24px !important;
  86. }
  87. .db-right {
  88. padding-right: 134px !important;
  89. border-bottom: 1px solid #ccc;
  90. }
  91. .db-center {
  92. padding: 9px 0;
  93. border-bottom: 1px solid #ccc;
  94. }
  95. .db-top {
  96. padding: 0 30px;
  97. }
  98. .covercolor:hover,
  99. .covercolor:visited,
  100. .covercolor:link,
  101. .covercolor:active {
  102. color: #0D93BF;
  103. }
  104. #store_id_box .layui-form-select {
  105. width: 230px;
  106. }
  107. #store_id_box .layui-form-select dl {
  108. left: 3px;
  109. top: 28px;
  110. }
  111. </style>
  112. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  113. <div class="page">
  114. <div class="fixed-bar">
  115. <div class="item-title">
  116. <h3>订单列表</h3>
  117. <ul class="tab-base">
  118. <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
  119. </ul>
  120. </div>
  121. </div>
  122. <div class="fixed-empty"></div>
  123. <form method="get" action="index.php" name="formSearch" id="formSearch" lay-filter="userform">
  124. <input type="hidden" name="act" value="refill_order" />
  125. <input type="hidden" name="op" value="index" />
  126. <input type="hidden" name="export" value="" />
  127. <input type="hidden" name="mch_notify" value="" />
  128. <input type="hidden" name="order_query" value="" />
  129. <input type="hidden" name="export_stats" value="" />
  130. <input type="hidden" name="fShowStat" value="" />
  131. <input type="hidden" name="no_mchid" value="" />
  132. <input type="hidden" name="no_amount" value="" />
  133. <input type="hidden" name="task_title" value="" />
  134. <input type="hidden" name="exmechs" value="<?php echo $output['exmechs']; ?>" />
  135. <input type="hidden" name="default_no_mch" value="<?php echo $_GET['no_mchid']; ?>" />
  136. <input type="hidden" name="default_no_amount" value="<?php echo $_GET['no_amount']; ?>" />
  137. <table class="tb-type1 noborder search" style="min-width:1400px">
  138. <tbody>
  139. <tr>
  140. <th><label>我方订单号</label></th>
  141. <td><input class="txt2" type="text" name="order_sn" value="<?php echo $_GET['order_sn']; ?>" /></td>
  142. <th><label>客户订单号</label></th>
  143. <td><input class="txt2" type="text" name="mch_order" value="<?php echo $_GET['mch_order']; ?>" /></td>
  144. <th><label>供方订单号</label></th>
  145. <td><input class="txt2" type="text" name="ch_trade_no" value="<?php echo $_GET['ch_trade_no']; ?>" /></td>
  146. </tr>
  147. <tr>
  148. <th><label>客户名称</label></th>
  149. <td class="layui-form" id="mchid_td">
  150. <select name="mchid" id="mchid" class="querySelect mchid" lay-verify="" lay-search lay-filter="mchid">
  151. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  152. <?php foreach ($output['merchant_list'] as $merchant) { ?>
  153. <option class="mchid_name" alpha-data="<?php echo $merchant['alpha'] ?>" value="<?php echo $merchant['mchid'] ?>" <?php if ($_GET['mchid'] == $merchant['mchid']) { ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name']; ?></option>
  154. <?php } ?>
  155. </select>
  156. </td>
  157. <th><label>供方名称</label></th>
  158. <td id="store_id_box">
  159. <div class="layui-form" lay-filter="store_id_select">
  160. <select name="store_id" class="store_id" lay-search style="width:220px;">
  161. <option data-color="<?php echo $provider['opened'] ?>" value=""><?php echo $lang['nc_please_choose']; ?></option>
  162. <?php foreach ($output['provider_list'] as $provider) { ?>
  163. <option value="<?php echo $provider['store_id'] ?>" <?php if ($_GET['store_id'] == $provider['store_id']) { ?>selected<?php } ?> data-color="<?php echo $provider['opened'] ?>" class="textColor"><?php echo $provider['store_name'] ?></option>
  164. <?php } ?>
  165. </select>
  166. </div>
  167. </td>
  168. <th><label>不包含客户</label></th>
  169. <td>
  170. <div id="select_nc"></div>
  171. </td>
  172. <th><label>初始质量</label></th>
  173. <td>
  174. <select name="org_quality" class="querySelect">
  175. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  176. <option value="<?php echo refill\Quality::Normal; ?>" <?php if ($_GET['org_quality'] == refill\Quality::Normal) { ?>selected<?php } ?>>普充(无流水)
  177. </option>
  178. <option value="<?php echo refill\Quality::Quick; ?>" <?php if ($_GET['org_quality'] == refill\Quality::Quick) { ?>selected<?php } ?>>快充
  179. </option>
  180. <option value="<?php echo refill\Quality::CardKey; ?>" <?php if ($_GET['org_quality'] == refill\Quality::CardKey) { ?>selected<?php } ?>>卡密
  181. </option>
  182. <option value="<?php echo refill\Quality::ThirdShop; ?>" <?php if ($_GET['org_quality'] == refill\Quality::ThirdShop) { ?>selected<?php } ?>>三方
  183. </option>
  184. <option value="<?php echo refill\Quality::SlowTwentyFour; ?>" <?php if ($_GET['org_quality'] == refill\Quality::SlowTwentyFour) { ?>selected<?php } ?>>慢24(有流水)
  185. </option>
  186. <option value="<?php echo refill\Quality::SlowSix; ?>" <?php if ($_GET['org_quality'] == refill\Quality::SlowSix) { ?>selected<?php } ?>>慢6
  187. </option>
  188. <option value="<?php echo refill\Quality::SlowTwo; ?>" <?php if ($_GET['org_quality'] == refill\Quality::SlowTwo) { ?>selected<?php } ?>>慢2
  189. </option>
  190. <option value="<?php echo refill\Quality::SlowFortyEight; ?>" <?php if ($_GET['org_quality'] == refill\Quality::SlowFortyEight) { ?>selected<?php } ?>>慢48
  191. </option>
  192. <option value="<?php echo refill\Quality::SlowSeventyTwo; ?>" <?php if ($_GET['org_quality'] == refill\Quality::SlowSeventyTwo) { ?>selected<?php } ?>>慢72
  193. </option>
  194. <option value="<?php echo refill\Quality::Fastest; ?>" <?php if ($_GET['org_quality'] == refill\Quality::Fastest) { ?>selected<?php } ?>>速充
  195. </option>
  196. <option value="<?php echo refill\Quality::DefSuccess; ?>" <?php if ($_GET['org_quality'] == refill\Quality::DefSuccess) { ?>selected<?php } ?>>普充+卡密+快充
  197. </option>
  198. <option value="<?php echo refill\Quality::CardkeyNormalQuick; ?>" <?php if ($_GET['org_quality'] == refill\Quality::CardkeyNormalQuick) { ?>selected<?php } ?>>卡密+普充+快充
  199. </option>
  200. <option value="<?php echo refill\Quality::NormalQuick; ?>" <?php if ($_GET['org_quality'] == refill\Quality::NormalQuick) { ?>selected<?php } ?>>普充+快充
  201. </option>
  202. </select>
  203. </td>
  204. </tr>
  205. <tr>
  206. <th><label>充值卡卡号</label></th>
  207. <td><input class="txt2" type="text" name="card_no" value="<?php echo $_GET['card_no']; ?>" /></td>
  208. <th><label>卡号状态</label></th>
  209. <td>
  210. <select name="cardno_state" class="querySelect">
  211. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  212. <option value="0" <?php if ($_GET['cardno_state'] == '0') { ?>selected<?php } ?>>空号</option>
  213. <option value="1" <?php if ($_GET['cardno_state'] == '1') { ?>selected<?php } ?>>实号</option>
  214. <option value="2" <?php if ($_GET['cardno_state'] == '2') { ?>selected<?php } ?>>停机</option>
  215. <option value="3" <?php if ($_GET['cardno_state'] == '3') { ?>selected<?php } ?>>库无</option>
  216. <option value="4" <?php if ($_GET['cardno_state'] == '4') { ?>selected<?php } ?>>沉默号</option>
  217. <option value="5" <?php if ($_GET['cardno_state'] == '5') { ?>selected<?php } ?>>风险号</option>
  218. </select>
  219. <label>是否携号转网</label>
  220. <select name="is_transfer">
  221. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  222. <option value="1" <?php if ($_GET['is_transfer'] == '1') { ?>selected<?php } ?>>是</option>
  223. <option value="0" <?php if ($_GET['is_transfer'] == '0') { ?>selected<?php } ?>>否</option>
  224. </select>
  225. </td>
  226. <th><label>不包含面额</label></th>
  227. <td>
  228. <div id="denomination"></div>
  229. </td>
  230. <th><label>日期类型</label></th>
  231. <td>
  232. <select name="time_type" class="time_type">
  233. <option value="order_time" <?php if ($_GET['time_type'] == 'order_time') { ?>selected<?php } ?>>下单时间</option>
  234. <option value="notify_time" <?php if ($_GET['time_type'] == 'notify_time') { ?>selected<?php } ?>>回调时间</option>
  235. </select>
  236. <label>导出对象</label>
  237. <select name="export_type" class="export_type">
  238. <option value="merchant" <?php if ($_GET['export_type'] == 'merchant') { ?>selected<?php } ?>>机构</option>
  239. <option value="provider" <?php if ($_GET['export_type'] == 'provider') { ?>selected<?php } ?>>上游</option>
  240. </select>
  241. </td>
  242. </tr>
  243. <tr>
  244. <th><label for="query_start_time">接单时间</label></th>
  245. <td>
  246. <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>" id="startTime" name="query_start_time" autocomplete="off" style="width:120px" />
  247. <label for="query_start_time">~</label>
  248. <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>" id="endTime" name="query_end_time" autocomplete="off" style="width:120px" />
  249. </td>
  250. <th><label>订单状态</label></th>
  251. <td>
  252. <select name="order_state" class="querySelect order_state">
  253. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  254. <option value="10" <?php if ($_GET['order_state'] == '10') { ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
  255. <option value="20" <?php if ($_GET['order_state'] == '20') { ?>selected<?php } ?>><?php echo $lang['order_state_pay']; ?></option>
  256. <option value="30" <?php if ($_GET['order_state'] == '30') { ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
  257. <option value="40" <?php if ($_GET['order_state'] == '40') { ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
  258. <option value="0" <?php if ($_GET['order_state'] == '0') { ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
  259. </select>
  260. <label>充值类型</label>
  261. <select name="card_type" class="querySelect">
  262. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  263. <option value="1" <?php if ($_GET['card_type'] == '1') { ?>selected<?php } ?>>中石油</option>
  264. <option value="2" <?php if ($_GET['card_type'] == '2') { ?>selected<?php } ?>>中石化</option>
  265. <option value="4" <?php if ($_GET['card_type'] == '4') { ?>selected<?php } ?>>中国移动</option>
  266. <option value="5" <?php if ($_GET['card_type'] == '5') { ?>selected<?php } ?>>中国联通</option>
  267. <option value="6" <?php if ($_GET['card_type'] == '6') { ?>selected<?php } ?>>中国电信</option>
  268. <option value="7" <?php if ($_GET['card_type'] == '7') { ?>selected<?php } ?>>增值业务</option>
  269. <option value="oil" <?php if ($_GET['card_type'] == 'oil') { ?>selected<?php } ?>>油费</option>
  270. <option value="phone" <?php if ($_GET['card_type'] == 'phone') { ?>selected<?php } ?>>手机费</option>
  271. </select>
  272. </td>
  273. <th><label>交易面额</label></th>
  274. <td>
  275. <select name="refill_amount" class="querySelect">
  276. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  277. <option value="10" <?php if ($_GET['refill_amount'] == '10') { ?>selected<?php } ?>>10</option>
  278. <option value="20" <?php if ($_GET['refill_amount'] == '20') { ?>selected<?php } ?>>20</option>
  279. <option value="30" <?php if ($_GET['refill_amount'] == '30') { ?>selected<?php } ?>>30</option>
  280. <option value="50" <?php if ($_GET['refill_amount'] == '50') { ?>selected<?php } ?>>50</option>
  281. <option value="100" <?php if ($_GET['refill_amount'] == '100') { ?>selected<?php } ?>>100</option>
  282. <option value="200" <?php if ($_GET['refill_amount'] == '200') { ?>selected<?php } ?>>200</option>
  283. <option value="300" <?php if ($_GET['refill_amount'] == '300') { ?>selected<?php } ?>>300</option>
  284. <option value="500" <?php if ($_GET['refill_amount'] == '500') { ?>selected<?php } ?>>500</option>
  285. <option value="1000" <?php if ($_GET['refill_amount'] == '1000') { ?>selected<?php } ?>>1000</option>
  286. <option value="2000" <?php if ($_GET['refill_amount'] == '2000') { ?>selected<?php } ?>>2000</option>
  287. </select>
  288. <label>有无上游</label>
  289. <select name="have_chname">
  290. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  291. <option value="1" <?php if ($_GET['have_chname'] == '1') { ?>selected<?php } ?>>无上游通道</option>
  292. <option value="2" <?php if ($_GET['have_chname'] == '2') { ?>selected<?php } ?>>有上游通道</option>
  293. </select>
  294. </td>
  295. <th><label>通道质量</label></th>
  296. <td>
  297. <select name="quality" class="querySelect">
  298. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  299. <option value="<?php echo refill\Quality::Normal; ?>" <?php if ($_GET['quality'] == refill\Quality::Normal) { ?>selected<?php } ?>>普充(无流水)
  300. </option>
  301. <option value="<?php echo refill\Quality::Quick; ?>" <?php if ($_GET['quality'] == refill\Quality::Quick) { ?>selected<?php } ?>>快充
  302. </option>
  303. <option value="<?php echo refill\Quality::CardKey; ?>" <?php if ($_GET['quality'] == refill\Quality::CardKey) { ?>selected<?php } ?>>卡密
  304. </option>
  305. <option value="<?php echo refill\Quality::ThirdShop; ?>" <?php if ($_GET['quality'] == refill\Quality::ThirdShop) { ?>selected<?php } ?>>三方
  306. </option>
  307. <option value="<?php echo refill\Quality::SlowTwentyFour; ?>" <?php if ($_GET['quality'] == refill\Quality::SlowTwentyFour) { ?>selected<?php } ?>>慢24(有流水)
  308. </option>
  309. <option value="<?php echo refill\Quality::SlowSix; ?>" <?php if ($_GET['quality'] == refill\Quality::SlowSix) { ?>selected<?php } ?>>慢6
  310. </option>
  311. <option value="<?php echo refill\Quality::SlowTwo; ?>" <?php if ($_GET['quality'] == refill\Quality::SlowTwo) { ?>selected<?php } ?>>慢2
  312. </option>
  313. <option value="<?php echo refill\Quality::SlowFortyEight; ?>" <?php if ($_GET['quality'] == refill\Quality::SlowFortyEight) { ?>selected<?php } ?>>慢48
  314. </option>
  315. <option value="<?php echo refill\Quality::SlowSeventyTwo; ?>" <?php if ($_GET['quality'] == refill\Quality::SlowSeventyTwo) { ?>selected<?php } ?>>慢72
  316. </option>
  317. <option value="<?php echo refill\Quality::Fastest; ?>" <?php if ($_GET['quality'] == refill\Quality::Fastest) { ?>selected<?php } ?>>速充
  318. </option>
  319. <option value="<?php echo refill\Quality::DefSuccess; ?>" <?php if ($_GET['quality'] == refill\Quality::DefSuccess) { ?>selected<?php } ?>>普充+卡密+快充
  320. </option>
  321. <option value="<?php echo refill\Quality::CardkeyNormalQuick; ?>" <?php if ($_GET['quality'] == refill\Quality::CardkeyNormalQuick) { ?>selected<?php } ?>>卡密+普充+快充
  322. </option>
  323. <option value="<?php echo refill\Quality::NormalQuick; ?>" <?php if ($_GET['quality'] == refill\Quality::NormalQuick) { ?>selected<?php } ?>>普充+快充
  324. </option>
  325. </select>
  326. <label>有无流水</label>
  327. <select name="official_status">
  328. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  329. <option value="1" <?php if ($_GET['official_status'] == '1') { ?>selected<?php } ?>>无流水</option>
  330. <option value="2" <?php if ($_GET['official_status'] == '2') { ?>selected<?php } ?>>有流水</option>
  331. </select>
  332. </td>
  333. <td>
  334. <a href="javascript:void(0);" id="ncsubmit" class="btn-search " title="<?php echo $lang['nc_query']; ?>">&nbsp;
  335. </a>
  336. </td>
  337. </tr>
  338. <tr>
  339. <td></td>
  340. <td>
  341. <a href="#" class="btns" onclick="hCopyChannel(event)">
  342. <span><i class="icon-edit"></i>拷贝渠道单号</span>
  343. </a>
  344. <a href="#" class="btns" onclick="hCopyCardNo(event)">
  345. <span><i class="icon-edit"></i>拷贝充值卡号</span>
  346. </a>
  347. <a href="#" class="btns" onclick="hCopyOrderSn(event)">
  348. <span><i class="icon-edit"></i>拷贝订单号</span>
  349. </a>
  350. <a href="#" class="btns" onclick="hCopyMchOrder(event)">
  351. <span><i class="icon-edit"></i>拷贝客户单号</span>
  352. </a>
  353. </td>
  354. <td></td>
  355. <td>
  356. <a href="javascript:void(0);" id="order_query" class="btns">
  357. <span><i class="icon-edit"></i>更新待收货订单状态</span>
  358. </a>
  359. <a href="javascript:void(0);" id="mch_notify" class="btns">
  360. <span><i class="icon-edit"></i>向客户回调</span>
  361. </a>
  362. </td>
  363. <td>
  364. </td>
  365. <td>
  366. <a href="javascript:void(0);" id="ncexport" class="btns">
  367. <span><i class="icon-edit"></i>导出Excel</span>
  368. </a>
  369. <a href="javascript:void(0);" id="ncstat" class="btns">
  370. <span>搜索+统计</span>
  371. </a>
  372. </td>
  373. </tr>
  374. <tr>
  375. <td></td>
  376. <td>
  377. <a href="#" class="btns" id="10_rder">
  378. <span><i class="icon-edit"></i>10分钟订单</span>
  379. </a>
  380. <a href="#" class="btns" id="30_rder">
  381. <span><i class="icon-edit"></i>半小时订单</span>
  382. </a>
  383. <a href="#" class="btns" id="60_rder">
  384. <span><i class="icon-edit"></i>一小时订单</span>
  385. </a>
  386. <a href="#" class="btns" id="0_rder">
  387. <span><i class="icon-edit"></i>当天零点订单</span>
  388. </a>
  389. </td>
  390. </tr>
  391. </tbody>
  392. </table>
  393. </form>
  394. <table class="table tb-type2" style="min-width:1400px">
  395. <tbody>
  396. <tr>
  397. <td>
  398. <ul>
  399. <li>
  400. 队列任务个数: <?php echo $output['dispatcher_queue_length'] ?? 0; ?>
  401. </li>
  402. <li>
  403. 监控队列任务: <?php echo $output['monitor_queue_length'] ?? 0; ?>
  404. </li>
  405. </ul>
  406. </td>
  407. </tr>
  408. </tbody>
  409. </table>
  410. <?php if ($_GET['fShowStat'] == 1) { ?>
  411. <table class="table tb-type2" id="prompt" style="min-width:1400px">
  412. <tbody>
  413. <tr class="space odd">
  414. <th colspan="12">
  415. <div class="title">
  416. <h5>
  417. 金额统计<?php echo $output['ftoday'] == true ? "(今日)" : "" ?></h5><span class="arrow"></span>
  418. </div>
  419. <span style="margin-left: 35px;"><?php echo $output['stat_tip'] ?? ''; ?></span>
  420. </th>
  421. </tr>
  422. <tr>
  423. <td>
  424. <ul>
  425. <div>
  426. <li class="lineLi">总计订单数量:<?php echo $output['stat']['all']['order_count'] ?? 0 ?></li>
  427. <li class="lineLi">总计充值金额:<?php echo $output['stat']['all']['refill_amounts'] ?? 0 ?></li>
  428. <!-- --><?php //if ($output['admin_info']['id'] == 1) { ?>
  429. <!-- <li class="lineLi">总计客户扣款金额:--><?php //echo $output['stat']['all']['mch_amounts'] ?? 0 ?><!--</li>-->
  430. <!-- <li class="lineLi noLineLi">&nbsp;</li>-->
  431. <!-- <li class="lineLi">总计供方扣款金额:--><?php //echo $output['stat']['all']['channel_amounts'] ?? 0 ?><!--</li>-->
  432. <!-- <li class="lineLi">总计利润:--><?php //echo ncPriceFormat($output['stat']['all']['mch_amounts'] - $output['stat']['all']['channel_amounts']) ?><!--</li>-->
  433. <!-- --><?php //} ?>
  434. </div>
  435. <div>
  436. <li class="lineLi">总计充值中订单数量:<?php echo $output['stat']['sending']['order_count'] ?? 0 ?></li>
  437. <li class="lineLi">总计充值中订单金额:<?php echo $output['stat']['sending']['refill_amounts'] ?? 0 ?></li>
  438. <!-- --><?php //if ($output['admin_info']['id'] == 1) { ?>
  439. <!-- <li class="lineLi">总计充值中客户扣款金额:--><?php //echo $output['stat']['sending']['mch_amounts'] ?? 0 ?><!--</li>-->
  440. <!-- <li class="lineLi noLineLi">&nbsp;</li>-->
  441. <!-- <li class="lineLi">总计充值中供方扣款金额:--><?php //echo $output['stat']['sending']['channel_amounts'] ?? 0 ?><!--</li>-->
  442. <!-- <li class="lineLi">总计充值中利润:--><?php //echo ncPriceFormat($output['stat']['sending']['mch_amounts'] - $output['stat']['sending']['channel_amounts']) ?><!--</li>-->
  443. <!-- --><?php //} ?>
  444. </div>
  445. <div>
  446. <li class="lineLi">总计充值成功订单数量:<?php echo $output['stat']['success']['order_count'] ?? 0 ?></li>
  447. <li class="lineLi">总计充值成功订单金额:<?php echo $output['stat']['success']['refill_amounts'] ?? 0 ?></li>
  448. <!-- --><?php //if ($output['admin_info']['id'] == 1) { ?>
  449. <!-- <li class="lineLi">总计充值成功客户扣款金额:--><?php //echo $output['stat']['success']['mch_amounts'] ?? 0 ?><!--</li>-->
  450. <!-- <li class="lineLi noLineLi">&nbsp;</li>-->
  451. <!-- <li class="lineLi">总计充值成功供方扣款金额:--><?php //echo $output['stat']['success']['channel_amounts'] ?? 0 ?><!--</li>-->
  452. <!-- <li class="lineLi">总计充值成功利润:--><?php //echo ncPriceFormat($output['stat']['success']['mch_amounts'] - $output['stat']['success']['channel_amounts']) ?><!--</li>-->
  453. <!-- --><?php //} ?>
  454. </div>
  455. <div>
  456. <li class="lineLi">总计充值失败订单数量:<?php echo $output['stat']['cancel']['order_count'] ?? 0 ?></li>
  457. <li class="lineLi">总计充值失败订单金额:<?php echo $output['stat']['cancel']['refill_amounts'] ?? 0 ?></li>
  458. <!-- --><?php //if ($output['admin_info']['id'] == 1) { ?>
  459. <!-- <li class="lineLi">总计充值失败客户扣款金额:--><?php //echo $output['stat']['cancel']['mch_amounts'] ?? 0 ?><!--</li>-->
  460. <!-- <li class="lineLi noLineLi">&nbsp;</li>-->
  461. <!-- <li class="lineLi">总计充值失败供方扣款金额:--><?php //echo $output['stat']['cancel']['channel_amounts'] ?? 0 ?><!--</li>-->
  462. <!-- <li class="lineLi">总计充值失败利润:--><?php //echo ncPriceFormat($output['stat']['cancel']['mch_amounts'] - $output['stat']['cancel']['channel_amounts']) ?><!--</li>-->
  463. <!-- --><?php //} ?>
  464. </div>
  465. <div>
  466. <li class="lineLi">成功率:
  467. <?php
  468. $count = $output['stat']['success']['order_count'] + $output['stat']['cancel']['order_count'];
  469. if ($count == 0) {
  470. echo '0%';
  471. } else {
  472. $ratio = sprintf("%.2f", $output['stat']['success']['order_count'] / $count);
  473. $ratio = $ratio * 100;
  474. echo "{$ratio}%";
  475. }
  476. ?></li>
  477. </div>
  478. </ul>
  479. </td>
  480. </tr>
  481. </tbody>
  482. </table>
  483. <?php } ?>
  484. <table class="table tb-type2 nobdb" style="min-width:1400px">
  485. <thead>
  486. <tr class="thead">
  487. <th class="align-center">编号</th>
  488. <th class="align-left">机构编号</th>
  489. <th class="align-left">机构名称</th>
  490. <th class="align-left">订单号</th>
  491. <th class="align-left">充值卡号</th>
  492. <th class="align-center">充值卡类型</th>
  493. <th class="align-center">转</th>
  494. <th class="align-center">充值额度</th>
  495. <th class="align-center">接单日期</th>
  496. <th class="align-right">耗时</th>
  497. <th class="align-center">订单状态</th>
  498. <th class="align-left">运营商流水号</th>
  499. <th class="align-left">错误原因</th>
  500. <th class="align-left">客户单号</th>
  501. <th class="align-left">供方名称</th>
  502. <th class="align-left">供方单号</th>
  503. <th class="align-right">次数</th>
  504. <th class="align-center">质量</th>
  505. <th class="align-center">初始质量</th>
  506. <!-- <th class="align-center">扣款金额</th>-->
  507. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  508. </tr>
  509. </thead>
  510. <tbody id="tbody">
  511. <?php if (count($output['order_list']) > 0) { ?>
  512. <?php
  513. foreach ($output['order_list'] as $key => $order) { ?>
  514. <tr class="hover trFlex">
  515. <td class="align-center"><?php echo $key + 1; ?></td>
  516. <td class="align-left"><?php echo $order['mchid']; ?></td>
  517. <td class="align-left"><?php echo $order['mch_name']; ?></td>
  518. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  519. <td class="align-left"><?php echo $order['card_no']; ?></td>
  520. <td class="align-center"><?php echo $order['card_type_text']; ?></td>
  521. <td class="align-center"><?php echo $order['is_transfer']; ?></td>
  522. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  523. <td class="align-center">
  524. <span class="doubleclick" data-order="<?php echo $order['order_sn']; ?>">
  525. <?php echo date('Y-m-d H:i:s', $order['order_time']); ?>
  526. </span>
  527. </td>
  528. <td class="align-right">
  529. <?php if (empty($order['notify_time'])) {
  530. if ($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
  531. ?>
  532. <span style="color: #fd9d0e"><?php echo $order['diff_time_text'] ?></span>
  533. <?php } elseif ($order['diff_time'] > 3600) { ?>
  534. <span style="color: #f30707"><?php echo $order['diff_time_text'] ?></span>
  535. <?php } else { ?>
  536. <?php echo $order['diff_time_text'] ?>
  537. <?php } ?>
  538. <?php } else { ?>
  539. <?php echo $order['diff_time_text'] ?>
  540. <?php } ?>
  541. </td>
  542. <td class="align-center"><?php echo orderState($order); ?></td>
  543. <td class="align-left"><?php echo $order['official_sn']; ?></td>
  544. <td class="align-left"><?php echo $order['err_msg']; ?></td>
  545. <td class="align-left"><?php echo $order['mch_order']; ?></td>
  546. <td class="align-left"><?php echo $order['channel_name']; ?></td>
  547. <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
  548. <td class="align-right"><?php echo $order['commit_times']; ?></td>
  549. <td class="align-center"><?php echo $order['quality_text']; ?></td>
  550. <td class="align-center"><?php echo $order['org_quality_text']; ?></td>
  551. <!-- <td class="align-center">--><?php //echo $order['mch_amount'];
  552. ?>
  553. <!--</td>-->
  554. <td class="align-center" id="Manual">
  555. <?php if (($order['order_state'] == ORDER_STATE_CANCEL || $order['order_state'] == ORDER_STATE_SUCCESS) && $order['is_retrying'] == 0) { ?>
  556. <a class="covercolor" href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
  557. 回调</a>
  558. <?php } ?>
  559. <?php if ($order['order_state'] == ORDER_STATE_SEND) { ?>
  560. <a class="covercolor" id="cancel" order_id="<?php echo $order['order_id']; ?>" href="#">
  561. 手动失败</a>
  562. |
  563. <a class="covercolor" id="success" order_id="<?php echo $order['order_id']; ?>" href="#">
  564. 手动成功</a>
  565. <?php } ?>
  566. <?php if ($order['card_type'] == mtopcard\ThirdRefillCard) { ?>
  567. |
  568. <a class="covercolor" href="#" id="examine" data-order="<?php echo $order['order_id']; ?>">
  569. 查看</a>
  570. <?php } ?>
  571. </td>
  572. </tr>
  573. <?php } ?>
  574. <?php } else { ?>
  575. <tr class="no_data">
  576. <td colspan="20"><?php echo $lang['nc_no_record']; ?></td>
  577. </tr>
  578. <?php } ?>
  579. </tbody>
  580. <tfoot>
  581. <tr class="tfoot">
  582. <td colspan="20" id="dataFuncs">
  583. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  584. </td>
  585. </tr>
  586. </tfoot>
  587. </table>
  588. </div>
  589. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  590. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  591. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
  592. <link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css" />
  593. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/js/xm-select.js"></script>
  594. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/layer.js"></script>
  595. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/refill/moment-with-locales.js"></script>
  596. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/layui.js"></script>
  597. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css" />
  598. <script type="text/javascript">
  599. $(function() {
  600. layui.use('form', function() {
  601. var form = layui.form;
  602. form.render('select', 'store_id_select');
  603. })
  604. function initialHighlight(id) {
  605. const $options = $('.mchid_name');
  606. const attrs = [];
  607. for (let i = 0; i < $options.length; i++) {
  608. attrs.push({
  609. alpha: $options.eq(i).attr('alpha-data'),
  610. value: $options.eq(i).attr('value')
  611. })
  612. }
  613. var highlight = [];
  614. var currentLetter = '';
  615. for (let i = 0; i < attrs.length; i++) {
  616. if (currentLetter == attrs[i].alpha) {
  617. continue;
  618. } else {
  619. highlight.push(attrs[i]);
  620. currentLetter = attrs[i].alpha;
  621. }
  622. }
  623. const $realDom = $(id).siblings('.layui-form-select').find('dd');
  624. for (let i = 0; i < highlight.length; i++) {
  625. for (let j = 0; j < $realDom.length; j++) {
  626. if (highlight[i].value == $realDom.eq(j).attr('lay-value')) {
  627. let text = $realDom.eq(j).text();
  628. $realDom.eq(j).html('<span class="highlightLetter-' + i + '-' + j + '" style="color:red;position:relative;">' + text.substring(0, 1) + '</span>' + text.substring(1, text.length))
  629. $('<style type="text/css">.highlightLetter-' + i + '-' + j + ':before{ content:"' + highlight[i].alpha.toLocaleUpperCase() + '";position:absolute;right:4px;top:-10px;color:#09C;width:12px;height:12px;line-height:12px;text-align:center;}</style>').appendTo('head');
  630. }
  631. }
  632. }
  633. console.log('highlight', highlight);
  634. }
  635. initialHighlight('#mchid');
  636. let EntTime = localStorage.getItem('Endtime')
  637. $('#endTime').val(EntTime)
  638. localStorage.clear();
  639. //查看
  640. $('#examine').click(function() {
  641. let order_id = $(this).attr('data-order')
  642. $.get('index.php?act=refill_order&op=refill_third_info', {
  643. order_id: order_id
  644. }, function(data) {
  645. data = JSON.parse(data)
  646. if (data.state == 1) {
  647. let contentArr = []
  648. contentArr.push(`单号:${data.data.order_sn}`)
  649. contentArr.push(`产品编码:${data.data.pcode}`)
  650. contentArr.push(`渠道编码:${data.data.chcode}`)
  651. contentArr.push(`充值数量:${data.data.quantity}`)
  652. if (data.data.user_account) {
  653. contentArr.push(`充值账号:${data.data.user_account}`)
  654. contentArr.push(`账号类型:${data.data.account_type_text}`)
  655. } else {
  656. contentArr.push(`卡密验证状态:${data.data.ret_state_text}`)
  657. contentArr.push(`卡密信息:${data.data.card_info}`)
  658. }
  659. let content = ''
  660. for (let index = 0; index < contentArr.length; index++) {
  661. content += `<p>${contentArr[index]}</p>`
  662. }
  663. layer.open({
  664. title: "查看",
  665. content: content
  666. });
  667. }
  668. })
  669. })
  670. //双击
  671. $('.doubleclick').dblclick(function() {
  672. let order_sn = $(this).attr('data-order')
  673. $.get('index.php?act=refill_order&op=showOrders', {
  674. order_sn: order_sn
  675. }, function(data) {
  676. data = JSON.parse(data)
  677. if (data.state == 1) {
  678. let order_item = data.data
  679. let html = '';
  680. for (let i = 0; i < order_item.length; i++) {
  681. let item = order_item[i];
  682. html += `
  683. <tr>
  684. <td class="db-center">${item.order_sn}</td>
  685. <td class="db-center">${item.commit_time_text}</td>
  686. <td class="db-center">${item.notify_time_text}</td>
  687. <td class="db-center">${item.diff_time_text}</td>
  688. <td class="db-center">${item.order_state_text}</td>
  689. <td class="db-center">${item.channel_name}</td>
  690. <td class="db-center">${item.err_msg}</td>
  691. <td class="db-center">${item.close_reason}</td>
  692. <td class="db-center">${item.quality_text}</td>
  693. <tr> `
  694. }
  695. let content = `<table>
  696. <thead>
  697. <tr>
  698. <th class="db-right">订单号</th>
  699. <th class="db-right">提单日期</th>
  700. <th class="db-right">回调日期</th>
  701. <th class="db-right">耗时</th>
  702. <th class="db-right">订单状态</th>
  703. <th class="db-right">供方名称</th>
  704. <th class="db-right">错误原因(充值)</th>
  705. <th class="db-right">错误原因(订单)</th>
  706. <th class="db-right">订单质量</th>
  707. </tr>
  708. </thead>
  709. <tbody>${html}</tbody>
  710. </table>`
  711. layer.open({
  712. title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
  713. content: content
  714. });
  715. } else {
  716. alert("没有此订单");
  717. }
  718. })
  719. })
  720. // 手动失败 成功
  721. $('#Manual #cancel').each(function(index, item) {
  722. $(item).click(function() {
  723. let order_id = $(this).attr("order_id")
  724. layer.confirm('您确实要手动失败', {
  725. btn: ['确定', '取消'],
  726. title: '手动失败'
  727. }, function() {
  728. window.location.href = `index.php?act=merchant&op=notify_manual_merchant&type=cancel&order_id= ${order_id}`
  729. }, function() {})
  730. })
  731. })
  732. // 手动成功
  733. $('#Manual #success').each(function(index, item) {
  734. $(item).click(function() {
  735. let order_id = $(this).attr("order_id")
  736. layer.confirm('您确实要手动成功', {
  737. btn: ['确定', '取消'],
  738. title: '手动成功'
  739. }, function() {
  740. window.location.href = `index.php?act=merchant&op=notify_manual_merchant&type=success&order_id= ${order_id}`
  741. }, function() {})
  742. })
  743. })
  744. let Base64 = {
  745. encode(str) {
  746. // first we use encodeURIComponent to get percent-encoded UTF-8,
  747. // then we convert the percent encodings into raw bytes which
  748. // can be fed into btoa.
  749. return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
  750. function toSolidBytes(match, p1) {
  751. return String.fromCharCode('0x' + p1);
  752. }));
  753. },
  754. decode(str) {
  755. // Going backwards: from bytestream, to percent-encoding, to original string.
  756. return decodeURIComponent(atob(str).split('').map(function(c) {
  757. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  758. }).join(''));
  759. }
  760. };
  761. // 获取不包含客户
  762. let exclude_merchant
  763. let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
  764. let exmechs = $('input[name="exmechs"]').val();
  765. $('input[name="exmechs"]').val('');
  766. exmechs = Base64.decode(exmechs)
  767. let data = JSON.parse(exmechs)
  768. if (default_no_mch) {
  769. for (let index = 0; index < default_no_mch.length; index++) {
  770. for (let j = 0; j < data.length; j++) {
  771. if (default_no_mch[index] == data[j].value) {
  772. data[j].selected = true
  773. }
  774. }
  775. }
  776. }
  777. exclude_merchant = xmSelect.render({
  778. el: '#select_nc',
  779. size: 'mini',
  780. filterable: true,
  781. autoRow: true,
  782. height: '500px',
  783. style: {
  784. minHeight: '27px',
  785. lineHeight: '27px',
  786. marginLeft: '4px'
  787. },
  788. language: 'zn',
  789. data: data
  790. })
  791. // 获取包含面值
  792. let denomination
  793. let default_no_amount = $('input[name="default_no_amount"]').val().split(',');
  794. let datas = [{
  795. name: '10',
  796. value: 10
  797. },
  798. {
  799. name: '20',
  800. value: 20
  801. },
  802. {
  803. name: '30',
  804. value: 30
  805. },
  806. {
  807. name: '50',
  808. value: 50
  809. },
  810. {
  811. name: '100',
  812. value: 100
  813. },
  814. {
  815. name: '200',
  816. value: 200
  817. },
  818. {
  819. name: '300',
  820. value: 300
  821. },
  822. {
  823. name: '500',
  824. value: 500
  825. },
  826. {
  827. name: '1000',
  828. value: 1000
  829. },
  830. {
  831. name: '2000',
  832. value: 2000
  833. },
  834. ]
  835. if (default_no_amount) {
  836. for (let index = 0; index < default_no_amount.length; index++) {
  837. for (let j = 0; j < datas.length; j++) {
  838. if (default_no_amount[index] == datas[j].value) {
  839. datas[j].selected = true
  840. }
  841. }
  842. }
  843. }
  844. denomination = xmSelect.render({
  845. el: '#denomination',
  846. size: 'mini',
  847. filterable: true,
  848. autoRow: true,
  849. height: '500px',
  850. style: {
  851. minHeight: '27px',
  852. lineHeight: '27px',
  853. marginLeft: '4px'
  854. },
  855. language: 'zn',
  856. data: datas
  857. })
  858. $('#ncsubmit').click(function() {
  859. loadIndex = layer.load();
  860. $('input[name="op"]').val('index');
  861. let selectArr = exclude_merchant.getValue();
  862. let selectStr = ''
  863. for (let i = 0; i < selectArr.length; i++) {
  864. selectStr += selectArr[i].value + ','
  865. }
  866. selectStr = selectStr.substr(0, selectStr.length - 1)
  867. let nominalAll = denomination.getValue();
  868. let nominalStr = ''
  869. for (let i = 0; i < nominalAll.length; i++) {
  870. nominalStr += nominalAll[i].value + ','
  871. }
  872. nominalStr = nominalStr.substr(0, nominalStr.length - 1)
  873. $('input[name="no_mchid"]').val(selectStr);
  874. $('input[name="no_amount"]').val(nominalStr);
  875. $('#formSearch').submit();
  876. let Endtime = $('#endTime').val()
  877. localStorage.setItem('Endtime', Endtime)
  878. });
  879. // 导出
  880. $('#ncexport').click(function() {
  881. $('input[name="export"]').val('1');
  882. $('input[name="op"]').val('index');
  883. // 不包含客户
  884. let selectArr = exclude_merchant.getValue();
  885. let selectStr = ''
  886. for (let i = 0; i < selectArr.length; i++) {
  887. selectStr += selectArr[i].value + ','
  888. }
  889. selectStr = selectStr.substr(0, selectStr.length - 1)
  890. $('input[name="no_mchid"]').val(selectStr);
  891. let time_type = $('.time_type').find('option:selected').text();
  892. let mchid = $('#mchid[name=mchid]').find('option:selected').html()
  893. let store_id = $('.store_id').find('option:selected').text();
  894. let order_state = $('.order_state').find('option:selected').text();
  895. let startTime = $('#startTime').val()
  896. let endTime = $('#endTime').val()
  897. let str = time_type + ` : ${startTime}-${endTime}`
  898. if (mchid != '请选择') {
  899. str = str + `,客户名称:${mchid}`
  900. }
  901. if (store_id != '请选择') {
  902. str = str + `,供方名称:${store_id}`
  903. }
  904. if (order_state != '请选择') {
  905. str = str + `,订单状态:${order_state}`
  906. }
  907. $('input[name="task_title"]').val(str);
  908. $('#formSearch').submit();
  909. $('input[name="export"]').val('');
  910. let Endtime = $('#endTime').val()
  911. localStorage.setItem('Endtime', Endtime)
  912. layer.load();
  913. })
  914. //搜索+统计
  915. $('#ncstat').click(function() {
  916. layer.load();
  917. $('input[name="fShowStat"]').val('1');
  918. $('input[name="op"]').val('index');
  919. // 不包含客户
  920. let selectArr = exclude_merchant.getValue();
  921. let selectStr = ''
  922. for (let i = 0; i < selectArr.length; i++) {
  923. selectStr += selectArr[i].value + ','
  924. }
  925. selectStr = selectStr.substr(0, selectStr.length - 1)
  926. // 不包含面值
  927. let nominalAll = denomination.getValue();
  928. let nominalStr = ''
  929. for (let i = 0; i < nominalAll.length; i++) {
  930. nominalStr += nominalAll[i].value + ','
  931. }
  932. nominalStr = nominalStr.substr(0, nominalStr.length - 1)
  933. $('input[name="no_mchid"]').val(selectStr);
  934. $('input[name="no_amount"]').val(nominalStr);
  935. $('#formSearch').submit();
  936. $('input[name="fShowStat"]').val('');
  937. let Endtime = $('#endTime').val()
  938. localStorage.setItem('Endtime', Endtime)
  939. })
  940. // 向客户回调
  941. $('#mch_notify').click(function() {
  942. layer.load();
  943. $('input[name="mch_notify"]').val('1');
  944. $('input[name="op"]').val('index');
  945. // 不包含客户
  946. let selectArr = exclude_merchant.getValue();
  947. let selectStr = ''
  948. for (let i = 0; i < selectArr.length; i++) {
  949. selectStr += selectArr[i].value + ','
  950. }
  951. selectStr = selectStr.substr(0, selectStr.length - 1)
  952. $('input[name="no_mchid"]').val(selectStr);
  953. $('#formSearch').submit();
  954. $('input[name="mch_notify"]').val('');
  955. })
  956. // 更新待收货状态
  957. $('#order_query').click(function() {
  958. layer.load();
  959. $('input[name="order_query"]').val('1');
  960. $('input[name="op"]').val('index');
  961. // 不包含客户
  962. let selectArr = exclude_merchant.getValue();
  963. let selectStr = ''
  964. for (let i = 0; i < selectArr.length; i++) {
  965. selectStr += selectArr[i].value + ','
  966. }
  967. selectStr = selectStr.substr(0, selectStr.length - 1)
  968. $('input[name="no_mchid"]').val(selectStr);
  969. $('#formSearch').submit();
  970. $('input[name="order_query"]').val('');
  971. })
  972. // 日期选择器
  973. laydate.render({
  974. elem: '#startTime',
  975. type: 'datetime',
  976. trigger: 'click'
  977. });
  978. laydate.render({
  979. elem: '#endTime',
  980. type: 'datetime',
  981. trigger: 'click'
  982. });
  983. // 表格hover时背景
  984. $('.trFlex').each(function() {
  985. $(this).hover(function() {
  986. $(this)[0].style.backgroundColor = '#cbe9f3'
  987. }, function() {
  988. $(this)[0].style.backgroundColor = '#fff'
  989. })
  990. })
  991. // 供方名称颜色
  992. $('.textColor').each(function() {
  993. let color = $(this).attr('data-color')
  994. if (color == '1') {
  995. $(this).css('color', 'green')
  996. } else {
  997. $(this).css('color', 'red')
  998. }
  999. })
  1000. // 十分钟订单
  1001. $('#10_rder').click(function() {
  1002. let date = new Date()
  1003. let time = date.getTime() - 600000
  1004. let str = moment(time).format("YYYY-M-DD HH:mm:ss")
  1005. $('#startTime').val(str)
  1006. });
  1007. // 30分钟订单
  1008. $('#30_rder').click(function() {
  1009. let date = new Date()
  1010. let time = date.getTime() - 1800000
  1011. let str = moment(time).format("YYYY-M-DD HH:mm:ss")
  1012. $('#startTime').val(str)
  1013. });
  1014. // 60分钟订单
  1015. $('#60_rder').click(function() {
  1016. let date = new Date()
  1017. let time = date.getTime() - 3600000
  1018. let str = moment(time).format("YYYY-M-DD HH:mm:ss")
  1019. $('#startTime').val(str)
  1020. });
  1021. // 当前零点钟订单
  1022. $('#0_rder').click(function() {
  1023. // let date = new Date()
  1024. // let time = date.getTime()
  1025. // let str = moment(time).format("YYYY-MM-DD HH:mm:ss")
  1026. // let start = moment(str,"YYYY-M-DD")
  1027. // str = start.format("YYYY-MM-DD HH:mm:ss")
  1028. let str = moment().startOf('day').format('YYYY-MM-DD HH:mm:ss');
  1029. $('#startTime').val(str)
  1030. })
  1031. });
  1032. function copy_some(col) {
  1033. let str = ''
  1034. $('#tbody tr').each(function() {
  1035. let res = $(this).find('td').eq(col).text()
  1036. str += res + '\n'
  1037. })
  1038. let oInput = document.createElement("textarea");
  1039. oInput.style.border = "0 none";
  1040. oInput.style.color = "transparent";
  1041. oInput.value = str;
  1042. document.body.appendChild(oInput);
  1043. oInput.select(); // 选择对象
  1044. document.execCommand("Copy"); // 执行浏览器复制命令
  1045. oInput.parentNode.removeChild(oInput)
  1046. }
  1047. function hCopyChannel(e) {
  1048. copy_some(15)
  1049. }
  1050. function hCopyCardNo(e) {
  1051. copy_some(4)
  1052. }
  1053. function hCopyOrderSn(e) {
  1054. copy_some(3)
  1055. }
  1056. function hCopyMchOrder(e) {
  1057. copy_some(13)
  1058. }
  1059. </script>