refill.order.index.php 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901
  1. <style>
  2. th label { display: inline-block;width: 60px; }
  3. .lineLi {
  4. min-width: 150px;
  5. font-size: 12px;
  6. color:#000;
  7. }
  8. #prompt ul .noLineLi {
  9. background:none;
  10. }
  11. #prompt div {
  12. display:inline-block;
  13. background:none
  14. }
  15. #prompt ul .lineLi {
  16. color:#000;
  17. }
  18. #selest_nc {
  19. width:220px
  20. }
  21. tbody {
  22. font-size: 12px;
  23. }
  24. .layui-form-select .layui-input {
  25. padding: 13px 5px;
  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: 883%!important;
  35. max-height: 280px!important;
  36. padding: 14px 0!important;
  37. }
  38. .layui-form-select {
  39. width: 45%;
  40. }
  41. .layui-select-title {
  42. width: 100%;
  43. }
  44. .layui-form-select .layui-input {
  45. padding-left: 11px;
  46. }
  47. .page .fixed-bar .item-title h3 {
  48. margin-top:18px !important;
  49. margin-bottom:10px !important;
  50. font-weight:700 !important;
  51. }
  52. .tab-base li span {
  53. font-size:12px !important;
  54. }
  55. .layui-form-select .layui-input {
  56. height:26px;
  57. }
  58. input::placeholder{
  59. color:#333;
  60. }
  61. .xm-tips{
  62. color: #333!important;
  63. font-size: 12px;
  64. }
  65. .layui-form-select dl dd.layui-this{
  66. display: none;
  67. }
  68. .layui-form-select dl dd {
  69. cursor: pointer;
  70. width: 130px;
  71. }
  72. .db-right {
  73. padding-right: 134px!important;
  74. border-bottom: 1px solid #ccc;
  75. }
  76. .db-center {
  77. padding: 9px 0;
  78. border-bottom: 1px solid #ccc;
  79. }
  80. .db-top {
  81. padding: 0 30px;
  82. }
  83. </style>
  84. <?php defined('InShopNC') or exit('Access Invalid!'); ?>
  85. <div class="page">
  86. <div class="fixed-bar">
  87. <div class="item-title">
  88. <h3>订单列表</h3>
  89. <ul class="tab-base">
  90. <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
  91. </ul>
  92. </div>
  93. </div>
  94. <div class="fixed-empty"></div>
  95. <form method="get" action="index.php" name="formSearch" id="formSearch" >
  96. <input type="hidden" name="act" value="refill_order"/>
  97. <input type="hidden" name="op" value="index"/>
  98. <input type="hidden" name="export" value=""/>
  99. <input type="hidden" name="mch_notify" value=""/>
  100. <input type="hidden" name="order_query" value=""/>
  101. <input type="hidden" name="export_stats" value=""/>
  102. <input type="hidden" name="fShowStat" value=""/>
  103. <input type="hidden" name="no_mchid" value=""/>
  104. <input type="hidden" name="default_no_mch" value="<?php echo $_GET['no_mchid']; ?>"/>
  105. <table class="tb-type1 noborder search" style="min-width:1400px">
  106. <tbody>
  107. <tr>
  108. <th><label>我方订单号</label></th>
  109. <td><input class="txt2" type="text" name="order_sn" value="<?php echo $_GET['order_sn']; ?>"/></td>
  110. <th><label>客户订单号</label></th>
  111. <td><input class="txt2" type="text" name="mch_order" value="<?php echo $_GET['mch_order']; ?>"/></td>
  112. <th><label>供方订单号</label></th>
  113. <td><input class="txt2" type="text" name="ch_trade_no" value="<?php echo $_GET['ch_trade_no']; ?>"/></td>
  114. </tr>
  115. <tr>
  116. <th><label>客户名称</label></th>
  117. <td class="layui-form">
  118. <select name="mchid" class="querySelect" lay-verify="" lay-search>
  119. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  120. <?php foreach($output['merchant_list'] as $merchant){?>
  121. <option value="<?php echo $merchant['mchid']?>"
  122. <?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name'];?>
  123. </option>
  124. <?php }?>
  125. </select>
  126. </td>
  127. <th><label>供方名称</label></th>
  128. <td >
  129. <select name="store_id" class="" >
  130. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  131. <?php foreach($output['provider_list'] as $provider){?>
  132. <option value="<?php echo $provider['store_id']?>"
  133. <?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?>
  134. </option>
  135. <?php }?>
  136. </select>
  137. </td>
  138. <th><label>不包含客户</label></th>
  139. <td>
  140. <div id="selest_nc"></div>
  141. </td>
  142. </tr>
  143. <tr>
  144. <th><label>充值卡卡号</label></th>
  145. <td><input class="txt2" type="text" name="card_no" value="<?php echo $_GET['card_no']; ?>"/></td>
  146. </tr>
  147. <tr>
  148. <th><label for="query_start_time">下单时间</label></th>
  149. <td>
  150. <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
  151. id="startTime" name="query_start_time" autocomplete="off" style="width:120px" />
  152. <label for="query_start_time">~</label>
  153. <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
  154. id="endTime" name="query_end_time" autocomplete="off" style="width:120px" /></td>
  155. <th><label>订单状态</label></th>
  156. <td>
  157. <select name="order_state" class="querySelect">
  158. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  159. <option value="10"
  160. <?php if ($_GET['order_state'] == '10'){ ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
  161. <option value="20"
  162. <?php if ($_GET['order_state'] == '20'){ ?>selected<?php } ?>><?php echo $lang['order_state_pay']; ?></option>
  163. <option value="30"
  164. <?php if ($_GET['order_state'] == '30'){ ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
  165. <option value="40"
  166. <?php if ($_GET['order_state'] == '40'){ ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
  167. <option value="0"
  168. <?php if ($_GET['order_state'] == '0'){ ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
  169. </select>
  170. <label>充值类型</label>
  171. <select name="card_type" class="querySelect">
  172. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  173. <option value="1"
  174. <?php if ($_GET['card_type'] == '1'){ ?>selected<?php } ?>>中石油</option>
  175. <option value="2"
  176. <?php if ($_GET['card_type'] == '2'){ ?>selected<?php } ?>>中石化</option>
  177. <option value="4"
  178. <?php if ($_GET['card_type'] == '4'){ ?>selected<?php } ?>>中国移动</option>
  179. <option value="5"
  180. <?php if ($_GET['card_type'] == '5'){ ?>selected<?php } ?>>中国联通</option>
  181. <option value="6"
  182. <?php if ($_GET['card_type'] == '6'){ ?>selected<?php } ?>>中国电信</option>
  183. <option value="7"
  184. <?php if ($_GET['card_type'] == '7'){ ?>selected<?php } ?>>增值业务</option>
  185. <option value="oil"
  186. <?php if ($_GET['card_type'] == 'oil'){ ?>selected<?php } ?>>油费</option>
  187. <option value="phone"
  188. <?php if ($_GET['card_type'] == 'phone'){ ?>selected<?php } ?>>手机费</option>
  189. </select>
  190. </td>
  191. <th><label>交易面额</label></th>
  192. <td>
  193. <select name="refill_amount" class="querySelect">
  194. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  195. <option value="10"
  196. <?php if ($_GET['refill_amount'] == '10'){ ?>selected<?php } ?>>10</option>
  197. <option value="20"
  198. <?php if ($_GET['refill_amount'] == '20'){ ?>selected<?php } ?>>20</option>
  199. <option value="30"
  200. <?php if ($_GET['refill_amount'] == '30'){ ?>selected<?php } ?>>30</option>
  201. <option value="50"
  202. <?php if ($_GET['refill_amount'] == '50'){ ?>selected<?php } ?>>50</option>
  203. <option value="100"
  204. <?php if ($_GET['refill_amount'] == '100'){ ?>selected<?php } ?>>100</option>
  205. <option value="200"
  206. <?php if ($_GET['refill_amount'] == '200'){ ?>selected<?php } ?>>200</option>
  207. <option value="300"
  208. <?php if ($_GET['refill_amount'] == '300'){ ?>selected<?php } ?>>300</option>
  209. <option value="500"
  210. <?php if ($_GET['refill_amount'] == '500'){ ?>selected<?php } ?>>500</option>
  211. <option value="1000"
  212. <?php if ($_GET['refill_amount'] == '1000'){ ?>selected<?php } ?>>1000</option>
  213. <option value="2000"
  214. <?php if ($_GET['refill_amount'] == '2000'){ ?>selected<?php } ?>>2000</option>
  215. </select>
  216. <label>充值耗时</label>
  217. <select name="time" class="querySelect">
  218. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  219. <option value="1"
  220. <?php if ($_GET['time'] == '1'){ ?>selected<?php } ?>>耗时半小时</option>
  221. <option value="2"
  222. <?php if ($_GET['time'] == '2'){ ?>selected<?php } ?>>耗时一小时</option>
  223. </select>
  224. </td>
  225. <th><label>通道质量</label></th>
  226. <td>
  227. <select name="quality" class="querySelect">
  228. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  229. <option value="1"
  230. <?php if ($_GET['quality'] == '1'){ ?>selected<?php } ?>>普充(无流水)</option>
  231. <option value="2"
  232. <?php if ($_GET['quality'] == '2'){ ?>selected<?php } ?>>快充</option>
  233. <option value="3"
  234. <?php if ($_GET['quality'] == '3'){ ?>selected<?php } ?>>卡密</option>
  235. <option value="4"
  236. <?php if ($_GET['quality'] == '4'){ ?>selected<?php } ?>>三方</option>
  237. <option value="5"
  238. <?php if ($_GET['quality'] == '5'){ ?>selected<?php } ?>>慢24(有流水)</option>
  239. <option value="6"
  240. <?php if ($_GET['quality'] == '6'){ ?>selected<?php } ?>>慢6</option>
  241. <option value="7"
  242. <?php if ($_GET['quality'] == '7'){ ?>selected<?php } ?>>慢2</option>
  243. <option value="8"
  244. <?php if ($_GET['quality'] == '8'){ ?>selected<?php } ?>>慢48</option>
  245. <option value="9"
  246. <?php if ($_GET['quality'] == '9'){ ?>selected<?php } ?>>慢72</option>
  247. </select>
  248. <label>有无流水</label>
  249. <select name="official_status">
  250. <option value=""><?php echo $lang['nc_please_choose']; ?></option>
  251. <option value="1"
  252. <?php if ($_GET['official_status'] == '1'){ ?>selected<?php } ?>>无流水</option>
  253. <option value="2"
  254. <?php if ($_GET['official_status'] == '2'){ ?>selected<?php } ?>>有流水</option>
  255. </select>
  256. </td>
  257. <td>
  258. <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
  259. title="<?php echo $lang['nc_query']; ?>">&nbsp;
  260. </a>
  261. </td>
  262. </tr>
  263. <tr>
  264. <td></td>
  265. <td>
  266. <a href="#" class="btns" onclick="hCopyChannel(event)">
  267. <span><i class="icon-edit"></i>拷贝渠道单号</span>
  268. </a>
  269. <a href="#" class="btns" onclick="hCopyCardNo(event)">
  270. <span><i class="icon-edit"></i>拷贝充值卡号</span>
  271. </a>
  272. <a href="#" class="btns" onclick="hCopyOrderSn(event)">
  273. <span><i class="icon-edit"></i>拷贝订单号</span>
  274. </a>
  275. </td>
  276. <td></td>
  277. <td>
  278. <a href="javascript:void(0);" id="order_query" class="btns" >
  279. <span><i class="icon-edit"></i>更新待收货订单状态</span>
  280. </a>
  281. <a href="javascript:void(0);" id="mch_notify" class="btns" >
  282. <span><i class="icon-edit"></i>向客户回调</span>
  283. </a>
  284. </td>
  285. <td>
  286. </td>
  287. <td>
  288. <a href="javascript:void(0);" id="ncexport" class="btns" >
  289. <span><i class="icon-edit"></i>搜索导出</span>
  290. </a>
  291. <a href="javascript:void(0);" id="ncexport_stats" class="btns" >
  292. <span><i class="icon-edit"></i>对账导出</span>
  293. </a>
  294. <a href="javascript:void(0);" id="ncstat" class="btns">
  295. <span>搜索+统计</span>
  296. </a>
  297. </td>
  298. <!-- <td>-->
  299. <!-- <a href="index.php?act=refill_order&op=batch_dispose" class="btns" >-->
  300. <!-- <span><i class="icon-edit"></i>成功抱阳</span>-->
  301. <!-- </a>-->
  302. <!-- </td>-->
  303. </tr>
  304. <tr>
  305. <td></td>
  306. <td>
  307. <a href="#" class="btns" id="10_rder">
  308. <span><i class="icon-edit"></i>10分钟订单</span>
  309. </a>
  310. <a href="#" class="btns" id="30_rder">
  311. <span><i class="icon-edit"></i>半小时订单</span>
  312. </a>
  313. <a href="#" class="btns" id="60_rder">
  314. <span><i class="icon-edit"></i>一小时订单</span>
  315. </a>
  316. <a href="#" class="btns" id="0_rder">
  317. <span><i class="icon-edit"></i>当天零点订单</span>
  318. </a>
  319. </td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. </form>
  324. <table class="table tb-type2" style="min-width:1400px">
  325. <tbody>
  326. <tr>
  327. <td>
  328. <ul>
  329. <li>
  330. 队列任务个数: <?php echo $output['dispatcher_queue_length'] ?? 0;?>
  331. </li>
  332. </ul>
  333. </td>
  334. </tr>
  335. </tbody>
  336. </table>
  337. <?php if($_GET['fShowStat'] == 1){?>
  338. <table class="table tb-type2" id="prompt" style="min-width:1400px">
  339. <tbody>
  340. <tr class="space odd">
  341. <th colspan="12"><div class="title"><h5>
  342. 金额统计<?php echo $output['ftoday'] == true ? "(今日)" : "" ?></h5><span class="arrow"></span></div></th>
  343. </tr>
  344. <tr>
  345. <td>
  346. <ul>
  347. <?php if(COMPANY_NAME === 'LZKJ_COMPANY' || $output['admin_info']['id'] == 1){?>
  348. <div>
  349. <li class="lineLi">总计订单数量:<?php echo $output['stat']['all']['order_count'] ?? 0?></li>
  350. <li class="lineLi">总计充值金额:<?php echo $output['stat']['all']['refill_amounts'] ?? 0?></li>
  351. <li class="lineLi">总计客户扣款金额:<?php echo $output['stat']['all']['mch_amounts'] ?? 0?></li>
  352. <li class="lineLi noLineLi">&nbsp;</li>
  353. <li class="lineLi">总计供方扣款金额:<?php echo $output['stat']['all']['channel_amounts'] ?? 0?></li>
  354. <li class="lineLi">总计利润:<?php echo ncPriceFormat($output['stat']['all']['mch_amounts'] - $output['stat']['all']['channel_amounts'])?></li>
  355. </div>
  356. <div>
  357. <li class="lineLi">总计充值中订单数量:<?php echo $output['stat']['sending']['order_count'] ?? 0?></li>
  358. <li class="lineLi">总计充值中订单金额:<?php echo $output['stat']['sending']['refill_amounts'] ?? 0?></li>
  359. <li class="lineLi">总计充值中客户扣款金额:<?php echo $output['stat']['sending']['mch_amounts'] ?? 0?></li>
  360. <li class="lineLi noLineLi">&nbsp;</li>
  361. <li class="lineLi">总计充值中供方扣款金额:<?php echo $output['stat']['sending']['channel_amounts'] ?? 0?></li>
  362. <li class="lineLi">总计充值中利润:<?php echo ncPriceFormat($output['stat']['sending']['mch_amounts'] - $output['stat']['sending']['channel_amounts'])?></li>
  363. </div>
  364. <div>
  365. <li class="lineLi">总计充值成功订单数量:<?php echo $output['stat']['success']['order_count'] ?? 0?></li>
  366. <li class="lineLi">总计充值成功订单金额:<?php echo $output['stat']['success']['refill_amounts'] ?? 0?></li>
  367. <li class="lineLi">总计充值成功客户扣款金额:<?php echo $output['stat']['success']['mch_amounts'] ?? 0?></li>
  368. <li class="lineLi noLineLi">&nbsp;</li>
  369. <li class="lineLi">总计充值成功供方扣款金额:<?php echo $output['stat']['success']['channel_amounts'] ?? 0?></li>
  370. <li class="lineLi">总计充值成功利润:<?php echo ncPriceFormat($output['stat']['success']['mch_amounts'] - $output['stat']['success']['channel_amounts'])?></li>
  371. </div>
  372. <div>
  373. <li class="lineLi">总计充值失败订单数量:<?php echo $output['stat']['cancel']['order_count'] ?? 0?></li>
  374. <li class="lineLi">总计充值失败订单金额:<?php echo $output['stat']['cancel']['refill_amounts'] ?? 0?></li>
  375. <li class="lineLi">总计充值失败客户扣款金额:<?php echo $output['stat']['cancel']['mch_amounts'] ?? 0?></li>
  376. <li class="lineLi noLineLi">&nbsp;</li>
  377. <li class="lineLi">总计充值失败供方扣款金额:<?php echo $output['stat']['cancel']['channel_amounts'] ?? 0?></li>
  378. <li class="lineLi">总计充值失败利润:<?php echo ncPriceFormat($output['stat']['cancel']['mch_amounts'] - $output['stat']['cancel']['channel_amounts'])?></li>
  379. </div>
  380. <?php }?>
  381. <div>
  382. <li class="lineLi">成功率:
  383. <?php
  384. $count = $output['stat']['success']['order_count'] + $output['stat']['cancel']['order_count'];
  385. if($count == 0) {
  386. echo '0%';
  387. } else {
  388. $ratio = sprintf("%.2f",$output['stat']['success']['order_count'] / $count);
  389. $ratio = $ratio * 100;
  390. echo "{$ratio}%";
  391. }
  392. ?></li>
  393. </div>
  394. </ul>
  395. </td>
  396. </tr>
  397. </tbody>
  398. </table>
  399. <?php }?>
  400. <table class="table tb-type2 nobdb" style="min-width:1400px">
  401. <thead>
  402. <tr class="thead">
  403. <th class="align-center">编号</th>
  404. <th class="align-center">订单号</th>
  405. <th class="align-center">机构编号</th>
  406. <th class="align-center">机构名称</th>
  407. <th class="align-center">充值卡号</th>
  408. <th class="align-center">充值卡类型</th>
  409. <th class="align-center">充值额度</th>
  410. <th class="align-right">下单日期</th>
  411. <th class="align-right">耗时</th>
  412. <th class="align-center">订单状态</th>
  413. <th class="align-center">运营商流水号</th>
  414. <th class="align-center">备注</th>
  415. <th class="align-center">客户单号</th>
  416. <th class="align-center">供方单号</th>
  417. <th class="align-center">供方名称</th>
  418. <th class="align-center">次数</th>
  419. <th class="align-center">质量</th>
  420. <th class="align-center">初始质量</th>
  421. <!-- <th class="align-center">扣款金额</th>-->
  422. <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
  423. </tr>
  424. </thead>
  425. <tbody id="tbody">
  426. <?php if (count($output['order_list']) > 0) { ?>
  427. <?php
  428. foreach ($output['order_list'] as $key => $order) { ?>
  429. <tr class="hover trFlex">
  430. <td class="align-center"><?php echo $key+1;?></td>
  431. <td class="align-left"><?php echo $order['order_sn']; ?></td>
  432. <td class="align-center"><?php echo $order['mchid']; ?></td>
  433. <td class="align-center"><?php echo $order['mch_name']; ?></td>
  434. <td class="align-left"><?php echo $order['card_no']; ?></td>
  435. <td class="align-center"><?php echo $order['card_type_text']; ?></td>
  436. <td class="align-center"><?php echo $order['refill_amount']; ?></td>
  437. <td class="align-right">
  438. <span class="doubleclick" data-order="<?php echo $order['order_sn'];?>">
  439. <?php echo date('Y-m-d H:i:s', $order['order_time']); ?>
  440. </span>
  441. </td>
  442. <td class="align-right">
  443. <?php if(empty($order['notify_time'])) {
  444. if($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
  445. ?>
  446. <span style="color: #fd9d0e"><?php echo $order['diff_time_text']?></span>
  447. <?php }elseif($order['diff_time'] > 3600) {?>
  448. <span style="color: #f30707"><?php echo $order['diff_time_text']?></span>
  449. <?php }else{?>
  450. <?php echo $order['diff_time_text']?>
  451. <?php }?>
  452. <?php }else{?>
  453. <?php echo $order['diff_time_text']?>
  454. <?php }?>
  455. </td>
  456. <td class="align-center"><?php echo orderState($order); ?></td>
  457. <td class="align-left"><?php echo $order['official_sn']; ?></td>
  458. <td class="align-left"><?php echo $order['err_msg']; ?></td>
  459. <td class="align-left"><?php echo $order['mch_order']; ?></td>
  460. <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
  461. <td class="align-center"><?php echo $order['channel_name']; ?></td>
  462. <td class="align-center"><?php echo $order['commit_times']+1; ?></td>
  463. <td class="align-center"><?php echo $order['quality_text']; ?></td>
  464. <td class="align-center"><?php echo $order['org_quality_text']; ?></td>
  465. <!-- <td class="align-center">--><?php //echo $order['mch_amount']; ?><!--</td>-->
  466. <td class="align-center">
  467. <?php if( ($order['order_state'] == ORDER_STATE_CANCEL || $order['order_state'] == ORDER_STATE_SUCCESS) && $order['is_retrying'] == 0){?>
  468. <a href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
  469. 回调</a>
  470. <?php }?>
  471. <?php if($order['order_state'] == ORDER_STATE_SEND){?>
  472. <a href="index.php?act=merchant&op=notify_manual_merchant&type=cancel&order_id=<?php echo $order['order_id']; ?>">
  473. 手动失败</a>
  474. |
  475. <a href="index.php?act=merchant&op=notify_manual_merchant&type=success&order_id=<?php echo $order['order_id']; ?>">
  476. 手动成功</a>
  477. <?php }?>
  478. <?php if($order['card_type'] == mtopcard\ThirdRefillCard){?>
  479. |
  480. <a href="#" class="examine" data-order="<?php echo $order['order_id']; ?>">
  481. 查看</a>
  482. <?php }?>
  483. </td>
  484. </tr>
  485. <?php } ?>
  486. <?php } else { ?>
  487. <tr class="no_data">
  488. <td colspan="19"><?php echo $lang['nc_no_record']; ?></td>
  489. </tr>
  490. <?php } ?>
  491. </tbody>
  492. <tfoot>
  493. <tr class="tfoot">
  494. <td colspan="19" id="dataFuncs">
  495. <div class="pagination"> <?php echo $output['show_page']; ?> </div>
  496. </td>
  497. </tr>
  498. </tfoot>
  499. </table>
  500. </div>
  501. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
  502. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
  503. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
  504. charset="utf-8"></script>
  505. <link rel="stylesheet" type="text/css"
  506. href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
  507. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
  508. <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
  509. <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
  510. <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
  511. <script type="text/javascript">
  512. $(function () {
  513. //查看
  514. $('.examine').click(function() {
  515. let sq = $(this).attr('data-order')
  516. // console.log(sq);
  517. $.get('index.php?act=refill_order&op=refill_third_info',
  518. {
  519. order_id:sq
  520. },function(data) {
  521. data = JSON.parse(data)
  522. if (data.state == 1) {
  523. let contentArr = []
  524. contentArr.push(`单号:${data.data.order_sn}`)
  525. contentArr.push(`产品编码:${data.data.pcode}`)
  526. contentArr.push(`渠道编码:${data.data.chcode}`)
  527. contentArr.push(`充值数量:${data.data.quantity}`)
  528. if (data.data.user_account) {
  529. contentArr.push(`充值账号:${data.data.user_account}`)
  530. contentArr.push(`账号类型:${data.data.account_type_text}`)
  531. } else {
  532. contentArr.push(`卡密验证状态:${data.data.ret_state_text}`)
  533. contentArr.push(`卡密信息:${data.data.card_info}`)
  534. }
  535. let content = ''
  536. for (let index = 0; index < contentArr.length; index++) {
  537. content += `<p>${contentArr[index]}</p>`
  538. }
  539. layer.open({
  540. title: "查看",
  541. content: content
  542. });
  543. }
  544. })
  545. })
  546. //双击
  547. $('.doubleclick').dblclick(function() {
  548. let db_click = $(this).attr('data-order')
  549. $.get('index.php?act=refill_order&op=showOrders', {
  550. order_sn:db_click
  551. }, function(data) {
  552. data = JSON.parse(data)
  553. if (data.state == 1) {
  554. var dbclick = data.data
  555. let ConentArr = [];
  556. let html = '';
  557. for (let i = 0; i < dbclick.length; i++) {
  558. var item = dbclick[i];
  559. html += `
  560. <tr>
  561. <td class="db-center">${item.order_sn}</td>
  562. <td class="db-center">${item.commit_time_text}</td>
  563. <td class="db-center">${item.notify_time_text}</td>
  564. <td class="db-center">${item.diff_time_text}</td>
  565. <td class="db-center">${item.order_state_text}</td>
  566. <td class="db-center">${item.channel_name}</td>
  567. <td class="db-center">${item.err_msg}</td>
  568. <tr>
  569. `
  570. }
  571. layer.open({
  572. title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>` ,
  573. content: `<table>
  574. <thead>
  575. <tr>
  576. <th class="db-right">订单号</th>
  577. <th class="db-right">下单日期</th>
  578. <th class="db-right">回调日期</th>
  579. <th class="db-right">耗时</th>
  580. <th class="db-right">订单状态</th>
  581. <th class="db-right">供方名称</th>
  582. <th class="db-right">错误原因</th>
  583. </tr>
  584. </thead>
  585. <tbody>
  586. ${html}
  587. </tbody>
  588. </table>`,
  589. });
  590. } else {
  591. alert("没有此订单");
  592. }
  593. })
  594. })
  595. // 获取不包含客户
  596. let selest_nc
  597. let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
  598. $.get('index.php?act=refill_order&op=merchant_data',function(data) {
  599. data = JSON.parse(data)
  600. if (default_no_mch) {
  601. for (let index = 0; index < default_no_mch.length; index++) {
  602. for (let j = 0; j < data.length; j++) {
  603. if (default_no_mch[index] == data[j].value) {
  604. data[j].selected = true
  605. }
  606. }
  607. }
  608. }
  609. selest_nc = xmSelect.render({
  610. el: '#selest_nc',
  611. size: 'mini',
  612. filterable: true,
  613. style: {
  614. minHeight: '27px',
  615. lineHeight: '27px',
  616. marginLeft: '4px'
  617. },
  618. language:'zn',
  619. data:data
  620. })
  621. console.log('data', data);
  622. })
  623. $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
  624. $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
  625. $('#ncsubmit').click(function () {
  626. var index = layer.load(0, {shade: false});
  627. $('input[name="op"]').val('index');
  628. let selectArr = selest_nc.getValue();
  629. let selectStr = ''
  630. for (let i = 0; i < selectArr.length; i++) {
  631. selectStr += selectArr[i].value+','
  632. }
  633. selectStr = selectStr.substr(0, selectStr.length-1)
  634. console.log(selectStr);
  635. $('input[name="no_mchid"]').val(selectStr);
  636. // console.log('selectArr', selectArr, selectStr);
  637. $('#formSearch').submit();
  638. });
  639. // 导出
  640. $('#ncexport').click(function () {
  641. $('input[name="export"]').val('1');
  642. $('input[name="op"]').val('index');
  643. // 不包含客户
  644. let selectArr = selest_nc.getValue();
  645. let selectStr = ''
  646. for (let i = 0; i < selectArr.length; i++) {
  647. selectStr += selectArr[i].value+','
  648. }
  649. selectStr = selectStr.substr(0, selectStr.length-1)
  650. $('input[name="no_mchid"]').val(selectStr);
  651. $('#formSearch').submit();
  652. $('input[name="export"]').val('');
  653. var ii = layer.load();
  654. setTimeout(function(){
  655. layer.close(ii);
  656. }, 800);
  657. })
  658. // 对账导出
  659. $('#ncexport_stats').click(function () {
  660. var ii = layer.load();
  661. setTimeout(function(){
  662. layer.close(ii);
  663. }, 800);
  664. $('input[name="export_stats"]').val('1');
  665. $('input[name="op"]').val('index');
  666. // 不包含客户
  667. let selectArr = selest_nc.getValue();
  668. let selectStr = ''
  669. for (let i = 0; i < selectArr.length; i++) {
  670. selectStr += selectArr[i].value+','
  671. }
  672. selectStr = selectStr.substr(0, selectStr.length-1)
  673. $('input[name="no_mchid"]').val(selectStr);
  674. $('#formSearch').submit();
  675. $('input[name="export_stats"]').val('');
  676. })
  677. //搜索+统计
  678. $('#ncstat').click(function () {
  679. var index = layer.load(0, {shade: false});
  680. $('input[name="fShowStat"]').val('1');
  681. $('input[name="op"]').val('index');
  682. // 不包含客户
  683. let selectArr = selest_nc.getValue();
  684. let selectStr = ''
  685. for (let i = 0; i < selectArr.length; i++) {
  686. selectStr += selectArr[i].value+','
  687. }
  688. selectStr = selectStr.substr(0, selectStr.length-1)
  689. $('input[name="no_mchid"]').val(selectStr);
  690. $('#formSearch').submit();
  691. $('input[name="fShowStat"]').val('');
  692. })
  693. // 向客户回调
  694. $('#mch_notify').click(function () {
  695. $('input[name="mch_notify"]').val('1');
  696. $('input[name="op"]').val('index');
  697. // 不包含客户
  698. let selectArr = selest_nc.getValue();
  699. let selectStr = ''
  700. for (let i = 0; i < selectArr.length; i++) {
  701. selectStr += selectArr[i].value+','
  702. }
  703. selectStr = selectStr.substr(0, selectStr.length-1)
  704. $('input[name="no_mchid"]').val(selectStr);
  705. $('#formSearch').submit();
  706. $('input[name="mch_notify"]').val('');
  707. var ii = layer.load();
  708. setTimeout(function(){
  709. layer.close(ii);
  710. }, 800);
  711. })
  712. // 更新待收货状态
  713. $('#order_query').click(function () {
  714. $('input[name="order_query"]').val('1');
  715. $('input[name="op"]').val('index');
  716. // 不包含客户
  717. let selectArr = selest_nc.getValue();
  718. let selectStr = ''
  719. for (let i = 0; i < selectArr.length; i++) {
  720. selectStr += selectArr[i].value+','
  721. }
  722. selectStr = selectStr.substr(0, selectStr.length-1)
  723. $('input[name="no_mchid"]').val(selectStr);
  724. $('#formSearch').submit();
  725. $('input[name="order_query"]').val('');
  726. var ii = layer.load();
  727. setTimeout(function(){
  728. layer.close(ii);
  729. }, 800);
  730. })
  731. // 日期选择器
  732. laydate.render({
  733. elem: '#startTime',
  734. type: 'datetime',
  735. trigger: 'click'
  736. });
  737. laydate.render({
  738. elem: '#endTime',
  739. type: 'datetime',
  740. trigger: 'click'
  741. });
  742. // 表格hover时背景
  743. $('.trFlex').each(function () {
  744. $(this).hover(function () {
  745. $(this)[0].style.backgroundColor = '#cbe9f3'
  746. },function() {
  747. $(this)[0].style.backgroundColor = '#fff'
  748. })
  749. })
  750. // 供方名称颜色
  751. $('.textColor').each(function () {
  752. let color = $(this).attr('data-color')
  753. if (color == '1') {
  754. $(this).css('color', 'green')
  755. } else {
  756. $(this).css('color', 'red')
  757. }
  758. })
  759. // 十分钟订单
  760. $('#10_rder').click(function () {
  761. let date=new Date();
  762. let min=date.getMinutes();
  763. date.setMinutes(min-10);
  764. let y = date.getFullYear();
  765. let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
  766. let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
  767. let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
  768. let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
  769. let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
  770. let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
  771. // console.log(formatdate)
  772. $('#startTime').val(formatdate)
  773. })
  774. // 30分钟订单
  775. $('#30_rder').click(function () {
  776. let date=new Date();
  777. let min=date.getMinutes();
  778. date.setMinutes(min-30);
  779. let y = date.getFullYear();
  780. let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
  781. let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
  782. let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
  783. let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
  784. let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
  785. let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
  786. // console.log(formatdate)
  787. $('#startTime').val(formatdate)
  788. })
  789. // 60分钟订单
  790. $('#60_rder').click(function () {
  791. let date=new Date();
  792. let min=date.getMinutes();
  793. date.setMinutes(min-60);
  794. let y = date.getFullYear();
  795. let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
  796. let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
  797. let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
  798. let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
  799. let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
  800. let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
  801. // console.log(formatdate)
  802. $('#startTime').val(formatdate)
  803. })
  804. // 60分钟订单
  805. $('#0_rder').click(function () {
  806. let date=new Date();
  807. let min=date.getMinutes();
  808. date.setMinutes(min-60);
  809. let y = date.getFullYear();
  810. let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
  811. let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
  812. let h = 0;
  813. let f = 0;
  814. let s = 0;
  815. let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
  816. // console.log(formatdate)
  817. $('#startTime').val(formatdate)
  818. })
  819. });
  820. function hCopyChannel(e) {
  821. let str = ''
  822. $('#tbody tr').each(function () {
  823. let res = $(this).find('td').eq(13).text()
  824. str += res + '\n'
  825. })
  826. let oInput = document.createElement("textarea");
  827. oInput.style.border = "0 none";
  828. oInput.style.color = "transparent";
  829. oInput.value = str;
  830. document.body.appendChild(oInput);
  831. oInput.select(); // 选择对象
  832. document.execCommand("Copy"); // 执行浏览器复制命令
  833. oInput.parentNode.removeChild(oInput)
  834. }
  835. function hCopyCardNo(e) {
  836. let str = ''
  837. $('#tbody tr').each(function () {
  838. let res = $(this).find('td').eq(4).text()
  839. str += res + '\n'
  840. })
  841. let oInput = document.createElement("textarea");
  842. oInput.style.border = "0 none";
  843. oInput.style.color = "transparent";
  844. oInput.value = str;
  845. document.body.appendChild(oInput);
  846. oInput.select(); // 选择对象
  847. document.execCommand("Copy"); // 执行浏览器复制命令
  848. oInput.parentNode.removeChild(oInput)
  849. }
  850. function hCopyOrderSn(e) {
  851. let str = ''
  852. $('#tbody tr').each(function () {
  853. let res = $(this).find('td').eq(1).text()
  854. str += res + '\n'
  855. })
  856. let oInput = document.createElement("textarea");
  857. oInput.style.border = "0 none";
  858. oInput.style.color = "transparent";
  859. oInput.value = str;
  860. document.body.appendChild(oInput);
  861. oInput.select(); // 选择对象
  862. document.execCommand("Copy"); // 执行浏览器复制命令
  863. oInput.parentNode.removeChild(oInput)
  864. }
  865. </script>