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
2deff02a
Commit
2deff02a
authored
Jun 10, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改工厂订单new 快捷生产 生产完成逻辑
parent
1ca4d66a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
16 deletions
+33
-16
src/views/order/components/FastProduction.vue
+29
-9
src/views/order/factoryOrderNew/index.vue
+4
-7
No files found.
src/views/order/components/FastProduction.vue
View file @
2deff02a
...
...
@@ -262,7 +262,12 @@
}}
</el-button>
<div
class=
"check"
>
<el-checkbox
v-model=
"isAutoSure"
>
自动完成上一单
</el-checkbox>
<el-checkbox
v-if=
"fastKey !== 'productionScan'"
v-model=
"isAutoSure"
>
自动完成上一单
</el-checkbox>
</div>
</div>
<div
v-if=
"fastKey !== 'fastReceipt'"
class=
"btn-down"
>
...
...
@@ -395,6 +400,7 @@ const props = withDefaults(
completeApi
?:
(
ids
:
number
[],
detail
:
Record
<
string
,
unknown
>
,
trigger
?:
'manual'
|
'auto'
,
)
=>
Promise
<
unknown
>
downloadApi
?:
(
ids
:
number
[],
...
...
@@ -608,13 +614,17 @@ const changeStatus = async () => {
setData
(
historyKeyFromDetail
(
detail
.
value
))
})
}
const
setData
=
async
(
orderNumber
:
string
)
=>
{
const
setData
=
async
(
orderNumber
:
string
,
trigger
:
'manual'
|
'auto'
=
'manual'
,
)
=>
{
if
(
!
detail
.
value
||
detail
.
value
?.
id
===
-
1
)
return
try
{
const
id
=
detail
.
value
.
id
const
res
=
(
await
props
.
completeApi
(
[
id
],
detail
.
value
as
unknown
as
Record
<
string
,
unknown
>
,
trigger
,
))
as
unknown
as
BaseRespData
<
{
factoryOrderNumber
?:
number
...
...
@@ -638,10 +648,16 @@ const setData = async (orderNumber: string) => {
}
emit
(
'onSuccess'
,
res
.
data
)
playAudio
(
'weight_success'
)
detail
.
value
=
{
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
as
cardImages
[],
if
(
trigger
===
'auto'
)
{
// new 快捷生产:扫码后直接将订单流转至生产中
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
}
else
{
detail
.
value
=
{
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
as
cardImages
[],
}
}
TrackingNumber
.
value
=
''
isDownloadImage
.
value
=
false
...
...
@@ -655,7 +671,9 @@ const setData = async (orderNumber: string) => {
}
>
if
(
err
?.
code
===
301
)
{
await
ElMessageBox
.
alert
(
`库存不足,无法进入生产!请联系仓库管理人员核对库存。<br/>库存数量:
${
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
`库存不足,无法进入生产!请联系仓库管理人员核对库存。<br/>
库存数量:
${
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
'提示'
,
{
type
:
'warning'
,
...
...
@@ -767,9 +785,10 @@ const trackCodeInput = async () => {
const
orderNumber
=
TrackingNumber
.
value
if
(
isAutoSure
.
value
)
{
if
(
!
[
'productionScan'
].
includes
(
props
.
fastKey
)
&&
isAutoSure
.
value
)
{
await
setData
(
historyData
.
value
[
historyData
.
value
.
length
-
1
].
orderNumber
||
''
,
'auto'
,
)
}
...
...
@@ -803,7 +822,7 @@ const trackCodeInput = async () => {
download
()
}
// 工厂订单new 校验库存
// 工厂订单new 校验库存
生产扫码
if
(
props
.
fastKey
===
'productionScan'
)
{
try
{
await
checkInventoryApi
(
...
...
@@ -836,6 +855,7 @@ const trackCodeInput = async () => {
}
throw
inventoryErr
}
await
setData
(
detail
.
value
.
id
.
toString
(),
'auto'
)
}
playAudio
(
'weight_search_success'
)
...
...
src/views/order/factoryOrderNew/index.vue
View file @
2deff02a
...
...
@@ -974,7 +974,7 @@
please
-
scan
-
tip
=
"请扫码操作单号"
search
-
input
-
audio
-
tip
=
"请录入操作单号"
history
-
storage
-
key
=
"historyFactoryOrderNewData"
tracking
-
placeholder
=
"扫描枪输入操作单号
,录入下一单本单自动生产完成,最后一单扫两次完成生产
"
tracking
-
placeholder
=
"扫描枪输入操作单号"
:
query
-
api
=
"getOperationByNo"
:
complete
-
api
=
"completeOperationById"
:
download
-
api
=
"downloadOperationById"
...
...
@@ -2843,13 +2843,10 @@ const getOperationByNo = (operationNo: string) =>
const
completeOperationById
=
(
ids
:
number
[],
detailData
?:
Record
<
string
,
unknown
>
,
trigger
:
'manual'
|
'auto'
=
'manual'
,
)
=>
{
const
detailStatus
=
String
(
detailData
?.
status
??
''
)
// 快捷生产 生产扫码
if
(
fastKey
.
value
===
'productionScan'
&&
(
detailStatus
===
'PENDING_PICK'
||
detailStatus
===
'PENDING_REPLENISH'
)
)
{
if
(
trigger
===
'auto'
)
{
const
detailStatus
=
String
(
detailData
?.
status
??
''
)
return
productionScanApi
(
ids
[
0
],
detailStatus
)
}
return
completeDeliveryApi
(
ids
)
...
...
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