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
0
Merge Requests
0
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
1de73eae
Commit
1de73eae
authored
Jul 20, 2026
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全部状态待接单和已取消的所有状态正常展示 延期时间的值
parent
4118f798
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/views/order/factoryOrderNew/index.vue
+8
-8
No files found.
src/views/order/factoryOrderNew/index.vue
View file @
1de73eae
...
...
@@ -1956,6 +1956,7 @@ const mainColumns = computed(() => [
const
delayText
=
getOrderDelayText
(
row
.
createTime
??
''
,
row
.
finishTime
??
''
,
row
.
status
??
''
,
)
return
(
<
div
style
=
{{
color
:
'red'
,
fontWeight
:
'bolder'
}}
>
...
...
@@ -2657,33 +2658,32 @@ const handleUpdateCustomsInfo = async () => {
await
nextTick
()
updateCustomsDialogRef
.
value
?.
resetForm
()
}
// 值为空:待接单
const
PENDING_RECEIVE_STATUSES
=
[
'PENDING_RECEIVE
'
]
// 值为空:待接单
和已取消状态
const
NULL_STATUSES
=
[
'PENDING_RECEIVE'
,
'CANCELLED
'
]
// 终态订单:已完成/已归档
const
TERMINAL_ORDER_STATUSES
=
[
'COMPLETED'
,
'ARCHIVE'
]
const
getOrderDelayText
=
(
createTime
?:
string
|
null
,
finishTime
?:
string
|
null
,
statusValue
?:
string
|
null
,
)
=>
{
if
(
!
createTime
)
return
''
if
(
TERMINAL_ORDER_STATUSES
.
includes
(
status
.
value
)
&&
!
finishTime
)
return
''
const
currentStatus
=
statusValue
??
''
if
(
TERMINAL_ORDER_STATUSES
.
includes
(
currentStatus
)
&&
!
finishTime
)
return
''
const
createAt
=
dayjs
(
createTime
)
if
(
!
createAt
.
isValid
())
return
''
// 终态订单用 finishTime - createTime 的差值
// 其他状态用 当前时间 - createTime 的差值
const
endTime
=
TERMINAL_ORDER_STATUSES
.
includes
(
status
.
value
)
&&
finishTime
TERMINAL_ORDER_STATUSES
.
includes
(
currentStatus
)
&&
finishTime
?
dayjs
(
finishTime
)
:
dayjs
()
const
diffMinutes
=
Math
.
max
(
0
,
endTime
.
diff
(
createAt
,
'minute'
))
const
baseHours
=
Math
.
floor
(
diffMinutes
/
60
)
const
remainMinutes
=
diffMinutes
%
60
const
hours
=
baseHours
+
(
remainMinutes
>
30
?
1
:
0
)
// 待接单状态不显示时间,其余显示小时数
const
result
=
!
PENDING_RECEIVE_STATUSES
.
includes
(
status
?.
value
)
?
`${hours
}
h`
:
''
const
result
=
!
NULL_STATUSES
.
includes
(
currentStatus
)
?
`${hours
}
h`
:
''
return
result
}
...
...
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