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
45a7a329
Commit
45a7a329
authored
Jan 15, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:【工厂端】POD订单(CN)中CB和G类商品的拣胚流程优化,方便拣胚人员提前拣胚#1002186
parent
3f47eaaf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
15 deletions
+105
-15
src/api/podCnOrder.ts
+8
-0
src/views/order/podCN/PodDistributionOrder.vue
+5
-9
src/views/order/podCN/index.vue
+92
-6
No files found.
src/api/podCnOrder.ts
View file @
45a7a329
...
...
@@ -790,3 +790,11 @@ export function updateProductOutOfStockApi(params: {
params
,
)
}
// 打印普胚生产单
export
function
printNormalProducePdf
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderProductCn/printNormalProducePdf'
,
orderIds
,
)
}
src/views/order/podCN/PodDistributionOrder.vue
View file @
45a7a329
...
...
@@ -269,7 +269,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
computed
,
nextTick
,
ref
,
watch
,
defineProps
,
defineEmits
}
from
'vue'
import
{
computed
,
nextTick
,
ref
,
watch
}
from
'vue'
import
useLodop
from
'@/utils/hooks/useLodop'
import
TableView
from
'@/components/TableView.vue'
import
{
OrderData
,
ProductList
,
IorderItem
}
from
'@/types/api/podMakeOrder'
...
...
@@ -499,14 +499,12 @@ async function barcodeInput() {
console
.
log
(
'pending'
,
pending
)
await
submitInspection
(
pending
,
async
()
=>
{
await
inputActive
()
await
getPackingData
(
code
)
noObj
.
value
=
{}
})
}
else
{
await
inputActive
()
await
getPackingData
(
code
)
}
await
inputActive
()
await
getPackingData
(
code
)
isLock
.
value
=
false
}
async
function
submitInspection
(
objs
?:
OrderData
,
callback
?:
()
=>
void
)
{
...
...
@@ -525,12 +523,10 @@ async function submitInspection(objs?: OrderData, callback?: () => void) {
ElMessage
.
success
(
res
.
message
)
coverImage
.
value
=
''
testingData
.
value
=
{}
await
inputActive
()
isLock
.
value
=
false
callback
?.()
}
catch
(
e
)
{
console
.
error
(
e
)
await
inputActive
()
isLock
.
value
=
false
}
}
...
...
@@ -591,7 +587,7 @@ async function getPackingData(code: string) {
async
function
printFile
(
data
:
OrderData
)
{
// await props.printOrderOne(data)
await
printOrderOne
(
data
)
noObj
.
value
[
data
.
id
!
]
=
data
noObj
.
value
[
data
.
id
as
number
]
=
data
await
inputActive
()
}
function
printOrderOne
(
item
:
OrderData
):
Promise
<
void
>
{
...
...
src/views/order/podCN/index.vue
View file @
45a7a329
...
...
@@ -879,6 +879,11 @@
<span
v-if=
"['WAIT_SHIPMENT'].includes(status)"
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"printNormal"
>
普货拣货
</ElButton>
</span>
<span
v-if=
"['WAIT_SHIPMENT'].includes(status)"
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"printNormalProductionOrder"
>
打印普胚生产单
</ElButton>
</span>
<span
v-if=
"
status === 'STOCK_OUT' ||
...
...
@@ -1829,7 +1834,9 @@
>
<
span
class
=
"operate-item"
>
<
ElButton
:
disabled
=
"!row.url && !row.tiffUrl"
:
disabled
=
"
(!row.url && !row.tiffUrl) || row.enableArrange === false
"
link
type
=
"primary"
@
click
=
"handleDownload(row)"
...
...
@@ -1853,7 +1860,7 @@
type
=
"primary"
@
click
=
"printPickingOrderItem(row, 1)"
>
打印
拣货单
拣货单
<
/ElButton
>
<
/span
>
<
span
class
=
"operate-item"
>
...
...
@@ -1862,19 +1869,19 @@
type
=
"primary"
@
click
=
"printPickingOrderItem(row, 2)"
>
打印
生产单
生产单
<
/ElButton
>
<
/span
>
<
span
class
=
"operate-item"
>
<
ElButton
:
disabled
=
"row.productNum > 50"
:
disabled
=
"row.productNum > 50
|| row.enableArrange === false
"
link
type
=
"warning"
:
loading
=
"reComposingLoadingMap[row.id]"
@
click
=
"showArrange(1, row)"
>
重
新排版
重
排
<
/ElButton
>
<
/span
>
<
span
class
=
"operate-item"
>
...
...
@@ -2105,6 +2112,16 @@
<
/template
>
<
template
#
operations
>
<
div
v
-
if
=
"
cardItem?.productMark &&
(status == 'TO_BE_ARRANGE' || status == 'PICKING')
"
class
=
"customizedQuantity"
:
title
=
"`类型:${getProductMarkt(cardItem?.productMark)
}
面`"
>
{{
getProductMarkt
(
cardItem
?.
productMark
)
}}
<
/div
>
<
div
v
-
if
=
"cardItem?.customizedQuantity"
class
=
"customizedQuantity"
:
title
=
"`类型:${getQuantityText(
...
...
@@ -2880,6 +2897,7 @@ import {
batchDownloadRecomposingApi
,
getCustomTagListCnApi
,
printNormalPdf
,
printNormalProducePdf
,
changeLogisticsApi
,
getEmployeeListApi
,
allErpCodeListApi
,
...
...
@@ -3327,6 +3345,42 @@ const printNormal = async () => {
window
.
open
(
filePath
+
res
.
message
)
}
const
printNormalProductionOrder
=
async
()
=>
{
const
orderIds
:
number
[]
=
[]
if
(
!
selection
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请选择订单'
)
}
selection
.
value
.
forEach
((
s
)
=>
{
s
.
productList
&&
s
.
productList
.
forEach
((
p
)
=>
{
if
(
p
.
productMark
===
'normal'
||
p
.
productMark
===
'custom_normal'
)
{
orderIds
.
push
(
p
.
id
)
}
}
)
}
)
if
(
!
orderIds
.
length
)
{
ElMessage
.
warning
(
'暂无可打印的普胚生产单'
)
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
printNormalProducePdf
(
orderIds
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
window
.
open
(
filePath
+
res
.
message
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
const
completeDelivery
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择订单'
)
...
...
@@ -3835,7 +3889,7 @@ const tableColumns = computed(() => {
{
label
:
'操作'
,
slot
:
'operate'
,
width
:
35
0
,
width
:
26
0
,
align
:
'center'
,
fixed
:
'right'
,
prop
:
'operate'
,
...
...
@@ -4830,7 +4884,33 @@ const showArrange = async (type: number, data?: PodCnOrderListData) => {
if
(
type
===
1
||
type
===
3
)
{
typesettingRow
.
value
=
data
}
else
if
(
type
===
2
)
{
const
ALLOWED_PRODUCT_MARKS
=
[
'custom_normal'
,
'normal'
]
const
selectedIds
=
cardSelection
.
value
.
map
((
item
)
=>
item
.
id
)
const
isProductMark
=
cardSelection
.
value
.
find
((
item
)
=>
ALLOWED_PRODUCT_MARKS
.
includes
(
item
.
productMark
as
string
),
)
if
(
isProductMark
)
{
const
bool
=
cardSelection
.
value
.
every
((
item
)
=>
ALLOWED_PRODUCT_MARKS
.
includes
(
item
.
productMark
as
string
),
)
if
(
!
bool
)
{
return
await
ElMessageBox
.
confirm
(
'无法排单,你选择的生产单包含多种商品类型,排单不支持多种商品类型混排,请选择同一类型的商品对应的生产单后再试!'
,
'错误提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
,
}
,
)
}
else
{
await
ElMessageBox
.
confirm
(
'确认对所选择的生产单进行排单?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
return
arrangeFinish
()
}
}
if
(
selectedIds
.
length
===
0
)
{
return
ElMessage
({
...
...
@@ -5815,6 +5895,12 @@ function getQuantityText(qty: number) {
if
(
!
qty
||
qty
<=
0
)
return
''
return
Math
.
floor
(
qty
)
===
1
?
'单'
:
'多'
}
function
getProductMarkt
(
productMark
:
string
)
{
if
(
!
productMark
)
return
''
if
(
productMark
===
'custom_normal'
)
return
'CB'
if
(
productMark
===
'normal'
)
return
'G'
return
''
}
const
handleMark
=
(
mark
:
string
)
=>
{
switch
(
mark
)
{
...
...
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