123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901 |
- <style>
- th label { display: inline-block;width: 60px; }
- .lineLi {
- min-width: 150px;
- font-size: 12px;
- color:#000;
- }
- #prompt ul .noLineLi {
- background:none;
- }
- #prompt div {
- display:inline-block;
- background:none
- }
- #prompt ul .lineLi {
- color:#000;
- }
- #selest_nc {
- width:220px
- }
- tbody {
- font-size: 12px;
- }
- .layui-form-select .layui-input {
- padding: 13px 5px;
- }
- .layui-form-selected dl {
- display: flex!important;
- flex-wrap: wrap!important;
- }
- .layui-form-select dl {
-
- top: 29px !important;
- left: 4px!important;
- min-width: 883%!important;
- max-height: 280px!important;
- padding: 14px 0!important;
- }
- .layui-form-select {
- width: 45%;
- }
- .layui-select-title {
- width: 100%;
- }
- .layui-form-select .layui-input {
-
- padding-left: 11px;
- }
- .page .fixed-bar .item-title h3 {
- margin-top:18px !important;
- margin-bottom:10px !important;
- font-weight:700 !important;
- }
- .tab-base li span {
- font-size:12px !important;
- }
- .layui-form-select .layui-input {
- height:26px;
- }
- input::placeholder{
- color:#333;
- }
- .xm-tips{
- color: #333!important;
- font-size: 12px;
- }
- .layui-form-select dl dd.layui-this{
- display: none;
- }
- .layui-form-select dl dd {
- cursor: pointer;
- width: 130px;
-
- }
- .db-right {
- padding-right: 134px!important;
- border-bottom: 1px solid #ccc;
- }
- .db-center {
- padding: 9px 0;
- border-bottom: 1px solid #ccc;
- }
- .db-top {
- padding: 0 30px;
- }
- </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="refill_order"/>
- <input type="hidden" name="op" value="index"/>
- <input type="hidden" name="export" value=""/>
- <input type="hidden" name="mch_notify" value=""/>
- <input type="hidden" name="order_query" value=""/>
- <input type="hidden" name="export_stats" value=""/>
- <input type="hidden" name="fShowStat" value=""/>
- <input type="hidden" name="no_mchid" value=""/>
- <input type="hidden" name="default_no_mch" value="<?php echo $_GET['no_mchid']; ?>"/>
- <table class="tb-type1 noborder search" style="min-width:1400px">
- <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 class="layui-form">
- <select name="mchid" class="querySelect" lay-verify="" lay-search>
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <?php foreach($output['merchant_list'] as $merchant){?>
- <option value="<?php echo $merchant['mchid']?>"
- <?php if ($_GET['mchid'] == $merchant['mchid']){ ?>selected<?php } ?>><?php echo $merchant['company_name'] == '' ? $merchant['name'] : $merchant['company_name'];?>
- </option>
- <?php }?>
- </select>
- </td>
- <th><label>供方名称</label></th>
- <td >
- <select name="store_id" class="" >
- <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 } ?> data-color="<?php echo $provider['opened']?>" class="textColor"><?php echo $provider['store_name']?>
- </option>
- <?php }?>
- </select>
- </td>
- <th><label>不包含客户</label></th>
- <td>
- <div id="selest_nc"></div>
- </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" style="width:120px" />
- <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" style="width:120px" /></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="7"
- <?php if ($_GET['card_type'] == '7'){ ?>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>
- <th><label>通道质量</label></th>
- <td>
- <select name="quality" class="querySelect">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="1"
- <?php if ($_GET['quality'] == '1'){ ?>selected<?php } ?>>普充(无流水)</option>
- <option value="2"
- <?php if ($_GET['quality'] == '2'){ ?>selected<?php } ?>>快充</option>
- <option value="3"
- <?php if ($_GET['quality'] == '3'){ ?>selected<?php } ?>>卡密</option>
- <option value="4"
- <?php if ($_GET['quality'] == '4'){ ?>selected<?php } ?>>三方</option>
- <option value="5"
- <?php if ($_GET['quality'] == '5'){ ?>selected<?php } ?>>慢24(有流水)</option>
- <option value="6"
- <?php if ($_GET['quality'] == '6'){ ?>selected<?php } ?>>慢6</option>
- <option value="7"
- <?php if ($_GET['quality'] == '7'){ ?>selected<?php } ?>>慢2</option>
- <option value="8"
- <?php if ($_GET['quality'] == '8'){ ?>selected<?php } ?>>慢48</option>
- <option value="9"
- <?php if ($_GET['quality'] == '9'){ ?>selected<?php } ?>>慢72</option>
- </select>
- <label>有无流水</label>
- <select name="official_status">
- <option value=""><?php echo $lang['nc_please_choose']; ?></option>
- <option value="1"
- <?php if ($_GET['official_status'] == '1'){ ?>selected<?php } ?>>无流水</option>
- <option value="2"
- <?php if ($_GET['official_status'] == '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>
- <a href="#" class="btns" onclick="hCopyOrderSn(event)">
- <span><i class="icon-edit"></i>拷贝订单号</span>
- </a>
- </td>
- <td></td>
- <td>
- <a href="javascript:void(0);" id="order_query" class="btns" >
- <span><i class="icon-edit"></i>更新待收货订单状态</span>
- </a>
- <a href="javascript:void(0);" id="mch_notify" class="btns" >
- <span><i class="icon-edit"></i>向客户回调</span>
- </a>
- </td>
- <td>
- </td>
- <td>
- <a href="javascript:void(0);" id="ncexport" class="btns" >
- <span><i class="icon-edit"></i>搜索导出</span>
- </a>
- <a href="javascript:void(0);" id="ncexport_stats" class="btns" >
- <span><i class="icon-edit"></i>对账导出</span>
- </a>
- <a href="javascript:void(0);" id="ncstat" class="btns">
- <span>搜索+统计</span>
- </a>
- </td>
- <!-- <td>-->
- <!-- <a href="index.php?act=refill_order&op=batch_dispose" class="btns" >-->
- <!-- <span><i class="icon-edit"></i>成功抱阳</span>-->
- <!-- </a>-->
- <!-- </td>-->
- </tr>
- <tr>
- <td></td>
- <td>
- <a href="#" class="btns" id="10_rder">
- <span><i class="icon-edit"></i>10分钟订单</span>
- </a>
- <a href="#" class="btns" id="30_rder">
- <span><i class="icon-edit"></i>半小时订单</span>
- </a>
- <a href="#" class="btns" id="60_rder">
- <span><i class="icon-edit"></i>一小时订单</span>
- </a>
- <a href="#" class="btns" id="0_rder">
- <span><i class="icon-edit"></i>当天零点订单</span>
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <table class="table tb-type2" style="min-width:1400px">
- <tbody>
- <tr>
- <td>
- <ul>
- <li>
- 队列任务个数: <?php echo $output['dispatcher_queue_length'] ?? 0;?>
- </li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- <?php if($_GET['fShowStat'] == 1){?>
- <table class="table tb-type2" id="prompt" style="min-width:1400px">
- <tbody>
- <tr class="space odd">
- <th colspan="12"><div class="title"><h5>
- 金额统计<?php echo $output['ftoday'] == true ? "(今日)" : "" ?></h5><span class="arrow"></span></div></th>
- </tr>
- <tr>
- <td>
- <ul>
- <?php if(COMPANY_NAME === 'LZKJ_COMPANY' || $output['admin_info']['id'] == 1){?>
- <div>
- <li class="lineLi">总计订单数量:<?php echo $output['stat']['all']['order_count'] ?? 0?></li>
- <li class="lineLi">总计充值金额:<?php echo $output['stat']['all']['refill_amounts'] ?? 0?></li>
- <li class="lineLi">总计客户扣款金额:<?php echo $output['stat']['all']['mch_amounts'] ?? 0?></li>
- <li class="lineLi noLineLi"> </li>
- <li class="lineLi">总计供方扣款金额:<?php echo $output['stat']['all']['channel_amounts'] ?? 0?></li>
- <li class="lineLi">总计利润:<?php echo ncPriceFormat($output['stat']['all']['mch_amounts'] - $output['stat']['all']['channel_amounts'])?></li>
- </div>
- <div>
- <li class="lineLi">总计充值中订单数量:<?php echo $output['stat']['sending']['order_count'] ?? 0?></li>
- <li class="lineLi">总计充值中订单金额:<?php echo $output['stat']['sending']['refill_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值中客户扣款金额:<?php echo $output['stat']['sending']['mch_amounts'] ?? 0?></li>
- <li class="lineLi noLineLi"> </li>
- <li class="lineLi">总计充值中供方扣款金额:<?php echo $output['stat']['sending']['channel_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值中利润:<?php echo ncPriceFormat($output['stat']['sending']['mch_amounts'] - $output['stat']['sending']['channel_amounts'])?></li>
- </div>
- <div>
- <li class="lineLi">总计充值成功订单数量:<?php echo $output['stat']['success']['order_count'] ?? 0?></li>
- <li class="lineLi">总计充值成功订单金额:<?php echo $output['stat']['success']['refill_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值成功客户扣款金额:<?php echo $output['stat']['success']['mch_amounts'] ?? 0?></li>
- <li class="lineLi noLineLi"> </li>
- <li class="lineLi">总计充值成功供方扣款金额:<?php echo $output['stat']['success']['channel_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值成功利润:<?php echo ncPriceFormat($output['stat']['success']['mch_amounts'] - $output['stat']['success']['channel_amounts'])?></li>
- </div>
- <div>
- <li class="lineLi">总计充值失败订单数量:<?php echo $output['stat']['cancel']['order_count'] ?? 0?></li>
- <li class="lineLi">总计充值失败订单金额:<?php echo $output['stat']['cancel']['refill_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值失败客户扣款金额:<?php echo $output['stat']['cancel']['mch_amounts'] ?? 0?></li>
- <li class="lineLi noLineLi"> </li>
- <li class="lineLi">总计充值失败供方扣款金额:<?php echo $output['stat']['cancel']['channel_amounts'] ?? 0?></li>
- <li class="lineLi">总计充值失败利润:<?php echo ncPriceFormat($output['stat']['cancel']['mch_amounts'] - $output['stat']['cancel']['channel_amounts'])?></li>
- </div>
- <?php }?>
- <div>
- <li class="lineLi">成功率:
- <?php
- $count = $output['stat']['success']['order_count'] + $output['stat']['cancel']['order_count'];
- if($count == 0) {
- echo '0%';
- } else {
- $ratio = sprintf("%.2f",$output['stat']['success']['order_count'] / $count);
- $ratio = $ratio * 100;
- echo "{$ratio}%";
- }
- ?></li>
- </div>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- <?php }?>
- <table class="table tb-type2 nobdb" style="min-width:1400px">
- <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">质量</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 trFlex">
- <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">
- <span class="doubleclick" data-order="<?php echo $order['order_sn'];?>">
- <?php echo date('Y-m-d H:i:s', $order['order_time']); ?>
- </span>
- </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-left" class="ch_trade_no"><?php echo $order['ch_trade_no']; ?></td>
- <td class="align-center"><?php echo $order['channel_name']; ?></td>
- <td class="align-center"><?php echo $order['commit_times']+1; ?></td>
- <td class="align-center"><?php echo $order['quality_text']; ?></td>
- <td class="align-center"><?php echo $order['org_quality_text']; ?></td>
- <!-- <td class="align-center">--><?php //echo $order['mch_amount']; ?><!--</td>-->
- <td class="align-center">
- <?php if( ($order['order_state'] == ORDER_STATE_CANCEL || $order['order_state'] == ORDER_STATE_SUCCESS) && $order['is_retrying'] == 0){?>
- <a href="index.php?act=merchant&op=notify_merchant&order_id=<?php echo $order['order_id']; ?>">
- 回调</a>
- <?php }?>
- <?php if($order['order_state'] == ORDER_STATE_SEND){?>
- <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>
- <?php }?>
- <?php if($order['card_type'] == mtopcard\ThirdRefillCard){?>
- |
- <a href="#" class="examine" data-order="<?php echo $order['order_id']; ?>">
- 查看</a>
- <?php }?>
- </td>
- </tr>
- <?php } ?>
- <?php } else { ?>
- <tr class="no_data">
- <td colspan="19"><?php echo $lang['nc_no_record']; ?></td>
- </tr>
- <?php } ?>
- </tbody>
- <tfoot>
- <tr class="tfoot">
- <td colspan="19" 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" src="<?php echo ADMIN_TEMPLATES_URL;?>/js/xm-select.js"></script>
- <script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
- <script type="text/javascript" src="<?php echo ADMIN_TEMPLATES_URL;?>/layui/layui.js"></script>
- <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_TEMPLATES_URL; ?>/layui/css/layui.css"/>
- <script type="text/javascript">
- $(function () {
- //查看
- $('.examine').click(function() {
- let sq = $(this).attr('data-order')
- // console.log(sq);
- $.get('index.php?act=refill_order&op=refill_third_info',
- {
- order_id:sq
- },function(data) {
- data = JSON.parse(data)
- if (data.state == 1) {
- let contentArr = []
- contentArr.push(`单号:${data.data.order_sn}`)
- contentArr.push(`产品编码:${data.data.pcode}`)
- contentArr.push(`渠道编码:${data.data.chcode}`)
- contentArr.push(`充值数量:${data.data.quantity}`)
- if (data.data.user_account) {
- contentArr.push(`充值账号:${data.data.user_account}`)
- contentArr.push(`账号类型:${data.data.account_type_text}`)
- } else {
- contentArr.push(`卡密验证状态:${data.data.ret_state_text}`)
- contentArr.push(`卡密信息:${data.data.card_info}`)
- }
- let content = ''
- for (let index = 0; index < contentArr.length; index++) {
- content += `<p>${contentArr[index]}</p>`
- }
- layer.open({
- title: "查看",
- content: content
- });
- }
- })
- })
- //双击
- $('.doubleclick').dblclick(function() {
- let db_click = $(this).attr('data-order')
- $.get('index.php?act=refill_order&op=showOrders', {
- order_sn:db_click
- }, function(data) {
- data = JSON.parse(data)
- if (data.state == 1) {
-
- var dbclick = data.data
- let ConentArr = [];
- let html = '';
- for (let i = 0; i < dbclick.length; i++) {
- var item = dbclick[i];
- html += `
- <tr>
- <td class="db-center">${item.order_sn}</td>
- <td class="db-center">${item.commit_time_text}</td>
- <td class="db-center">${item.notify_time_text}</td>
- <td class="db-center">${item.diff_time_text}</td>
- <td class="db-center">${item.order_state_text}</td>
- <td class="db-center">${item.channel_name}</td>
- <td class="db-center">${item.err_msg}</td>
- <tr>
- `
- }
- layer.open({
- title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>` ,
- content: `<table>
- <thead>
- <tr>
- <th class="db-right">订单号</th>
- <th class="db-right">下单日期</th>
- <th class="db-right">回调日期</th>
- <th class="db-right">耗时</th>
- <th class="db-right">订单状态</th>
- <th class="db-right">供方名称</th>
- <th class="db-right">错误原因</th>
- </tr>
- </thead>
- <tbody>
- ${html}
- </tbody>
- </table>`,
-
- });
- } else {
- alert("没有此订单");
- }
-
- })
- })
- // 获取不包含客户
- let selest_nc
- let default_no_mch = $('input[name="default_no_mch"]').val().split(',');
- $.get('index.php?act=refill_order&op=merchant_data',function(data) {
- data = JSON.parse(data)
-
- if (default_no_mch) {
-
- for (let index = 0; index < default_no_mch.length; index++) {
- for (let j = 0; j < data.length; j++) {
- if (default_no_mch[index] == data[j].value) {
- data[j].selected = true
- }
- }
- }
- }
-
- selest_nc = xmSelect.render({
- el: '#selest_nc',
- size: 'mini',
- filterable: true,
- style: {
- minHeight: '27px',
- lineHeight: '27px',
- marginLeft: '4px'
- },
- language:'zn',
- data:data
- })
- console.log('data', data);
- })
- $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
- $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
- $('#ncsubmit').click(function () {
- var index = layer.load(0, {shade: false});
- $('input[name="op"]').val('index');
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- console.log(selectStr);
- $('input[name="no_mchid"]').val(selectStr);
- // console.log('selectArr', selectArr, selectStr);
- $('#formSearch').submit();
- });
- // 导出
- $('#ncexport').click(function () {
-
- $('input[name="export"]').val('1');
- $('input[name="op"]').val('index');
- // 不包含客户
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- $('input[name="no_mchid"]').val(selectStr);
- $('#formSearch').submit();
- $('input[name="export"]').val('');
- var ii = layer.load();
- setTimeout(function(){
- layer.close(ii);
- }, 800);
- })
- // 对账导出
- $('#ncexport_stats').click(function () {
- var ii = layer.load();
- setTimeout(function(){
- layer.close(ii);
- }, 800);
- $('input[name="export_stats"]').val('1');
- $('input[name="op"]').val('index');
- // 不包含客户
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- $('input[name="no_mchid"]').val(selectStr);
- $('#formSearch').submit();
- $('input[name="export_stats"]').val('');
- })
- //搜索+统计
- $('#ncstat').click(function () {
- var index = layer.load(0, {shade: false});
- $('input[name="fShowStat"]').val('1');
- $('input[name="op"]').val('index');
- // 不包含客户
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- $('input[name="no_mchid"]').val(selectStr);
- $('#formSearch').submit();
- $('input[name="fShowStat"]').val('');
- })
- // 向客户回调
- $('#mch_notify').click(function () {
- $('input[name="mch_notify"]').val('1');
- $('input[name="op"]').val('index');
- // 不包含客户
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- $('input[name="no_mchid"]').val(selectStr);
- $('#formSearch').submit();
- $('input[name="mch_notify"]').val('');
- var ii = layer.load();
- setTimeout(function(){
- layer.close(ii);
- }, 800);
- })
- // 更新待收货状态
- $('#order_query').click(function () {
- $('input[name="order_query"]').val('1');
- $('input[name="op"]').val('index');
- // 不包含客户
- let selectArr = selest_nc.getValue();
- let selectStr = ''
- for (let i = 0; i < selectArr.length; i++) {
- selectStr += selectArr[i].value+','
- }
- selectStr = selectStr.substr(0, selectStr.length-1)
- $('input[name="no_mchid"]').val(selectStr);
- $('#formSearch').submit();
- $('input[name="order_query"]').val('');
- var ii = layer.load();
- setTimeout(function(){
- layer.close(ii);
- }, 800);
- })
- // 日期选择器
- laydate.render({
- elem: '#startTime',
- type: 'datetime',
- trigger: 'click'
- });
- laydate.render({
- elem: '#endTime',
- type: 'datetime',
- trigger: 'click'
- });
- // 表格hover时背景
- $('.trFlex').each(function () {
- $(this).hover(function () {
- $(this)[0].style.backgroundColor = '#cbe9f3'
- },function() {
- $(this)[0].style.backgroundColor = '#fff'
- })
- })
- // 供方名称颜色
- $('.textColor').each(function () {
- let color = $(this).attr('data-color')
- if (color == '1') {
- $(this).css('color', 'green')
- } else {
- $(this).css('color', 'red')
- }
- })
- // 十分钟订单
- $('#10_rder').click(function () {
- let date=new Date();
- let min=date.getMinutes();
- date.setMinutes(min-10);
- let y = date.getFullYear();
- let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
- let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
- let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
- let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
- let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
- let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
- // console.log(formatdate)
- $('#startTime').val(formatdate)
- })
- // 30分钟订单
- $('#30_rder').click(function () {
- let date=new Date();
- let min=date.getMinutes();
- date.setMinutes(min-30);
- let y = date.getFullYear();
- let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
- let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
- let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
- let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
- let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
- let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
- // console.log(formatdate)
- $('#startTime').val(formatdate)
- })
- // 60分钟订单
- $('#60_rder').click(function () {
- let date=new Date();
- let min=date.getMinutes();
- date.setMinutes(min-60);
- let y = date.getFullYear();
- let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
- let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
- let h = date.getHours() < 10 ? ('0' + date.getHours()) : date.getHours()
- let f = date.getMinutes() < 10 ? ('0' + date.getMinutes()) : date.getMinutes()
- let s = date.getSeconds() < 10 ? ('0' + date.getseconds()) : date.getSeconds()
- let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
- // console.log(formatdate)
- $('#startTime').val(formatdate)
- })
- // 60分钟订单
- $('#0_rder').click(function () {
- let date=new Date();
- let min=date.getMinutes();
- date.setMinutes(min-60);
- let y = date.getFullYear();
- let m = (date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : (date.getMonth() + 1);
- let d = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate();
- let h = 0;
- let f = 0;
- let s = 0;
- let formatdate = y+'-'+m+'-'+d + " " + h + ":" + f + ":" + s;
- // console.log(formatdate)
- $('#startTime').val(formatdate)
- })
- });
- function hCopyChannel(e) {
- let str = ''
- $('#tbody tr').each(function () {
- let res = $(this).find('td').eq(13).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)
- }
- function hCopyOrderSn(e) {
- let str = ''
- $('#tbody tr').each(function () {
- let res = $(this).find('td').eq(1).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>
|