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
e5fdf4c2
authored
Sep 01, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
取消订单添加user_id
parent
a9742406
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
17 deletions
app/Http/Controllers/OrderController.php
public/js/order.js
public/js/order_cancel.js
resources/views/detail/content.blade.php
resources/views/orderlist/content.blade.php
resources/views/selfOrder/content.blade.php
app/Http/Controllers/OrderController.php
View file @
e5fdf4c2
...
...
@@ -1665,15 +1665,16 @@ Class OrderController extends Controller
public
function
ajaxCancel
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
$data
[
'order_id'
]
=
$request
->
input
(
'order_id'
,
0
);
$data
[
'user_id'
]
=
$request
->
input
(
'user_id'
,
0
);
$data
[
'order_id'
]
=
$request
->
input
(
'order_id'
,
0
);
$data
[
'cancel_reason'
]
=
$request
->
input
(
'cancel_reason'
,
''
);
$data
[
'type'
]
=
$request
->
input
(
'type'
,
2
);
// 2.取消订单,3.审核不通过,4-填写取消原因
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$data
[
'type'
]
=
$request
->
input
(
'type'
,
2
);
// 2.取消订单,3.审核不通过,4-填写取消原因
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
...
...
public/js/order.js
View file @
e5fdf4c2
...
...
@@ -555,10 +555,11 @@
cancelorder
:
function
()
{
// 填写订单取消原因
$
(
'.input-cancel-reason'
).
click
(
function
(){
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
user_id
=
self
.
data
(
'uid'
);
var
order_id
=
self
.
data
(
'oid'
);
var
type
=
self
.
data
(
'type'
);
var
title
=
''
;
var
type
=
self
.
data
(
'type'
);
var
title
=
''
;
switch
(
type
)
{
case
2
:
title
=
'取消订单'
;
break
;
...
...
@@ -670,7 +671,7 @@
$
.
ajax
({
url
:
'/ajaxCancel'
,
data
:
{
order_id
:
order_id
,
cancel_reason
:
cancel_reason
,
type
:
type
},
data
:
{
user_id
:
user_id
,
order_id
:
order_id
,
cancel_reason
:
cancel_reason
,
type
:
type
},
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
...
...
public/js/order_cancel.js
View file @
e5fdf4c2
...
...
@@ -7,10 +7,11 @@
cancelorder
:
function
()
{
// 填写订单取消原因
$
(
'.input-cancel-reason'
).
click
(
function
(){
var
self
=
$
(
this
);
var
self
=
$
(
this
);
var
user_id
=
self
.
data
(
'uid'
);
var
order_id
=
self
.
data
(
'oid'
);
var
type
=
self
.
data
(
'type'
);
var
title
=
''
;
var
type
=
self
.
data
(
'type'
);
var
title
=
''
;
switch
(
type
)
{
case
2
:
title
=
'取消订单'
;
break
;
...
...
@@ -122,7 +123,7 @@
$
.
ajax
({
url
:
'/ajaxCancel'
,
data
:
{
order_id
:
order_id
,
cancel_reason
:
cancel_reason
,
type
:
type
},
data
:
{
user_id
:
user_id
,
order_id
:
order_id
,
cancel_reason
:
cancel_reason
,
type
:
type
},
type
:
'post'
,
dataType
:
'json'
,
success
:
function
(
resp
){
...
...
resources/views/detail/content.blade.php
View file @
e5fdf4c2
...
...
@@ -153,7 +153,7 @@
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2, 3, 4])
&&
in_array('cancel_order', $userPerms))
<!-- <a href="{{URL('cancelPay', ['order_id'=>$order_info['order_id']])}}" class="btn btn-danger">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"2"
>
取消订单
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-
uid=
"{{$order_info['user_id']}}"
data-
type=
"2"
>
取消订单
</a>
@endif
@if (in_array('check_order', $userPerms)
&&
$order_info['sale_id'])
...
...
@@ -221,7 +221,7 @@
<div
class=
"tabs-box"
>
@if (in_array($order_info['status'], [1, 2, 3, 4])
&&
in_array('self_order_cancel', $userPerms))
<!-- <a class="btn btn-danger self_cancel" href="javascript:;" data-id="{{$order_info['order_id']}}">取消订单</a> -->
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-type=
"2"
>
取消订单
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$order_info['order_id']}}"
data-
uid=
"{{$order_info['user_id']}}"
data-
type=
"2"
>
取消订单
</a>
@endif
<!-- 判断状态和权限 $extend-自营线下订单 -->
...
...
resources/views/orderlist/content.blade.php
View file @
e5fdf4c2
...
...
@@ -389,7 +389,7 @@
?>
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-type=
"4"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-
uid=
"{{$v['user_id']}}"
data-
type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
...
...
resources/views/selfOrder/content.blade.php
View file @
e5fdf4c2
...
...
@@ -394,7 +394,7 @@
@endif
@if ($v['status'] == -1
&&
!$v['cancel_reason'])
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-type=
"4"
>
填写取消原因
</a>
<a
class=
"btn btn-danger input-cancel-reason"
href=
"javascript:;"
data-oid=
"{{$v['order_id']}}"
data-
uid=
"{{$v['user_id']}}"
data-
type=
"4"
>
填写取消原因
</a>
@endif
</div>
</td>
...
...
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