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
b4150a0e
Commit
b4150a0e
authored
Nov 28, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:【工厂端】【新派单-PODUS/PODCN】:CB、G类商品在订单列表商品图右上角展示标识#1000527
parent
1aca4c94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
253 additions
and
118 deletions
+253
-118
src/views/order/podCN/PodDistributionOrder.vue
+2
-1
src/views/order/podCN/PodMakeOrder.vue
+71
-52
src/views/order/podCN/index.vue
+155
-46
src/views/order/podUs/PodMakeOrder.vue
+21
-15
src/views/order/podUs/index.vue
+4
-4
No files found.
src/views/order/podCN/PodDistributionOrder.vue
View file @
b4150a0e
...
...
@@ -161,7 +161,8 @@
<
template
#
image=
"{ row }"
>
<div
style=
"display: flex; flex-wrap: nowrap"
>
<div
v-for=
"img in row.productMark !== 'normal'
v-for=
"img in row.productMark !== 'normal' &&
row.productMark !== 'custom_normal'
? row.previewImgs
: [
{ url: row.variantImage }]"
:key="img"
...
...
src/views/order/podCN/PodMakeOrder.vue
View file @
b4150a0e
...
...
@@ -112,11 +112,12 @@
@
row-click=
"handleRowClick"
>
<
template
#
image=
"{ row }"
>
<div
style=
"display: flex; flex-wrap: nowrap"
>
<div
style=
"display: flex; flex-wrap: nowrap"
>
<div
v-for=
"img in row.productMark!=='normal'?row.previewImgs:[
{url:row.variantImage}]"
v-for=
"img in row.productMark !== 'normal' &&
row.productMark !== 'custom_normal'
? row.previewImgs
: [
{ url: row.variantImage }]"
:key="img"
style="cursor: pointer; margin-right: 5px; flex: 1"
@click.stop="handleCurrentChange(img.url)"
...
...
@@ -124,15 +125,13 @@
<img
v-if=
"img.url"
:src=
"img.url"
alt=
""
/>
</div>
</div>
</
template
>
<
template
#
verifyResult=
"{ row }"
>
<el-icon
v-if=
"row.power"
style=
"color: #00cc00; font-size: 24px; font-weight: 900"
>
<Check
/>
<Check
/>
</el-icon>
</
template
>
</TableView>
...
...
@@ -187,19 +186,12 @@
<ElButton
type=
"primary"
@
click=
"podOrderDetailsData && print(podOrderDetailsData, true)"
>
手动打印
</ElButton
>
<ElButton
type=
"primary"
@
click=
"printNormal"
>
普货拣货
</ElButton
>
>
手动打印
</ElButton>
<ElButton
type=
"primary"
@
click=
"printNormal"
>
普货拣货
</ElButton>
<ElButton
type=
"success"
@
click=
"handlePrintFinish"
>
打单完成
</ElButton
>
>
打单完成
</ElButton>
<ElButton
type=
"danger"
@
click=
"handleClearBox"
>
清空箱子
</ElButton>
</div>
<div
...
...
@@ -225,7 +217,7 @@
:class=
"{
active: item.box && boxIndex == item.box,
isNull: !item.data,
badge: handleProduct(item.data || {}),
//
badge: handleProduct(item.data || {}),
}"
@
click=
"handleBoxClick(item)"
>
...
...
@@ -235,6 +227,19 @@
<span
v-if=
"item.data"
class=
"number"
>
{{ item.data.pickingNumber }}/{{ item.data.purchaseNumber }}
</span>
<div
v-if=
"
item.data &&
item.data.productList?.some(
(e) =>
e.productMark === 'custom_normal' ||
e.productMark === 'normal',
)
"
class=
"cb-product-mark"
>
<div
class=
"red-circle"
></div>
</div>
</div>
</div>
</div>
...
...
@@ -259,7 +264,8 @@ import {
getPackingCnDataApi
,
clearBoxApi
,
getPodBoxListApi
,
submitInspectionApi
,
printNormalPdf
,
submitInspectionApi
,
printNormalPdf
,
}
from
'@/api/podCnOrder'
import
useUserStore
from
'@/store/user'
import
{
Check
}
from
'@element-plus/icons-vue'
...
...
@@ -306,33 +312,28 @@ const podOrderDetailsColumns = computed(() => [
{
label
:
'生产单号'
,
prop
:
'podJomallCnNo'
,
showOverflowTooltip
:
true
,
showOverflowTooltip
:
true
,
width
:
150
,
align
:
'center'
,
},
// {
// label: 'base SKU',
// prop: 'baseSku',
// width: 140,
// align: 'center',
// },
{
{
label
:
'库存SKU'
,
prop
:
'thirdSkuCode'
,
showOverflowTooltip
:
true
,
showOverflowTooltip
:
true
,
width
:
180
,
align
:
'center'
,
},
{
label
:
'variant SKU'
,
prop
:
'variantSku'
,
showOverflowTooltip
:
true
,
showOverflowTooltip
:
true
,
width
:
150
,
align
:
'center'
,
},
{
label
:
'商品名称'
,
showOverflowTooltip
:
true
,
showOverflowTooltip
:
true
,
width
:
200
,
prop
:
'productName'
,
},
...
...
@@ -380,6 +381,7 @@ watch(visible, async (value: boolean) => {
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
{
await
socket
.
init
(
...
...
@@ -501,8 +503,8 @@ const renderItemBox = (bool: boolean) => {
parts
.
length
>
3
&&
parts
[
3
].
startsWith
(
'CNPSC'
)
?
parts
[
3
]
:
parts
.
length
>
1
?
parts
[
1
]
:
parts
[
0
]
?
parts
[
1
]
:
parts
[
0
]
for
(
const
product
of
productList
)
{
if
(
product
.
podJomallCnNo
===
currentCode
)
{
coverImage
.
value
=
product
.
previewImgs
?.[
0
]?.
url
||
''
...
...
@@ -552,12 +554,15 @@ const setPodBoxList = (data: WebSocketMessage) => {
}
const
printNormal
=
async
()
=>
{
const
arr
:
(
number
|
undefined
)[]
=
[]
;
(
podBoxList
.
value
||
[]).
forEach
((
item
:
PodMakeOrderData
)
=>
{
const
arr
:
(
number
|
undefined
)[]
=
[]
;
(
podBoxList
.
value
||
[]).
forEach
((
item
:
PodMakeOrderData
)
=>
{
if
(
item
.
data
)
{
if
(
item
.
data
.
productList
&&
item
.
data
.
productList
.
length
>
0
)
{
const
flag
=
item
.
data
.
productList
.
some
((
item1
)
=>
{
return
item1
.
productMark
==
'normal'
return
(
item1
.
productMark
==
'normal'
||
item1
.
productMark
==
'custom_normal'
)
})
if
(
flag
)
{
arr
?.
push
(
item
.
data
?.
id
)
...
...
@@ -589,15 +594,15 @@ 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
)
=>
{
return
item
.
productMark
==
'normal'
})
}
else
{
return
false
}
}
//
const handleProduct = (val: OrderData) => {
//
if (val && val.productList && val.productList.length > 0) {
//
return val.productList?.some((item) => {
//
return item.productMark == 'normal'
//
})
//
} else {
//
return false
//
}
//
}
const
handleSearch
=
()
=>
{
const
code
=
productionOrder
.
value
if
(
!
code
)
{
...
...
@@ -733,9 +738,9 @@ const initOrderDetailBox = async () => {
return
}
console
.
log
(
res
.
data
)
res
.
data
.
forEach
(
r
=>
{
r
.
data
?.
productList
?.
forEach
(
d
=>
{
if
(
d
.
productMark
===
'normal'
)
{
res
.
data
.
forEach
(
(
r
)
=>
{
r
.
data
?.
productList
?.
forEach
(
(
d
)
=>
{
if
(
d
.
productMark
===
'normal'
||
d
.
productMark
===
'custom_normal'
)
{
d
.
previewImgs
=
[{
url
:
d
.
variantImage
||
''
}]
}
else
{
if
(
!
d
.
previewImgs
)
d
.
previewImgs
=
JSON
.
parse
(
d
.
imageAry
||
'[]'
)
...
...
@@ -779,7 +784,7 @@ const initOrderDetailBox = async () => {
if
(
podOrderDetailsData
.
value
&&
podOrderDetailsData
.
value
.
pickingNumber
===
podOrderDetailsData
.
value
.
purchaseNumber
podOrderDetailsData
.
value
.
purchaseNumber
)
{
podOrderDetailsData
.
value
.
printResult
=
'notPrintSuccess'
}
...
...
@@ -998,8 +1003,11 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
// }
const
handleRowClick
=
(
row
:
ProductList
)
=>
{
console
.
log
(
907
,
row
)
const
previewImages
=
row
.
productMark
!==
'normal'
?
row
.
previewImgs
:[{
url
:
row
.
variantImage
}]
coverImage
.
value
=
previewImages
?.[
0
]?.
url
||
''
const
previewImages
=
row
.
productMark
!==
'normal'
&&
row
.
productMark
!==
'custom_normal'
?
row
.
previewImgs
:
[{
url
:
row
.
variantImage
}]
coverImage
.
value
=
previewImages
?.[
0
]?.
url
||
''
productionOrderRef
.
value
.
focus
()
}
const
handleCurrentChange
=
(
url
:
string
)
=>
{
...
...
@@ -1231,6 +1239,17 @@ const handleWarehouseChange = (value: string | number) => {
color
:
#ddd
;
}
}
.cb-product-mark
{
position
:
absolute
;
top
:
0
;
right
:
0
;
.red-circle
{
width
:
8px
;
height
:
8px
;
border-radius
:
50%
;
background-color
:
red
;
}
}
</
style
>
<
style
lang=
"scss"
>
.pod-make-order-dialog
{
...
...
src/views/order/podCN/index.vue
View file @
b4150a0e
...
...
@@ -996,32 +996,50 @@
class=
"goods-item-img"
style=
"display: flex; flex-direction: column"
>
<div
v-for=
"img in item.productMark !== 'normal' &&
item.productMark !== 'custom_normal'
? item.previewImgs
: [
{ url: item.variantImage }]"
:key="img"
style="text-align: center"
>
<template
v-if=
"item.previewImgs?.length"
>
<div
v-for=
"img in item.previewImgs"
:key=
"img"
style=
"text-align: center"
>
<img
:src=
"img.url"
alt=
"商品图片"
style=
"cursor: pointer"
@
click=
"handlePictureCardPreview(img.url)"
/>
<div
v-if=
"item.customizedQuantity"
class=
"triangle-box"
:title=
"`类型:$
{getQuantityText(
item.customizedQuantity,
)}面`"
>
<div
class=
"multi-text"
>
{{
getQuantityText
(
item
.
customizedQuantity
)
}}
</div>
</div>
</div>
</
template
>
<
template
v-else
>
<img
:src=
"i
mg.url
"
alt=
"商品图片
222
"
:src=
"i
tem.variantImage
"
alt=
"商品图片"
style=
"cursor: pointer"
@
click=
"handlePictureCardPreview(i
mg.url
)"
@
click=
"handlePictureCardPreview(i
tem.variantImage
)"
/>
<div
v-if=
"item.customizedQuantity"
class=
"triangle-box"
:title=
"`类型:$
{getQuantityText(
item.customizedQuantity,
)}面`
"
>
<div
class=
"multi-text"
>
{{
getQuantityText
(
item
.
customizedQuantity
)
}}
<div
class=
"triangle-container-wrap"
>
<div
class=
"triangle-container"
>
<div
class=
"triangle-marker"
></div>
<div
class=
"content"
:title=
"handleMark(item.productMark).label
"
>
{{
handleMark
(
item
.
productMark
).
name
}}
</div>
</div>
</div>
</
div
>
</
template
>
</div>
<div
class=
"goods-item-info"
>
<div
class=
"goods-item-info-item"
>
...
...
@@ -5006,14 +5024,16 @@ const openDetail = async (id: number) => {
try
{
const
res
=
await
getOrderDetailById
(
id
)
if
(
res
.
code
==
200
)
{
const
item
=
res
.
data
if
(
item
.
imageAry
){
if
(
item
.
imageAry
.
startsWith
(
'http'
)){
item
.
imageAry
=
JSON
.
stringify
(
item
.
imageAry
.
split
(
','
).
map
(
e
=>
{
return
{
url
:
e
}
}
))
const
item
=
res
.
data
if
(
item
.
imageAry
)
{
if
(
item
.
imageAry
.
startsWith
(
'http'
))
{
item
.
imageAry
=
JSON
.
stringify
(
item
.
imageAry
.
split
(
','
).
map
((
e
)
=>
{
return
{
url
:
e
,
}
}
),
)
}
}
if
(
item
.
imageAry
)
{
...
...
@@ -5161,25 +5181,34 @@ watch(
(
newData
)
=>
{
if
(
!
newData
?.
length
)
return
newData
.
forEach
((
order
)
=>
{
const
item
=
order
as
ProductList
if
(
item
.
imageAry
){
if
(
item
.
imageAry
.
startsWith
(
'http'
)){
item
.
imageAry
=
JSON
.
stringify
(
item
.
imageAry
.
split
(
','
).
map
(
e
=>
{
return
{
url
:
e
}
}
))
const
item
=
order
as
ProductList
if
(
item
.
imageAry
)
{
if
(
item
.
imageAry
.
startsWith
(
'http'
))
{
item
.
imageAry
=
JSON
.
stringify
(
item
.
imageAry
.
split
(
','
).
map
((
e
)
=>
{
return
{
url
:
e
,
}
}
),
)
}
}
if
(
order
.
productList
)
{
if
(
order
.
productList
)
{
// 使用可选链和空值合并简化判断
order
.
productList
?.
forEach
((
product
)
=>
{
if
(
!
product
.
previewImgs
&&
product
.
imageAry
)
{
try
{
product
.
previewImgs
=
JSON
.
parse
(
product
.
imageAry
)?.
filter
(
(
el
:
{
title
:
string
}
)
=>
el
.
title
,
)
||
[]
if
(
product
.
productMark
===
'custom_normal'
||
product
.
productMark
===
'normal'
)
{
product
.
previewImgs
=
[]
}
else
{
product
.
previewImgs
=
JSON
.
parse
(
product
.
imageAry
)?.
filter
(
(
el
:
{
title
:
string
}
)
=>
el
.
title
,
)
||
[]
}
}
catch
(
error
)
{
console
.
error
(
'JSON解析失败:'
,
error
)
product
.
previewImgs
=
[]
...
...
@@ -5187,7 +5216,6 @@ watch(
}
}
)
}
}
)
}
,
{
deep
:
true
,
immediate
:
true
}
,
// 添加immediate确保初始化时执行
...
...
@@ -5367,6 +5395,59 @@ function getQuantityText(qty: number) {
return
Math
.
floor
(
qty
)
===
1
?
'单'
:
'多'
}
const
handleMark
=
(
mark
:
string
)
=>
{
switch
(
mark
)
{
case
'virtual'
:
return
{
name
:
'VIR'
,
color
:
'#ff9900'
,
label
:
'虚拟商品'
,
}
case
'normal'
:
return
{
name
:
'G'
,
color
:
'#67C23A'
,
label
:
'普通商品'
,
}
case
'pod'
:
return
{
name
:
'P'
,
color
:
'#F56C6C'
,
label
:
'pod商品'
,
}
case
'custom'
:
return
{
name
:
'C'
,
color
:
'#6d9eeb'
,
label
:
'一件定制商品'
,
}
case
'custom_part'
:
return
{
name
:
'CP'
,
color
:
'#6d9eeb'
,
label
:
'一件定制局部印商品'
,
}
case
'custom_full'
:
return
{
name
:
'CF'
,
color
:
'#6d9eeb'
,
label
:
'一件定制满印商品'
,
}
case
'custom_normal'
:
return
{
name
:
'CB'
,
color
:
'#67C23A'
,
label
:
'胚衣'
,
}
default
:
return
{
name
:
''
,
color
:
'#FFFFFF'
,
width
:
'0'
,
}
}
}
const
dialogVisible
=
ref
(
false
)
const
dialogImageUrl
=
ref
(
''
)
const
handlePictureCardPreview
=
(
fileUrl
:
string
)
=>
{
...
...
@@ -5482,9 +5563,9 @@ useEnterKeyTrigger({
// height: 100px;
position
:
relative
;
img
{
width
:
65
%
;
}
//
img
{
//
width: 65%;
//
}
}
&
:
not
(:
last
-
child
)
{
...
...
@@ -5796,6 +5877,34 @@ useEnterKeyTrigger({
}
}
}
.
triangle
-
container
-
wrap
{
position
:
absolute
;
top
:
0
;
right
:
0
;
}
.
triangle
-
container
{
position
:
relative
;
.
triangle
-
marker
{
width
:
0
;
height
:
0
;
border
:
18
px
solid
transparent
;
border
-
right
:
18
px
solid
#
e74c3c
;
border
-
top
:
18
px
solid
#
e74c3c
;
}
.
content
{
position
:
absolute
;
top
:
0
;
left
:
18
px
;
transform
:
rotate
(
45
deg
);
color
:
white
;
text
-
align
:
center
;
font
-
weight
:
bold
;
font
-
size
:
12
px
;
}
}
<
/style
>
<
style
lang
=
"scss"
>
.
customize
-
select
-
style
{
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
b4150a0e
...
...
@@ -201,7 +201,6 @@
:class=
"{
active: item.box && boxIndex == item.box,
isNull: !item.data,
badge: handleProduct(item.data || {}),
}"
@
click=
"handleBoxClick(item)"
>
...
...
@@ -215,7 +214,9 @@
v-if=
"
item.data &&
item.data.productList?.some(
(e) => e.productMark === 'custom_normal',
(e) =>
e.productMark === 'custom_normal' ||
e.productMark === 'normal',
)
"
class=
"cb-product-mark"
...
...
@@ -350,8 +351,12 @@ watch(visible, async (value: boolean) => {
if
(
value
)
{
podOrderDetailsData
.
value
=
{}
currentCode
=
''
warehouseId
.
value
=
props
.
warehouseList
[
0
].
id
_warehouseId
.
value
=
props
.
warehouseList
[
0
].
id
const
localRaw
=
sessionStorage
.
getItem
(
'locaclCnWarehouseId'
)
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
if
(
userStore
.
user
?.
factory
.
id
)
{
try
{
...
...
@@ -378,6 +383,7 @@ watch(visible, async (value: boolean) => {
const
locaclWarehouseId
=
localStorage
.
getItem
(
'locaclWarehouseId'
)
if
(
locaclPrinter
)
sheetPrinter
.
value
=
JSON
.
parse
(
locaclPrinter
)
if
(
locaclWarehouseId
)
warehouseId
.
value
=
JSON
.
parse
(
locaclWarehouseId
)
emit
(
'set-printer'
,
sheetPrinter
.
value
)
}
else
{
if
(
userStore
.
user
?.
factory
.
id
)
{
socket
.
send
({
...
...
@@ -453,7 +459,7 @@ const renderItemBox = (bool: boolean) => {
const
{
data
}
=
boxItem
data
?.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
JSON
.
parse
(
el
.
imageAry
)
...
...
@@ -552,15 +558,15 @@ 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
)
=>
{
return
item
.
productMark
==
'normal'
})
}
else
{
return
false
}
}
//
const handleProduct = (val: OrderData) => {
//
if (val && val.productList && val.productList.length > 0) {
//
return val.productList?.some((item) => {
//
return item.productMark == 'normal'
//
})
//
} else {
//
return false
//
}
//
}
const
handleSearch
=
()
=>
{
const
code
=
productionOrder
.
value
if
(
!
code
)
{
...
...
@@ -723,7 +729,7 @@ const initOrderDetailBox = async () => {
podOrderDetailsData
.
value
?.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
el
.
imageAry
...
...
src/views/order/podUs/index.vue
View file @
b4150a0e
...
...
@@ -3989,13 +3989,13 @@ watch(
if
(
!
newData
?.
length
)
return
newData
.
forEach
((
order
)
=>
{
// console.log(3690, order)
// 使用可选链和空值合并简化判断
order
.
productList
?.
forEach
((
product
)
=>
{
if
(
!
product
.
previewImgs
&&
product
.
imageAry
)
{
try
{
if
(
product
.
productMark
===
'custom_normal'
)
{
if
(
product
.
productMark
===
'custom_normal'
||
product
.
productMark
===
'normal'
)
{
product
.
previewImgs
=
[]
}
else
{
product
.
previewImgs
=
...
...
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