|
@@ -79,37 +79,54 @@
|
|
<input type="hidden" name="act" value="OrderSendList"/>
|
|
<input type="hidden" name="act" value="OrderSendList"/>
|
|
<input type="hidden" name="op" value="neterr_order"/>
|
|
<input type="hidden" name="op" value="neterr_order"/>
|
|
<input type="hidden" name="export" value=""/>
|
|
<input type="hidden" name="export" value=""/>
|
|
|
|
+ <input type="hidden" name="order_query" value=""/>
|
|
<table class="tb-type1 noborder search">
|
|
<table class="tb-type1 noborder search">
|
|
<tr>
|
|
<tr>
|
|
<th><label class="lefto">供方名称</label></th>
|
|
<th><label class="lefto">供方名称</label></th>
|
|
<td class="layui-form">
|
|
<td class="layui-form">
|
|
- <select name="store_id" class="querySelect" lay-verify="" lay-search>
|
|
|
|
- <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 name="store_id" class="">
|
|
|
|
+ <option data-color="<?php echo $provider['opened']?>" value=""><?php echo $lang['nc_please_choose']; ?> </option>
|
|
|
|
+ <?php if(!empty($output['special_stat'])){?>
|
|
|
|
+ <?php foreach($output['special_stat'] 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>
|
|
</select>
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<a href="javascript:void(0);" id="ncsubmit" class="btn-search "
|
|
<a href="javascript:void(0);" id="ncsubmit" class="btn-search "
|
|
title="<?php echo $lang['nc_query']; ?>">
|
|
title="<?php echo $lang['nc_query']; ?>">
|
|
</a>
|
|
</a>
|
|
- <a href="javascript:void(0);" id="ncexport" class="btns" >
|
|
|
|
- <span><i class="icon-edit"></i>导出</span>
|
|
|
|
- </a>
|
|
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
<table class="tb-type1 noborder search">
|
|
<table class="tb-type1 noborder search">
|
|
<tr>
|
|
<tr>
|
|
<td>
|
|
<td>
|
|
|
|
+ <a href="javascript:void(0);" id="order_query" class="btns" style="margin-right: 59px;">
|
|
|
|
+ <span><i class="icon-edit"></i>更新待收货订单状态</span>
|
|
|
|
+ </a>
|
|
|
|
+ <a href="#" class="btns" onclick="hCopyOrder(event)">
|
|
|
|
+ <span><i class="icon-edit"></i>拷贝我方订单号</span>
|
|
|
|
+ </a>
|
|
|
|
+ <a href="#" class="btns" onclick="hCopyMchOrder(event)">
|
|
|
|
+ <span><i class="icon-edit"></i>拷贝商家单号</span>
|
|
|
|
+ </a>
|
|
<a href="#" class="btns" onclick="hCopyChannel(event)">
|
|
<a href="#" class="btns" onclick="hCopyChannel(event)">
|
|
- <span><i class="icon-edit"></i>拷贝订单号</span>
|
|
|
|
|
|
+ <span><i class="icon-edit"></i>拷贝渠道单号</span>
|
|
</a>
|
|
</a>
|
|
<a href="#" class="btns" onclick="hCopyCardNo(event)">
|
|
<a href="#" class="btns" onclick="hCopyCardNo(event)">
|
|
<span><i class="icon-edit"></i>拷贝充值卡号</span>
|
|
<span><i class="icon-edit"></i>拷贝充值卡号</span>
|
|
</a>
|
|
</a>
|
|
- <a href="#" class="btns" id="hFail">
|
|
|
|
|
|
+ <a href="javascript:void(0);" id="ncexport" class="btns" style="margin: 0 59px;">
|
|
|
|
+ <span><i class="icon-edit"></i>导出Excel</span>
|
|
|
|
+ </a>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td>
|
|
|
|
+ <a href="#" class="btns fail">
|
|
<span><i class="icon-edit"></i>批量失败</span>
|
|
<span><i class="icon-edit"></i>批量失败</span>
|
|
</a>
|
|
</a>
|
|
</td>
|
|
</td>
|
|
@@ -121,7 +138,8 @@
|
|
<tr class="space odd" id="autoClick">
|
|
<tr class="space odd" id="autoClick">
|
|
<th colspan="12">
|
|
<th colspan="12">
|
|
<div class="title"><h5>
|
|
<div class="title"><h5>
|
|
- 数据统计</h5><span class="arrow"></span></div>
|
|
|
|
|
|
+ 数据统计</h5><span class="arrow"></span>
|
|
|
|
+ </div>
|
|
</th>
|
|
</th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
@@ -129,6 +147,13 @@
|
|
<ul>
|
|
<ul>
|
|
<li class="lineLi" style="color:#000;">总计订单数量:<?php echo $output['stat']['order_count'] ?? 0 ?></li>
|
|
<li class="lineLi" style="color:#000;">总计订单数量:<?php echo $output['stat']['order_count'] ?? 0 ?></li>
|
|
</ul>
|
|
</ul>
|
|
|
|
+ <ul id="special_stat">
|
|
|
|
+ <?php if(!empty($output['special_stat'])) {
|
|
|
|
+ foreach ($output['special_stat'] as $stat){
|
|
|
|
+ ?>
|
|
|
|
+ <li class="lineLi" style="color:#000;"><?php echo "{$stat['store_name']} :{$stat['order_count']}" ?></li>
|
|
|
|
+ <?php }}?>
|
|
|
|
+ </ul>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
@@ -136,7 +161,7 @@
|
|
<table class="table tb-type2 nobdb">
|
|
<table class="table tb-type2 nobdb">
|
|
<thead>
|
|
<thead>
|
|
<tr class="thead">
|
|
<tr class="thead">
|
|
- <th class="align-center" id="selectAll">全选</th>
|
|
|
|
|
|
+ <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>
|
|
@@ -162,9 +187,7 @@
|
|
<?php
|
|
<?php
|
|
foreach ($output['order_list'] as $key => $order) { ?>
|
|
foreach ($output['order_list'] as $key => $order) { ?>
|
|
<tr class="hover trFlex">
|
|
<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"><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-center"><?php echo $key + 1; ?></td>
|
|
<td class="align-left"><?php echo $order['order_sn']; ?></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['mchid']; ?></td>
|
|
@@ -243,121 +266,95 @@
|
|
});
|
|
});
|
|
$('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
|
|
$('#query_start_time').datepicker({dateFormat: 'yy-mm-dd'});
|
|
$('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
|
|
$('#query_end_time').datepicker({dateFormat: 'yy-mm-dd'});
|
|
- //全选
|
|
|
|
- $('#selectAll' ).click ( function () {
|
|
|
|
- if ($(this).text() == '全选') {
|
|
|
|
- $("input[name='checkbox']").each(function() {
|
|
|
|
- this.checked = true;
|
|
|
|
- })
|
|
|
|
- $(this).text("取消全选")
|
|
|
|
- } else {
|
|
|
|
- $("input[name='checkbox']").each(function() {
|
|
|
|
- this.checked = false;
|
|
|
|
- })
|
|
|
|
- $(this).text("全选")
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- //批量
|
|
|
|
- $('#hFail').click(function () {
|
|
|
|
- layer.confirm('您确定要批量失败', {
|
|
|
|
- btn: ['确定','取消'],
|
|
|
|
- title:'批量失败'
|
|
|
|
- }, function(){
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- let arr = [];
|
|
|
|
- $("input:checkbox:checked").each(function (i) {
|
|
|
|
- arr[i] = $(this).val();
|
|
|
|
- })
|
|
|
|
- let str = arr.join(",");
|
|
|
|
- // console.log(str);
|
|
|
|
- if (str != '') {
|
|
|
|
- window.location.href =`index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${str ? str : ''}&type=cancel`
|
|
|
|
- console.log(str);
|
|
|
|
- // layer.msg('批量成功', {icon: 1});
|
|
|
|
-
|
|
|
|
|
|
+ //全选
|
|
|
|
+ $('#selectAll').click(function () {
|
|
|
|
+ if ($("input[name='chbox']").is(':checked')) {
|
|
|
|
+ $("input[name='checkbox']").each(function () {
|
|
|
|
+ this.checked = true;
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
- layer.msg('请还没有任何操作,请先选择');
|
|
|
|
|
|
+ $("input[name='checkbox']").each(function () {
|
|
|
|
+ this.checked = false;
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }, function(){
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- //手动成功
|
|
|
|
- $('.hsuccess').click(function() {
|
|
|
|
- let succid = $(this).attr('data_id');
|
|
|
|
- layer.prompt({
|
|
|
|
-
|
|
|
|
- // formType: 1 ,
|
|
|
|
- title: '请输入运营商流水号' ,
|
|
|
|
- // area: [ '500px' , '150px' ],
|
|
|
|
- // btnAlign: 'c' ,
|
|
|
|
- yes: function(index, layero){
|
|
|
|
- // 获取文本框输入的值
|
|
|
|
- var value = layero.find( ".layui-layer-input" ).val();
|
|
|
|
- console.log(value);
|
|
|
|
- if (value) {
|
|
|
|
- window.location.href =`index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=success&official_sn= ${value}`
|
|
|
|
- // layer.close(index);
|
|
|
|
- } else {
|
|
|
|
- window.location.href =`index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=success`
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ //批量失败
|
|
|
|
+ $('.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=ordersendlist&op=neterr_order_manual&type=cancel&order_ids= ${strrr ? strrr : ''}`
|
|
|
|
+ } else if(!isNaN(number) && str !== '') {
|
|
|
|
+ window.location.href = `index.php?act=ordersendlist&op=neterr_order_manual&type=cancel&order_ids= ${str ? str : ''}`
|
|
|
|
+ } else {
|
|
|
|
+ layer.msg('请还没有任何操作,请先选择');
|
|
|
|
+ }
|
|
|
|
+ }, function () {layer.msg('取消成功');});
|
|
|
|
+ })
|
|
|
|
+ //手动成功
|
|
|
|
+ $('.hsuccess').click(function () {
|
|
|
|
+ let succid = $(this).attr('data_id');
|
|
|
|
+ layer.prompt({
|
|
|
|
+ title: '请输入运营商流水号',
|
|
|
|
+ yes: function (index, layero) {
|
|
|
|
+ var value = layero.find(".layui-layer-input").val();
|
|
|
|
+ if (value) {
|
|
|
|
+ window.location.href = `index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=success&official_sn= ${value}`
|
|
|
|
+ } else {
|
|
|
|
+ window.location.href = `index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=success`
|
|
}
|
|
}
|
|
- });
|
|
|
|
- })
|
|
|
|
- //手动失败
|
|
|
|
- $('.hcancel').click(function() {
|
|
|
|
- let succid = $(this).attr('data_id');
|
|
|
|
- layer.confirm('确定要手动失败 ?', {
|
|
|
|
- btn: ['确定','失败'] //按钮
|
|
|
|
- }, function(){
|
|
|
|
- window.location.href =`index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=cancel`
|
|
|
|
- }, function(){
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //双击
|
|
|
|
- $('.doubleclick').dblclick(function() {
|
|
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ //手动失败
|
|
|
|
+ $('.hcancel').click(function () {
|
|
|
|
+ let succid = $(this).attr('data_id');
|
|
|
|
+ layer.confirm('确定要手动失败 ?', {
|
|
|
|
+ btn: ['确定', '失败'] //按钮
|
|
|
|
+ }, function () {
|
|
|
|
+ window.location.href = `index.php?act=ordersendlist&op=neterr_order_manual&order_ids= ${succid}&type=cancel`
|
|
|
|
+ }, function () {
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ //双击
|
|
|
|
+ $('.doubleclick').dblclick(function () {
|
|
let db_click = $(this).attr('data-order')
|
|
let db_click = $(this).attr('data-order')
|
|
$.get('index.php?act=refill_order&op=showOrders', {
|
|
$.get('index.php?act=refill_order&op=showOrders', {
|
|
- order_sn:db_click
|
|
|
|
- }, function(data) {
|
|
|
|
|
|
+ order_sn: db_click
|
|
|
|
+ }, function (data) {
|
|
data = JSON.parse(data)
|
|
data = JSON.parse(data)
|
|
-
|
|
|
|
if (data.state == 1) {
|
|
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>
|
|
|
|
- <td class="db-center">${item.close_reason}</td>
|
|
|
|
- <tr>
|
|
|
|
- `
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ 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>
|
|
|
|
+ <td class="db-center">${item.close_reason}</td>
|
|
|
|
+ <tr>`
|
|
|
|
+ }
|
|
layer.open({
|
|
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>
|
|
|
|
|
|
+ title: `<span>共${data.count}单</span> <span class="db-top">回调状态:${data.mch_notify_state}</span> <span>回调次数:${data.mch_notify_times}</span>`,
|
|
|
|
+ content: `<table>
|
|
|
|
+ <thead>
|
|
<tr>
|
|
<tr>
|
|
<th class="db-right">订单号</th>
|
|
<th class="db-right">订单号</th>
|
|
<th class="db-right">下单日期</th>
|
|
<th class="db-right">下单日期</th>
|
|
@@ -373,16 +370,11 @@
|
|
${html}
|
|
${html}
|
|
</tbody>
|
|
</tbody>
|
|
</table>`,
|
|
</table>`,
|
|
-
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
alert("没有此订单");
|
|
alert("没有此订单");
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
})
|
|
})
|
|
-
|
|
|
|
})
|
|
})
|
|
// 日期选择器
|
|
// 日期选择器
|
|
laydate.render({
|
|
laydate.render({
|
|
@@ -425,8 +417,8 @@
|
|
$(this).css('color', 'red')
|
|
$(this).css('color', 'red')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- // 导出
|
|
|
|
- $('#ncexport').click(function () {
|
|
|
|
|
|
+ // 导出
|
|
|
|
+ $('#ncexport').click(function () {
|
|
$('input[name="export"]').val('1');
|
|
$('input[name="export"]').val('1');
|
|
$('#formSearch').submit();
|
|
$('#formSearch').submit();
|
|
$('input[name="export"]').val('');
|
|
$('input[name="export"]').val('');
|
|
@@ -437,7 +429,18 @@
|
|
})
|
|
})
|
|
});
|
|
});
|
|
|
|
|
|
- function hCopyChannel(e) {
|
|
|
|
|
|
+ // 更新待收货状态
|
|
|
|
+ $('#order_query').click(function () {
|
|
|
|
+ $('input[name="order_query"]').val('1');
|
|
|
|
+ $('#formSearch').submit();
|
|
|
|
+ $('input[name="order_query"]').val('');
|
|
|
|
+ var ii = layer.load();
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ layer.close(ii);
|
|
|
|
+ }, 800);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function hCopyOrder(e) {
|
|
let str = ''
|
|
let str = ''
|
|
$('#tbody tr').each(function () {
|
|
$('#tbody tr').each(function () {
|
|
let res = $(this).find('td').eq(2).text()
|
|
let res = $(this).find('td').eq(2).text()
|
|
@@ -453,7 +456,7 @@
|
|
oInput.parentNode.removeChild(oInput)
|
|
oInput.parentNode.removeChild(oInput)
|
|
}
|
|
}
|
|
|
|
|
|
- function hCopyCardNo(e) {
|
|
|
|
|
|
+ function hCopyCardNo(e) {
|
|
let str = ''
|
|
let str = ''
|
|
$('#tbody tr').each(function () {
|
|
$('#tbody tr').each(function () {
|
|
let res = $(this).find('td').eq(5).text()
|
|
let res = $(this).find('td').eq(5).text()
|
|
@@ -468,4 +471,34 @@
|
|
document.execCommand("Copy"); // 执行浏览器复制命令
|
|
document.execCommand("Copy"); // 执行浏览器复制命令
|
|
oInput.parentNode.removeChild(oInput)
|
|
oInput.parentNode.removeChild(oInput)
|
|
}
|
|
}
|
|
|
|
+ function hCopyMchOrder(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 hCopyChannel(e) {
|
|
|
|
+ let str = ''
|
|
|
|
+ $('#tbody tr').each(function () {
|
|
|
|
+ let res = $(this).find('td').eq(16).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>
|
|
</script>
|