Commit ff3064c3 by 朱继来

调整订单列表信息

parent 19f41868
......@@ -389,28 +389,26 @@ Class OrderController extends Controller
$map = array();
// 页面参数
if ($request->isMethod('get')) {
$map['order_type'] = $request->input('order_type', '');
$map['order_contain'] = $request->input('order_contain', '');
$map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', '');
$map['sale_type'] = $request->input('sale_type', '');
$map['shipping_name'] = $request->input('shipping_name', '');
$map['order_send'] = $request->input('order_send', '');
$map['test_order'] = $request->input('test_order', '');
$map['order_pay_type'] = $request->input('order_pay_type', '');
$map['order_type_a'] = $request->input('order_type_a', '');
$map['order_source'] = $request->input('order_source', '');
$map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_source_ptag'] = $request->input('order_source_ptag', '');
$map['erp_order_id'] = $request->input('erp_order_id', '');
$map['order_payment_mode'] = $request->input('order_payment_mode', '');
$map['order_invoice_status']= $request->input('order_invoice_status', '');
$map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', '');
}
$map['order_type'] = $request->input('order_type', '');
$map['order_contain'] = $request->input('order_contain', '');
$map['time_start'] = $request->input('time_start', '');
$map['time_end'] = $request->input('time_end', '');
$map['order_status'] = $request->input('order_status', '');
$map['sale_type'] = $request->input('sale_type', '');
$map['shipping_name'] = $request->input('shipping_name', '');
$map['order_send'] = $request->input('order_send', '');
$map['test_order'] = $request->input('test_order', '');
$map['order_pay_type'] = $request->input('order_pay_type', '');
$map['order_type_a'] = $request->input('order_type_a', '');
$map['order_source'] = $request->input('order_source', '');
$map['order_source_pf'] = $request->input('order_source_pf', '');
$map['order_source_adtag'] = $request->input('order_source_adtag', '');
$map['order_source_ptag'] = $request->input('order_source_ptag', '');
$map['erp_order_id'] = $request->input('erp_order_id', '');
$map['order_payment_mode'] = $request->input('order_payment_mode', '');
$map['order_invoice_status']= $request->input('order_invoice_status', '');
$map['is_new'] = $request->input('is_new', '');
$map['is_new_order'] = $request->input('is_new_order', '');
// 订单查看权限---交易员、客服、测试
if (in_array($info['role'], [3, 4])) {
......@@ -486,12 +484,7 @@ Class OrderController extends Controller
$info['condition'] = $info['map'];
$info['sale_list'] = $sale_list;
$info['list'] = $response['data']['data'];
$info['pay_count'] = $response['data']['pay_count'];
$info['count'] = $response['data']['count'];
$info['user_count'] = $response['data']['user_count'];
$info['paid_user_count'] = $response['data']['paid_user_count'];
$info['paid_order_count'] = $response['data']['paid_order_count'];
$info['noreason_count'] = $response['data']['noreason_count'];
$info['page'] = $show;
return $info;
......
......@@ -87,11 +87,11 @@ Class OrderCountController extends Controller
$time_today_start = strtotime(date('Y-m-d'));
$time_today_end = strtotime(date('Y-m-d',time()+3600*24))-1;
$map['time_start'] = $time_start = !empty($time_start) ? $time_start : $time_today_start;
$map['time_end'] = $time_end = !empty($time_end) ? $time_end : $time_today_end;
$map['checkTime'] = $checkTime = $request->input('checkTime', '1'); // 默认选择订单付款时间
$map['checkStatus'] = $checkStatus = $request->input('checkStatus', '1'); // 默认选择查询全部
$map['time_start'] = $time_start = !empty($time_start) ? $time_start : $time_today_start;
$map['time_end'] = $time_end = !empty($time_end) ? $time_end : $time_today_end;
$map['checkTime'] = $checkTime = $request->input('checkTime', '1'); // 默认选择订单付款时间
$map['checkStatus'] = $checkStatus = $request->input('checkStatus', '1'); // 默认选择查询全部
$map['order_goods_type'] = $type;
// 竞调账号
......@@ -100,7 +100,7 @@ Class OrderCountController extends Controller
}
// 调用API
$url = Config('website.api_domain').'order/getOrderAmount';
$url = Config('website.api_domain').'order/getAllOrder';
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
......@@ -114,8 +114,6 @@ Class OrderCountController extends Controller
if ($response['err_code'] == 0) {
$count = $response['data']['count'];
$pay_count = $response['data']['pay_count'];
if($count > 0){
$pageSize = 10;
$page = new Page($count, $pageSize);
......@@ -125,13 +123,12 @@ Class OrderCountController extends Controller
}
$info['list'] = $response['data']['data'];
$info['pay_count'] = $response['data']['pay_count'];
}
$info['checkTime'] = $checkTime;
$info['checkStatus'] = $checkStatus;
$info['time_start'] = $time_start;
$info['time_end'] = $time_end;
$info['checkTime'] = $checkTime;
$info['checkStatus'] = $checkStatus;
$info['time_start'] = $time_start;
$info['time_end'] = $time_end;
return view($view, $info);
}
......@@ -147,4 +144,33 @@ Class OrderCountController extends Controller
{
return $this->amount($request, 2, 'amount');
}
// 金额统计
public function orderAmountInfoLoading(REQUEST $request)
{
$time_start = $request->input('time_start', ''); // 开始时间
$time_end = $request->input('time_end', ''); // 结束时间
// 今日开始、结束时间
$time_today_start = strtotime(date('Y-m-d'));
$time_today_end = strtotime(date('Y-m-d',time()+3600*24))-1;
$map['time_start'] = !empty($time_start) ? $time_start : $time_today_start;
$map['time_end'] = !empty($time_end) ? $time_end : $time_today_end;
$map['checkTime'] = $request->input('checkTime', '1'); // 默认选择订单付款时间
$map['checkStatus'] = $request->input('checkStatus', '1'); // 默认选择查询全部
$map['order_goods_type'] = $request->input('type', '1');
$url = Config('website.api_domain').'order/getOrderAmount';
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['map'] = $map;
$response = json_decode(curlApi($url, $data), true);
return $response;
}
}
\ No newline at end of file
......@@ -63,6 +63,7 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/self_count', 'OrderCountController@selfCount');
Route::get('/amount', 'OrderCountController@amount');
Route::get('/self_amount', 'OrderCountController@selfAmount');
Route::post('/ajax/orderAmountInfoLoading', 'OrderCountController@orderAmountInfoLoading');
Route::get('/self_order', 'OrderController@selfOrder');
Route::post('/ajaxCancel', 'OrderController@ajaxCancel');
......
......@@ -280,6 +280,7 @@
}
})
// ERP订单列表
$('.searchErpOrder').click(function(){
var order_type = $('#order_type').data('default'),
order_contain = $('input[name=order_contain]').val(),
......@@ -325,63 +326,75 @@
// 订单其他信息
var page_type = $('#page_type').val();
this.orderOtherInfo(page_type);
orderOtherInfo(page_type);
// 填写取消原因
this.cancelorder();
},
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
function orderOtherInfo(pid) {
var order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val();
// 订单其他信息:已付款, 下单用户数, 付款用户数, 金额
orderOtherInfo:function(pid) {
var datax = {
order_type : $('#order_type').data('default'),
order_contain : $('input[name=order_contain]').val(),
time_start : $('input[name="time_start"]').val(),
time_end : $('input[name="time_end"]').val(),
order_pay_type : $('#order_pay_type').val() ? $('#order_pay_type').val() : '',
order_status : $('#order_status').val() ? $('#order_status').val() : '',
sale_type : $('#sale_type').val() ? $('#sale_type').val() : '',
shipping_name : $('#shipping_name').val() ? $('#shipping_name').val() : '',
order_send : $('#order_send').val(),
order_source_pf : $('#order_source_pf').val() ? $('#order_source_pf').val() : '',
order_invoice_status : $('#order_invoice_status').val() ? $('#order_invoice_status').val() : '',
order_source_adtag : $('input[name="order_source_adtag"]').val(),
order_source_ptag : $('input[name="order_source_ptag"]').val(),
erp_order_id : $('#erp_order_id').val() ? $('#erp_order_id').val() : '',
test_order : $('input[name=test_order]').is(':checked') ? 1 : 0,
is_new : $('#is_new').val() ? $('#is_new').val() : '',
order_payment_mode : $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
is_new_order : $('#is_new_order').val() ? $('#is_new_order').val() : '',
pid : pid,
};
$.ajax({
type: "POST",
url: '/ajax/orderOtherInfoLoading',
data: datax,
dataType: "json",
success: function(resp){
if (resp.err_code != 0) {
layer.msg(resp.err_msg);
return false;
}
var data = resp.data;
var html = '';
if(time_start){
time_start = Date.parse(time_start) / 1000;
}
if (pid != 3) {
html += '<span class="paid_order_count">'+data.paid_order_count+'单已付款(包含预付款),</span><span class="user_count">下单用户数为'+data.user_count+'人,</span><span class="paid_user_count">付款用户数为'+data.paid_user_count+'人,</span>';
}
if(time_end){
time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
}
html += '<span class="rmb_count">应付金额 ¥'+data.pay_count.rmb_count+',</span><span class="usd_count">$'+data.pay_count.usd_count+',</span><span class="rmb_pay">实收金额 ¥'+data.pay_count.rmb_pay+',</span><span class="usd_pay">$'+data.pay_count.usd_pay+',</span>';
var datax = {
order_type : $('#order_type').data('default'),
order_contain : specialStr(order_contain),
time_start : time_start,
time_end : time_end,
order_pay_type : $('#order_pay_type').val() ? $('#order_pay_type').val() : '',
order_status : $('#order_status').val() ? $('#order_status').val() : '',
sale_type : $('#sale_type').val() ? $('#sale_type').val() : '',
shipping_name : $('#shipping_name').val() ? $('#shipping_name').val() : '',
order_send : $('#order_send').val(),
order_source_pf : $('#order_source_pf').val() ? $('#order_source_pf').val() : '',
order_invoice_status : $('#order_invoice_status').val() ? $('#order_invoice_status').val() : '',
order_source_adtag : $('input[name="order_source_adtag"]').val(),
order_source_ptag : $('input[name="order_source_ptag"]').val(),
erp_order_id : $('#erp_order_id').val() ? $('#erp_order_id').val() : '',
test_order : $('input[name=test_order]').is(':checked') ? 1 : 0,
is_new : $('#is_new').val() ? $('#is_new').val() : '',
order_payment_mode : $('#order_payment_mode').val() ? $('#order_payment_mode').val() : '',
is_new_order : $('#is_new_order').val() ? $('#is_new_order').val() : '',
pid : pid,
};
$.ajax({
type: "POST",
url: '/ajax/orderOtherInfoLoading',
data: datax,
dataType: "json",
success: function(resp){
if (resp.err_code != 0) {
layer.msg(resp.err_msg);
return false;
}
var data = resp.data;
var html = '';
if (pid != 3) {
html += '<span class="paid_order_count">'+data.paid_order_count+'单已付款(包含预付款),</span><span class="user_count">下单用户数为'+data.user_count+'人,</span><span class="paid_user_count">付款用户数为'+data.paid_user_count+'人,</span>';
}
if (pid != 3 && data.noreason_count) {
html += '<span class="error">共有'+data.noreason_count+'单已取消订单未填写取消原因</span>';
}
html += '<span class="rmb_count">应付金额 ¥'+data.pay_count.rmb_count+',</span><span class="usd_count">$'+data.pay_count.usd_count+',</span><span class="rmb_pay">实收金额 ¥'+data.pay_count.rmb_pay+',</span><span class="usd_pay">$'+data.pay_count.usd_pay+',</span>';
$('.show-other-info').append(html);
},
})
},
if (pid != 3 && data.noreason_count) {
html += '<span class="error">共有'+data.noreason_count+'单已取消订单未填写取消原因</span>';
}
$('.show-other-info').append(html);
},
})
}
// 填写取消原因
this.cancelorder();
},
// 取消订单弹框
cancelorder:function () {
......
......@@ -8,6 +8,7 @@
self.bind();
},
bind:function(){
// 订单列表
$('.order-amount-search').click(function(){
var type = $('input[name=type]').val(),
checkTime = $('#checkTime').val(),
......@@ -28,6 +29,64 @@
location.href = url;
})
// 订单金额信息
var status = $('#status').val();
var type = $('#type').val();
orderAmountInfo(status, type);
function orderAmountInfo(status, type) {
var type = $('input[name=type]').val(),
checkTime = $('#checkTime').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
checkStatus = $('#status').val();
if(time_start){
time_start = Date.parse(time_start) / 1000;
}
if(time_end){
time_end = Date.parse(time_end) / 1000 + (24*60*60-1);
}
var datax = {
type : type,
checkTime : checkTime,
time_start : time_start,
time_end : time_end,
checkStatus : checkStatus,
};
$.ajax({
type: "POST",
url: '/ajax/orderAmountInfoLoading',
data: datax,
dataType: "json",
success: function(resp){
if (resp.err_code != 0) {
layer.msg(resp.err_msg);
return false;
}
var data = resp.data;
var html = '';
html += '<span>实收金额:¥'+data.rmb_pay+',</span><span>$'+data.usd_pay+',</span>';
if (checkStatus == 1) {
html += '<span>已完成金额:¥'+data.rmb_pay_finish+',</span><span>$'+data.usd_pay_finish+',</span>'+
'<span>未完成金额:¥'+data.rmb_pay_unfinish+',</span><span>$'+data.usd_pay_unfinish+'</span>';
} else if (checkStatus == 2) {
html += '<span>已完成金额:¥'+data.rmb_pay_finish+',</span><span>$'+data.usd_pay_finish+'</span>';
} else {
html += '<span>未完成金额:¥'+data.rmb_pay_unfinish+',</span><span>$'+data.usd_pay_unfinish+'</span>';
}
$('.show-list-info').append(html);
},
})
}
}
}
......
......@@ -23,8 +23,7 @@
<option value="2">已完成</option>
<option value="3">未完成</option>
</select>
<input type="hidden" name="type" value="{{ $type }}">
<button class="btn btn-primary order-amount-search">搜索</button>
</div>
</div>
......@@ -114,23 +113,13 @@
@endforeach
@endif
</table>
</div>
<input type="hidden" name="status" id="status" value="{{$checkStatus}}">
<input type="hidden" name="type" id="type" value="{{$type}}">
</div>
<div class="row-fluid pagination">
<span class="show-list-info">
@if ($checkStatus == 1)
实收金额:¥{{isset($pay_count['rmb_pay']) ? $pay_count['rmb_pay'] : 0}} &nbsp; ${{isset($pay_count['usd_pay']) ? $pay_count['usd_pay'] : 0}}
已完成金额:¥{{!empty($pay_count['rmb_pay_finish']) ? $pay_count['rmb_pay_finish'] : 0}} &nbsp; ${{!empty($pay_count['usd_pay_finish']) ? $pay_count['usd_pay_finish'] : 0}}
未完成金额:¥{{!empty($pay_count['rmb_pay_unfinish']) ? $pay_count['rmb_pay_unfinish'] : 0}} &nbsp; ${{!empty($pay_count['usd_pay_unfinish']) ? $pay_count['usd_pay_unfinish'] : 0}}
@elseif ($checkStatus == 2)
实收金额:¥{{isset($pay_count['rmb_pay']) ? $pay_count['rmb_pay'] : 0}} &nbsp; ${{isset($pay_count['usd_pay']) ? $pay_count['usd_pay'] : 0}}
已完成金额:¥{{!empty($pay_count['rmb_pay_finish']) ? $pay_count['rmb_pay_finish'] : 0}} &nbsp; ${{!empty($pay_count['usd_pay_finish']) ? $pay_count['usd_pay_finish'] : 0}}
@else
实收金额:¥{{isset($pay_count['rmb_pay']) ? $pay_count['rmb_pay'] : 0}} &nbsp; ${{isset($pay_count['usd_pay']) ? $pay_count['usd_pay'] : 0}}
未完成金额:¥{{!empty($pay_count['rmb_pay_unfinish']) ? $pay_count['rmb_pay_unfinish'] : 0}} &nbsp; ${{!empty($pay_count['usd_pay_unfinish']) ? $pay_count['usd_pay_unfinish'] : 0}}
@endif
</span>
<span class="show-list-info"></span>
<?php echo isset($page) ? $page : ''; ?>
</div>
......
......@@ -290,9 +290,7 @@
@if ($username != 'vpadmin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单,
<!-- 应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}} -->
<span class="show-other-info"></span>
</span>
@endif
......
......@@ -459,18 +459,9 @@
@if ($username != 'vpadmin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单,
<!-- {{$paid_order_count}}单已付款(包含预付款),
下单用户数为{{$user_count}}人,
付款用户数为{{$paid_user_count}}人,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}},
@if ($noreason_count)
<span class="error">共有{{$noreason_count}}单已取消订单未填写取消原因</span>
@endif -->
<span class="show-other-info"></span>
</span>
</span>
@endif
<?php echo $page; ?>
......
......@@ -339,12 +339,7 @@
@if ($username != 'vpadmin@ichunt.com')
<span class="show-list-info">
共{{$count ? $count : 0}}单,
<!-- {{$paid_order_count}}单已付款(包含预付款),
下单用户数为{{$user_count}}人,
付款用户数为{{$paid_user_count}}人,
应付金额 ¥{{$pay_count['rmb_count'] ? $pay_count['rmb_count'] : 0}}, ${{$pay_count['usd_count'] ? $pay_count['usd_count'] : 0}},
实收金额 ¥{{$pay_count['rmb_pay'] ? $pay_count['rmb_pay'] : 0}},
${{$pay_count['usd_pay'] ? $pay_count['usd_pay'] : 0}} -->
<span class="show-other-info"></span>
</span>
@endif
......
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