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
aed60613
authored
Dec 03, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_batch_goods_20181129
parents
2c3fcf9a
86914074
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
77 additions
and
69 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
public/js/self_order.js
resources/views/detail/changeOrder.blade.php
resources/views/detail/content.blade.php
resources/views/detail/selfCheckPay.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
aed60613
...
...
@@ -850,7 +850,7 @@ Class OrderController extends Controller
$info
=
$this
->
orderDetail
(
$request
,
$id
);
//总共允许2次调价(以点击审核按钮次数来统计)
if
(
$info
[
'order_info'
][
'adjust_count'
]
>=
2
)
{
if
(
$info
[
'order_info'
][
'
order_goods_type'
]
!=
1
&&
$info
[
'order_info'
][
'
adjust_count'
]
>=
2
)
{
errorLog
(
Error
::
E_FORBIDDEN
,
'该订单无法再进行调价操作'
);
return
redirect
(
'/prompt'
)
->
with
([
'message'
=>
"该订单无法再进行调价操作"
,
'url'
=>
'/details/'
.
$id
,
'jumpTime'
=>
3
,
'status'
=>
false
]);
}
...
...
@@ -1401,13 +1401,13 @@ Class OrderController extends Controller
{
if
(
$request
->
isMethod
(
'post'
))
{
$order_id
=
$request
->
input
(
'order_id'
,
''
);
$serial_number
=
$request
->
input
(
'serial_number'
,
''
);
//
$serial_number = $request->input('serial_number', '');
$operator_id
=
$request
->
user
->
userId
;
$url
=
Config
(
'website.api_domain'
)
.
'order/selfcheckpay'
;
$data
[
'order_id'
]
=
$order_id
;
$data
[
'serial_number'
]
=
$serial_number
;
//
$data['serial_number'] = $serial_number;
$data
[
'operator_id'
]
=
$operator_id
;
$data
[
'k1'
]
=
time
();
...
...
@@ -1424,6 +1424,11 @@ Class OrderController extends Controller
}
$info
=
$this
->
orderDetail
(
$request
,
$id
);
if
(
!
$request
->
input
(
'tags'
)
&&
$request
->
input
(
'tags'
)
!=
'self'
)
{
// 自营订单页面
return
redirect
(
'/self_order'
);
}
$this
->
pageHeader
(
$request
,
$info
,
'自营对账'
,
[
"title"
=>
'自营对账'
,
"href"
=>
'#'
]);
$this
->
selfOtherData
(
$info
,
$id
);
...
...
public/js/order.js
View file @
aed60613
...
...
@@ -632,16 +632,16 @@
// 点击物流展开
$
(
'.click-down'
).
click
(
function
()
{
$
(
'.other-infos'
).
show
();
$
(
this
).
parents
(
'tbody'
).
find
(
'.other-infos'
).
show
();
$
(
this
).
hide
();
$
(
'.click-up'
).
show
();
$
(
this
).
parents
(
'tbody'
).
find
(
'.click-up'
).
show
();
})
// 点击物流收起
$
(
'.click-up'
).
click
(
function
()
{
$
(
'.other-infos'
).
hide
();
$
(
this
).
parents
(
'tbody'
).
find
(
'.other-infos'
).
hide
();
$
(
this
).
hide
();
$
(
'.click-down'
).
show
();
$
(
this
).
parents
(
'tbody'
).
find
(
'.click-down'
).
show
();
})
},
...
...
@@ -1272,11 +1272,12 @@
var
payTimeOther
=
$
(
'.payTimeOther'
).
val
();
var
sale_id
=
$
(
'input[name=sale_id]'
).
val
();
var
order_goods_type
=
$
(
'input[name=order_goods_type]'
).
val
();
var
order_id
=
$
(
'input[name=order_id]'
).
val
();
// 联营订单需要先指派业务员
if
(
order_goods_type
==
1
&&
sale_id
==
0
)
{
layer
.
alert
(
'请先将订单推送给业务员'
,
function
(){
location
.
href
=
'/sendSales/'
+
$
(
'input[name=order_id]'
).
val
()
;
location
.
href
=
'/sendSales/'
+
order_id
;
});
return
false
;
}
...
...
@@ -1366,7 +1367,7 @@
}
}
if
(
!
is_manager
)
{
if
(
!
is_manager
&&
order_goods_type
!=
1
)
{
// 非管理员或经理权限和非联营订单需要判断商品价格是否低于80%以下
// 设置默认值false
$
(
'input[name=check_failed]'
).
val
(
0
);
$
(
'input[name=change_pay_type]'
).
val
(
0
);
...
...
@@ -1401,9 +1402,11 @@
if
(
order_goods_type
==
1
)
{
var
extra_fee
=
$
(
'input[name=extra_fee]'
).
val
()
?
currencySign
+
'0'
:
currencySign
+
$
(
'input[name=extra_fee]'
).
val
();
var
content
=
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>附加费金额:'
+
extra_fee
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
;
var
url
=
'/details/'
+
order_id
;
}
else
{
var
content
=
'<div><p class="error">请核对订单金额,谨慎操作!</p><div><p>商品总金额:'
+
goods_amount
+
'</p><p>订单总金额:<span class="error">'
+
order_amount
+
'</span></p></div></div>'
;
}
var
url
=
'/details/'
+
order_id
+
'?tags=self'
;
}
// 弹出提示
layer
.
open
({
...
...
@@ -1423,7 +1426,8 @@
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
// location.reload();
location
.
href
=
url
;
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
,
function
(){
...
...
@@ -1442,14 +1446,12 @@
// 弹出已调价的订单信息
$
(
'.checkAdjusted'
).
click
(
function
(){
var
adjusted_info
=
$
(
'.adjusted_order'
).
html
();
var
layer_btn
;
var
adjusted_info
=
$
(
'.adjusted_order'
).
html
();
var
order_id
=
$
(
'input[name=order_id]'
).
val
();
var
order_goods_type
=
$
(
'input[name=order_goods_type]'
).
val
();
if
(
is_manager
)
{
layer_btn
=
[
'驳回'
,
'通过'
];
}
else
{
layer_btn
=
[];
}
var
layer_btn
=
is_manager
?
[
'通过'
,
'驳回'
]
:
[];
var
url
=
order_goods_type
==
1
?
'/details/'
+
order_id
:
'/details/'
+
order_id
+
'?tags=self'
;
// 弹出提示
layer
.
open
({
...
...
@@ -1459,15 +1461,15 @@
btn
:
layer_btn
,
yes
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajax
Rejected
'
,
url
:
'/ajax
SaveChange
'
,
type
:
'post'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=
1
'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=
2
'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
()
;
location
.
href
=
url
;
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
...
...
@@ -1481,15 +1483,16 @@
},
btn2
:
function
(
index
,
layero
){
$
.
ajax
({
url
:
'/ajax
SaveChange
'
,
url
:
'/ajax
Rejected
'
,
type
:
'post'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=
2
'
,
data
:
$
(
'#adjustedOrderForm'
).
serialize
()
+
'&order_status=
1
'
,
dataType
:
'json'
,
success
:
function
(
resp
)
{
if
(
resp
.
errcode
===
0
){
layer
.
msg
(
resp
.
errmsg
||
'操作成功'
);
setTimeout
(
function
(){
location
.
reload
();
// location.reload();
location
.
href
=
url
;
},
1000
);
}
else
{
layer
.
alert
(
resp
.
errmsg
||
'网络异常'
);
...
...
@@ -1686,12 +1689,12 @@
// 自营对账
$
(
'.self-sure-pay'
).
click
(
function
(){
var
order_id
=
$
(
'#order_id'
).
val
();
var
serial_number
=
$
(
'input[name="serial_number"]'
).
val
();
//
var serial_number = $('input[name="serial_number"]').val();
if
(
serial_number
.
length
==
0
)
{
layer
.
alert
(
'请输入流水号'
);
return
false
;
}
//
if (serial_number.length == 0) {
//
layer.alert('请输入流水号');
//
return false;
//
}
layer
.
open
({
title
:
'收款确认'
,
...
...
@@ -1700,7 +1703,8 @@
btn1
:
function
(){
$
.
ajax
({
url
:
'/self_check_pay/'
+
order_id
,
data
:
{
order_id
:
order_id
,
serial_number
:
serial_number
},
// data: {order_id : order_id, serial_number : serial_number},
data
:
{
order_id
:
order_id
},
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
...
...
public/js/self_order.js
View file @
aed60613
...
...
@@ -21,7 +21,7 @@
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
test_order
=
$
(
'input[name=test_order]'
),
is_new
=
$
(
'#is_new'
).
data
(
'default'
),
is_new_order
=
$
(
'#is_new_order'
).
data
(
'default'
),
//
is_new_order = $('#is_new_order').data('default'),
listUrl
=
'/self_order'
;
listUrl
+=
'?order_type='
+
order_type
;
...
...
@@ -78,9 +78,9 @@
listUrl
+=
'&is_new='
+
is_new
;
}
if
(
is_new_order
!==
''
)
{
listUrl
+=
'&is_new_order='
+
is_new_order
;
}
//
if (is_new_order !== '') {
//
listUrl += '&is_new_order=' + is_new_order;
//
}
if
(
test_order
.
is
(
':checked'
))
{
listUrl
+=
'&test_order='
+
1
;
...
...
@@ -108,16 +108,16 @@
order_source_adtag
=
$
(
'input[name="order_source_adtag"]'
).
val
(),
order_source_ptag
=
$
(
'input[name="order_source_ptag"]'
).
val
(),
is_new
=
$
(
'#is_new'
).
data
(
'default'
),
is_new_order
=
$
(
'#is_new_order'
).
data
(
'default'
),
//
is_new_order = $('#is_new_order').data('default'),
test_order
=
$
(
'input[name=test_order]'
);
if
(
test_order
.
length
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
is_new_order
&&
!
test_order
.
is
(
':checked'
))
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
test_order
.
is
(
':checked'
))
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
}
else
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
&&
!
is_new_order
)
{
if
(
!
order_contain
&&
!
time_start
&&
!
time_end
&&
!
order_payment_mode
&&
!
order_status
&&
!
sale_type
&&
!
order_invoice_status
&&
!
order_source_pf
&&
!
order_source_adtag
&&
!
order_source_ptag
&&
!
is_new
)
{
layer
.
msg
(
'请选择筛选条件,再导出!'
);
return
false
;
}
...
...
@@ -137,7 +137,7 @@
test_order
=
''
;
}
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_payment_mode='
+
order_payment_mode
+
'&order_status='
+
order_status
+
'&sale_type='
+
sale_type
+
'&order_invoice_status='
+
order_invoice_status
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&order_source_ptag='
+
order_source_ptag
+
'&test_order='
+
test_order
+
'&is_new='
+
is_new
+
'&
is_new_order='
+
is_new_order
+
'&
order_goods_type='
+
2
;
location
.
href
=
'/export?order_type='
+
order_type
+
'&order_contain='
+
order_contain
+
'&time_start='
+
time_start
+
'&time_end='
+
time_end
+
'&order_payment_mode='
+
order_payment_mode
+
'&order_status='
+
order_status
+
'&sale_type='
+
sale_type
+
'&order_invoice_status='
+
order_invoice_status
+
'&order_source_pf='
+
order_source_pf
+
'&order_source_adtag='
+
order_source_adtag
+
'&order_source_ptag='
+
order_source_ptag
+
'&test_order='
+
test_order
+
'&is_new='
+
is_new
+
'&order_goods_type='
+
2
;
})
// 选择查看测试订单
...
...
resources/views/detail/changeOrder.blade.php
View file @
aed60613
<p
style=
"padding-left: 5px;"
>
人工审单
</p>
<div
class=
"tabs-box"
>
<div
class=
"order-change-main"
>
@if (
$order_info['status'] == 1
)
@if (
($order_info['order_goods_type'] == 1
&&
$order_info['status'] == 1) || ($order_info['order_goods_type'] != 1
&&
in_array($order_info['status'], [1, 2])
&&
$order_info['adjust_count']
<
2
)
)
<
form
id=
"checkOrderForm"
class=
"form-horizontal table-responsive"
>
<input
type=
"hidden"
name=
"order_sn"
value=
"{{$order_info['order_sn']}}"
>
<input
type=
"hidden"
name=
"user_id"
value=
"{{$order_info['user_id']}}"
>
...
...
@@ -271,7 +271,7 @@
</table>
</div>
@if ($order_info['
status'] == 1
&&
$order_temp_info['status'] == 1)
@if ($order_info['
order_goods_type'] != 1
&&
in_array($order_info['status'], [1, 2])
&&
$order_temp_info['status'] == 1)
<a
class=
"btn btn-primary checkAdjusted"
>
查看调价信息
</a>
@else
<a
class=
"btn btn-primary checkOrder"
>
提交
</a>
...
...
@@ -279,7 +279,7 @@
</form>
@endif
@if (
$order_info['status'] == 2
)
@if (
($order_info['order_goods_type'] == 1
&&
$order_info['status'] == 2) || ($order_info['order_goods_type'] != 1
&&
$order_info['adjust_count'] == 2)
)
<div
class=
"checked_section"
>
<div
class=
"checked_left"
>
<p>
交易状态:
审核通过,请联系客户及时付款!
...
...
@@ -296,8 +296,10 @@
}
?>
@if ($order_info['adjust_count']
<
2
)
@if ($order_info['
order_goods_type'] == 2
&&
$order_info['
adjust_count']
<
2
)
<
a
class=
"btn btn-default"
href=
"{{$adjustPriceUrl}}"
>
再次调价
</a><span
class=
"warn-tip"
>
每笔订单仅有一次“再次调价”机会
</span>
@elseif ($order_info['order_goods_type'] == 1)
<a
class=
"btn btn-default"
href=
"{{$adjustPriceUrl}}"
>
再次调价
</a>
@endif
</div>
...
...
@@ -346,7 +348,8 @@
</div>
</div>
@if ($order_info['status'] == 1
&&
$order_temp_info['status'] == 1)
<!-- 自营订单客服调价低于80% 显示经理审核 -->
@if ($order_info['order_goods_type'] != 1
&&
in_array($order_info['status'], [1, 2])
&&
$order_temp_info['status'] == 1)
<script>
$
(
'#checkOrderForm'
).
find
(
'input'
).
attr
(
'disabled'
,
true
);
$
(
'#checkOrderForm'
).
find
(
'select'
).
attr
(
'disabled'
,
true
);
...
...
resources/views/detail/content.blade.php
View file @
aed60613
...
...
@@ -576,12 +576,12 @@
<p
style=
"padding-left: 5px;"
>
操作
</p>
<div
class=
"tabs-box"
>
<!-- 判断操作权限 -->
@if (
$order_info['status'] == 1
&&
in_array('check_order', $userPerms))
<a
class=
"btn btn-
success
"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
>
人工审单
</a>
@if (
in_array($order_info['status'], [1, 2])
&&
in_array('check_order', $userPerms))
<a
class=
"btn btn-
info
"
href=
"{{URL('change', ['order_id'=>$order_info['order_id']])}}"
>
人工审单
</a>
@endif
@if ($order_info['status'] == 2
&&
in_array('cancel_order', $userPerms))
<a
href=
"{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-d
efault
"
>
取消订单
</a>
<a
href=
"{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}"
class=
"btn btn-d
anger
"
>
取消订单
</a>
@endif
<!-- 预付款 管理员完成首款对账后改变'对账'按钮 -->
...
...
@@ -611,13 +611,13 @@
<a
class=
"btn btn-success self-check"
data-id=
"{{$order_info['order_id']}}"
>
内部订单审核
</a>
@endif
<!--
预售
订单审单 -->
@if (
$order_info['status'] == 1
&&
$order_info['sale_type'] == 2
&&
in_array('self_check_order', $userPerms))
<a
class=
"btn btn-
success
"
href=
"/change/{{$order_info['order_id']}}?tags=self"
>
人工审单
</a>
<!-- 订单审单 -->
@if (
in_array($order_info['status'], [1, 2])
&&
in_array('self_check_order', $userPerms))
<a
class=
"btn btn-
info
"
href=
"/change/{{$order_info['order_id']}}?tags=self"
>
人工审单
</a>
@endif
@if (in_array($order_info['status'], [1, 2, 3, 4])
&&
!$extend
&&
in_array('self_order_cancel', $userPerms))
<a
class=
"btn btn-d
efault
self_cancel"
href=
"javascript:;"
data-id=
"{{$order_info['order_id']}}"
>
取消订单
</a>
<a
class=
"btn btn-d
anger
self_cancel"
href=
"javascript:;"
data-id=
"{{$order_info['order_id']}}"
>
取消订单
</a>
@endif
@if ($order_info['status'] == 2
&&
in_array('self_check_pay', $userPerms))
...
...
resources/views/detail/selfCheckPay.blade.php
View file @
aed60613
<p
style=
"margin-left: 5px;"
>
对账操作
</p>
<div
class=
"tabs-box"
>
<!-- 判断订单类型 1.全款,2.预付款 -->
<?php
if
(
$order_info
[
'status'
]
==
4
)
{
echo
'<p>订单对账正常</p>
<p class="error">订单总金额:'
.
$order_info
[
'order_amount'
]
.
'</p>
<p>流水号:'
.
$order_pay_log
[
0
][
'serial_number'
]
.
'</p>'
;
}
else
{
$serial_number
=
isset
(
$order_pay_log
[
0
][
'serial_number'
])
?
$order_pay_log
[
0
][
'serial_number'
]
:
''
;
echo
'<p class="error">订单总金额:'
.
$order_info
[
'order_amount'
]
.
'</p>
<p> 流水号:
<input style="width: 200px;" type="text" name="serial_number" value="'
.
$serial_number
.
'">
<span style="color:orange;">请录入流水号,流水号为英文、数字</span>
</p>
<p style="margin-top: 20px;"><a class="btn btn-default self-sure-pay">确认收款</a></p>'
;
}
?>
@if ($order_info['status'] == 4)
<p>
订单对账正常
</p>
<p
class=
"error"
>
订单总金额:{{ $order_info['order_amount'] }}
</p>
<!-- <p>流水号:{{ $order_pay_log[0]['serial_number'] }}</p> -->
@else
<p
class=
"error"
>
订单总金额:{{ $order_info['order_amount'] }}
</p>
<!-- <p> 流水号:
<input style="width: 200px;" type="text" name="serial_number" value="{{ isset($order_pay_log[0]['serial_number']) ? $order_pay_log[0]['serial_number'] : '' }}">
<span style="color:orange;">请录入流水号,流水号为英文、数字</span>
</p> -->
<p
style=
"margin-top: 20px;"
><a
class=
"btn btn-default self-sure-pay"
>
确认收款
</a></p>
@endif
</div>
<div
class=
"hide"
id=
"sure-pay"
>
...
...
resources/views/selfOrder/content.blade.php
View file @
aed60613
...
...
@@ -148,7 +148,7 @@
</div>
</dd>
</dl>
<dl>
<
!-- <
dl>
<dt>新订单:</dt>
<dd style="width: 115px;">
<div class="droplist" data-default="{{$condition['is_new_order']}}" id="is_new_order" name="is_new_order">
...
...
@@ -159,7 +159,7 @@
</ul>
</div>
</dd>
</dl>
</dl>
-->
@if (in_array('self_check_test_order', $userPerms))
<dl>
...
...
@@ -276,7 +276,7 @@
<div
class=
"btn-group btn-group-xs"
>
<a
class=
"btn btn-primary"
href=
"/details/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
详情
</a>
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2, 3])
&&
$v['sale_type'] == 2
)
@if (in_array('self_check_order', $userPerms)
&&
in_array($v['status'], [1, 2, 3]))
<a
class=
"btn btn-success"
href=
"/change/{{$v['order_id']}}?tags=self"
target=
"_blank"
>
人工审单
</a>
@endif
...
...
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