Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
017d5a98
Commit
017d5a98
authored
Dec 13, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单CN、US代码复原
parent
75a40f4a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
2 deletions
+57
-2
src/types/api/podCnOrder.ts
+1
-0
src/types/api/podUsOrder.ts
+1
-0
src/views/order/podCN/index.vue
+55
-2
src/views/order/podUs/index.vue
+0
-0
No files found.
src/types/api/podCnOrder.ts
View file @
017d5a98
...
@@ -139,6 +139,7 @@ export interface ProductList {
...
@@ -139,6 +139,7 @@ export interface ProductList {
tagIds
?:
string
tagIds
?:
string
isProduction
?:
boolean
isProduction
?:
boolean
createTime
?:
string
createTime
?:
string
startStockingTime
?:
string
|
null
updateTime
?:
string
updateTime
?:
string
remark
?:
string
|
null
remark
?:
string
|
null
version
?:
number
version
?:
number
...
...
src/types/api/podUsOrder.ts
View file @
017d5a98
...
@@ -138,6 +138,7 @@ export interface ProductList {
...
@@ -138,6 +138,7 @@ export interface ProductList {
tagIds
?:
string
tagIds
?:
string
isProduction
?:
boolean
isProduction
?:
boolean
createTime
?:
string
createTime
?:
string
startStockingTime
?:
string
|
null
updateTime
?:
string
updateTime
?:
string
remark
?:
string
|
null
remark
?:
string
|
null
version
?:
number
version
?:
number
...
...
src/views/order/podCN/index.vue
View file @
017d5a98
...
@@ -1604,6 +1604,15 @@
...
@@ -1604,6 +1604,15 @@
{{
row
.
lanshouAddress
}}
{{
row
.
lanshouAddress
}}
<
/span
>
<
/span
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"['TO_BE_CONFIRMED', 'STOCK_OUT'].includes(status)"
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
订单延期时间
:
<
/span
>
<
span
class
=
"order-detail-item-value red-time"
>
{{
calculateDelayTime
(
row
)
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
template
#
price
=
"{ row
}
"
>
<
template
#
price
=
"{ row
}
"
>
...
@@ -5463,7 +5472,10 @@ watch(
...
@@ -5463,7 +5472,10 @@ watch(
}
,
}
,
{
deep
:
true
,
immediate
:
true
}
,
// 添加immediate确保初始化时执行
{
deep
:
true
,
immediate
:
true
}
,
// 添加immediate确保初始化时执行
)
)
// 当前时间响应式变量(每60秒更新一次)
const
currentTime
=
ref
(
new
Date
())
// 定时器实例
let
timer
:
number
|
null
=
null
onMounted
(()
=>
{
onMounted
(()
=>
{
loadTabData
()
loadTabData
()
getUserMark
()
getUserMark
()
...
@@ -5471,8 +5483,45 @@ onMounted(() => {
...
@@ -5471,8 +5483,45 @@ onMounted(() => {
getCustomTagList
()
getCustomTagList
()
loadCraftList
()
loadCraftList
()
getlogisticsCompanyAllCodelist
()
getlogisticsCompanyAllCodelist
()
// 每60秒更新一次当前时间
timer
=
window
.
setInterval
(()
=>
{
currentTime
.
value
=
new
Date
()
}
,
60000
)
}
)
// 计算时间差(小时数)并向上取整
const
calculateHoursDifference
=
(
startDateString
?:
string
):
string
=>
{
if
(
!
startDateString
)
return
'--'
try
{
const
startTime
=
new
Date
(
startDateString
)
const
diffInMs
=
currentTime
.
value
.
getTime
()
-
startTime
.
getTime
()
// 转换为小时并取整:ceil向上或者round:四舍五入
const
hours
=
Math
.
round
(
diffInMs
/
(
1000
*
60
*
60
))
return
`${hours
}
小时`
}
catch
(
error
)
{
console
.
error
(
'日期解析错误:'
,
error
)
return
'--'
}
}
// 根据订单状态计算延期时间
const
calculateDelayTime
=
computed
(()
=>
(
row
:
ProductList
)
=>
{
switch
(
status
.
value
)
{
case
'TO_BE_CONFIRMED'
:
return
row
.
createTime
?
calculateHoursDifference
(
row
.
createTime
)
:
'--'
case
'STOCK_OUT'
:
return
row
.
startStockingTime
?
calculateHoursDifference
(
row
.
startStockingTime
)
:
'--'
default
:
return
'--'
}
}
)
onBeforeUnmount
(()
=>
{
// 组件卸载时清除定时器
if
(
timer
)
{
clearInterval
(
timer
)
timer
=
null
}
}
)
}
)
const
handleShipmentAreaCommand
=
(
command
:
number
)
=>
{
const
handleShipmentAreaCommand
=
(
command
:
number
)
=>
{
shipmentArea
.
value
=
command
shipmentArea
.
value
=
command
search
()
search
()
...
@@ -5843,6 +5892,10 @@ useEnterKeyTrigger({
...
@@ -5843,6 +5892,10 @@ useEnterKeyTrigger({
text
-
overflow
:
ellipsis
;
text
-
overflow
:
ellipsis
;
white
-
space
:
nowrap
;
white
-
space
:
nowrap
;
}
}
.
red
-
time
{
color
:
red
;
font
-
weight
:
bold
;
}
}
}
.
card
-
list
{
.
card
-
list
{
...
...
src/views/order/podUs/index.vue
View file @
017d5a98
This diff is collapsed.
Click to expand it.
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