123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <style>
- th label { display: inline-block;width: 60px; }
- </style>
- <?php defined('InShopNC') or exit('Access Invalid!'); ?>
- <div class="page">
- <div class="fixed-bar">
- <div class="item-title">
- <h3>订单列表</h3>
- <ul class="tab-base">
- <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
- </ul>
- </div>
- </div>
- <div class="fixed-empty"></div>
- <form method="get" action="index.php" name="formSearch" id="formSearch">
- <input type="hidden" name="act" value="merchant"/>
- <input type="hidden" name="op" value="refill_order"/>
- <table class="tb-type1 noborder search">
- <tbody>
- <tr>
- <th><label>我方订单号</label></th>
- <td><input class="txt2" type="text" name="order_sn" value="<?php echo $_GET['order_sn']; ?>"/></td>
- <th><label>客户订单号</label></th>
- <td><input class="txt2" type="text" name="mch_order" value="<?php echo $_GET['mch_order']; ?>"/></td>
- <th><label>供方订单号</label></th>
- <td><input class="txt2" type="text" name="ch_trade_no" value="<?php echo $_GET['ch_trade_no']; ?>"/></td>
- </tr>
- <tr>
- <th><label>客户名称</label></th>
- <td><input class="txt2" type="text" name="mchid" value="<?php echo $_GET['mchid']; ?>"/></td>
- <th><label>供方名称</label></th>
- <td>
- <select name="store_id" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <?php foreach($output['provider_list'] as $provider){?>
- <option value="<?php echo $provider['store_id']?>"
- <?php if ($_GET['store_id'] == $provider['store_id']){ ?>selected<?php } ?>><?php echo $provider['name']?>
- </option>
- <?php }?>
- </select>
- </td>
- </tr>
- <tr>
- <th><label>充值卡卡号</label></th>
- <td><input class="txt2" type="text" name="card_no" value="<?php echo $_GET['card_no']; ?>"/></td>
- </tr>
- <tr>
- <th><label for="query_start_time">下单时间</label></th>
- <td>
- <input class="txt date" type="text" value="<?php echo $_GET['query_start_time']; ?>"
- id="startTime" name="query_start_time" autocomplete="off" />
- <label for="query_start_time">~</label>
- <input class="txt date" type="text" value="<?php echo $_GET['query_end_time']; ?>"
- id="endTime" name="query_end_time" autocomplete="off"/></td>
- <th><label>订单状态</label></th>
- <td>
- <select name="order_state" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="10"
- <?php if ($_GET['order_state'] == '10'){ ?>selected<?php } ?>><?php echo $lang['order_state_new']; ?></option>
- <option value="20"
- <?php if ($_GET['order_state'] == '20'){ ?>selected<?php } ?>><?php echo $lang['order_state_pay']; ?></option>
- <option value="30"
- <?php if ($_GET['order_state'] == '30'){ ?>selected<?php } ?>><?php echo $lang['order_state_send']; ?></option>
- <option value="40"
- <?php if ($_GET['order_state'] == '40'){ ?>selected<?php } ?>><?php echo $lang['order_state_success']; ?></option>
- <option value="0"
- <?php if ($_GET['order_state'] == '0'){ ?>selected<?php } ?>><?php echo $lang['order_state_cancel']; ?></option>
- </select>
- <label>充值类型</label>
- <select name="card_type" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="1"
- <?php if ($_GET['card_type'] == '1'){ ?>selected<?php } ?>>中石油</option>
- <option value="2"
- <?php if ($_GET['card_type'] == '2'){ ?>selected<?php } ?>>中石化</option>
- <option value="4"
- <?php if ($_GET['card_type'] == '4'){ ?>selected<?php } ?>>中国移动</option>
- <option value="5"
- <?php if ($_GET['card_type'] == '5'){ ?>selected<?php } ?>>中国联通</option>
- <option value="6"
- <?php if ($_GET['card_type'] == '6'){ ?>selected<?php } ?>>中国电信</option>
- <option value="oil"
- <?php if ($_GET['card_type'] == 'oil'){ ?>selected<?php } ?>>油费</option>
- <option value="phone"
- <?php if ($_GET['card_type'] == 'phone'){ ?>selected<?php } ?>>手机费</option>
- </select>
- </td>
- <th><label>交易面额</label></th>
- <td>
- <select name="refill_amount" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="10"
- <?php if ($_GET['refill_amount'] == '10'){ ?>selected<?php } ?>>10</option>
- <option value="20"
- <?php if ($_GET['refill_amount'] == '20'){ ?>selected<?php } ?>>20</option>
- <option value="30"
- <?php if ($_GET['refill_amount'] == '30'){ ?>selected<?php } ?>>30</option>
- <option value="50"
- <?php if ($_GET['refill_amount'] == '50'){ ?>selected<?php } ?>>50</option>
- <option value="100"
- <?php if ($_GET['refill_amount'] == '100'){ ?>selected<?php } ?>>100</option>
- <option value="200"
- <?php if ($_GET['refill_amount'] == '200'){ ?>selected<?php } ?>>200</option>
- <option value="300"
- <?php if ($_GET['refill_amount'] == '300'){ ?>selected<?php } ?>>300</option>
- <option value="500"
- <?php if ($_GET['refill_amount'] == '500'){ ?>selected<?php } ?>>500</option>
- <option value="1000"
- <?php if ($_GET['refill_amount'] == '1000'){ ?>selected<?php } ?>>1000</option>
- <option value="2000"
- <?php if ($_GET['refill_amount'] == '2000'){ ?>selected<?php } ?>>2000</option>
- </select>
- <label>充值耗时</label>
- <select name="time" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="1"
- <?php if ($_GET['time'] == '1'){ ?>selected<?php } ?>>耗时半小时</option>
- <option value="2"
- <?php if ($_GET['time'] == '2'){ ?>selected<?php } ?>>耗时一小时</option>
- </select>
- </td>
- <td>
- <a href="javascript:void(0);" id="ncsubmit" class="btn-search "
- title="<?php echo $lang['nc_query']; ?>">
- </a>
- </td>
- </tr>
- <tr>
- <td></td>
- <td>
- <a href="#" class="btns" onclick="hCopyChannel(event)">
- <span><i class="icon-edit"></i>拷贝供方单号</span>
- </a>
- <a href="#" class="btns" onclick="hCopyCardNo(event)">
- <span><i class="icon-edit"></i>拷贝充值卡号</span>
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <table class="table tb-type2" id="prompt">
- <tbody>
- <tr class="space odd">
- <th colspan="12"><div class="title"><h5>
- 金额统计</h5><span class="arrow"></span></div></th>
- </tr>
- <tr>
- <td>
- <ul>
- <li>总计充值金额:<?php echo $output['stat']['refill_amounts'] ?? 0?></li>
- <li>总计供方扣款金额:<?php echo $output['stat']['channel_amounts'] ?? 0?></li>
- <li>总计客户扣款金额:<?php echo $output['stat']['mch_amounts'] ?? 0?></li>
- <li>总计利润:<?php echo ncPriceFormat($output['stat']['channel_amounts'] - $output['stat']['mch_amounts'])?></li>
- <li>总计订单数量:<?php echo $output['stat']['order_count'] ?? 0?></li>
- <li>超过半小时订单数量:<?php echo $output['count']['half_count'] ?? 0?></li>
- <li>超过一小时订单数量:<?php echo $output['count']['hour_count'] ?? 0?></li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table tb-type2 nobdb">
- <thead>
- <tr class="thead">
- <th class="align-center">编号</th>
- <th class="align-center">订单号</th>
- <th class="align-center">机构编号</th>
- <th class="align-center">机构名称</th>
- <th class="align-center">充值卡号</th>
- <th class="align-center">充值卡类型</th>
- <th class="align-center">充值额度</th>
- <th class="align-right">下单日期</th>
- <th class="align-right">耗时</th>
- <th class="align-center">订单状态</th>
- <th class="align-center">运营商流水号</th>
- <th class="align-center">失败原因</th>
- <th class="align-center">商家单号</th>
- <th class="align-center">扣款金额</th>
- <th class="align-center">渠道单号</th>
- <th class="align-center">渠道名称</th>
- <th class="align-center"><?php echo $lang['nc_handle']; ?></th>
- </tr>
- </thead>
- <tbody id="tbody">
- <?php if (count($output['order_list']) > 0) { ?>
- <?php
- foreach ($output['order_list'] as $key => $order) { ?>
- <tr class="hover">
- <td class="align-center"><?php echo $key+1;?></td>
- <td class="align-left"><?php echo $order['order_sn']; ?></td>
- <td class="align-center"><?php echo $order['mchid']; ?></td>
- <td class="align-center"><?php echo $order['mch_name']; ?></td>
- <td class="align-left"><?php echo $order['card_no']; ?></td>
- <td class="align-center"><?php echo $order['card_type_text']; ?></td>
- <td class="align-center"><?php echo $order['refill_amount']; ?></td>
- <td class="align-right"><?php echo date('Y-m-d H:i:s', $order['order_time']); ?></td>
- <td class="align-right">
- <?php if(empty($order['notify_time'])) {
- if($order['diff_time'] >= 1800 && $order['diff_time'] <= 3600) {
- ?>
- <span style="color: #fd9d0e"><?php echo $order['diff_time_text']?></span>
- <?php }elseif($order['diff_time'] > 3600) {?>
- <span style="color: #f30707"><?php echo $order['diff_time_text']?></span>
- <?php }else{?>
- <?php echo $order['diff_time_text']?>
- <?php }?>
- <?php }else{?>
- <?php echo $order['diff_time_text']?>
- <?php }?>
- </td>
- <td class="align-center"><?php echo orderState($order); ?></td>
- <td class="align-left"><?php echo $order['official_sn']; ?></td>
- <td class="align-left"><?php echo $order['err_msg']; ?></td>
- <td class="align-left"><?php echo $order['mch_order']; ?></td>
- <td class="align-center"><?php echo $order['mch_amount']; ?></td>
- <td class="align-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
- <td class="align-center"><?php echo $order['channel_name']; ?></td>
- <td class="w144 align-center">
- <a href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
- 回调</a>
- |
- <a href="index.php?act=merchant&op=notify_manual_merchant&type=cancel&order_id=<?php echo $order['order_id']; ?>">
- 手动失败</a>
- |
- <a href="index.php?act=merchant&op=notify_manual_merchant&type=success&order_id=<?php echo $order['order_id']; ?>">
- 手动成功</a>
- </td>
- </tr>
- <?php } ?>
- <?php } else { ?>
- <tr class="no_data">
- <td colspan="17"><?php echo $lang['nc_no_record']; ?></td>
- </tr>
- <?php } ?>
- </tbody>
- <tfoot>
- <tr class="tfoot">
- <td colspan="15" id="dataFuncs">
- <div class="pagination"> <?php echo $output['show_page']; ?> </div>
- </td>
- </tr>
- </tfoot>
- </table>
- </div>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/laydate/laydate.js"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/i18n/zh-CN.js"
- charset="utf-8"></script>
- <link rel="stylesheet" type="text/css"
- href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/themes/ui-lightness/jquery.ui.css"/>
- <script type="text/javascript">
- $(function () {
- $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
- $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
- $('#ncsubmit').click(function () {
- $('input[name="op"]').val('refill_order');
- $('#formSearch').submit();
- });
- // 日期选择器
- laydate.render({
- elem: '#startTime',
- type: 'datetime'
- });
- laydate.render({
- elem: '#endTime',
- type: 'datetime'
- });
- });
- function hCopyChannel(e) {
- let str = ''
- $('#tbody tr').each(function () {
- let res = $(this).find('td').eq(14).text()
- str += res + '\n'
- })
- let oInput = document.createElement("textarea");
- oInput.style.border = "0 none";
- oInput.style.color = "transparent";
- oInput.value = str;
- document.body.appendChild(oInput);
- oInput.select(); // 选择对象
- document.execCommand("Copy"); // 执行浏览器复制命令
- oInput.parentNode.removeChild(oInput)
- }
- function hCopyCardNo(e) {
- let str = ''
- $('#tbody tr').each(function () {
- let res = $(this).find('td').eq(4).text()
- str += res + '\n'
- })
- let oInput = document.createElement("textarea");
- oInput.style.border = "0 none";
- oInput.style.color = "transparent";
- oInput.value = str;
- document.body.appendChild(oInput);
- oInput.select(); // 选择对象
- document.execCommand("Copy"); // 执行浏览器复制命令
- oInput.parentNode.removeChild(oInput)
- }
- </script>
|