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
7b15e487
Commit
7b15e487
authored
May 28, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!196
parents
980ed3a4
bfcc7948
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
9 deletions
+80
-9
src/types/api/factoryOrderNew/factoryOrderNew.ts
+2
-0
src/types/api/order/factoryOrderNew.ts
+2
-0
src/views/order/factoryOrderNew/hooks/useOrderListAndDetail.ts
+7
-3
src/views/order/factoryOrderNew/index.vue
+69
-6
No files found.
src/types/api/factoryOrderNew/factoryOrderNew.ts
View file @
7b15e487
...
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
}
export
interface
SearchForm
{
status
?:
string
pauseReason
?:
number
platform
?:
string
craftCode
?:
string
|
string
[]
thirdSkuCode
?:
string
...
...
src/types/api/order/factoryOrderNew.ts
View file @
7b15e487
...
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
}
export
interface
SearchForm
{
status
?:
string
pauseReason
?:
number
platform
?:
string
craftCode
?:
string
|
string
[]
thirdSkuCode
?:
string
...
...
src/views/order/factoryOrderNew/hooks/useOrderListAndDetail.ts
View file @
7b15e487
...
...
@@ -16,6 +16,8 @@ import type {
interface
UseOrderListAndDetailOptions
{
status
:
Ref
<
string
>
// 查询的状态树,与左侧状态树参数不同,用于挂起状态下suspendReason参数的修改
treeStatus
:
Ref
<
string
>
isCardLayout
:
Ref
<
boolean
>
isTableLayout
:
Ref
<
boolean
>
getQueryPayload
:
()
=>
Record
<
string
,
unknown
>
...
...
@@ -26,6 +28,7 @@ interface UseOrderListAndDetailOptions {
export
function
useOrderListAndDetail
(
options
:
UseOrderListAndDetailOptions
)
{
const
{
status
,
treeStatus
,
isCardLayout
,
isTableLayout
,
getQueryPayload
,
...
...
@@ -69,14 +72,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
refresh
:
refreshTableList
,
}
=
usePageList
<
FactoryOrderNewListData
>
({
query
:
(
page
,
size
)
=>
{
const
isSuspend
=
s
tatus
.
value
===
'SUSPEND'
const
isSuspend
Tree
=
treeS
tatus
.
value
===
'SUSPEND'
return
getFactoryOrderNewListApi
(
buildListQueryBody
(),
page
,
size
,
status
.
value
===
'ALL'
?
undefined
:
status
.
value
,
getListPageAcceptedSubStatus
(),
isSuspend
?
suspendedSubTab
.
value
:
undefined
,
isSuspend
Tree
?
suspendedSubTab
.
value
:
undefined
,
).
then
(
async
(
res
)
=>
{
const
records
=
res
.
data
.
records
||
[]
await
nextTick
(()
=>
{
...
...
@@ -133,7 +136,8 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
)
{
return
}
const
sortProp
=
LIST_SORT_PROP_BY_COLUMN
[
prop
as
keyof
typeof
LIST_SORT_PROP_BY_COLUMN
]
const
sortProp
=
LIST_SORT_PROP_BY_COLUMN
[
prop
as
keyof
typeof
LIST_SORT_PROP_BY_COLUMN
]
if
(
order
===
'ascending'
)
{
listSortProp
.
value
=
sortProp
listSortOrder
.
value
=
'asc'
...
...
src/views/order/factoryOrderNew/index.vue
View file @
7b15e487
...
...
@@ -49,6 +49,25 @@
:
inline
=
"true"
label
-
width
=
"70px"
>
<
ElFormItem
v
-
if
=
"status === 'ALL'"
label
=
"订单状态"
>
<
ElTreeSelect
v
-
model
=
"searchFormStatusSelect"
:
data
=
"statusTreeChildren"
:
props
=
"{
value: 'status',
label: 'statusName',
children: 'children',
}
"
node
-
key
=
"status"
placeholder
=
"请选择"
collapse
-
tags
multiple
clearable
filterable
check
-
strictly
style
=
"width: 180px"
/>
<
/ElFormItem
>
<
ElFormItem
label
=
"平台"
>
<
ElSelect
v
-
model
=
"searchForm.platform"
...
...
@@ -673,8 +692,8 @@
<
div
v
-
if
=
"isCardLayout"
:
key
=
"status"
class
=
"card-content"
>
<
CardLayout
ref
=
"cardLayoutRef"
:
status
=
"
s
tatus"
:
query
-
payload
=
"getQueryPayload()"
:
status
=
"
listQueryS
tatus"
:
query
-
payload
=
"get
List
QueryPayload()"
@
selection
-
change
=
"handleCardSelectionChange"
@
view
-
detail
=
"handleViewDetail"
/>
...
...
@@ -1093,11 +1112,54 @@ const {
onClearTableState
:
()
=>
{
}
,
onRefreshCurrentView
:
()
=>
{
}
,
}
)
// 查询状态树
const
statusTreeChildren
=
computed
(()
=>
{
const
tree
=
JSON
.
parse
(
JSON
.
stringify
(
statusTree
.
value
?.[
0
]?.
children
))
if
(
!
tree
)
return
[]
tree
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
status
===
'PICKING'
)
item
.
children
=
[]
}
)
return
tree
.
filter
(
(
item
:
any
)
=>
item
.
status
!==
'AWAITING_RESTOCK'
&&
item
.
status
!==
'BATCH_MANAGE'
,
)
}
)
const
searchFormStatusSelect
=
computed
({
get
()
{
const
val
=
searchForm
.
value
.
status
if
(
!
val
)
return
[]
return
String
(
val
).
split
(
','
).
filter
(
Boolean
)
}
,
set
(
val
:
string
|
string
[]
|
undefined
)
{
const
arr
=
Array
.
isArray
(
val
)
?
val
:
val
?
[
val
]
:
[]
searchForm
.
value
.
status
=
arr
.
length
?
arr
.
join
(
','
)
:
undefined
}
,
}
)
getFactoryOrderSearchVisibilityContext
=
()
=>
({
status
:
status
.
value
,
status
:
s
earchForm
.
value
.
status
??
s
tatus
.
value
,
isCardLayout
:
isCardLayout
.
value
,
}
)
// 全部状态下列表/导出请求status参数
const
listQueryStatus
=
computed
(()
=>
{
if
(
status
.
value
===
'ALL'
&&
searchForm
.
value
.
status
)
{
return
searchForm
.
value
.
status
}
return
status
.
value
}
)
const
getListQueryPayload
=
()
=>
{
const
payload
=
{
...
getQueryPayload
()
}
if
(
status
.
value
===
'ALL'
&&
searchForm
.
value
.
status
)
{
payload
.
status
=
searchForm
.
value
.
status
}
else
{
delete
payload
.
status
}
return
payload
}
const
{
subLoading
,
activeTab
,
...
...
@@ -1123,10 +1185,11 @@ const {
handleTabClick
,
handleMainTableSortChange
,
}
=
useOrderListAndDetail
({
status
,
status
:
listQueryStatus
,
treeStatus
:
status
,
isCardLayout
,
isTableLayout
,
getQueryPayload
,
getQueryPayload
:
getListQueryPayload
,
getListPageAcceptedSubStatus
,
suspendedSubTab
,
}
)
...
...
@@ -1171,7 +1234,7 @@ const submitExportForm = async () => {
try
{
await
exportFactoryOrderInfo
({
...
params
,
...(
resourceType
===
2
?
getQueryPayload
()
:
{
}
),
...(
resourceType
===
2
?
get
List
QueryPayload
()
:
{
}
),
}
as
ExportParams
)
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
exportVisible
.
value
=
false
...
...
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