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
1b3c1d7b
authored
Jan 26, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整确认退款
parent
96f361ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
27 deletions
app/Http/Controllers/ApiController.php
resources/views/detail/content.blade.php
app/Http/Controllers/ApiController.php
View file @
1b3c1d7b
...
...
@@ -476,36 +476,17 @@ class ApiController extends Controller
if
(
!
$id
)
$this
->
Export
(
-
1
,
'参数缺失'
);
$OrderServiceModel
=
new
OrderServiceModel
;
$order_service
=
$OrderServiceModel
->
find
(
$id
);
$OrderRefundModel
=
new
OrderRefundModel
;
$OrderRefundLogModel
=
new
OrderRefundLogModel
;
$update_service
=
[];
$update_service
[
'refund_status'
]
=
3
;
$update_service
[
'update_time'
]
=
time
();
$res
=
$OrderServiceModel
->
where
(
'id'
,
$id
)
->
update
(
$update_service
);
if
(
$res
===
false
)
$this
->
Export
(
-
1
,
'更新售后退款状态失败'
);
$update
=
[];
$update
[
'is_refund'
]
=
1
;
$update
[
'status'
]
=
10
;
$update
[
'is_sys'
]
=
2
;
// 同步财务
$update
[
'refund_time'
]
=
time
();
$data
[
'id'
]
=
$id
;
$data
[
'operator_id'
]
=
$request
->
user
->
userId
;
$res
=
$OrderRefundModel
->
where
(
'refund_id'
,
$order_service
->
refund_id
)
->
update
(
$update
);
if
(
$res
===
false
)
$this
->
Export
(
-
1
,
'更新退款表失败'
);
$url
=
Config
(
'website.api_domain'
)
.
'refund/confirmrefund'
;
$update_log
=
[];
$update_log
[
'refund_status'
]
=
10
;
$update_log
[
'refund_time'
]
=
time
();
$data
[
'k1'
]
=
time
();
$data
[
'k2'
]
=
md5
(
md5
(
$data
[
'k1'
])
.
'fh6y5t4rr351d2c3bryi'
);
$res
=
$OrderRefundLogModel
->
where
(
'refund_id'
,
$order_service
->
refund_id
)
->
update
(
$update_log
);
if
(
$res
===
false
)
$this
->
Export
(
-
1
,
'更新退款日志失败'
);
$temp
=
json_decode
(
curlApi
(
$url
,
$data
,
"POST"
),
true
);
// 连接API
$this
->
Export
(
0
,
'成功'
);
$this
->
Export
(
$temp
[
'err_code'
],
$temp
[
'err_msg'
]
);
}
...
...
resources/views/detail/content.blade.php
View file @
1b3c1d7b
...
...
@@ -211,7 +211,7 @@
@endif
<!-- 售后申请 -->
@if ($order_info['status'] > 2
&&
$order_info['status']
<
10
)
@if ($order_info['status'] > 2)
<a
class=
"btn btn-info order_service"
data-id=
"{{$order_info['order_id']}}"
data-pay_type=
"{{$order_info['order_pay_type']}}"
>
售后申请
</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