Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_admin
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
859f928d
authored
Nov 30, 2022
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug修改
parent
4396caee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
app/Admin/Service/OrderService.php
app/Models/OrderPrice.php
resources/views/admin/pages/order-page.blade.php
resources/views/export/order_contract_PI.blade.php
app/Admin/Service/OrderService.php
View file @
859f928d
...
...
@@ -138,10 +138,9 @@ class OrderService extends BaseService
if
(
!
empty
(
$returnItems
)){
foreach
(
$insertReturnItemData
as
$field
=>
$val
){
if
(
$field
==
"type"
&&
!
in_array
(
$val
[
"type"
]
,[
1
,
2
])){
if
(
$field
!=
"type"
||
!
in_array
(
$val
,[
1
,
2
])){
continue
;
}
if
(
$field
==
"return_goods_number"
&&
!
$val
){
continue
;
}
...
...
@@ -166,6 +165,7 @@ class OrderService extends BaseService
if
(
$createOrEdit
){
$insertReturnItemData
[
"return_amount"
]
=
decimal_number_format
(
$insertReturnItemData
[
"return_price"
]
*
$insertReturnItemData
[
"return_num"
]);
}
$createOrEdit
&&
OrderReturnItems
::
create
(
array_merge
(
$insertReturnItemData
,[
"create_time"
=>
time
()]));
}
...
...
@@ -287,6 +287,8 @@ class OrderService extends BaseService
if
(
empty
(
$orderInfo
)){
throw
new
InvalidRequestException
(
admin_trans
(
"order.return_msg.50005"
));
}
$freightCharge
=
$freightCharge
<=
0
?
0
:
$freightCharge
;
$payCommission
=
$payCommission
<=
0
?
0
:
$payCommission
;
OrderPrice
::
editOrderSettlement
(
$orderId
,
$orderInfo
[
"order_sn"
],
$freightCharge
,
$payCommission
);
Order
::
updateOrder
([
"order_id"
=>
$orderId
],[
"order_user_pay_type"
=>
$orderUserPayType
,
...
...
app/Models/OrderPrice.php
View file @
859f928d
...
...
@@ -37,8 +37,6 @@ class OrderPrice extends Model
//新增或者修改订单的 运费 支付手续费
public
static
function
editOrderSettlement
(
$orderId
,
$orderSn
,
$freightCharge
,
$payCommission
){
if
(
$freightCharge
){
self
::
updateOrCreate
([
"order_id"
=>
$orderId
,
"price_type"
=>
self
::
$PRICE_TYPE_LIST
[
"运费"
],
...
...
@@ -48,9 +46,8 @@ class OrderPrice extends Model
"currency"
=>
2
,
"create_time"
=>
time
(),
]);
}
if
(
$payCommission
){
self
::
updateOrCreate
([
"order_id"
=>
$orderId
,
"price_type"
=>
self
::
$PRICE_TYPE_LIST
[
"支付手续费"
],
...
...
@@ -60,7 +57,7 @@ class OrderPrice extends Model
"currency"
=>
2
,
"create_time"
=>
time
(),
]);
}
}
...
...
resources/views/admin/pages/order-page.blade.php
View file @
859f928d
...
...
@@ -413,10 +413,10 @@
<div class="
layui
-
form
-
item
">
<label class="
layui
-
form
-
label
">
{
{admin_trans("order.order_page.支付方式")}
}
:</label>
<div class="
layui
-
input
-
block
">
<div class="
layui
-
form
-
mid
">
{
{$info["settlementInfo"]["order_user_pay_type_cn"]}
}
</div>
<div class="
layui
-
form
-
mid
">
{
{$info["settlementInfo"]["order_user_pay_type_cn"]}
}
</div>
<div class="
show
" style="
display
:
none
">
<input type="
radio
" name="
order_user_pay_type
" value="
1
" title="
Paypal
"
checked
>
<input type="
radio
" name="
order_user_pay_type
" value="
2
" title="
TT
">
<input type="
radio
" name="
order_user_pay_type
" value="
1
" title="
Paypal
"
@if(
$info["settlementInfo"]["order_user_pay_type"]
== "
1
") checked @endif
>
<input type="
radio
" name="
order_user_pay_type
" value="
2
"
@if(
$info["settlementInfo"]["order_user_pay_type"]
== "
2
") checked @endif
title="
TT
">
</div>
</div>
</div>
...
...
resources/views/export/order_contract_PI.blade.php
View file @
859f928d
<table
border=
"1"
>
<tr>
<td
rowspan=
"4"
>
<img
src=
"./assets/images/logo.png"
width=
"50"
height=
"50"
>
</td>
</tr>
...
...
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