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
e17c6a36
Commit
e17c6a36
authored
Dec 16, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/put-wall-optimization' into release
parents
017d5a98
7029defc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
117 additions
and
48 deletions
+117
-48
src/api/podUsOrder.ts
+19
-17
src/store/cnOrder.ts
+1
-1
src/store/cnSuperOrder.ts
+1
-1
src/store/order.ts
+9
-2
src/types/api/podMakeOrder.ts
+3
-1
src/utils/websocket.ts
+1
-0
src/views/order/podUs/PodMakeOrder.vue
+83
-26
No files found.
src/api/podUsOrder.ts
View file @
e17c6a36
...
...
@@ -86,20 +86,15 @@ export function getCardOrderList(
)
}
export
function
uploadPRNFile
(
id
:
number
,
data
:
FormData
,
)
{
export
function
uploadPRNFile
(
id
:
number
,
data
:
FormData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
`/factory/podBatchDownload/uploadPRNFile?id=
${
id
}
`
,
data
data
,
)
}
export
function
updatePRNDownloadStatus
(
id
:
number
)
{
export
function
updatePRNDownloadStatus
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
string
>>
(
`/factory/podBatchDownload/updatePRNDownloadStatus?id=
${
id
}
`
`/factory/podBatchDownload/updatePRNDownloadStatus?id=
${
id
}
`
,
)
}
export
function
confirmOrderApi
(
...
...
@@ -242,7 +237,7 @@ export function getPackingDataApi(
warehouseId
:
number
|
string
,
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
>>
(
'/factory/podJomallOrderUs/
getPodBoxDetailsBySkuOrNo
'
,
'/factory/podJomallOrderUs/
putPackingSafe
'
,
{
params
:
{
podJomallUsNo
:
code
,
...
...
@@ -254,7 +249,7 @@ export function getPackingDataApi(
)
}
export
function
getPodBoxListApi
(
factoryNo
:
number
|
string
,
factoryNo
:
number
|
string
|
undefined
,
warehouseId
:
number
|
string
,
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
...
...
@@ -289,9 +284,12 @@ export function clearBoxApi(
},
)
}
export
function
clearAllBoxApi
()
{
export
function
clearAllBoxApi
(
warehouseId
:
string
|
number
,
factoryNo
:
string
|
number
|
undefined
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/delPodBoxOrderDetails'
,
{
params
:
{
warehouseId
,
factoryNo
},
},
)
}
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
...
...
@@ -483,7 +481,11 @@ export function getListCraftApi() {
}
// 批量下载 列表
export
function
batchDownloadApi
(
params
:
SearchForm
,
currentPage
:
number
,
pageSize
:
number
)
{
export
function
batchDownloadApi
(
params
:
SearchForm
,
currentPage
:
number
,
pageSize
:
number
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podBatchDownload/us/list_page`
,
{
...
...
@@ -581,10 +583,10 @@ export function changeToFinished(ids: string) {
}
export
function
reissueOrderApi
(
data
:
{
ids
:
string
reissueType
:
number
trackingNumber
?:
string
expressSheet
:
string
ids
:
string
reissueType
:
number
trackingNumber
?:
string
expressSheet
:
string
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/reissueOrder`
,
...
...
src/store/cnOrder.ts
View file @
e17c6a36
...
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('order', {
},
actions
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
|
undefined
,
factoryNo
:
number
|
string
warehouseId
:
number
|
string
box
?:
number
...
...
src/store/cnSuperOrder.ts
View file @
e17c6a36
...
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('cnSuperOrder', {
},
actions
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
|
undefined
,
factoryNo
:
number
|
string
box
?:
number
data
?:
OrderData
...
...
src/store/order.ts
View file @
e17c6a36
...
...
@@ -21,13 +21,18 @@ const useOrderStore = defineStore('order', {
actions
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
factoryNo
:
number
|
string
factoryNo
:
number
|
string
|
undefined
fromUser
:
number
warehouseId
:
number
|
string
box
?:
number
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
))
{
boxList
.
forEach
(
item
=>
{
item
.
fromUser
=
fromUser
})
this
.
podBoxList
=
boxList
}
else
{
const
index
=
this
.
podBoxList
?.
findIndex
((
item
)
=>
item
.
box
===
box
)
...
...
@@ -35,6 +40,7 @@ const useOrderStore = defineStore('order', {
try
{
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
)
const
boxList
=
res
.
data
.
map
((
item
)
=>
{
item
.
fromUser
=
fromUser
if
(
res
.
data
)
{
const
productList
=
item
?.
data
?.
productList
||
[]
const
pickingNumber
=
productList
.
reduce
(
...
...
@@ -62,6 +68,7 @@ const useOrderStore = defineStore('order', {
const
arr
=
this
.
podBoxList
if
(
arr
)
{
arr
[
box
-
1
]
=
{
fromUser
:
fromUser
,
box
,
data
:
data
||
boxList
||
null
,
}
...
...
src/types/api/podMakeOrder.ts
View file @
e17c6a36
export
interface
PodMakeOrderData
{
data
:
OrderData
|
null
data
?
:
OrderData
|
null
warehouseId
?:
number
fromUser
?:
number
|
string
box
?:
number
addDate
?:
string
}
...
...
@@ -12,6 +13,7 @@ export interface OrderData {
logisticsWayName
?:
string
|
null
company
?:
string
|
null
orderStatus
?:
number
fromUser
?:
string
|
number
salesPlatform
?:
string
logisticsCompanyId
?:
number
blocked
?:
boolean
...
...
src/utils/websocket.ts
View file @
e17c6a36
...
...
@@ -10,6 +10,7 @@ interface NotificationOptions {
export
interface
WebSocketMessage
{
code
?:
string
fromUser
?:
number
content
?:
string
type
?:
string
data
?:
unknown
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
e17c6a36
...
...
@@ -138,10 +138,11 @@
</div>
<div
class=
"middle-content"
>
<div
class=
"box-top"
>
<div
class=
"box-top-item"
>
<div
class=
"box-top-item"
v-if=
"boxIndex !== 0"
>
<span
class=
"box-top-item-box-index"
>
{{ boxIndex }}
</span>
<span
class=
"box-top-item-box-index-text"
>
号箱
</span>
<span
style=
"font-size: 30px"
>
放入第
</span>
...
...
@@ -150,6 +151,9 @@
</div>
<span
style=
"font-size: 30px"
>
件商品
</span>
</div>
<div
v-else
class=
"box-top-item-box-index-text"
>
单件商品订单,不占用播种墙
</div>
<div
class=
"box-top-item-status"
>
<span
v-if=
"
...
...
@@ -207,8 +211,9 @@
<span
style=
"font-weight: bold"
:title=
"index + 1 + '号箱'"
>
{{ index + 1 }}
</span>
<span
v-if=
"item.data"
class=
"number"
>
{{ item.data.pickingNumber }}/{{ item.data.purchaseNumber }}
<span
v-if=
"item.data?.pickingNumber"
class=
"number"
>
{{ item.data?.pickingNumber }}/{{ item.data.purchaseNumber }}
</span>
<div
v-if=
"
...
...
@@ -343,7 +348,9 @@ const orderStore = useOrderStore()
const
isLock
=
ref
<
boolean
>
(
false
)
const
productionOrderRef
=
ref
()
const
socketConnect
=
computed
(()
=>
orderStore
.
socketConnect
)
const
podBoxList
=
computed
(()
=>
orderStore
.
podBoxList
)
const
podBoxList
=
computed
(()
=>
{
return
orderStore
.
podBoxList
})
const
coverImage
=
ref
<
string
>
(
''
)
let
currentCode
=
''
const
tableRef
=
ref
()
...
...
@@ -354,9 +361,9 @@ watch(visible, async (value: boolean) => {
const
localRaw
=
localStorage
.
getItem
(
'locaclWarehouseId'
)
const
localId
=
localRaw
?
JSON
.
parse
(
localRaw
)
:
''
/* 先找一次,确认本地值是否存在于列表 */
const
hit
=
props
.
warehouseList
.
find
((
w
)
=>
w
.
id
==
=
localId
)
warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
].
id
_warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
].
id
const
hit
=
props
.
warehouseList
.
find
((
w
)
=>
w
.
id
==
localId
)
warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
]
?
.
id
_warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
]
?
.
id
if
(
userStore
.
user
?.
factory
.
id
)
{
try
{
...
...
@@ -394,15 +401,19 @@ watch(visible, async (value: boolean) => {
}
})
watch
(
boxIndex
,
(
value
:
number
|
null
)
=>
{
if
(
value
)
{
// if (value) {
console
.
log
(
'boxIndex11111'
,
value
)
const
bool
=
!
boxChange
.
value
boxChange
.
value
=
false
renderItemBox
(
bool
)
}
//
}
})
watch
(
podBoxList
,
(
value
)
=>
{
console
.
log
(
'podBoxIndex1111'
,
podBoxIndex
.
value
)
if
(
value
)
{
const
item
=
value
.
find
((
item
)
=>
item
.
box
===
podBoxIndex
.
value
)
console
.
log
(
'podBoxList'
,
value
,
podBoxIndex
.
value
,
item
)
...
...
@@ -451,8 +462,9 @@ const renderItemBox = (bool: boolean) => {
return
if
(
renderLock
)
return
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
:
[]
}
}
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
...
...
@@ -505,8 +517,10 @@ const renderItemBox = (bool: boolean) => {
}
podOrderDetailsData
.
value
=
data
console
.
log
(
408
,
data
)
if
(
productList
.
every
((
item
)
=>
item
.
power
))
{
if
(
userStore
.
user
?.
id
!==
boxItem
.
fromUser
)
return
print
(
data
,
false
,
()
=>
{
renderLock
=
false
})
...
...
@@ -530,13 +544,19 @@ const messageChange = (data: WebSocketMessage) => {
}
catch
(
e
)
{
console
.
error
(
e
)
}
console
.
log
(
'WebSocketMessage'
,
more
)
setPodBoxList
(
more
)
}
else
if
(
code
===
'POD_BOX_FLUSH'
)
{
initOrderDetailBox
()
}
}
const
setPodBoxList
=
(
data
:
WebSocketMessage
)
=>
{
console
.
log
(
data
,
'datatatata'
)
const
obj
=
data
.
txt
if
(
obj
&&
typeof
obj
===
'string'
)
{
const
parsedData
=
JSON
.
parse
(
obj
)
parsedData
.
fromUser
=
data
.
fromUser
orderStore
.
setPodBoxList
(
parsedData
)
}
}
...
...
@@ -556,6 +576,7 @@ const initPrintDevice = () => {
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
printDeviceList
.
value
=
arr
}
// const handleProduct = (val: OrderData) => {
// if (val && val.productList && val.productList.length > 0) {
// return val.productList?.some((item) => {
...
...
@@ -628,12 +649,35 @@ const getPackingData = async (code: string) => {
productionOrder
.
value
=
''
return
}
const
{
box
}
=
res
.
data
const
{
box
,
data
}
=
res
.
data
console
.
log
(
'box'
,
box
)
if
(
box
)
{
boxIndex
.
value
=
box
// if (box) {
boxIndex
.
value
=
box
as
number
// }
if
(
boxIndex
.
value
==
0
)
{
podOrderDetailsData
.
value
=
data
as
OrderData
podOrderDetailsData
.
value
.
fromUser
=
userStore
.
user
?.
id
if
(
podOrderDetailsData
.
value
.
productList
?.
length
)
{
const
list
=
podOrderDetailsData
.
value
.
productList
for
(
const
product
of
list
)
{
if
(
product
.
count
===
product
.
purchaseNumber
)
{
product
.
power
=
true
print
(
data
as
OrderData
,
false
,
()
=>
{
renderLock
=
false
})
}
}
nextTick
(()
=>
{
tableRef
.
value
?.
setCurrentRow
(
list
[
0
])
})
}
}
// renderItemBox(true)
console
.
log
(
'podBoxList'
,
podBoxList
.
value
)
// }
}
catch
(
error
)
{
console
.
log
(
error
)
}
finally
{
...
...
@@ -696,6 +740,7 @@ const initOrderDetailBox = async () => {
}
orderStore
.
setPodBoxList
({
boxList
:
res
.
data
,
fromUser
:
userStore
.
user
?
userStore
.
user
.
id
:
0
,
factoryNo
,
warehouseId
:
warehouseId
.
value
,
})
...
...
@@ -835,6 +880,7 @@ const nextStep = async (callback: () => void) => {
}
const
handleBoxClick
=
(
item
:
PodMakeOrderData
)
=>
{
const
{
box
,
data
}
=
item
if
(
box
==
0
)
return
isBillLading
.
value
=
!
data
?.
filePath
nextStep
(()
=>
{
if
(
!
data
)
{
...
...
@@ -870,12 +916,12 @@ const handleClearBox = async () => {
return
}
ElMessage
.
success
(
'清空成功'
)
orderStore
.
setPodBoxList
({
boxList
:
null
,
factoryNo
,
box
:
boxIndex
.
value
||
undefined
,
warehouseId
:
warehouseId
.
value
,
})
//
orderStore.setPodBoxList({
//
boxList: null,
//
factoryNo,
//
box: boxIndex.value || undefined,
//
warehouseId: warehouseId.value,
//
})
boxIndex
.
value
=
null
podOrderDetailsData
.
value
=
{}
coverImage
.
value
=
''
...
...
@@ -947,10 +993,18 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
item
.
data
.
printResult
=
'printFail'
}
}
if
(
_boxIndex
==
0
)
{
if
(
status
)
{
;(
podOrderDetailsData
.
value
as
OrderData
).
printResult
=
'printSuccess'
}
else
{
;(
podOrderDetailsData
.
value
as
OrderData
).
printResult
=
'printFail'
}
}
const
factoryNo
=
userStore
.
user
?.
factory
.
id
if
(
!
factoryNo
)
return
orderStore
.
setPodBoxList
({
boxList
:
item
?
item
.
data
:
null
,
fromUser
:
userStore
.
user
?
userStore
.
user
.
id
:
0
,
boxList
:
item
?
(
item
.
data
as
PodMakeOrderData
[])
:
null
,
factoryNo
,
box
:
_boxIndex
||
undefined
,
warehouseId
:
warehouseId
.
value
,
...
...
@@ -968,13 +1022,13 @@ const clearAllBox = async () => {
return
}
try
{
const
res
=
await
clearAllBoxApi
()
const
res
=
await
clearAllBoxApi
(
warehouseId
.
value
,
userStore
.
user
?.
factory
.
id
)
if
(
res
.
code
!==
200
)
return
orderStore
.
setPodBoxList
({
boxList
:
res
.
data
,
factoryNo
:
userStore
.
user
?.
factory
.
id
||
''
,
warehouseId
:
warehouseId
.
value
,
})
//
orderStore.setPodBoxList({
//
boxList: res.data,
//
factoryNo: userStore.user?.factory.id || '',
//
warehouseId: warehouseId.value,
//
})
productionOrderRef
.
value
.
focus
()
podOrderDetailsData
.
value
=
{}
coverImage
.
value
=
''
...
...
@@ -1229,6 +1283,9 @@ const printNormal = async () => {
background-color
:
red
;
}
}
.fontStyle
{
font-size
:
12px
;
}
</
style
>
<
style
lang=
"scss"
>
.pod-make-order-dialog
{
...
...
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