Commit ad400db2 by 朱继来

调整订单列表其他信息展示

parent 3fea8ef7
......@@ -486,6 +486,27 @@ Class OrderController extends Controller
// 订单其他信息
public function orderOtherInfoLoading(Request $request)
{
$is_manager = $request->input('is_manager', 0);
if (!$is_manager) { // 非管理账户检查查询时间
$time_start = $request->input('time_start', '');
$time_end = $request->input('time_end', '');
if ($time_start && $time_end) {
$diff = $time_end - $time_start;
if ($diff >= 60*60*24*365) return ['err_code'=>1, 'err_msg'=>'查询时间不能超过一年'];
} else if ($time_end) {
return ['err_code'=>2, 'err_msg'=>'请选择开始时间'];
} else if ($time_start) {
$diff = time() - $time_start;
if ($diff >= 60*60*24*365) return ['err_code'=>1, 'err_msg'=>'查询时间不能超过一年'];
} else {
return ['err_code'=>3, 'err_msg'=>'请选择查询时间'];
}
}
// 判断页面
$tid = $request->input('pid', 1);
$info = $this->_search($request, $tid);
......
......@@ -329,14 +329,20 @@
location.href = listUrl;
})
// 指定账号加载信息
if (username == 'admin@ichunt.com') {
// 订单其他信息
var page_type = $('#page_type').val();
// 点击获取订单其他信息
$('.order-other-info').click(function(){
var page_type = $('#page_type').val(); // 区分页面 1-联营,2-自营,3-ERP
orderOtherInfo(page_type);
})
// 管理账户直接显示订单其他信息
if (manager == 1) {
var page_type = $('#page_type').val();
orderOtherInfo(page_type, 1);
}
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
function orderOtherInfo(pid) {
function orderOtherInfo(pid, is_manager=0) {
var order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val();
......@@ -370,6 +376,7 @@
is_new_order : $('#is_new_order').val() ? $('#is_new_order').val() : '',
business_type : $('#business_type').val() ? $('#business_type').val() : '',
pid : pid,
is_manager : is_manager,
};
$.ajax({
......@@ -396,10 +403,10 @@
}
$('.show-other-info').append(html);
$('.order-other-info').hide();
},
})
}
}
// 填写取消原因
this.cancelorder();
......
......@@ -286,14 +286,15 @@
@endif
</table>
</div>
<div class="row-fluid pagination">
@if ($username == 'admin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单
<div class="row-fluid pagination">
<div class="show-list-info">
<span>共{{$count ? $count : 0}}单</span>
<span class="show-other-info"></span>
</span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a class="btn btn-xs btn-info order-other-info" style="margin-top: -3px;">查看其它信息</a>
@endif
</div>
<?php echo $page; ?>
</div>
......@@ -304,7 +305,7 @@
var order_status = "{{$condition['order_status']}}";
var order_source = "{{$condition['order_source_pf']}}";
var order_send = "{{$condition['order_send']}}";
var username = "{{$username}}";
var manager = "{{$role}}";
$(".order_status").selectpicker({
actionsBox:true, //在下拉选项添加选中所有和取消选中的按钮
......
......@@ -456,13 +456,13 @@
</div>
<div class="row-fluid pagination">
@if ($username == 'admin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单
<div class="show-list-info">
<span>共{{$count ? $count : 0}}单</span>
<span class="show-other-info"></span>
</span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a class="btn btn-xs btn-info order-other-info" style="margin-top: -3px;">查看其它信息</a>
@endif
</div>
<?php echo $page; ?>
</div>
......@@ -480,7 +480,7 @@
var is_new = "{{$condition['is_new']}}";
var erp_order_id = "{{$condition['erp_order_id']}}";
var is_new_order = "{{$condition['is_new_order']}}";
var username = "{{$username}}";
var manager = "{{$role}}";
if (test_order) {
$('input[name=test_order]').attr('checked', true);
......
......@@ -348,14 +348,15 @@
@endif
</table>
</div>
<div class="row-fluid pagination">
@if ($username == 'admin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单
<div class="row-fluid pagination">
<div class="show-list-info">
<span>共{{$count ? $count : 0}}单</span>
<span class="show-other-info"></span>
</span>
@if (!in_array($username, ['vpadmin@ichunt.com', 'admin@ichunt.com']))
<a class="btn btn-xs btn-info order-other-info" style="margin-top: -3px;">查看其它信息</a>
@endif
</div>
<?php echo $page; ?>
</div>
......@@ -373,7 +374,7 @@
var order_send = "{{$condition['order_send']}}";
var order_pay_type = "{{$condition['order_pay_type']}}";
var is_new = "{{$condition['is_new']}}";
var username = "{{$username}}";
var manager = "{{$role}}";
if (test_order) {
$('input[name=test_order]').attr('checked', true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment