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
5b391770
authored
Nov 23, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_order_invoice_20181123
parents
12a171ab
ac39c42f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
23 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
resources/views/detail/cancelPay.blade.php
resources/views/detail/content.blade.php
app/Http/Controllers/AddOrderController.php
View file @
5b391770
...
...
@@ -557,13 +557,13 @@ Class AddOrderController extends Controller
}
else
{
$data
[
'order_id'
]
=
$request
->
input
(
'order_id'
);
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$data
[
'
cancel_reason'
]
=
'后台审核不通过'
;
$data
[
'
type'
]
=
3
;
$url
=
Config
(
'website.api_domain'
)
.
'order/
selfC
ancel'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/
c
ancel'
;
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
$event
=
'自营线下订单审核不通过'
;
...
...
app/Http/Controllers/OrderController.php
View file @
5b391770
...
...
@@ -990,14 +990,7 @@ Class OrderController extends Controller
$order_id
=
$request
->
input
(
'order_id'
,
''
);
//订单号
$sale_id
=
$request
->
input
(
'sale_id'
,
null
);
//对应销售
$operator_id
=
$request
->
user
->
userId
;
$order_status
=
$request
->
input
(
'order_status'
,
''
);
//审核通过 2 审核不通过(即取消订单) -1
$cancel_reason
=
$request
->
input
(
'cancel_reason'
,
''
);
$order_sn
=
$request
->
input
(
'order_sn'
,
''
);
if
(
$order_status
==
-
1
&&
!
$cancel_reason
)
{
return
array
(
'errcode'
=>
1
,
'errmsg'
=>
'审核不通过的原因不可为空!'
);
}
if
(
!
isset
(
$sale_id
))
{
return
array
(
'errcode'
=>
1
,
'errmsg'
=>
'请选择订单业务员!'
);
...
...
@@ -1008,12 +1001,12 @@ Class OrderController extends Controller
}
//用于后台订单审核
$url
=
Config
(
'website.api_domain'
)
.
'order/
adminCheck
'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/
cancel
'
;
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$resData
=
array
(
"cancel_reason"
=>
$cancel_reason
,
"order_id"
=>
$order_id
,
'sale_id'
=>
$sale_id
,
'status'
=>
$order_status
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
'operator_id'
=>
$operator_id
);
$resData
=
array
(
"cancel_reason"
=>
$cancel_reason
,
"order_id"
=>
$order_id
,
'sale_id'
=>
$sale_id
,
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
'operator_id'
=>
$operator_id
,
'type'
=>
3
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
...
...
@@ -1021,7 +1014,7 @@ Class OrderController extends Controller
}
}
//
取消订单(仅限审核通过,未付款前)
//
联营取消订单
public
function
cancelPay
(
Request
$request
,
$id
)
{
if
(
$request
->
isMethod
(
'post'
)){
...
...
@@ -1039,12 +1032,12 @@ Class OrderController extends Controller
return
array
(
'errcode'
=>
Error
::
E_NOT_EXISTS
,
'errmsg'
=>
'取消订单的原因不可为空~'
);
}
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel
Pay
'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel'
;
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
,
'type'
=>
2
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
...
...
@@ -1356,7 +1349,7 @@ print_r(curlApi($update_url, $data, 'POST'));
return
$response
;
}
// 取消订单
//
自营
取消订单
public
function
ajaxSelfCancel
(
Request
$request
)
{
if
(
$request
->
isMethod
(
'post'
))
{
...
...
@@ -1364,13 +1357,13 @@ print_r(curlApi($update_url, $data, 'POST'));
$cancel_reason
=
$request
->
input
(
'reason'
);
$operator_id
=
$request
->
user
->
userId
;
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel
Pay
'
;
$url
=
Config
(
'website.api_domain'
)
.
'order/cancel'
;
$check
[
'k1'
]
=
time
();
$check
[
'k2'
]
=
md5
(
md5
(
$check
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
);
$resData
=
array
(
"pf"
=>
1
,
"k1"
=>
$check
[
'k1'
],
"k2"
=>
$check
[
'k2'
],
"order_id"
=>
$order_id
,
"cancel_reason"
=>
$cancel_reason
,
'operator_id'
=>
$operator_id
,
'type'
=>
2
);
$temp
=
json_decode
(
curlApi
(
$url
,
$resData
,
"POST"
),
true
);
return
array
(
'errcode'
=>
$temp
[
'err_code'
],
'errmsg'
=>
$temp
[
'err_msg'
]);
...
...
@@ -1714,7 +1707,9 @@ print_r(curlApi($update_url, $data, 'POST'));
public
function
checkHistroyOrder
(
Request
$request
)
{
// 查找用户订单数,并更新用户表和订单扩展表
$subQuery
=
OrderModel
::
where
(
'is_type'
,
'='
,
0
)
->
orderBy
(
'order_id'
);
$subQuery
=
OrderModel
::
where
(
'is_type'
,
'='
,
0
)
->
where
(
'status'
,
'<>'
,
-
1
)
->
orderBy
(
'order_id'
);
DB
::
connection
(
'order'
)
->
table
(
'lie_order_extend'
)
->
update
([
'is_new'
=>
0
]);
// 是否新订单恢复默认值0
OrderModel
::
from
(
DB
::
raw
(
"(
{
$subQuery
->
toSql
()
}
) as sub"
))
->
mergeBindings
(
$subQuery
->
getQuery
())
...
...
resources/views/detail/cancelPay.blade.php
View file @
5b391770
...
...
@@ -5,9 +5,9 @@
case
2
:
echo
'<table class="table">
<tr>
<td>取消订单原因:</td>
<td
width="10%"
>取消订单原因:</td>
<td>
<textarea name="" id="cancel-reason" c
ols="30" rows="3"
placeholder="请输入取消原因"></textarea>
<textarea name="" id="cancel-reason" c
lass="form-control"
placeholder="请输入取消原因"></textarea>
</td>
</tr>
<tr><td colspan="20"><a class="btn btn-primary submit">提交</a></td></tr>
...
...
resources/views/detail/content.blade.php
View file @
5b391770
...
...
@@ -607,7 +607,7 @@
<a
class=
"btn btn-success"
href=
"/change/{{$order_info['order_id']}}?tags=self"
>
人工审单
</a>
@endif
@if (in_array($order_info['status'], [2, 3, 4])
&&
!$extend
&&
in_array('self_order_cancel', $userPerms))
@if (in_array($order_info['status'], [
1,
2, 3, 4])
&&
!$extend
&&
in_array('self_order_cancel', $userPerms))
<a
class=
"btn btn-default self_cancel"
href=
"javascript:;"
data-id=
"{{$order_info['order_id']}}"
>
取消订单
</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