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
bfcc7948
Commit
bfcc7948
authored
May 28, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_factory_new_order_filter' into 'dev'
Dev factory new order filter See merge request
!195
parents
a89226e3
46b8f3d5
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 @
bfcc7948
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
}
}
export
interface
SearchForm
{
export
interface
SearchForm
{
status
?:
string
pauseReason
?:
number
platform
?:
string
platform
?:
string
craftCode
?:
string
|
string
[]
craftCode
?:
string
|
string
[]
thirdSkuCode
?:
string
thirdSkuCode
?:
string
...
...
src/types/api/order/factoryOrderNew.ts
View file @
bfcc7948
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
...
@@ -6,6 +6,8 @@ export interface StatusTreeNode {
}
}
export
interface
SearchForm
{
export
interface
SearchForm
{
status
?:
string
pauseReason
?:
number
platform
?:
string
platform
?:
string
craftCode
?:
string
|
string
[]
craftCode
?:
string
|
string
[]
thirdSkuCode
?:
string
thirdSkuCode
?:
string
...
...
src/views/order/factoryOrderNew/hooks/useOrderListAndDetail.ts
View file @
bfcc7948
...
@@ -16,6 +16,8 @@ import type {
...
@@ -16,6 +16,8 @@ import type {
interface
UseOrderListAndDetailOptions
{
interface
UseOrderListAndDetailOptions
{
status
:
Ref
<
string
>
status
:
Ref
<
string
>
// 查询的状态树,与左侧状态树参数不同,用于挂起状态下suspendReason参数的修改
treeStatus
:
Ref
<
string
>
isCardLayout
:
Ref
<
boolean
>
isCardLayout
:
Ref
<
boolean
>
isTableLayout
:
Ref
<
boolean
>
isTableLayout
:
Ref
<
boolean
>
getQueryPayload
:
()
=>
Record
<
string
,
unknown
>
getQueryPayload
:
()
=>
Record
<
string
,
unknown
>
...
@@ -26,6 +28,7 @@ interface UseOrderListAndDetailOptions {
...
@@ -26,6 +28,7 @@ interface UseOrderListAndDetailOptions {
export
function
useOrderListAndDetail
(
options
:
UseOrderListAndDetailOptions
)
{
export
function
useOrderListAndDetail
(
options
:
UseOrderListAndDetailOptions
)
{
const
{
const
{
status
,
status
,
treeStatus
,
isCardLayout
,
isCardLayout
,
isTableLayout
,
isTableLayout
,
getQueryPayload
,
getQueryPayload
,
...
@@ -69,14 +72,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
...
@@ -69,14 +72,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
refresh
:
refreshTableList
,
refresh
:
refreshTableList
,
}
=
usePageList
<
FactoryOrderNewListData
>
({
}
=
usePageList
<
FactoryOrderNewListData
>
({
query
:
(
page
,
size
)
=>
{
query
:
(
page
,
size
)
=>
{
const
isSuspend
=
s
tatus
.
value
===
'SUSPEND'
const
isSuspend
Tree
=
treeS
tatus
.
value
===
'SUSPEND'
return
getFactoryOrderNewListApi
(
return
getFactoryOrderNewListApi
(
buildListQueryBody
(),
buildListQueryBody
(),
page
,
page
,
size
,
size
,
status
.
value
===
'ALL'
?
undefined
:
status
.
value
,
status
.
value
===
'ALL'
?
undefined
:
status
.
value
,
getListPageAcceptedSubStatus
(),
getListPageAcceptedSubStatus
(),
isSuspend
?
suspendedSubTab
.
value
:
undefined
,
isSuspend
Tree
?
suspendedSubTab
.
value
:
undefined
,
).
then
(
async
(
res
)
=>
{
).
then
(
async
(
res
)
=>
{
const
records
=
res
.
data
.
records
||
[]
const
records
=
res
.
data
.
records
||
[]
await
nextTick
(()
=>
{
await
nextTick
(()
=>
{
...
@@ -133,7 +136,8 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
...
@@ -133,7 +136,8 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
)
{
)
{
return
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'
)
{
if
(
order
===
'ascending'
)
{
listSortProp
.
value
=
sortProp
listSortProp
.
value
=
sortProp
listSortOrder
.
value
=
'asc'
listSortOrder
.
value
=
'asc'
...
...
src/views/order/factoryOrderNew/index.vue
View file @
bfcc7948
...
@@ -49,6 +49,25 @@
...
@@ -49,6 +49,25 @@
:
inline
=
"true"
:
inline
=
"true"
label
-
width
=
"70px"
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
=
"平台"
>
<
ElFormItem
label
=
"平台"
>
<
ElSelect
<
ElSelect
v
-
model
=
"searchForm.platform"
v
-
model
=
"searchForm.platform"
...
@@ -673,8 +692,8 @@
...
@@ -673,8 +692,8 @@
<
div
v
-
if
=
"isCardLayout"
:
key
=
"status"
class
=
"card-content"
>
<
div
v
-
if
=
"isCardLayout"
:
key
=
"status"
class
=
"card-content"
>
<
CardLayout
<
CardLayout
ref
=
"cardLayoutRef"
ref
=
"cardLayoutRef"
:
status
=
"
s
tatus"
:
status
=
"
listQueryS
tatus"
:
query
-
payload
=
"getQueryPayload()"
:
query
-
payload
=
"get
List
QueryPayload()"
@
selection
-
change
=
"handleCardSelectionChange"
@
selection
-
change
=
"handleCardSelectionChange"
@
view
-
detail
=
"handleViewDetail"
@
view
-
detail
=
"handleViewDetail"
/>
/>
...
@@ -1093,11 +1112,54 @@ const {
...
@@ -1093,11 +1112,54 @@ const {
onClearTableState
:
()
=>
{
}
,
onClearTableState
:
()
=>
{
}
,
onRefreshCurrentView
:
()
=>
{
}
,
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
=
()
=>
({
getFactoryOrderSearchVisibilityContext
=
()
=>
({
status
:
status
.
value
,
status
:
s
earchForm
.
value
.
status
??
s
tatus
.
value
,
isCardLayout
:
isCardLayout
.
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
{
const
{
subLoading
,
subLoading
,
activeTab
,
activeTab
,
...
@@ -1123,10 +1185,11 @@ const {
...
@@ -1123,10 +1185,11 @@ const {
handleTabClick
,
handleTabClick
,
handleMainTableSortChange
,
handleMainTableSortChange
,
}
=
useOrderListAndDetail
({
}
=
useOrderListAndDetail
({
status
,
status
:
listQueryStatus
,
treeStatus
:
status
,
isCardLayout
,
isCardLayout
,
isTableLayout
,
isTableLayout
,
getQueryPayload
,
getQueryPayload
:
getListQueryPayload
,
getListPageAcceptedSubStatus
,
getListPageAcceptedSubStatus
,
suspendedSubTab
,
suspendedSubTab
,
}
)
}
)
...
@@ -1171,7 +1234,7 @@ const submitExportForm = async () => {
...
@@ -1171,7 +1234,7 @@ const submitExportForm = async () => {
try
{
try
{
await
exportFactoryOrderInfo
({
await
exportFactoryOrderInfo
({
...
params
,
...
params
,
...(
resourceType
===
2
?
getQueryPayload
()
:
{
}
),
...(
resourceType
===
2
?
get
List
QueryPayload
()
:
{
}
),
}
as
ExportParams
)
}
as
ExportParams
)
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
exportVisible
.
value
=
false
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