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
ab0d0dfd
Commit
ab0d0dfd
authored
Dec 16, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!123
parents
3eb20eca
87593839
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
176 additions
and
72 deletions
+176
-72
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
+4
-1
src/utils/websocket.ts
+1
-0
src/views/order/podCN/PodMakeOrder.vue
+35
-10
src/views/order/podUs/PodMakeOrder.vue
+106
-40
No files found.
src/api/podUsOrder.ts
View file @
ab0d0dfd
...
@@ -86,20 +86,15 @@ export function getCardOrderList(
...
@@ -86,20 +86,15 @@ export function getCardOrderList(
)
)
}
}
export
function
uploadPRNFile
(
export
function
uploadPRNFile
(
id
:
number
,
data
:
FormData
)
{
id
:
number
,
data
:
FormData
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
`/factory/podBatchDownload/uploadPRNFile?id=
${
id
}
`
,
`/factory/podBatchDownload/uploadPRNFile?id=
${
id
}
`
,
data
data
,
)
)
}
}
export
function
updatePRNDownloadStatus
(
export
function
updatePRNDownloadStatus
(
id
:
number
)
{
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
string
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
string
>>
(
`/factory/podBatchDownload/updatePRNDownloadStatus?id=
${
id
}
`
`/factory/podBatchDownload/updatePRNDownloadStatus?id=
${
id
}
`
,
)
)
}
}
export
function
confirmOrderApi
(
export
function
confirmOrderApi
(
...
@@ -242,7 +237,7 @@ export function getPackingDataApi(
...
@@ -242,7 +237,7 @@ export function getPackingDataApi(
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
>>
(
'/factory/podJomallOrderUs/
getPodBoxDetailsBySkuOrNo
'
,
'/factory/podJomallOrderUs/
putPackingSafe
'
,
{
{
params
:
{
params
:
{
podJomallUsNo
:
code
,
podJomallUsNo
:
code
,
...
@@ -254,7 +249,7 @@ export function getPackingDataApi(
...
@@ -254,7 +249,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
[]
>>
(
...
@@ -289,9 +284,12 @@ export function clearBoxApi(
...
@@ -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
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/delPodBoxOrderDetails'
,
'factory/podJomallOrderUs/delPodBoxOrderDetails'
,
{
params
:
{
warehouseId
,
factoryNo
},
},
)
)
}
}
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
...
@@ -483,7 +481,11 @@ export function getListCraftApi() {
...
@@ -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
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podBatchDownload/us/list_page`
,
`factory/podBatchDownload/us/list_page`
,
{
{
...
@@ -581,10 +583,10 @@ export function changeToFinished(ids: string) {
...
@@ -581,10 +583,10 @@ export function changeToFinished(ids: string) {
}
}
export
function
reissueOrderApi
(
data
:
{
export
function
reissueOrderApi
(
data
:
{
ids
:
string
ids
:
string
reissueType
:
number
reissueType
:
number
trackingNumber
?:
string
trackingNumber
?:
string
expressSheet
:
string
expressSheet
:
string
})
{
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/reissueOrder`
,
`factory/podJomallOrderUs/reissueOrder`
,
...
...
src/store/cnOrder.ts
View file @
ab0d0dfd
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('order', {
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('order', {
},
},
actions
:
{
actions
:
{
async
setPodBoxList
(
content
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
|
undefined
,
factoryNo
:
number
|
string
factoryNo
:
number
|
string
warehouseId
:
number
|
string
warehouseId
:
number
|
string
box
?:
number
box
?:
number
...
...
src/store/cnSuperOrder.ts
View file @
ab0d0dfd
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('cnSuperOrder', {
...
@@ -20,7 +20,7 @@ const useOrderStore = defineStore('cnSuperOrder', {
},
},
actions
:
{
actions
:
{
async
setPodBoxList
(
content
:
{
async
setPodBoxList
(
content
:
{
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
boxList
:
PodMakeOrderData
[]
|
OrderData
|
null
|
undefined
,
factoryNo
:
number
|
string
factoryNo
:
number
|
string
box
?:
number
box
?:
number
data
?:
OrderData
data
?:
OrderData
...
...
src/store/order.ts
View file @
ab0d0dfd
...
@@ -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 @
ab0d0dfd
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
...
@@ -52,6 +54,7 @@ export interface ProductList {
...
@@ -52,6 +54,7 @@ export interface ProductList {
variantImage
?:
string
variantImage
?:
string
podJomallUsNo
?:
string
podJomallUsNo
?:
string
podJomallCnNo
?:
string
podJomallCnNo
?:
string
thirdSkuCode
?:
string
previewImgs
?:
{
sort
?:
string
|
number
;
title
?:
string
;
url
:
string
}[]
previewImgs
?:
{
sort
?:
string
|
number
;
title
?:
string
;
url
:
string
}[]
}
}
...
...
src/utils/websocket.ts
View file @
ab0d0dfd
...
@@ -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/podCN/PodMakeOrder.vue
View file @
ab0d0dfd
...
@@ -463,7 +463,18 @@ watch(
...
@@ -463,7 +463,18 @@ watch(
(
val
)
=>
{
(
val
)
=>
{
if
(
val
&&
val
.
productList
?.
length
)
if
(
val
&&
val
.
productList
?.
length
)
val
.
productList
.
forEach
((
el
)
=>
{
val
.
productList
.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
||
'[]'
)
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
el
.
imageAry
?
JSON
.
parse
(
el
.
imageAry
)
:
[{
url
:
el
.
variantImage
}]
}
}
})
})
},
},
{
deep
:
true
},
{
deep
:
true
},
...
@@ -492,7 +503,13 @@ const renderItemBox = (bool: boolean) => {
...
@@ -492,7 +503,13 @@ const renderItemBox = (bool: boolean) => {
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
if
(
!
boxItem
)
boxItem
=
{
data
:
{
productList
:
[]
}
}
const
{
data
}
=
boxItem
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
data
?.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
||
'[]'
)
if
(
!
el
.
previewImgs
||
!
el
.
previewImgs
.
length
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
||
'[]'
)
}
}
})
})
if
(
!
data
)
{
if
(
!
data
)
{
renderLock
=
false
renderLock
=
false
...
@@ -513,15 +530,23 @@ const renderItemBox = (bool: boolean) => {
...
@@ -513,15 +530,23 @@ const renderItemBox = (bool: boolean) => {
}
}
}
}
if
(
currentCode
)
{
if
(
currentCode
)
{
const
parts
=
currentCode
.
split
(
'_'
)
if
(
!
currentCode
.
startsWith
(
'JM'
))
{
currentCode
=
const
parts
=
currentCode
.
split
(
'_'
)
parts
.
length
>
3
&&
parts
[
3
].
startsWith
(
'CNPSC'
)
currentCode
=
?
parts
[
3
]
parts
.
length
>
3
&&
parts
[
3
].
startsWith
(
'CNPSC'
)
:
parts
.
length
>
1
?
parts
[
3
]
?
parts
[
1
]
:
parts
.
length
>
1
:
parts
[
0
]
?
parts
[
1
]
:
parts
[
0
]
}
console
.
log
(
540
,
currentCode
)
for
(
const
product
of
productList
)
{
for
(
const
product
of
productList
)
{
if
(
product
.
podJomallCnNo
===
currentCode
)
{
if
(
product
.
podJomallCnNo
===
currentCode
||
product
.
thirdSkuCode
===
currentCode
)
{
coverImage
.
value
=
product
.
previewImgs
?.[
0
]?.
url
||
''
coverImage
.
value
=
product
.
previewImgs
?.[
0
]?.
url
||
''
nextTick
(()
=>
{
nextTick
(()
=>
{
tableRef
.
value
?.
setCurrentRow
(
product
)
tableRef
.
value
?.
setCurrentRow
(
product
)
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
ab0d0dfd
...
@@ -138,10 +138,11 @@
...
@@ -138,10 +138,11 @@
</div>
</div>
<div
class=
"middle-content"
>
<div
class=
"middle-content"
>
<div
class=
"box-top"
>
<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"
>
<span
class=
"box-top-item-box-index"
>
{{ boxIndex }}
{{ boxIndex }}
</span>
</span>
<span
class=
"box-top-item-box-index-text"
>
号箱
</span>
<span
class=
"box-top-item-box-index-text"
>
号箱
</span>
<span
style=
"font-size: 30px"
>
放入第
</span>
<span
style=
"font-size: 30px"
>
放入第
</span>
...
@@ -150,6 +151,9 @@
...
@@ -150,6 +151,9 @@
</div>
</div>
<span
style=
"font-size: 30px"
>
件商品
</span>
<span
style=
"font-size: 30px"
>
件商品
</span>
</div>
</div>
<div
v-else
class=
"box-top-item-box-index-text"
>
单件商品订单,不占用播种墙
</div>
<div
class=
"box-top-item-status"
>
<div
class=
"box-top-item-status"
>
<span
<span
v-if=
"
v-if=
"
...
@@ -207,8 +211,9 @@
...
@@ -207,8 +211,9 @@
<span
style=
"font-weight: bold"
:title=
"index + 1 + '号箱'"
>
<span
style=
"font-weight: bold"
:title=
"index + 1 + '号箱'"
>
{{ index + 1 }}
{{ index + 1 }}
</span>
</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>
</span>
<div
<div
v-if=
"
v-if=
"
...
@@ -343,7 +348,9 @@ const orderStore = useOrderStore()
...
@@ -343,7 +348,9 @@ const orderStore = useOrderStore()
const
isLock
=
ref
<
boolean
>
(
false
)
const
isLock
=
ref
<
boolean
>
(
false
)
const
productionOrderRef
=
ref
()
const
productionOrderRef
=
ref
()
const
socketConnect
=
computed
(()
=>
orderStore
.
socketConnect
)
const
socketConnect
=
computed
(()
=>
orderStore
.
socketConnect
)
const
podBoxList
=
computed
(()
=>
orderStore
.
podBoxList
)
const
podBoxList
=
computed
(()
=>
{
return
orderStore
.
podBoxList
})
const
coverImage
=
ref
<
string
>
(
''
)
const
coverImage
=
ref
<
string
>
(
''
)
let
currentCode
=
''
let
currentCode
=
''
const
tableRef
=
ref
()
const
tableRef
=
ref
()
...
@@ -354,9 +361,9 @@ watch(visible, async (value: boolean) => {
...
@@ -354,9 +361,9 @@ watch(visible, async (value: boolean) => {
const
localRaw
=
localStorage
.
getItem
(
'locaclWarehouseId'
)
const
localRaw
=
localStorage
.
getItem
(
'locaclWarehouseId'
)
const
localId
=
localRaw
?
JSON
.
parse
(
localRaw
)
:
''
const
localId
=
localRaw
?
JSON
.
parse
(
localRaw
)
:
''
/* 先找一次,确认本地值是否存在于列表 */
/* 先找一次,确认本地值是否存在于列表 */
const
hit
=
props
.
warehouseList
.
find
((
w
)
=>
w
.
id
==
=
localId
)
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
_warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
].
id
_warehouseId
.
value
=
hit
?
localId
:
props
.
warehouseList
[
0
]
?
.
id
if
(
userStore
.
user
?.
factory
.
id
)
{
if
(
userStore
.
user
?.
factory
.
id
)
{
try
{
try
{
...
@@ -394,15 +401,19 @@ watch(visible, async (value: boolean) => {
...
@@ -394,15 +401,19 @@ watch(visible, async (value: boolean) => {
}
}
})
})
watch
(
boxIndex
,
(
value
:
number
|
null
)
=>
{
watch
(
boxIndex
,
(
value
:
number
|
null
)
=>
{
if
(
value
)
{
// if (value) {
const
bool
=
!
boxChange
.
value
console
.
log
(
'boxIndex11111'
,
value
)
boxChange
.
value
=
false
renderItemBox
(
bool
)
const
bool
=
!
boxChange
.
value
}
boxChange
.
value
=
false
renderItemBox
(
bool
)
// }
})
})
watch
(
watch
(
podBoxList
,
podBoxList
,
(
value
)
=>
{
(
value
)
=>
{
console
.
log
(
'podBoxIndex1111'
,
podBoxIndex
.
value
)
if
(
value
)
{
if
(
value
)
{
const
item
=
value
.
find
((
item
)
=>
item
.
box
===
podBoxIndex
.
value
)
const
item
=
value
.
find
((
item
)
=>
item
.
box
===
podBoxIndex
.
value
)
console
.
log
(
'podBoxList'
,
value
,
podBoxIndex
.
value
,
item
)
console
.
log
(
'podBoxList'
,
value
,
podBoxIndex
.
value
,
item
)
...
@@ -424,7 +435,10 @@ watch(
...
@@ -424,7 +435,10 @@ watch(
if
(
val
&&
val
.
productList
?.
length
)
if
(
val
&&
val
.
productList
?.
length
)
val
.
productList
.
forEach
((
el
)
=>
{
val
.
productList
.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
}
else
{
el
.
previewImgs
=
el
.
imageAry
el
.
previewImgs
=
el
.
imageAry
...
@@ -451,16 +465,17 @@ const renderItemBox = (bool: boolean) => {
...
@@ -451,16 +465,17 @@ const renderItemBox = (bool: boolean) => {
return
return
if
(
renderLock
)
return
if
(
renderLock
)
return
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
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
!
el
.
previewImgs
||
!
el
.
previewImgs
.
length
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
}
else
{
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
)
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
||
'[]'
)
}
}
}
}
})
})
...
@@ -483,15 +498,21 @@ const renderItemBox = (bool: boolean) => {
...
@@ -483,15 +498,21 @@ const renderItemBox = (bool: boolean) => {
}
}
}
}
if
(
currentCode
)
{
if
(
currentCode
)
{
const
parts
=
currentCode
.
split
(
'_'
)
if
(
!
currentCode
.
startsWith
(
'JM'
))
{
currentCode
=
const
parts
=
currentCode
.
split
(
'_'
)
parts
.
length
>
3
&&
parts
[
3
].
startsWith
(
'USPSC'
)
currentCode
=
?
parts
[
3
]
parts
.
length
>
3
&&
parts
[
3
].
startsWith
(
'USPSC'
)
:
parts
.
length
>
1
?
parts
[
3
]
?
parts
[
1
]
:
parts
.
length
>
1
:
parts
[
0
]
?
parts
[
1
]
:
parts
[
0
]
}
console
.
log
(
540
,
currentCode
)
for
(
const
product
of
productList
)
{
for
(
const
product
of
productList
)
{
if
(
product
.
podJomallUsNo
===
currentCode
)
{
if
(
product
.
podJomallUsNo
===
currentCode
||
product
.
thirdSkuCode
===
currentCode
)
{
coverImage
.
value
=
product
.
previewImgs
?.[
0
]?.
url
||
''
coverImage
.
value
=
product
.
previewImgs
?.[
0
]?.
url
||
''
console
.
log
(
441
,
coverImage
.
value
)
console
.
log
(
441
,
coverImage
.
value
)
...
@@ -505,8 +526,10 @@ const renderItemBox = (bool: boolean) => {
...
@@ -505,8 +526,10 @@ const renderItemBox = (bool: boolean) => {
}
}
podOrderDetailsData
.
value
=
data
podOrderDetailsData
.
value
=
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
})
})
...
@@ -530,13 +553,19 @@ const messageChange = (data: WebSocketMessage) => {
...
@@ -530,13 +553,19 @@ const messageChange = (data: WebSocketMessage) => {
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
}
console
.
log
(
'WebSocketMessage'
,
more
)
setPodBoxList
(
more
)
setPodBoxList
(
more
)
}
else
if
(
code
===
'POD_BOX_FLUSH'
)
{
initOrderDetailBox
()
}
}
}
}
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
)
}
}
}
}
...
@@ -556,6 +585,7 @@ const initPrintDevice = () => {
...
@@ -556,6 +585,7 @@ const initPrintDevice = () => {
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
printDeviceList
.
value
=
arr
printDeviceList
.
value
=
arr
}
}
// const handleProduct = (val: OrderData) => {
// const handleProduct = (val: OrderData) => {
// if (val && val.productList && val.productList.length > 0) {
// if (val && val.productList && val.productList.length > 0) {
// return val.productList?.some((item) => {
// return val.productList?.some((item) => {
...
@@ -628,12 +658,35 @@ const getPackingData = async (code: string) => {
...
@@ -628,12 +658,35 @@ const getPackingData = async (code: string) => {
productionOrder
.
value
=
''
productionOrder
.
value
=
''
return
return
}
}
const
{
box
}
=
res
.
data
const
{
box
,
data
}
=
res
.
data
console
.
log
(
'box'
,
box
)
console
.
log
(
'box'
,
box
)
if
(
box
)
{
// if (box) {
boxIndex
.
value
=
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
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
finally
{
}
finally
{
...
@@ -696,6 +749,7 @@ const initOrderDetailBox = async () => {
...
@@ -696,6 +749,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
,
})
})
...
@@ -835,6 +889,7 @@ const nextStep = async (callback: () => void) => {
...
@@ -835,6 +889,7 @@ const nextStep = async (callback: () => void) => {
}
}
const
handleBoxClick
=
(
item
:
PodMakeOrderData
)
=>
{
const
handleBoxClick
=
(
item
:
PodMakeOrderData
)
=>
{
const
{
box
,
data
}
=
item
const
{
box
,
data
}
=
item
if
(
box
==
0
)
return
isBillLading
.
value
=
!
data
?.
filePath
isBillLading
.
value
=
!
data
?.
filePath
nextStep
(()
=>
{
nextStep
(()
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
...
@@ -870,12 +925,12 @@ const handleClearBox = async () => {
...
@@ -870,12 +925,12 @@ const handleClearBox = async () => {
return
return
}
}
ElMessage
.
success
(
'清空成功'
)
ElMessage
.
success
(
'清空成功'
)
orderStore
.
setPodBoxList
({
//
orderStore.setPodBoxList({
boxList
:
null
,
//
boxList: null,
factoryNo
,
//
factoryNo,
box
:
boxIndex
.
value
||
undefined
,
//
box: boxIndex.value || undefined,
warehouseId
:
warehouseId
.
value
,
//
warehouseId: warehouseId.value,
})
//
})
boxIndex
.
value
=
null
boxIndex
.
value
=
null
podOrderDetailsData
.
value
=
{}
podOrderDetailsData
.
value
=
{}
coverImage
.
value
=
''
coverImage
.
value
=
''
...
@@ -947,10 +1002,18 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
...
@@ -947,10 +1002,18 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
item
.
data
.
printResult
=
'printFail'
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
const
factoryNo
=
userStore
.
user
?.
factory
.
id
if
(
!
factoryNo
)
return
if
(
!
factoryNo
)
return
orderStore
.
setPodBoxList
({
orderStore
.
setPodBoxList
({
boxList
:
item
?
item
.
data
:
null
,
fromUser
:
userStore
.
user
?
userStore
.
user
.
id
:
0
,
boxList
:
item
?
(
item
.
data
as
PodMakeOrderData
[])
:
null
,
factoryNo
,
factoryNo
,
box
:
_boxIndex
||
undefined
,
box
:
_boxIndex
||
undefined
,
warehouseId
:
warehouseId
.
value
,
warehouseId
:
warehouseId
.
value
,
...
@@ -968,13 +1031,13 @@ const clearAllBox = async () => {
...
@@ -968,13 +1031,13 @@ const clearAllBox = async () => {
return
return
}
}
try
{
try
{
const
res
=
await
clearAllBoxApi
()
const
res
=
await
clearAllBoxApi
(
warehouseId
.
value
,
userStore
.
user
?.
factory
.
id
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
orderStore
.
setPodBoxList
({
//
orderStore.setPodBoxList({
boxList
:
res
.
data
,
//
boxList: res.data,
factoryNo
:
userStore
.
user
?.
factory
.
id
||
''
,
//
factoryNo: userStore.user?.factory.id || '',
warehouseId
:
warehouseId
.
value
,
//
warehouseId: warehouseId.value,
})
//
})
productionOrderRef
.
value
.
focus
()
productionOrderRef
.
value
.
focus
()
podOrderDetailsData
.
value
=
{}
podOrderDetailsData
.
value
=
{}
coverImage
.
value
=
''
coverImage
.
value
=
''
...
@@ -1229,6 +1292,9 @@ const printNormal = async () => {
...
@@ -1229,6 +1292,9 @@ const printNormal = async () => {
background-color
:
red
;
background-color
:
red
;
}
}
}
}
.fontStyle
{
font-size
:
12px
;
}
</
style
>
</
style
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.pod-make-order-dialog
{
.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