Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
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
07cb5345
authored
Nov 23, 2022
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
深茂订单详情
parent
9644b8da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletions
app/Http/Services/OrderService.php
app/helpers.php
app/Http/Services/OrderService.php
View file @
07cb5345
...
...
@@ -379,7 +379,7 @@ class OrderService
"goods_id"
=>
$v
[
"goods_id"
],
"goods_name"
=>
$v
[
"goods_name"
],
"brand_name"
=>
$v
[
"brand_name"
],
"delivery_time"
=>
$v
[
"delivery_time"
]
,
"delivery_time"
=>
changeDeliverToEn
(
$v
[
"delivery_time"
])
,
"pdf"
=>
\Arr
::
get
(
$oneInfo
,
"pdf"
),
"goods_number"
=>
$v
[
"goods_number"
],
"goods_price"
=>
$v
[
"goods_price"
],
...
...
app/helpers.php
View file @
07cb5345
...
...
@@ -116,3 +116,30 @@ function getRate($k = "美元")
function
timeToDate
(
$timestr
){
return
$timestr
>
0
?
date
(
"Y-m-d H:i:s"
,
$timestr
)
:
""
;
}
/*
* 工作日或者周转换英文
*/
function
changeDeliverToEn
(
$delivery_time
){
$day_filter
=
[
"工作日"
,
"个工作日"
,
"日"
];
$week_filter
=
[
"周"
];
//货区去掉工作日
$hk_delivery_time_origin
=
$delivery_time
;
$delivery_time
=
str_replace
(
"工作日"
,
""
,
$delivery_time
);
$delivery_time
=
str_replace
(
"个"
,
""
,
$delivery_time
);
#工作日转换
foreach
(
$day_filter
as
$d
){
if
(
strpos
(
$hk_delivery_time_origin
,
$d
)
!==
false
){
$delivery_time
=
$delivery_time
.
" workdays"
;
break
;
}
}
#周转换
foreach
(
$week_filter
as
$d
){
if
(
strpos
(
$hk_delivery_time_origin
,
$d
)
!==
false
){
$delivery_time
=
$delivery_time
.
" weeks"
;
break
;
}
}
return
$delivery_time
;
}
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