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
bd79ca49
Commit
bd79ca49
authored
Jul 30, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix_1001679' into 'dev'
Fix 1001679 See merge request
!287
parents
46551e46
157d3e5d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
src/views/order/factoryOrderNew/index.vue
+12
-5
src/views/order/podUs/PodMakeOrder.vue
+12
-5
No files found.
src/views/order/factoryOrderNew/index.vue
View file @
bd79ca49
...
...
@@ -2903,12 +2903,19 @@ const handleSeedingWall = (type: 'print' | 'sort') => {
podOrderVisible
.
value
=
true
}
const
printOrder
=
async
(
/** LODOP 单例不可并发,打印串行 */
let
printOrderChain
:
Promise
<
void
>
=
Promise
.
resolve
()
const
printOrder
=
(
data
:
OrderData
,
callback
:
(
status
:
boolean
)
=>
void
,
)
=>
{
const
run
=
async
()
=>
{
const
lodop
=
getCLodop
(
null
,
null
)
if
(
!
lodop
)
return
if
(
!
lodop
)
{
callback
&&
callback
(
false
)
return
}
lodop
.
PRINT_INIT
(
'打印内容'
)
const
printerIndex
=
lodop
.
SET_PRINTER_INDEX
(
sheetPrinter
.
value
)
console
.
log
(
...
...
@@ -2963,11 +2970,9 @@ const printOrder = async (
console
.
log
(
'PRINT_STATUS_OK:'
,
jobCode
,
`ok: ${ok
}
`
)
if
(
ok
==
1
)
{
console
.
log
(
'打印成功'
)
// 打印状态:成功
callback
&&
callback
(
true
)
return
}
// 如果打印状态表示未成功或者返回了空,继续获取任务是否存在
const
exist
=
await
lodopCall
((
lodop
)
=>
lodop
.
GET_VALUE
(
'PRINT_STATUS_EXIST'
,
jobCode
),
)
...
...
@@ -2981,7 +2986,6 @@ const printOrder = async (
)
if
(
exist
==
0
)
{
console
.
log
(
'任务不存在了'
,
`exist:${exist
}
`
)
// 任务不存在了
callback
&&
callback
(
true
)
return
}
...
...
@@ -2998,6 +3002,9 @@ const printOrder = async (
lodop
.
PRINT
()
callback
&&
callback
(
false
)
}
}
printOrderChain
=
printOrderChain
.
then
(
run
,
run
)
}
let
_lodop
:
LODOPObject
|
null
=
null
let
_lodopCallback
:
{
[
key
:
string
]:
(
value
:
string
)
=>
void
}
=
{
}
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
bd79ca49
...
...
@@ -1251,9 +1251,6 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
if
(
type
===
'manual'
&&
boxs
.
length
>
0
)
{
nextTick
(
async
()
=>
{
// 切换箱子至验货完成的箱子
boxChange
.
value
=
true
boxIndex
.
value
=
boxs
[
0
]
as
number
const
token
=
++
pickFinishedAlertToken
if
(
token
>
1
)
{
ElMessageBox
.
close
()
...
...
@@ -1338,7 +1335,8 @@ const nextStep = async (callback: () => void) => {
callback
&&
callback
()
})
}
catch
(
error
)
{
productionOrderRef
.
value
.
focus
()
// 取消打单完成时仍允许切换箱子 / 关闭弹窗
callback
&&
callback
()
console
.
error
(
error
)
}
}
else
{
...
...
@@ -1448,15 +1446,24 @@ const handlePrinterChange = (value: string) => {
emit
(
'set-printer'
,
value
)
}
/** 已自动打印过的订单,避免 WS 回写清掉 printResult 后重复打印 */
const
autoPrintedIds
=
new
Set
<
number
>
()
const
print
=
(
data
:
OrderData
,
forcePrint
=
false
,
callback
?:
()
=>
void
)
=>
{
const
_boxIndex
=
boxIndex
.
value
const
orderId
=
data
.
id
if
(
!
forcePrint
&&
data
.
printResult
)
{
if
(
!
forcePrint
&&
(
data
.
printResult
||
(
orderId
!=
null
&&
autoPrintedIds
.
has
(
orderId
)))
)
{
callback
&&
callback
()
return
}
if
(
!
forcePrint
&&
orderId
!=
null
)
autoPrintedIds
.
add
(
orderId
)
props
.
printOrder
(
data
,
(
status
:
boolean
)
=>
{
if
(
!
status
&&
orderId
!=
null
)
autoPrintedIds
.
delete
(
orderId
)
callback
&&
callback
()
const
item
=
podBoxList
.
value
?.
find
((
item
)
=>
item
.
box
===
_boxIndex
)
if
(
item
&&
item
.
data
)
{
...
...
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