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
9636fe0f
Commit
9636fe0f
authored
Apr 10, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商品类型查询条件修改
parent
34c97635
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
110 additions
and
21 deletions
+110
-21
components.d.ts
+1
-0
src/types/api/factoryOrderNew.ts
+2
-0
src/types/api/order/factoryOrderNew.ts
+4
-0
src/views/order/factoryOrderNew/component/ProductTypeFilter.vue
+1
-0
src/views/order/factoryOrderNew/hooks/useOrderDictionaries.ts
+16
-10
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
+9
-3
src/views/order/factoryOrderNew/utils/productMarkQuery.ts
+51
-0
src/views/order/podCN/PodDistributionOrder.vue
+26
-8
No files found.
components.d.ts
View file @
9636fe0f
...
...
@@ -54,6 +54,7 @@ declare module 'vue' {
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTimeline
:
typeof
import
(
'element-plus/es'
)[
'ElTimeline'
]
ElTimelineItem
:
typeof
import
(
'element-plus/es'
)[
'ElTimelineItem'
]
ElTimePicker
:
typeof
import
(
'element-plus/es'
)[
'ElTimePicker'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
...
...
src/types/api/factoryOrderNew.ts
View file @
9636fe0f
...
...
@@ -34,6 +34,8 @@ export interface SearchForm {
interceptStatus
?:
boolean
standardDesignImage
?:
number
productMarkList
?:
string
[]
podCustomizedQuantity
?:
string
cpCustomizedQuantity
?:
string
}
export
interface
FactoryOrderNewListData
{
...
...
src/types/api/order/factoryOrderNew.ts
View file @
9636fe0f
...
...
@@ -34,6 +34,10 @@ export interface SearchForm {
interceptStatus
?:
boolean
standardDesignImage
?:
number
productMarkList
?:
string
[]
/** list_page:POD 商品单面/多面,与 productMarkList 中 pod 联动 */
podCustomizedQuantity
?:
string
/** list_page:一件定制局部印单面/多面,与 productMarkList 中 custom_part 联动 */
cpCustomizedQuantity
?:
string
operationNo
?:
string
}
...
...
src/views/order/factoryOrderNew/component/ProductTypeFilter.vue
View file @
9636fe0f
...
...
@@ -70,6 +70,7 @@
</template>
<
script
setup
lang=
"ts"
>
/** 选项 value 与接口查询字段的对应关系见 `../utils/productMarkQuery.ts`(productMarkList / podCustomizedQuantity / cpCustomizedQuantity)。 */
import
{
computed
}
from
'vue'
import
{
ArrowDown
}
from
'@element-plus/icons-vue'
import
type
{
ProductTypeGroup
,
ProductTypeValue
}
from
'./productTypeFilterTypes'
...
...
src/views/order/factoryOrderNew/hooks/useOrderDictionaries.ts
View file @
9636fe0f
...
...
@@ -3,6 +3,12 @@ import { getListCraftApi, getCustomTagListCnApi, allErpCodeListApi } from '@/api
import
{
getUserMarkList
,
loadWarehouseListApi
}
from
'@/api/common'
import
{
getAllCountryApi
}
from
'@/api/logistics'
import
type
{
ProductTypeGroup
}
from
'../component/productTypeFilterTypes'
import
{
PRODUCT_TYPE_CUSTOM_PART_MULTIPLE
,
PRODUCT_TYPE_CUSTOM_PART_SINGLE
,
PRODUCT_TYPE_POD_MULTIPLE
,
PRODUCT_TYPE_POD_SINGLE
,
}
from
'../utils/productMarkQuery'
import
type
{
IAllList
}
from
'@/types/api/podUsOrder'
import
type
{
CraftListData
}
from
'@/types/api/podCnOrder'
import
type
{
WarehouseListData
}
from
'@/types'
...
...
@@ -38,28 +44,28 @@ export function useOrderDictionaries() {
const
productTypeGroups
=
ref
<
ProductTypeGroup
[]
>
([
{
label
:
'普品'
,
value
:
'
NORMAL_ALL
'
,
children
:
[{
label
:
'普品'
,
value
:
'
NORMAL
'
}],
value
:
'
normal
'
,
children
:
[{
label
:
'普品'
,
value
:
'
normal
'
}],
},
{
label
:
'胚衣'
,
value
:
'
GREIGE_ALL
'
,
children
:
[{
label
:
'胚衣'
,
value
:
'
GREIGE
'
}],
value
:
'
custom_normal
'
,
children
:
[{
label
:
'胚衣'
,
value
:
'
custom_normal
'
}],
},
{
label
:
'POD商品'
,
value
:
'
POD_ALL
'
,
value
:
'
pod
'
,
children
:
[
{
label
:
'单面'
,
value
:
'POD_SINGLE'
},
{
label
:
'多面'
,
value
:
'POD_MULTI'
},
{
label
:
'单面'
,
value
:
PRODUCT_TYPE_POD_SINGLE
},
{
label
:
'多面'
,
value
:
PRODUCT_TYPE_POD_MULTIPLE
},
],
},
{
label
:
'一件定制局部印'
,
value
:
'
CUSTOM_PART_ALL
'
,
value
:
'
custom_part
'
,
children
:
[
{
label
:
'单面'
,
value
:
'CUSTOM_PART_SINGLE'
},
{
label
:
'多面'
,
value
:
'CUSTOM_PART_MULTI'
},
{
label
:
'单面'
,
value
:
PRODUCT_TYPE_CUSTOM_PART_SINGLE
},
{
label
:
'多面'
,
value
:
PRODUCT_TYPE_CUSTOM_PART_MULTIPLE
},
],
},
])
...
...
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
View file @
9636fe0f
import
{
nextTick
,
ref
}
from
'vue'
import
type
{
SearchForm
}
from
'@/types/api/order/factoryOrderNew'
import
{
normalizeProductMarkListForQuery
}
from
'../utils/productMarkQuery'
export
function
useOrderSearchForm
(
refreshCurrentView
:
()
=>
void
)
{
const
searchForm
=
ref
<
SearchForm
>
({})
...
...
@@ -57,11 +58,16 @@ export function useOrderSearchForm(refreshCurrentView: () => void) {
searchForm
.
value
.
shipmentType
=
''
}
const
getQueryPayload
=
()
=>
({
...
searchForm
.
value
,
const
getQueryPayload
=
()
=>
{
const
{
productMarkList
:
rawProductMarks
,
...
rest
}
=
searchForm
.
value
const
markQuery
=
normalizeProductMarkListForQuery
(
rawProductMarks
)
return
{
...
rest
,
...
markQuery
,
startTime
:
dateRange
.
value
?.[
0
]
||
null
,
endTime
:
dateRange
.
value
?.[
1
]
||
null
,
})
}
}
const
reset
=
()
=>
{
searchForm
.
value
=
{}
...
...
src/views/order/factoryOrderNew/utils/productMarkQuery.ts
0 → 100644
View file @
9636fe0f
/** POD 商品子项,与 useOrderDictionaries 中 options 一致 */
export
const
PRODUCT_TYPE_POD_SINGLE
=
'pod_single'
export
const
PRODUCT_TYPE_POD_MULTIPLE
=
'pod_multiple'
/** 一件定制局部印子项 */
export
const
PRODUCT_TYPE_CUSTOM_PART_SINGLE
=
'custom_part_single'
export
const
PRODUCT_TYPE_CUSTOM_PART_MULTIPLE
=
'custom_part_multiple'
export
interface
ProductMarkQueryResult
{
productMarkList
?:
string
[]
podCustomizedQuantity
?:
string
cpCustomizedQuantity
?:
string
}
export
function
normalizeProductMarkListForQuery
(
raw
:
string
[]
|
undefined
,
):
ProductMarkQueryResult
{
if
(
!
raw
?.
length
)
{
return
{}
}
const
set
=
new
Set
(
raw
)
const
marks
:
string
[]
=
[]
if
(
set
.
has
(
'normal'
))
marks
.
push
(
'normal'
)
if
(
set
.
has
(
'custom_normal'
))
marks
.
push
(
'custom_normal'
)
if
(
set
.
has
(
PRODUCT_TYPE_POD_SINGLE
)
||
set
.
has
(
PRODUCT_TYPE_POD_MULTIPLE
)
)
{
marks
.
push
(
'pod'
)
}
if
(
set
.
has
(
PRODUCT_TYPE_CUSTOM_PART_SINGLE
)
||
set
.
has
(
PRODUCT_TYPE_CUSTOM_PART_MULTIPLE
)
)
{
marks
.
push
(
'custom_part'
)
}
const
podS
=
set
.
has
(
PRODUCT_TYPE_POD_SINGLE
)
const
podM
=
set
.
has
(
PRODUCT_TYPE_POD_MULTIPLE
)
const
partS
=
set
.
has
(
PRODUCT_TYPE_CUSTOM_PART_SINGLE
)
const
partM
=
set
.
has
(
PRODUCT_TYPE_CUSTOM_PART_MULTIPLE
)
const
podQty
=
podS
&&
podM
?
undefined
:
podS
?
'single'
:
podM
?
'multiple'
:
undefined
const
partQty
=
partS
&&
partM
?
undefined
:
partS
?
'single'
:
partM
?
'multiple'
:
undefined
const
result
:
ProductMarkQueryResult
=
{}
if
(
marks
.
length
)
result
.
productMarkList
=
marks
if
(
podQty
!==
undefined
)
result
.
podCustomizedQuantity
=
podQty
if
(
partQty
!==
undefined
)
result
.
cpCustomizedQuantity
=
partQty
return
result
}
src/views/order/podCN/PodDistributionOrder.vue
View file @
9636fe0f
...
...
@@ -269,7 +269,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
computed
,
nextTick
,
ref
,
watch
}
from
'vue'
import
{
computed
,
nextTick
,
onUnmounted
,
ref
,
watch
}
from
'vue'
import
useLodop
from
'@/utils/hooks/useLodop'
import
TableView
from
'@/components/TableView.vue'
import
{
OrderData
,
ProductList
,
IorderItem
}
from
'@/types/api/podMakeOrder'
...
...
@@ -404,13 +404,6 @@ const emit = defineEmits<{
(
e
:
'refresh'
):
void
(
e
:
'set-printer'
,
v
:
string
):
void
}
>
()
onMounted
(()
=>
{
window
.
addEventListener
(
'keydown'
,
keyDown
)
})
onUnmounted
(()
=>
{
window
.
removeEventListener
(
'keydown'
,
keyDown
)
})
const
visible
=
computed
({
get
()
{
return
props
.
modelValue
...
...
@@ -475,6 +468,14 @@ const handleWarehouseChange = (value: string) => {
function
keyDown
(
e
:
KeyboardEvent
)
{
const
e1
=
e
||
(
window
.
event
as
KeyboardEvent
)
if
(
!
[
37
,
38
,
39
,
40
].
includes
(
e1
.
keyCode
))
return
const
t
=
e1
.
target
as
HTMLElement
|
null
if
(
t
?.
closest
?.(
'input, textarea, select, [contenteditable="true"], [role="textbox"]'
,
)
)
{
return
}
e1
.
stopPropagation
()
e1
.
preventDefault
()
let
idx
=
boxIndex
.
value
??
0
...
...
@@ -486,6 +487,23 @@ function keyDown(e: KeyboardEvent) {
if
(
idx
<
1
||
idx
>
len
)
return
boxIndex
.
value
=
idx
}
watch
(
visible
,
(
v
)
=>
{
if
(
v
)
{
window
.
addEventListener
(
'keydown'
,
keyDown
)
}
else
{
window
.
removeEventListener
(
'keydown'
,
keyDown
)
}
},
{
immediate
:
true
},
)
onUnmounted
(()
=>
{
window
.
removeEventListener
(
'keydown'
,
keyDown
)
})
const
testingInputRef
=
ref
<
HTMLInputElement
|
null
>
(
null
)
async
function
inputActive
()
{
await
nextTick
()
...
...
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