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
d1eb0289
Commit
d1eb0289
authored
May 14, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 按 Tab 可配置裁剪列表查询条件
parent
3e07ee50
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
12 deletions
+57
-12
src/types/factoryOrderNew/searchQueryVisibility.ts
+4
-0
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
+10
-2
src/views/order/factoryOrderNew/index.vue
+16
-10
src/views/order/factoryOrderNew/utils/listSearchQueryFilter.ts
+27
-0
No files found.
src/types/factoryOrderNew/searchQueryVisibility.ts
0 → 100644
View file @
d1eb0289
export
interface
FactoryOrderSearchQueryVisibilityContext
{
status
:
string
isCardLayout
:
boolean
}
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
View file @
d1eb0289
import
{
nextTick
,
ref
}
from
'vue'
import
{
nextTick
,
ref
}
from
'vue'
import
type
{
SearchForm
}
from
'@/types/api/order/factoryOrderNew'
import
type
{
SearchForm
}
from
'@/types/api/order/factoryOrderNew'
import
type
{
FactoryOrderSearchQueryVisibilityContext
}
from
'@/types/factoryOrderNew/searchQueryVisibility'
import
{
filterFactoryOrderListSearchPayload
}
from
'../utils/listSearchQueryFilter'
import
{
normalizeProductMarkListForQuery
}
from
'../utils/productMarkQuery'
import
{
normalizeProductMarkListForQuery
}
from
'../utils/productMarkQuery'
export
function
useOrderSearchForm
(
refreshCurrentView
:
()
=>
void
)
{
export
function
useOrderSearchForm
(
refreshCurrentView
:
()
=>
void
,
getVisibilityContext
?:
()
=>
FactoryOrderSearchQueryVisibilityContext
,
)
{
const
searchForm
=
ref
<
SearchForm
>
({})
const
searchForm
=
ref
<
SearchForm
>
({})
const
dateRange
=
ref
<
string
[]
>
([])
const
dateRange
=
ref
<
string
[]
>
([])
const
searchVisible
=
ref
(
false
)
const
searchVisible
=
ref
(
false
)
...
@@ -66,13 +71,16 @@ export function useOrderSearchForm(refreshCurrentView: () => void) {
...
@@ -66,13 +71,16 @@ export function useOrderSearchForm(refreshCurrentView: () => void) {
Array
.
isArray
(
tagsIdArr
)
&&
tagsIdArr
.
length
>
0
Array
.
isArray
(
tagsIdArr
)
&&
tagsIdArr
.
length
>
0
?
tagsIdArr
.
join
(
','
)
?
tagsIdArr
.
join
(
','
)
:
undefined
:
undefined
return
{
const
raw
:
Record
<
string
,
unknown
>
=
{
...
rest
,
...
rest
,
...
markQuery
,
...
markQuery
,
...(
tagsId
!==
undefined
?
{
tagsId
}
:
{}),
...(
tagsId
!==
undefined
?
{
tagsId
}
:
{}),
startTime
:
dateRange
.
value
?.[
0
]
||
null
,
startTime
:
dateRange
.
value
?.[
0
]
||
null
,
endTime
:
dateRange
.
value
?.[
1
]
||
null
,
endTime
:
dateRange
.
value
?.[
1
]
||
null
,
}
}
return
getVisibilityContext
?
filterFactoryOrderListSearchPayload
(
raw
,
getVisibilityContext
())
:
raw
}
}
const
reset
=
()
=>
{
const
reset
=
()
=>
{
...
...
src/views/order/factoryOrderNew/index.vue
View file @
d1eb0289
...
@@ -1016,6 +1016,7 @@ import PodDistributionOrder from '@/views/order/podCN/PodDistributionOrder.vue'
...
@@ -1016,6 +1016,7 @@ import PodDistributionOrder from '@/views/order/podCN/PodDistributionOrder.vue'
import
PrintWarehouseSkuTag
from
'@/views/order/components/printWarehouseSkuTag.vue'
import
PrintWarehouseSkuTag
from
'@/views/order/components/printWarehouseSkuTag.vue'
import
UpdateAddress
from
'@/views/order/podCN/components/updateAddress.vue'
import
UpdateAddress
from
'@/views/order/podCN/components/updateAddress.vue'
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
import
type
{
FactoryOrderSearchQueryVisibilityContext
}
from
'@/types/factoryOrderNew/searchQueryVisibility'
import
{
useOrderDictionaries
}
from
'./hooks/useOrderDictionaries'
import
{
useOrderDictionaries
}
from
'./hooks/useOrderDictionaries'
import
{
useOrderSearchForm
}
from
'./hooks/useOrderSearchForm'
import
{
useOrderSearchForm
}
from
'./hooks/useOrderSearchForm'
import
{
useOrderStatusTree
}
from
'./hooks/useOrderStatusTree'
import
{
useOrderStatusTree
}
from
'./hooks/useOrderStatusTree'
...
@@ -1046,6 +1047,11 @@ const {
...
@@ -1046,6 +1047,11 @@ const {
}
=
useOrderDictionaries
()
}
=
useOrderDictionaries
()
const
refreshCurrentViewProxy
=
ref
<
()
=>
void
>
(()
=>
{
}
)
const
refreshCurrentViewProxy
=
ref
<
()
=>
void
>
(()
=>
{
}
)
let
getFactoryOrderSearchVisibilityContext
:
()
=>
FactoryOrderSearchQueryVisibilityContext
=
()
=>
({
status
:
'PENDING_RECEIVE'
,
isCardLayout
:
false
,
}
)
const
{
const
{
searchForm
,
searchForm
,
dateRange
,
dateRange
,
...
@@ -1055,7 +1061,10 @@ const {
...
@@ -1055,7 +1061,10 @@ const {
changeReplaceShipment
,
changeReplaceShipment
,
getQueryPayload
,
getQueryPayload
,
reset
,
reset
,
}
=
useOrderSearchForm
(()
=>
refreshCurrentViewProxy
.
value
())
}
=
useOrderSearchForm
(
()
=>
refreshCurrentViewProxy
.
value
(),
()
=>
getFactoryOrderSearchVisibilityContext
(),
)
const
statusCurrentPageRef
=
ref
(
1
)
const
statusCurrentPageRef
=
ref
(
1
)
const
statusPageSizeRef
=
ref
(
50
)
const
statusPageSizeRef
=
ref
(
50
)
...
@@ -1084,6 +1093,10 @@ const {
...
@@ -1084,6 +1093,10 @@ const {
onClearTableState
:
()
=>
{
}
,
onClearTableState
:
()
=>
{
}
,
onRefreshCurrentView
:
()
=>
{
}
,
onRefreshCurrentView
:
()
=>
{
}
,
}
)
}
)
getFactoryOrderSearchVisibilityContext
=
()
=>
({
status
:
status
.
value
,
isCardLayout
:
isCardLayout
.
value
,
}
)
const
{
const
{
subLoading
,
subLoading
,
...
@@ -1158,12 +1171,8 @@ const submitExportForm = async () => {
...
@@ -1158,12 +1171,8 @@ const submitExportForm = async () => {
try
{
try
{
await
exportFactoryOrderInfo
({
await
exportFactoryOrderInfo
({
...
params
,
...
params
,
...(
resourceType
===
2
...(
resourceType
===
2
?
getQueryPayload
()
:
{
}
),
?
{
}
as
ExportParams
)
...
searchForm
.
value
,
}
:
{
}
),
}
)
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
exportVisible
.
value
=
false
exportVisible
.
value
=
false
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -1260,9 +1269,6 @@ const handleRefreshReceiverAddress = async (row: FactoryOrderNewListData) => {
...
@@ -1260,9 +1269,6 @@ const handleRefreshReceiverAddress = async (row: FactoryOrderNewListData) => {
}
}
const
handleStatusNodeClick
=
(
node
:
{
status
:
string
}
)
=>
{
const
handleStatusNodeClick
=
(
node
:
{
status
:
string
}
)
=>
{
if
(
node
.
status
!==
'ALL'
)
{
searchForm
.
value
.
logisticsWayId
=
undefined
}
status
.
value
=
node
.
status
status
.
value
=
node
.
status
if
(
node
.
status
!==
'PENDING_RECEIVE'
)
{
if
(
node
.
status
!==
'PENDING_RECEIVE'
)
{
pendingAcceptSubTab
.
value
=
'PENDING_RECEIVE'
pendingAcceptSubTab
.
value
=
'PENDING_RECEIVE'
...
...
src/views/order/factoryOrderNew/utils/listSearchQueryFilter.ts
0 → 100644
View file @
d1eb0289
import
type
{
FactoryOrderSearchQueryVisibilityContext
}
from
'@/types/factoryOrderNew/searchQueryVisibility'
export
const
FACTORY_ORDER_LIST_SEARCH_FIELD_RULES
:
Record
<
string
,
(
ctx
:
FactoryOrderSearchQueryVisibilityContext
)
=>
boolean
>
=
{
batchArrangeNumber
:
(
c
)
=>
c
.
isCardLayout
,
operationNo
:
(
c
)
=>
c
.
isCardLayout
,
receiverCountry
:
(
c
)
=>
!
c
.
isCardLayout
,
logisticsWayId
:
(
c
)
=>
c
.
status
===
'ALL'
,
}
export
function
filterFactoryOrderListSearchPayload
(
payload
:
Record
<
string
,
unknown
>
,
ctx
:
FactoryOrderSearchQueryVisibilityContext
,
):
Record
<
string
,
unknown
>
{
const
out
=
{
...
payload
}
for
(
const
[
key
,
rule
]
of
Object
.
entries
(
FACTORY_ORDER_LIST_SEARCH_FIELD_RULES
,
))
{
if
(
!
Object
.
prototype
.
hasOwnProperty
.
call
(
out
,
key
))
continue
if
(
!
rule
(
ctx
))
{
delete
out
[
key
]
}
}
return
out
}
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