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
74491db1
Commit
74491db1
authored
May 27, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 问题修改
parent
dec0aeed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/store/order.ts
+3
-2
src/views/order/podUs/PodMakeOrder.vue
+4
-2
No files found.
src/store/order.ts
View file @
74491db1
...
@@ -22,17 +22,18 @@ const useOrderStore = defineStore('order', {
...
@@ -22,17 +22,18 @@ const useOrderStore = defineStore('order', {
async
setPodBoxList
(
content
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
factoryNo
:
number
|
string
factoryNo
:
number
|
string
warehouseId
:
number
|
string
box
?:
number
box
?:
number
data
?:
OrderData
data
?:
OrderData
})
{
})
{
const
{
factoryNo
,
boxList
,
box
,
data
}
=
content
const
{
factoryNo
,
warehouseId
,
boxList
,
box
,
data
}
=
content
if
(
Array
.
isArray
(
boxList
))
{
if
(
Array
.
isArray
(
boxList
))
{
this
.
podBoxList
=
boxList
this
.
podBoxList
=
boxList
}
else
{
}
else
{
const
index
=
this
.
podBoxList
?.
findIndex
((
item
)
=>
item
.
box
===
box
)
const
index
=
this
.
podBoxList
?.
findIndex
((
item
)
=>
item
.
box
===
box
)
if
(
index
===
-
1
)
{
if
(
index
===
-
1
)
{
try
{
try
{
const
res
=
await
getPodBoxListApi
(
factoryNo
)
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
)
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
const
productList
=
item
?.
data
?.
productList
||
[]
const
productList
=
item
?.
data
?.
productList
||
[]
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
74491db1
...
@@ -442,9 +442,7 @@ const messageChange = (data: WebSocketMessage) => {
...
@@ -442,9 +442,7 @@ const messageChange = (data: WebSocketMessage) => {
const
setPodBoxList
=
(
data
:
WebSocketMessage
)
=>
{
const
setPodBoxList
=
(
data
:
WebSocketMessage
)
=>
{
const
obj
=
data
.
txt
const
obj
=
data
.
txt
if
(
obj
&&
typeof
obj
===
'string'
)
{
if
(
obj
&&
typeof
obj
===
'string'
)
{
console
.
log
(
'obj'
,
obj
)
const
parsedData
=
JSON
.
parse
(
obj
)
const
parsedData
=
JSON
.
parse
(
obj
)
console
.
log
(
'parsedData'
,
parsedData
)
useOrderStore
().
setPodBoxList
(
parsedData
)
useOrderStore
().
setPodBoxList
(
parsedData
)
}
}
}
}
...
@@ -599,6 +597,7 @@ const initOrderDetailBox = async () => {
...
@@ -599,6 +597,7 @@ const initOrderDetailBox = async () => {
orderStore
.
setPodBoxList
({
orderStore
.
setPodBoxList
({
boxList
:
res
.
data
,
boxList
:
res
.
data
,
factoryNo
,
factoryNo
,
warehouseId
:
warehouseId
.
value
,
})
})
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
if
(
item
.
data
)
{
if
(
item
.
data
)
{
...
@@ -760,6 +759,7 @@ const handleClearBox = async () => {
...
@@ -760,6 +759,7 @@ const handleClearBox = async () => {
boxList
:
null
,
boxList
:
null
,
factoryNo
,
factoryNo
,
box
:
boxIndex
.
value
||
undefined
,
box
:
boxIndex
.
value
||
undefined
,
warehouseId
:
warehouseId
.
value
,
})
})
boxIndex
.
value
=
null
boxIndex
.
value
=
null
podOrderDetailsData
.
value
=
{}
podOrderDetailsData
.
value
=
{}
...
@@ -808,6 +808,7 @@ const print = (data: OrderData, forcePrint = false) => {
...
@@ -808,6 +808,7 @@ const print = (data: OrderData, forcePrint = false) => {
boxList
:
item
?
item
.
data
:
null
,
boxList
:
item
?
item
.
data
:
null
,
factoryNo
,
factoryNo
,
box
:
_boxIndex
||
undefined
,
box
:
_boxIndex
||
undefined
,
warehouseId
:
warehouseId
.
value
,
})
})
})
})
}
}
...
@@ -827,6 +828,7 @@ const clearAllBox = async () => {
...
@@ -827,6 +828,7 @@ const clearAllBox = async () => {
orderStore
.
setPodBoxList
({
orderStore
.
setPodBoxList
({
boxList
:
res
.
data
,
boxList
:
res
.
data
,
factoryNo
:
userStore
.
user
?.
factory
.
id
||
''
,
factoryNo
:
userStore
.
user
?.
factory
.
id
||
''
,
warehouseId
:
warehouseId
.
value
,
})
})
productionOrderRef
.
value
.
focus
()
productionOrderRef
.
value
.
focus
()
podOrderDetailsData
.
value
=
{}
podOrderDetailsData
.
value
=
{}
...
...
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