Commit 290c11ad by 朱继来

添加ERP订单列表

parent 4d4570c8
......@@ -214,6 +214,58 @@ Class OrderController extends Controller
return view('orderlist', $info);
}
// erp订单
public function erpOrder(Request $request)
{
$info = $this->getPageInfo($request);
$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['order_send'] = $request->input('order_send', '');
}
/* 查看ERP订单 */
$map['online_order'] = 2;
// 获取所有的业务员 (包括经理和交易员)
$perm = new PermController;
$manager = $perm->getRoleUsers($request, '经理');
$sale_list = $perm->getRoleUsers($request, '交易员');
$sale_list = array_merge($manager, $sale_list);
//获取订单列表
$url = Config('website.api_domain').'order/getAllOrder';
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$data['p'] = $request->input('p', 1); // 当前页码
$data['map'] = $map;
$response = json_decode(curlApi($url, $data), true);
// 分页
$page = new Page($response['data']['count'], 10);
$page->setConfig('theme', '%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%');
$show = $page->show();
$info['condition'] = $map;
$info['sale_list'] = $sale_list;
$info['list'] = $response['data']['data'];
$info['pay_count'] = $response['data']['pay_count'];
$info['count'] = $response['data']['count'];
$info['page'] = $show;
return view('erpOrder', $info);
}
// 获取对应部门人员
public function getSales($title='')
{
......
......@@ -33,6 +33,7 @@ Route::pattern('roleId', '[0-9]+');
Route::group(['middleware' => 'web'], function () {
Route::get('/', 'OrderController@orderList');
Route::get('/list', 'OrderController@orderList');
Route::get('/erp_order', 'OrderController@erpOrder');
Route::get('/export', 'OrderController@export');
Route::get('/details/{id}', 'OrderController@details');
......
......@@ -2,7 +2,9 @@
return [
// 菜单权限
'订单管理' => [
'订单列表' => ['orderlist_check', 'export', 'check_order', 'cancel_order', 'check_account', 'order_send', 'send_invoice', 'update_address', 'update_invoice', 'check_test_order', 'check_offline_order'],
'平台订单' => ['orderlist_check', 'export', 'check_order', 'cancel_order', 'check_account', 'order_send', 'send_invoice', 'update_address', 'update_invoice', 'check_test_order', 'check_offline_order'],
'ERP订单' => ['erp_order_check'],
'订单统计' => ['ordercount_check'],
],
......
......@@ -258,4 +258,12 @@ input[type="color"],
}
.error{
color: red;
}
.show-title {
width:450px;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
margin-bottom: 0;
}
\ No newline at end of file
......@@ -19,7 +19,7 @@
order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_type_a = $('#order_type_a').data('default'),
// order_type_a = $('#order_type_a').data('default'),
order_pay_type = $('#order_pay_type').data('default'),
order_status = $('#order_status').data('default'),
shipping_name = $('#shipping_name').data('default'),
......@@ -47,9 +47,9 @@
listUrl += '&time_end='+time_end;
}
if (order_type_a) {
listUrl += '&order_type_a=' + order_type_a;
}
// if (order_type_a) {
// listUrl += '&order_type_a=' + order_type_a;
// }
if (order_pay_type) {
listUrl += '&order_pay_type=' + order_pay_type;
......@@ -92,7 +92,7 @@
order_contain = $('input[name=order_contain]').val(),
time_start = $('input[name="time_start"]').val(),
time_end = $('input[name="time_end"]').val(),
order_type_a = $('#order_type_a').data('default'),
// order_type_a = $('#order_type_a').data('default'),
order_pay_type = $('#order_pay_type').data('default'),
order_status = $('#order_status').data('default'),
shipping_name = $('#shipping_name').data('default'),
......@@ -127,7 +127,7 @@
test_order = '';
}
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_type_a='+order_type_a+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&test_order='+test_order;
location.href = '/export?order_type='+order_type+'&order_contain='+order_contain+'&time_start='+time_start+'&time_end='+time_end+'&order_pay_type='+order_pay_type+'&order_status='+order_status+'&shipping_name='+shipping_name+'&order_send='+order_send+'&order_source_pf='+order_source_pf+'&order_source_adtag='+order_source_adtag+'&test_order='+test_order;
})
// 选择查看测试订单
......@@ -198,7 +198,46 @@
content: content
});
});
$('.searchErpOrder').click(function(){
var 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_status = $('#order_status').data('default'),
order_send = $('#order_send').data('default'),
listUrl = '/erp_order';
listUrl += '?order_type=' + order_type;
if (order_contain) {
listUrl += '&order_contain=' + order_contain;
}
if(time_start){
time_start = Date.parse(time_start) / 1000;
listUrl += '&time_start='+time_start;
}
if(time_end){
time_end = Date.parse(time_end) / 1000;
listUrl += '&time_end='+time_end;
}
if (order_status) {
listUrl += '&order_status=' + order_status;
}
if (order_send) {
listUrl += '&order_send=' + order_send;
}
location.href = listUrl;
})
},
details:function(){
var self = this;
var action_type=$('.action_type').val();
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>订单管理后台 | 订单列表</title>
<script>document.domain="{{ Config::get('website.domain') }}";</script>
@include('orderlist.css')
@include('orderlist.js')
</head>
<body class="">
<div id="wrapper">
<!-- layouts.navigation -->
@include('layouts.navigation')
<div id="page-wrapper" class="gray-bg">
<div class="row">
@include('erpOrder.content')
</div>
</div>
</div>
</body>
......@@ -30,7 +30,7 @@
<input type="text" name="time_end" value="{{ !empty($condition['time_end']) ? date('Y/m/d', $condition['time_end']) : '' }}" class="Wdate " onfocus="WdatePicker({dateFmt:'yyyy/MM/dd'})" placeholder="结束时间"/>
</dd>
</dl>
<dl>
<!-- <dl>
<dt>订单类型:</dt>
<dd>
<div class="droplist" data-default="{{$condition['order_type_a']}}" id="order_type_a" name="order_type_a" >
......@@ -41,7 +41,7 @@
</ul>
</div>
</dd>
</dl>
</dl> -->
<dl>
<dt>付款类型:</dt>
<dd>
......
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