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
0
Merge Requests
0
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
7029defc
Commit
7029defc
authored
Dec 11, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:清空全部箱子 添加仓库id和工厂id
parent
ef04d047
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
src/api/podUsOrder.ts
+1
-1
src/store/order.ts
+9
-2
src/types/api/podMakeOrder.ts
+2
-0
src/utils/websocket.ts
+1
-0
src/views/order/podUs/PodMakeOrder.vue
+7
-1
No files found.
src/api/podUsOrder.ts
View file @
7029defc
...
@@ -243,7 +243,7 @@ export function getPackingDataApi(
...
@@ -243,7 +243,7 @@ export function getPackingDataApi(
)
)
}
}
export
function
getPodBoxListApi
(
export
function
getPodBoxListApi
(
factoryNo
:
number
|
string
,
factoryNo
:
number
|
string
|
undefined
,
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
...
...
src/store/order.ts
View file @
7029defc
...
@@ -21,13 +21,18 @@ const useOrderStore = defineStore('order', {
...
@@ -21,13 +21,18 @@ const useOrderStore = defineStore('order', {
actions
:
{
actions
:
{
async
setPodBoxList
(
content
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
factoryNo
:
number
|
string
factoryNo
:
number
|
string
|
undefined
fromUser
:
number
warehouseId
:
number
|
string
warehouseId
:
number
|
string
box
?:
number
box
?:
number
data
?:
OrderData
data
?:
OrderData
})
{
})
{
const
{
factoryNo
,
warehouseId
,
boxList
,
box
,
data
}
=
content
console
.
log
(
content
,
'content'
)
const
{
factoryNo
,
warehouseId
,
boxList
,
box
,
data
,
fromUser
}
=
content
if
(
Array
.
isArray
(
boxList
))
{
if
(
Array
.
isArray
(
boxList
))
{
boxList
.
forEach
(
item
=>
{
item
.
fromUser
=
fromUser
})
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
)
...
@@ -35,6 +40,7 @@ const useOrderStore = defineStore('order', {
...
@@ -35,6 +40,7 @@ const useOrderStore = defineStore('order', {
try
{
try
{
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
)
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
)
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
item
.
fromUser
=
fromUser
if
(
res
.
data
)
{
if
(
res
.
data
)
{
const
productList
=
item
?.
data
?.
productList
||
[]
const
productList
=
item
?.
data
?.
productList
||
[]
const
pickingNumber
=
productList
.
reduce
(
const
pickingNumber
=
productList
.
reduce
(
...
@@ -62,6 +68,7 @@ const useOrderStore = defineStore('order', {
...
@@ -62,6 +68,7 @@ const useOrderStore = defineStore('order', {
const
arr
=
this
.
podBoxList
const
arr
=
this
.
podBoxList
if
(
arr
)
{
if
(
arr
)
{
arr
[
box
-
1
]
=
{
arr
[
box
-
1
]
=
{
fromUser
:
fromUser
,
box
,
box
,
data
:
data
||
boxList
||
null
,
data
:
data
||
boxList
||
null
,
}
}
...
...
src/types/api/podMakeOrder.ts
View file @
7029defc
export
interface
PodMakeOrderData
{
export
interface
PodMakeOrderData
{
data
?:
OrderData
|
null
data
?:
OrderData
|
null
warehouseId
?:
number
warehouseId
?:
number
fromUser
?:
number
|
string
box
?:
number
box
?:
number
addDate
?:
string
addDate
?:
string
}
}
...
@@ -12,6 +13,7 @@ export interface OrderData {
...
@@ -12,6 +13,7 @@ export interface OrderData {
logisticsWayName
?:
string
|
null
logisticsWayName
?:
string
|
null
company
?:
string
|
null
company
?:
string
|
null
orderStatus
?:
number
orderStatus
?:
number
fromUser
?:
string
|
number
salesPlatform
?:
string
salesPlatform
?:
string
logisticsCompanyId
?:
number
logisticsCompanyId
?:
number
blocked
?:
boolean
blocked
?:
boolean
...
...
src/utils/websocket.ts
View file @
7029defc
...
@@ -10,6 +10,7 @@ interface NotificationOptions {
...
@@ -10,6 +10,7 @@ interface NotificationOptions {
export
interface
WebSocketMessage
{
export
interface
WebSocketMessage
{
code
?:
string
code
?:
string
fromUser
?:
number
content
?:
string
content
?:
string
type
?:
string
type
?:
string
data
?:
unknown
data
?:
unknown
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
7029defc
...
@@ -464,7 +464,7 @@ const renderItemBox = (bool: boolean) => {
...
@@ -464,7 +464,7 @@ const renderItemBox = (bool: boolean) => {
renderLock
=
true
renderLock
=
true
let
boxItem
=
podBoxList
.
value
?.
find
((
item
)
=>
item
.
box
===
boxIndex
.
value
)
let
boxItem
=
podBoxList
.
value
?.
find
((
item
)
=>
item
.
box
===
boxIndex
.
value
)
console
.
log
(
boxItem
,
'boxItem'
)
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
const
{
data
}
=
boxItem
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
data
?.
productList
?.
forEach
((
el
)
=>
{
...
@@ -520,6 +520,7 @@ const renderItemBox = (bool: boolean) => {
...
@@ -520,6 +520,7 @@ const renderItemBox = (bool: boolean) => {
console
.
log
(
408
,
data
)
console
.
log
(
408
,
data
)
if
(
productList
.
every
((
item
)
=>
item
.
power
))
{
if
(
productList
.
every
((
item
)
=>
item
.
power
))
{
if
(
userStore
.
user
?.
id
!==
boxItem
.
fromUser
)
return
print
(
data
,
false
,
()
=>
{
print
(
data
,
false
,
()
=>
{
renderLock
=
false
renderLock
=
false
})
})
...
@@ -551,9 +552,11 @@ const messageChange = (data: WebSocketMessage) => {
...
@@ -551,9 +552,11 @@ const messageChange = (data: WebSocketMessage) => {
}
}
}
}
const
setPodBoxList
=
(
data
:
WebSocketMessage
)
=>
{
const
setPodBoxList
=
(
data
:
WebSocketMessage
)
=>
{
console
.
log
(
data
,
'datatatata'
)
const
obj
=
data
.
txt
const
obj
=
data
.
txt
if
(
obj
&&
typeof
obj
===
'string'
)
{
if
(
obj
&&
typeof
obj
===
'string'
)
{
const
parsedData
=
JSON
.
parse
(
obj
)
const
parsedData
=
JSON
.
parse
(
obj
)
parsedData
.
fromUser
=
data
.
fromUser
orderStore
.
setPodBoxList
(
parsedData
)
orderStore
.
setPodBoxList
(
parsedData
)
}
}
}
}
...
@@ -654,6 +657,7 @@ const getPackingData = async (code: string) => {
...
@@ -654,6 +657,7 @@ const getPackingData = async (code: string) => {
// }
// }
if
(
boxIndex
.
value
==
0
)
{
if
(
boxIndex
.
value
==
0
)
{
podOrderDetailsData
.
value
=
data
as
OrderData
podOrderDetailsData
.
value
=
data
as
OrderData
podOrderDetailsData
.
value
.
fromUser
=
userStore
.
user
?.
id
if
(
podOrderDetailsData
.
value
.
productList
?.
length
)
{
if
(
podOrderDetailsData
.
value
.
productList
?.
length
)
{
const
list
=
podOrderDetailsData
.
value
.
productList
const
list
=
podOrderDetailsData
.
value
.
productList
for
(
const
product
of
list
)
{
for
(
const
product
of
list
)
{
...
@@ -736,6 +740,7 @@ const initOrderDetailBox = async () => {
...
@@ -736,6 +740,7 @@ const initOrderDetailBox = async () => {
}
}
orderStore
.
setPodBoxList
({
orderStore
.
setPodBoxList
({
boxList
:
res
.
data
,
boxList
:
res
.
data
,
fromUser
:
userStore
.
user
?
userStore
.
user
.
id
:
0
,
factoryNo
,
factoryNo
,
warehouseId
:
warehouseId
.
value
,
warehouseId
:
warehouseId
.
value
,
})
})
...
@@ -998,6 +1003,7 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
...
@@ -998,6 +1003,7 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
const
factoryNo
=
userStore
.
user
?.
factory
.
id
const
factoryNo
=
userStore
.
user
?.
factory
.
id
if
(
!
factoryNo
)
return
if
(
!
factoryNo
)
return
orderStore
.
setPodBoxList
({
orderStore
.
setPodBoxList
({
fromUser
:
userStore
.
user
?
userStore
.
user
.
id
:
0
,
boxList
:
item
?
(
item
.
data
as
PodMakeOrderData
[])
:
null
,
boxList
:
item
?
(
item
.
data
as
PodMakeOrderData
[])
:
null
,
factoryNo
,
factoryNo
,
box
:
_boxIndex
||
undefined
,
box
:
_boxIndex
||
undefined
,
...
...
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