Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
290c11ad
authored
Jan 31, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加ERP订单列表
parent
4d4570c8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
397 additions
and
9 deletions
app/Http/Controllers/OrderController.php
app/Http/routes.php
config/perm.php
public/css/order.css
public/js/order.js
resources/views/erpOrder.blade.php
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
290c11ad
...
...
@@ -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
=
''
)
{
...
...
app/Http/routes.php
View file @
290c11ad
...
...
@@ -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'
);
...
...
config/perm.php
View file @
290c11ad
...
...
@@ -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'
],
],
...
...
public/css/order.css
View file @
290c11ad
...
...
@@ -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
public/js/order.js
View file @
290c11ad
...
...
@@ -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
();
...
...
resources/views/erpOrder.blade.php
0 → 100644
View file @
290c11ad
<!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>
resources/views/erpOrder/content.blade.php
0 → 100644
View file @
290c11ad
<div
class=
"wrapper wrapper-content"
>
<div
class=
"page-content"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"javascript:;"
>
ERP订单列表
</a></li>
</ul>
<div
class=
"tabs-box"
>
<div
class=
"row-fluid search-box"
>
<div
class=
"span12"
>
<dl>
<dt>
查询类型:
</dt>
<dd
style=
"width:auto !important;"
>
<div
class=
"droplist"
data-default=
"{{$condition['order_type']}}"
id=
"order_type"
name=
"order_type"
>
<ul
class=
"dropdown-menu"
>
<li
class=
"order_type_tab active"
data-val=
""
>
会员账号
</li>
<li
class=
"order_type_tab"
data-val=
"1"
>
订单编号
</li>
<li
class=
"order_type_tab"
data-val=
"2"
>
型号名称
</li>
</ul>
</div>
</dd>
<dd><input
type=
"text"
name=
"order_contain"
value=
"{{$condition['order_contain']}}"
placeholder=
"请输入内容"
></dd>
</dl>
<dl>
<dt>
创建日期:
</dt>
<dd>
<input
type=
"text"
name=
"time_start"
value=
"{{ !empty($condition['time_start']) ? date('Y/m/d', $condition['time_start']) : '' }}"
class=
"Wdate "
onfocus=
"WdatePicker({dateFmt:'yyyy/MM/dd'})"
placeholder=
"开始时间"
/>
</dd>
<dd>
<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>
<dt>
订单状态:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['order_status']}}"
id=
"order_status"
name=
"order_status"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"-1"
>
已取消
</li>
<li
data-val=
"1"
>
待审核
</li>
<li
data-val=
"2"
>
待付款
</li>
<li
data-val=
"3"
>
待付尾款
</li>
<li
data-val=
"4"
>
待发货
</li>
<li
data-val=
"7"
>
部分发货
</li>
<li
data-val=
"8"
>
待收货
</li>
<li
data-val=
"10"
>
交易成功
</li>
</ul>
</div>
</dd>
</dl>
<dl>
<dt>
推送业务员:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['order_send']}}"
id=
"order_send"
name=
"order_send"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
@foreach ($sale_list as $v)
<li
data-val=
"{{$v->userId}}"
>
{{$v->name}}
</li>
@endforeach
</ul>
</div>
</dd>
</dl>
<dl>
<dt>
<button
type=
"submit"
class=
"nbtn searchErpOrder"
>
搜索
</button>
</dt>
</dl>
</div>
</div>
</div>
<div
class=
"row-fluid"
>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th
class=
"pl30"
>
会员账号
</th>
<th
class=
"pl30"
>
应付金额
</th>
<th
class=
"pl30"
>
订单状态
</th>
<th
class=
"pl30"
>
订单类型
</th>
<th
class=
"pl30"
>
支付方式
</th>
<th
class=
"pl30"
>
推送业务员
</th>
<th
class=
"pl30"
>
发货状态
</th>
<th
class=
"pl30"
>
配送方式
</th>
<th
class=
"pl30"
>
下单时间
</th>
<th
class=
"pl30"
>
操作
</th>
</tr>
</thead>
@if (empty($list))
<tr>
<td
colspan=
"10"
>
没有查询到相关记录~
</td>
</tr>
@else
<tbody>
@foreach ($list as $v)
<tr>
<td
class=
"show-list"
>
{{$v['mobile'] ? $v['mobile'] : $v['email']}}
</td>
<td
class=
"show-list"
>
@if ($v['currency'] == '1')
{{'¥'.$v['order_amount']}}
@else
{{'$ '.$v['order_amount']}}
@endif
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'status'
])
{
case
-
2
:
echo
'<span class="list-text-no-check"><b>审核未通过</b></span>'
;
break
;
case
-
1
:
echo
'<span class="list-text-cancel"><b>已取消</b></span>'
;
break
;
case
1
:
echo
'<span class="list-text-checking"><b>待审核</b></span>'
;
break
;
case
2
:
echo
'<span class="list-text-pay"><b>待付款</b></span>'
;
break
;
case
3
:
echo
'<span class="list-text-last-pay"><b>待付尾款</b></span>'
;
break
;
case
4
:
echo
'<span class="list-text-send"><b>待发货</b></span>'
;
break
;
case
7
:
echo
'<span class="list-text-send"><b>部分发货</b></span>'
;
break
;
case
8
:
echo
'<span class="list-text-confirm"><b>待收货</b></span>'
;
break
;
case
10
:
echo
'<span class="list-text-success"><b>交易成功</b></span>'
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
<?php
switch
(
$v
[
'order_pay_type'
])
{
case
1
:
echo
"全款"
;
break
;
case
2
:
echo
"预付款"
;
break
;
case
3
:
echo
"账期"
;
break
;
}
?>
</td>
<td
class=
"show-list"
>
{{$v['pay_name']}}
</td>
<td
class=
"show-list"
>
<?php
foreach
(
$sale_list
as
$val
)
{
if
(
$val
->
userId
==
$v
[
'sale_id'
])
{
echo
$val
->
name
;
}
}
?>
</td>
<td
class=
"show-list"
class=
"show-list"
>
<?php
if
(
!
empty
(
$v
[
'shipping_type'
]))
{
$pos
=
strpos
(
$v
[
'shipping_type'
],
'1'
);
// 订单物流1
if
(
$pos
!==
false
)
{
$exp
=
explode
(
','
,
$v
[
'shipping_status'
]);
if
(
count
(
$exp
)
==
1
)
{
$status
=
$exp
[
0
];
}
else
{
$status
=
$exp
[
$pos
];
}
switch
(
$status
)
{
case
1
:
echo
'已配送'
;
break
;
case
2
:
echo
'已签收'
;
break
;
default
:
echo
'未配送'
;
break
;
}
}
else
{
echo
''
;
}
}
else
{
echo
''
;
}
?>
</td>
<td
class=
"show-list"
>
@if ($v['order_shipping_type'] == '1')
快递配送
@else
自提
@endif
</td>
<td
class=
"show-list"
>
{{date('Y-m-d H:i:s', $v['create_time'])}}
</td>
<td>
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"{{URL('details', ['order_id'=>$v['order_id']])}}"
>
详情
</a>
<!-- 管理员和经理显示 -->
@if ($role == 1 || $role == 2)
<a
class=
"btn btn-success"
href=
"{{URL('change', ['order_id'=>$v['order_id']])}}"
>
人工审单
</a>
<!-- <a class="btn btn-success" href="{{URL('check', ['order_id'=>$v['order_id']])}}">审单</a> -->
@endif
</div>
</td>
</tr>
<!-- 点击展示内容 -->
<tr
class=
"show-other-content"
>
<td
colspan=
"10"
>
<table
class=
"table table-hover table-bordered"
>
<tr>
<td
class=
"table-list-title"
>
订单编号
</td>
<td
class=
"table-list-content"
>
{{$v['order_sn']}}
</td>
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-content"
>
{{$v['com_name']}}
</td>
</tr>
<tr>
<td
class=
"table-list-title"
>
支付时间
</td>
<td
class=
"table-list-content"
>
<?php
if
(
$v
[
'order_pay_time'
]
!=
0
)
{
echo
date
(
'Y-m-d H:i:s'
,
$v
[
'order_pay_time'
]);
}
else
{
if
(
$v
[
'advance_pay_time'
]
!=
0
)
{
echo
date
(
'Y-m-d H:i:s'
,
$v
[
'advance_pay_time'
]);
}
else
{
echo
''
;
}
}
?>
</td>
<td
class=
"table-list-title"
>
完成时间
</td>
<td
class=
"table-list-content"
>
{{$v['finish_time'] != 0 ? date('Y-m-d H:i:s', $v['finish_time']) : ''}}
</td>
</tr>
<tr>
<td
class=
"table-list-title"
>
Adtag或其它
</td>
<td
class=
"table-list-content"
>
<p
class=
"show-title"
title=
"{{$v['order_source']}}"
>
{{$v['order_source']}}
</p>
</td>
<td
class=
"table-list-title"
>
发票状态
</td>
<td
class=
"table-list-content"
>
<?php
switch
(
$v
[
'invoice_status'
])
{
case
-
1
:
echo
"待确认"
;
break
;
case
1
:
echo
"已开票"
;
break
;
case
2
:
echo
"已发货"
;
break
;
case
3
:
echo
"已签收"
;
break
;
}
?>
</td>
</tr>
</table>
</td>
</tr>
@endforeach
</tbody>
@endif
</table>
</div>
<div
class=
"row-fluid pagination"
>
<span>
共{{$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>
<?php
echo
$page
;
?>
</div>
</div>
</div>
<script>
$
.
lie
.
order
.
index
();
</script>
\ No newline at end of file
resources/views/orderlist/content.blade.php
View file @
290c11ad
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment