123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- <style>
- th label {
- display: inline-block;
- width: 60px;
- margin-left: 10px;
- }
- .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;
- }
- .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;
- }
- .query_ors {
- width: 125px;
- }
- 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;
- min-width: 883% !important;
- max-height: 280px !important;
- padding: 14px 0 !important;
- left: -599px !important;
- }
- .layui-form-select {
- width: 45%;
- }
- .layui-select-title {
- width: 104%;
- }
- .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;
- }
- .tb-type1 td select {
- width: 201px;
- }
- .tb-type1 td input[type="text"],
- .tb-type1 td select {
- margin-right: 4px;
- margin-left: 0;
- width: 195px;
- }
- .layui-form-select .layui-edge {
- right: -91px !important;
- }
- #selectAll {
- cursor: pointer;
- }
- #hover .success:hover:after {
- position: absolute;
- left: 520px;
- top: 162px;
- padding: 3px;
- color: #1d0d0d;
- content: attr(title);
- z-index: 4;
- width: 291px;
- text-align: center;
- }
- #hover .fail:hover:after {
- position: absolute;
- left: 520px;
- top: 162px;
- padding: 3px;
- color: #1d0d0d;
- content: attr(title);
- z-index: 4;
- width: 291px;
- text-align: center;
- }
- #hover .callback:hover:after {
- position: absolute;
- left: 520px;
- top: 162px;
- padding: 3px;
- color: #1d0d0d;
- content: attr(title);
- z-index: 4;
- width: 291px;
- text-align: center;
- }
- #hover .resale:hover:after {
- position: absolute;
- left: 520px;
- top: 162px;
- padding: 3px;
- color: #1d0d0d;
- content: attr(title);
- z-index: 4;
- width: 291px;
- text-align: center;
- }
- </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="index.php?act=refill_order_manual&op=index"><span>订单强制处理</span></a></li>
- <li><a href="JavaScript:void(0);" class="current"><span>订单批量处理</span></a></li>
- <li><a href="index.php?act=refill_order_manual&op=set_cancel_order"><span>拦截订单</span></a></li>
- <li><a href="index.php?act=refill_order_manual&op=refill_buyback"><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_manual"/>
- <input type="hidden" name="op" value="refill_order_batch"/>
- <table class="tb-type1 noborder search">
- <tr>
- <th><label for="query_start_time">下单时间</label></th>
- <td style="width: 327px">
- <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>
- </td>
- <th><label class="query_ors">供方名称</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 class="">客户名称</label></th>
- <td class="layui-form td_time" style="width: 110px;">
- <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>
- </tr>
- <tr>
- <th><label class="query_ors">订单号(多行查询)</label></th>
- <td><textarea style="width: 324px;" name="order_sns" id="order_sns" cols="30"
- rows="10"><?php echo $_GET['order_sns']; ?></textarea></td>
- <th><label class="query_ors">充值卡号(多行查询)</label></th>
- <td><textarea name="card_nos" id="card_nos" cols="30"
- rows="10"><?php echo $_GET['card_nos']; ?></textarea></td>
- <th><label class="query_ors">商家单号(多行查询)</label></th>
- <td><textarea name="mch_orders" id="mch_orders" cols="30"
- rows="10"><?php echo $_GET['mch_orders']; ?></textarea>
- </td>
- <th><label>充值类型</label></th>
- <td>
- <select name="card_type" class="querySelect" style="height: 29px;">
- <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>
- </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 id="hover">
- <a href="#" class="btns success" title="所选的订单全部手动处理为成功,只有待收货状态可操作">
- <span><i class="icon-edit"></i>批量成功</span>
- </a>
- <a href="#" class="btns fail" title="所选的订单全部手动处理为失败,只有待收货状态可操作">
- <span><i class="icon-edit"></i>批量失败</span>
- </a>
- <a href="#" class="btns callback" title="所选的订单全部手动处理为回调,只有交易完成或已取消状态可操作">
- <span><i class="icon-edit"></i>批量回调</span>
- </a>
- <a href="#" class="btns resale" title="所选的订单全部手动处理为返销,只有交易完成状态可操作">
- <span><i class="icon-edit"></i>批量返销</span>
- </a>
- </td>
- </tr>
- </table>
- </form>
- <table class="table tb-type2 nobdb">
- <thead>
- <tr class="thead">
- <th class="align-center" id="selectAll"><input type="checkbox" name="chbox" value=""></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-right">下单日期</th>
- <th class="align-right">耗时</th>
- <th class="align-center">订单状态</th>
- <th class="align-left">返销状态</th>
- <th class="align-left">运营商流水号</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>
- </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">
- <input type="checkbox" id="checkBoxList" name="checkbox" value="<?php echo $order['order_id'];?>">
- </td>
- <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['buyback'] == true ? '已反销': '/';?>
- </td>
- <td class="align-left"><?php echo $order['official_sn']; ?></td>
- <td class="align-left"><?php echo $order['quality_text']; ?></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="align-center">
- <?php if( ($order['order_state'] == ORDER_STATE_SUCCESS) && $order['is_retrying'] == 0){?>
- <a class="covercolor" href="#" data-id="<?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>
- <!-- 预警提示 -->
- <audio id="auto" src="<?php echo RESOURCE_SITE_URL; ?>/warning.mp3"></audio>
- </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; ?>/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 () {
- $('#ncsubmit').click(function () {
- $('#formSearch').submit();
- });
- $('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
- $('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
- // 日期选择器
- laydate.render({
- elem: '#startTime',
- type: 'datetime'
- });
- laydate.render({
- elem: '#endTime',
- type: 'datetime'
- });
- //双击
- $('.doubleclick').dblclick(function () {
- let order_sn = $(this).attr('data-order')
- $.get('index.php?act=refill_order&op=showOrders', {
- order_sn: order_sn
- }, function (data) {
- data = JSON.parse(data)
- if (data.state === 1) {
- let order_item = data.data
- let html = '';
- for (let i = 0; i < order_item.length; i++) {
- var item = order_item[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>
- <td class="db-center">${item.close_reason}</td>
- <tr>`
- }
- let 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>
- <th class="db-right">错误原因(订单)</th>
- </tr>
- </thead>
- <tbody>${html}</tbody>
- </table>`
- layer.open({
- title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
- content: content
- });
- } else {
- alert("没有此订单");
- }
- })
- })
- //过滤
- $("#card_nos").blur(function () {
- let test_mch = $("#card_nos").val();
- let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
- $(this).val(result)
- })
- $("#mch_orders").blur(function () {
- let test_mch = $("#mch_orders").val();
- let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
- $(this).val(result)
- })
- $("#order_sns").blur(function () {
- let test_mch = $("#order_sns").val();
- let result = test_mch.replace(/[\ \r\n\,]+/g, ",");
- $(this).val(result)
- })
- // 表格hover时背景
- $('.trFlex').each(function () {
- $(this).hover(function () {
- $(this)[0].style.backgroundColor = '#cbe9f3'
- }, function () {
- $(this)[0].style.backgroundColor = '#fff'
- })
- })
- //全选
- $('#selectAll').click(function () {
- if ($("input[name='chbox']").is(':checked')) {
- $("input[name='checkbox']").each(function () {
- this.checked = true;
- })
- } else {
- $("input[name='checkbox']").each(function () {
- this.checked = false;
- })
- }
- })
- // 供方名称颜色
- $('.textColor').each(function () {
- let color = $(this).attr('data-color')
- if (color == '1') {
- $(this).css('color', 'green')
- } else {
- $(this).css('color', 'red')
- }
- })
- //批量操作
- $('.success').click(function() {
- layer.confirm('您确定要批量成功', {
- btn: ['确定', '取消'],
- title: '批量成功'
- }, function () {
- let arr = [];
- $("input:checkbox:checked").each(function (i) {
- arr[i] = $(this).val();
- })
- let str = arr.join(",");
- let strr = str.substring(0, 1);
- let number = Number(strr);
- if (isNaN(number)) {
- let strrr = str.substring(1, str.length);
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=success&order_id= ${strrr ? strrr : ''}`
- } else if(!isNaN(number) && str !== '') {
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=success&order_id= ${str ? str : ''}`
- } else {
- layer.msg('请还没有任何操作,请先选择');
- }
- }, function () { layer.msg('取消成功');});
- })
- $('.fail').click(function() {
- layer.confirm('您确定要批量失败', {
- btn: ['确定', '取消'],
- title: '批量失败'
- }, function () {
- let arr = [];
- $("input:checkbox:checked").each(function (i) {
- arr[i] = $(this).val();
- })
- let str = arr.join(",");
- let strr = str.substring(0, 1);
- let number = Number(strr);
- if (isNaN(number)) {
- let strrr = str.substring(1, str.length);
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=cancel&order_id= ${strrr ? strrr : ''}`
- } else if(!isNaN(number) && str !== '') {
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=cancel&order_id= ${str ? str : ''}`
- } else {
- layer.msg('请还没有任何操作,请先选择');
- }
- }, function () {layer.msg('取消成功');});
- })
- $('.callback').click(function() {
- layer.confirm('您确定要批量回调', {
- btn: ['确定', '取消'],
- title: '批量回调'
- }, function () {
- let arr = [];
- $("input:checkbox:checked").each(function (i) {
- arr[i] = $(this).val();
- })
- let str = arr.join(",");
- let strr = str.substring(0, 1);
- let number = Number(strr);
- if (isNaN(number)) {
- let strrr = str.substring(1, str.length);
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=notify&order_id= ${strrr ? strrr : ''}`
- } else if(!isNaN(number) && str !== '') {
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=notify&order_id= ${str ? str : ''}`
- } else {
- layer.msg('请还没有任何操作,请先选择');
- }
- }, function () {layer.msg('取消成功');});
- })
- $('.resale').click(function() {
- layer.confirm('您确定要批量返销', {
- btn: ['确定', '取消'],
- title: '批量返销'
- }, function () {
- let arr = [];
- $("input:checkbox:checked").each(function (i) {
- arr[i] = $(this).val();
- })
- let str = arr.join(",");
- let strr = str.substring(0, 1);
- let number = Number(strr);
- if (isNaN(number)) {
- let strrr = str.substring(1, str.length);
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=buyback&order_id= ${strrr ? strrr : ''}`
- } else if(!isNaN(number) && str !== '') {
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=buyback&order_id= ${str ? str : ''}`
- } else {
- layer.msg('请还没有任何操作,请先选择');
- }
- }, function () {layer.msg('取消成功');});
- })
- //返销
- $('.covercolor').click(function() {
- let data_id = $(this).attr('data-id');
- layer.confirm('您确定要返销', {
- btn: ['确定', '取消'],
- title: '返销'
- }, function () {
- window.location.href = `index.php?act=refill_order_manual&op=refill_order_batch_dispose&type=buyback&order_id= ${data_id ? data_id : ''}`
- }, function () {layer.msg('取消成功');});
- })
- });
- </script>
|