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
eb70972b
authored
Mar 13, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1. 添加预付款金额展示;
2. ERP订单添加来源筛选;
parent
cd3b5a11
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
34 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
resources/views/changeInvoice/content.blade.php
resources/views/changeShipping/content.blade.php
resources/views/detail/content.blade.php
resources/views/erpOrder/content.blade.php
resources/views/orderlist/content.blade.php
app/Http/Controllers/OrderController.php
View file @
eb70972b
...
...
@@ -244,10 +244,12 @@ Class OrderController extends Controller
$map
[
'time_end'
]
=
$request
->
input
(
'time_end'
,
''
);
$map
[
'order_status'
]
=
$request
->
input
(
'order_status'
,
''
);
$map
[
'order_send'
]
=
$request
->
input
(
'order_send'
,
''
);
$map
[
'order_source'
]
=
$request
->
input
(
'order_source'
,
''
);
}
/* 查看ERP订单 */
$map
[
'online_order'
]
=
2
;
// $map['online_order'] = 2;
$map
[
'offline_order'
]
=
[
2
,
3
];
// 2-ERP, 3-JD
// 获取所有的业务员 (包括经理和交易员)
$perm
=
new
PermController
;
...
...
public/js/order.js
View file @
eb70972b
...
...
@@ -206,6 +206,7 @@
time_end
=
$
(
'input[name="time_end"]'
).
val
(),
order_status
=
$
(
'#order_status'
).
data
(
'default'
),
order_send
=
$
(
'#order_send'
).
data
(
'default'
),
order_source
=
$
(
'#order_source'
).
data
(
'default'
),
listUrl
=
'/erp_order'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -234,6 +235,10 @@
listUrl
+=
'&order_send='
+
order_send
;
}
if
(
order_source
)
{
listUrl
+=
'&order_source='
+
order_source
;
}
location
.
href
=
listUrl
;
})
},
...
...
@@ -619,13 +624,19 @@
var
order_id
=
$
(
'input[name=order_id]'
).
val
();
if
(
tags
)
{
var
url
=
'/details/'
+
order_id
+
'?tags='
+
tags
;
}
else
{
var
url
=
'/details/'
+
order_id
;
}
$
(
'form'
).
on
(
'submit'
,
function
(){
$
(
this
).
ajaxSubmit
({
data
:
{
order_id
:
order_id
},
dataType
:
'json'
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
){
location
.
href
=
'/details/'
+
order_id
;
location
.
href
=
url
;
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
)
}
...
...
@@ -651,13 +662,19 @@
}
})
if
(
tags
)
{
var
url
=
'/details/'
+
order_id
+
'?tags='
+
tags
;
}
else
{
var
url
=
'/details/'
+
order_id
;
}
$
(
'form'
).
on
(
'submit'
,
function
(){
$
(
this
).
ajaxSubmit
({
data
:
{
order_id
:
order_id
},
dataType
:
'json'
,
success
:
function
(
resp
){
if
(
resp
.
errcode
==
0
){
location
.
href
=
'/details/'
+
order_id
;
location
.
href
=
url
;
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
)
}
...
...
resources/views/changeInvoice/content.blade.php
View file @
eb70972b
<div
class=
"page-content order-details"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{{URL('list')}}"
>
订单列表
</a></li>
@if (isset($_REQUEST['tags']))
<li><a
href=
"{{URL('erp_order')}}"
>
ERP订单
</a></li>
<li><a
href=
"/details/{{$detail['order_id']}}?tags={{$_REQUEST['tags']}}"
>
订单详情
</a></li>
@else
<li><a
href=
"{{URL('list')}}"
>
平台订单
</a></li>
<li><a
href=
"{{URL('details', ['order_id'=>$detail['order_id']])}}"
>
订单详情
</a></li>
@endif
<li
class=
"active"
><a
href=
"javascript:;"
>
订单发票信息
</a></li>
</ul>
<?php
...
...
@@ -81,6 +87,8 @@
</div>
<script>
var
tags
=
"{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}"
;
$
.
lie
.
order
.
details
();
var
inv_type
=
'{{$detail['
inv_type
']}}'
;
...
...
resources/views/changeShipping/content.blade.php
View file @
eb70972b
<div
class=
"page-content order-details"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{{URL('list')}}"
>
订单列表
</a></li>
@if (isset($_REQUEST['tags']))
<li><a
href=
"{{URL('erp_order')}}"
>
ERP订单
</a></li>
<li><a
href=
"/details/{{$detail['order_id']}}?tags={{$_REQUEST['tags']}}"
>
订单详情
</a></li>
@else
<li><a
href=
"{{URL('list')}}"
>
平台订单
</a></li>
<li><a
href=
"{{URL('details', ['order_id'=>$detail['order_id']])}}"
>
订单详情
</a></li>
@endif
<li
class=
"active"
><a
href=
"javascript:;"
>
订单收货信息
</a></li>
</ul>
<?php
...
...
@@ -45,5 +51,7 @@
</div>
<script>
var
tags
=
"{{isset($_REQUEST['tags']) ? $_REQUEST['tags'] : ''}}"
;
$
.
lie
.
order
.
details
();
</script>
\ No newline at end of file
resources/views/detail/content.blade.php
View file @
eb70972b
<div
class=
"page-content order-details"
>
<ul
class=
"nav nav-tabs"
>
<li><a
href=
"{{URL('list')}}"
>
订单列表
</a></li>
@if (isset($_REQUEST['tags']))
<li><a
href=
"{{URL('erp_order')}}"
>
ERP订单
</a></li>
@else
<li><a
href=
"{{URL('list')}}"
>
平台订单
</a></li>
@endif
<li
class=
"active"
><a
href=
"javascript:;"
>
订单详情
</a></li>
</ul>
<?php
...
...
@@ -59,7 +63,11 @@
{{$order_address_info['province_val']}}
{{$order_address_info['city_val']}}
{{$order_address_info['district_val']}}
{{$order_address_info['address']}}
<!-- 订单状态小于5 且 更新地址权限存在 显示按钮 -->
@if (in_array($order_info['status'], array(1, 2, 3, 4))
&&
in_array('update_address', $userPerms))
<a
href=
"{{URL('changeShipping', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-success btn-sm"
>
更改收货地址
</a>
@if (isset($_REQUEST['tags']))
<a
href=
"/changeShipping/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}"
class=
"btn btn-success btn-sm"
>
更改收货地址
</a>
@else
<a
href=
"/changeShipping/{{$order_info['order_id']}}"
class=
"btn btn-success btn-sm"
>
更改收货地址
</a>
@endif
@endif
</td>
</tr>
...
...
@@ -73,9 +81,32 @@
<div
class=
"order-right"
>
<table
class=
"table order-express"
>
<?php
$currency
=
$order_info
[
'currency'
]
==
2
?
'$'
:
'¥'
;
?>
@if ($order_info['order_pay_type'] == 2)
<tr>
<td
colspan=
"2"
>
<p>
<b
style=
"font-weight:bolder !important;"
>
预付款:
</b>
{{$currency.$order_info['advance_amount']}}
</p>
</td>
<td
colspan=
"3"
>
<p>
<b
style=
"font-weight:bolder !important;"
>
尾款:
</b>
{{$currency.number_format($order_info['order_amount'] - $order_info['advance_amount'], 2, '.', '')}}
</p>
</td>
</tr>
@endif
<tr>
<td>
<p>
交易状态:
<p>
<b
style=
"font-weight:bolder !important;"
>
交易状态:
</b>
<?php
switch
(
$order_info
[
'status'
])
{
case
-
2
:
echo
"审核未通过"
;
break
;
...
...
@@ -93,7 +124,7 @@
</td>
<td>
<p>
对账状态:
<b
style=
"font-weight:bolder !important;"
>
对账状态:
</b>
<?php
if
(
$order_info
[
'order_pay_type'
]
==
1
)
{
if
(
!
empty
(
$order_pay_log
)
&&
$order_pay_log
[
0
][
'order_id'
]
!=
''
)
{
...
...
@@ -114,7 +145,8 @@
</p>
</td>
<td>
<p>
配送状态:
<p>
<b
style=
"font-weight:bolder !important;"
>
配送状态:
</b>
<?php
switch
(
$order_shipping_info
[
'status'
])
{
case
1
:
echo
'已配送'
;
break
;
...
...
@@ -130,7 +162,7 @@
<tr>
<td>
<p>
<b
style=
"font-weight:bolder !important;"
>
支付方式:
<b
style=
"font-weight:bolder !important;"
>
支付方式:
</b>
<?php
if
(
$order_info
[
'order_pay_type'
]
==
1
)
{
if
(
!
empty
(
$order_pay_log
)
&&
$order_pay_log
[
0
][
'pay_name'
]
!=
''
)
{
...
...
@@ -148,12 +180,11 @@
}
}
?>
</b>
</p>
</td>
<td>
<p>
<b
style=
"font-weight:bolder !important;"
>
支付类型:
<b
style=
"font-weight:bolder !important;"
>
支付类型:
</b>
<?php
if
(
$order_info
[
'order_pay_type'
]
==
1
)
{
if
(
!
empty
(
$order_pay_log
)
&&
$order_pay_log
[
0
][
'pay_type'
]
!=
''
)
{
...
...
@@ -171,12 +202,11 @@
}
}
?>
</b>
</p>
</td>
<td>
<p>
<b
style=
"font-weight:bolder !important;"
>
支付状态:
<b
style=
"font-weight:bolder !important;"
>
支付状态:
</b>
<?php
if
(
$order_info
[
'order_pay_type'
]
==
1
)
{
if
(
!
empty
(
$order_pay_log
)
&&
$order_pay_log
[
0
][
'is_paid'
]
!=
''
)
{
...
...
@@ -194,7 +224,6 @@
}
}
?>
</b>
</p>
</td>
<td>
</td>
...
...
@@ -207,7 +236,11 @@
发票信息
<!-- 发票状态小于2(已发货)且更改权限存在 显示按钮 -->
@if (in_array($order_info['status'], array(1, 2, 3, 4, 7, 8))
&&
$order_invoice_info['invoice_status']
<
2
&&
in_array
('
update_invoice
',
$
userPerms
))
<
a
href=
"{{URL('changeInvoice', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-success btn-sm"
>
更改
</a>
@
if
(
isset
($
_REQUEST
['
tags
']))
<
a
href=
"/changeInvoice/{{$order_info['order_id']}}?tags={{$_REQUEST['tags']}}"
class=
"btn btn-success btn-sm"
>
更改发票
</a>
@else
<a
href=
"/changeInvoice/{{$order_info['order_id']}}"
class=
"btn btn-success btn-sm"
>
更改发票
</a>
@endif
@endif
</th>
</tr>
...
...
@@ -286,9 +319,6 @@
</tr>
</thead>
<tbody>
<?php
$currency
=
$order_info
[
'currency'
]
==
2
?
'$'
:
'¥'
;
?>
@foreach ($order_items_info as $v)
<tr>
<td>
{{$v['goods_name']}}
</td>
...
...
@@ -409,6 +439,8 @@
<include
file=
"recovery"
/>
</if>
<!-- 查看ERP订单详情时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']))
<!-- 人工审单时去掉操作按钮 -->
@if ($action_name != 'changeOrder')
<p
style=
"padding-left: 5px;"
>
操作
</p>
...
...
@@ -446,6 +478,7 @@
<a href="{:U('recovery', 'order_id='.$order_info['order_id'])}" class="btn btn-default">平账设置</a> -->
</div>
@endif
@endif
<!-- 二期处理 -->
<!-- <p>操作记录</p>
<div class="tabs-box">
...
...
resources/views/erpOrder/content.blade.php
View file @
eb70972b
<div
class=
"wrapper wrapper-content"
>
<div
class=
"page-content"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"javascript:;"
>
ERP订单
列表
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
>
ERP订单
</a></li>
</ul>
<div
class=
"tabs-box"
>
...
...
@@ -47,7 +47,18 @@
</div>
</dd>
</dl>
<dl>
<dt>
订单来源:
</dt>
<dd>
<div
class=
"droplist"
data-default=
"{{$condition['order_source']}}"
id=
"order_source"
name=
"order_source"
>
<ul
class=
"dropdown-menu"
>
<li
data-val=
""
class=
"active"
>
全部
</li>
<li
data-val=
"2"
>
ERP
</li>
<li
data-val=
"3"
>
京东
</li>
</ul>
</div>
</dd>
</dl>
<dl>
<dt>
推送业务员:
</dt>
<dd>
...
...
@@ -83,6 +94,7 @@
<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>
...
...
@@ -98,11 +110,11 @@
<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
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
...
...
@@ -173,10 +185,17 @@
自提
@endif
</td>
<td>
@if ($v['order_type'] == 2)
ERP
@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>
<a
class=
"btn btn-primary"
href=
"
/details/{{$v['order_id']}}?tags=erp
"
>
详情
</a>
</div>
</td>
</tr>
...
...
@@ -191,6 +210,14 @@
<td
class=
"table-list-title"
>
公司名称
</td>
<td
class=
"table-list-content"
>
{{$v['com_name']}}
</td>
</tr>
@if ($v['order_pay_type'] == 2)
<tr>
<td
class=
"table-list-title"
>
预付款
</td>
<td
class=
"table-list-content"
>
{{$currencySign.$v['advance_amount']}}
</td>
<td
class=
"table-list-title"
>
尾款
</td>
<td
class=
"table-list-content"
>
{{$currencySign.number_format($v['order_amount'] - $v['advance_amount'], 2, '.', '')}}
</td>
</tr>
@endif
<tr>
<td
class=
"table-list-title"
>
支付时间
</td>
<td
class=
"table-list-content"
>
...
...
resources/views/orderlist/content.blade.php
View file @
eb70972b
<div
class=
"wrapper wrapper-content"
>
<div
class=
"page-content"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
href=
"javascript:;"
>
订单列表
</a></li>
<li
class=
"active"
><a
href=
"javascript:;"
>
平台订单
</a></li>
</ul>
<div
class=
"tabs-box"
>
...
...
@@ -179,11 +179,11 @@
<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
<?php
$currencySign
=
$v
[
'currency'
]
==
1
?
'¥'
:
'$'
;
echo
$currencySign
.
$v
[
'order_amount'
];
?>
</td>
<td
class=
"show-list"
>
<?php
...
...
@@ -279,6 +279,14 @@
<p
class=
"show-title"
title=
"{{$v['com_name']}}"
>
{{$v['com_name']}}
</p>
</td>
</tr>
@if ($v['order_pay_type'] == 2)
<tr>
<td
class=
"table-list-title"
>
预付款
</td>
<td
class=
"table-list-content"
>
{{$currencySign.$v['advance_amount']}}
</td>
<td
class=
"table-list-title"
>
尾款
</td>
<td
class=
"table-list-content"
>
{{$currencySign.number_format($v['order_amount'] - $v['advance_amount'], 2, '.', '')}}
</td>
</tr>
@endif
<tr>
<td
class=
"table-list-title"
>
支付时间
</td>
<td
class=
"table-list-content"
>
...
...
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