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
1ca4d66a
Commit
1ca4d66a
authored
Jun 09, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 工厂订单new 快捷生产修改 #1008656
parent
fb972b49
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
15 deletions
+65
-15
components.d.ts
+1
-0
src/api/factoryOrderNew.ts
+7
-0
src/views/order/components/FastProduction.vue
+40
-0
src/views/order/factoryOrderNew/index.vue
+17
-15
No files found.
components.d.ts
View file @
1ca4d66a
...
@@ -54,6 +54,7 @@ declare module 'vue' {
...
@@ -54,6 +54,7 @@ declare module 'vue' {
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTimeline
:
typeof
import
(
'element-plus/es'
)[
'ElTimeline'
]
ElTimeline
:
typeof
import
(
'element-plus/es'
)[
'ElTimeline'
]
ElTimelineItem
:
typeof
import
(
'element-plus/es'
)[
'ElTimelineItem'
]
ElTimelineItem
:
typeof
import
(
'element-plus/es'
)[
'ElTimelineItem'
]
ElTimePicker
:
typeof
import
(
'element-plus/es'
)[
'ElTimePicker'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElTreeSelect
:
typeof
import
(
'element-plus/es'
)[
'ElTreeSelect'
]
ElTreeSelect
:
typeof
import
(
'element-plus/es'
)[
'ElTreeSelect'
]
...
...
src/api/factoryOrderNew.ts
View file @
1ca4d66a
...
@@ -558,6 +558,13 @@ export function getByOperationNoLogApi(operationNo: string) {
...
@@ -558,6 +558,13 @@ export function getByOperationNoLogApi(operationNo: string) {
)
)
}
}
// 校验库存
export
function
checkInventoryApi
(
id
:
number
|
string
,
status
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrderOperation/check-inventory'
,
{
params
:
{
id
,
status
}
},
)
}
export
function
listByNoPodOrderApi
(
params
:
{
export
function
listByNoPodOrderApi
(
params
:
{
type
:
string
type
:
string
no
:
string
no
:
string
...
...
src/views/order/components/FastProduction.vue
View file @
1ca4d66a
...
@@ -320,6 +320,7 @@ import {
...
@@ -320,6 +320,7 @@ import {
downloadMaterialApi
,
downloadMaterialApi
,
}
from
'@/api/podCnOrder'
}
from
'@/api/podCnOrder'
import
{
cardImages
,
PodOrderRes
}
from
'@/types/api/podCnOrder'
import
{
cardImages
,
PodOrderRes
}
from
'@/types/api/podCnOrder'
import
{
checkInventoryApi
}
from
'@/api/factoryOrderNew'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
filePath
}
from
'@/api/axios'
import
{
filePath
}
from
'@/api/axios'
import
{
computed
,
ref
,
watch
}
from
'vue'
import
{
computed
,
ref
,
watch
}
from
'vue'
...
@@ -779,6 +780,7 @@ const trackCodeInput = async () => {
...
@@ -779,6 +780,7 @@ const trackCodeInput = async () => {
}
}
detail
.
value
=
normalizeDetail
(
res
.
data
)
detail
.
value
=
normalizeDetail
(
res
.
data
)
// 扫码后限制
if
(
props
.
isLimitScan
)
{
if
(
props
.
isLimitScan
)
{
if
(
if
(
detail
.
value
.
productMark
&&
detail
.
value
.
productMark
&&
...
@@ -786,6 +788,9 @@ const trackCodeInput = async () => {
...
@@ -786,6 +788,9 @@ const trackCodeInput = async () => {
)
{
)
{
detail
.
value
=
{
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
}
detail
.
value
=
{
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
}
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
TrackingNumber
.
value
=
''
return
showConfirm
(
props
.
limitScanMessage
||
''
,
{
return
showConfirm
(
props
.
limitScanMessage
||
''
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
...
@@ -797,6 +802,41 @@ const trackCodeInput = async () => {
...
@@ -797,6 +802,41 @@ const trackCodeInput = async () => {
if
(
isDownloadImage
.
value
)
{
if
(
isDownloadImage
.
value
)
{
download
()
download
()
}
}
// 工厂订单new 校验库存
if
(
props
.
fastKey
===
'productionScan'
)
{
try
{
await
checkInventoryApi
(
detail
.
value
.
id
,
String
(
detail
.
value
.
status
??
''
),
)
}
catch
(
inventoryErr
)
{
const
err
=
inventoryErr
as
BaseRespData
<
{
inventory
:
number
producingQuantity
:
number
availableInventory
:
number
}
>
if
(
err
?.
code
===
301
)
{
historyData
.
value
=
[]
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
detail
.
value
=
emptyDetail
()
playAudio
(
'weight_search_error'
,
props
.
searchInputAudioTip
)
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
TrackingNumber
.
value
=
''
await
ElMessageBox
.
alert
(
`库存不足,无法进入生产!请联系仓库管理人员核对库存。<br/>库存数量:
${
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
'提示'
,
{
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
,
},
)
return
}
throw
inventoryErr
}
}
playAudio
(
'weight_search_success'
)
playAudio
(
'weight_search_success'
)
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
...
...
src/views/order/factoryOrderNew/index.vue
View file @
1ca4d66a
...
@@ -579,14 +579,7 @@
...
@@ -579,14 +579,7 @@
>
申请补胚
<
/ElButto
n
>
申请补胚
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
<
span
v
-
if
=
"['IN_PRODUCTION'].includes(status)"
class
=
"item"
>
v
-
if
=
"
['PENDING_PICK', 'PENDING_REPLENISH', 'IN_PRODUCTION'].includes(
status,
)
"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleQuickProduction()"
<
ElButton
type
=
"success"
@
click
=
"handleQuickProduction()"
>
快捷生产
<
/ElButto
n
>
快捷生产
<
/ElButto
n
>
>
...
@@ -2847,10 +2840,21 @@ const handleReplenishFail = () => {
...
@@ -2847,10 +2840,21 @@ const handleReplenishFail = () => {
}
}
const
getOperationByNo
=
(
operationNo
:
string
)
=>
const
getOperationByNo
=
(
operationNo
:
string
)
=>
getByOperationNoLogApi
(
operationNo
)
as
Promise
<
{
data
?:
unknown
}
>
getByOperationNoLogApi
(
operationNo
)
as
Promise
<
{
data
?:
unknown
}
>
const
completeOperationById
=
(
ids
:
number
[])
=>
const
completeOperationById
=
(
fastKey
.
value
===
'productionScan'
ids
:
number
[],
?
productionScanApi
(
ids
[
0
],
status
.
value
)
detailData
?:
Record
<
string
,
unknown
>
,
:
completeDeliveryApi
(
ids
)
)
=>
{
const
detailStatus
=
String
(
detailData
?.
status
??
''
)
// 快捷生产 生产扫码
if
(
fastKey
.
value
===
'productionScan'
&&
(
detailStatus
===
'PENDING_PICK'
||
detailStatus
===
'PENDING_REPLENISH'
)
)
{
return
productionScanApi
(
ids
[
0
],
detailStatus
)
}
return
completeDeliveryApi
(
ids
)
}
const
downloadOperationById
=
(
ids
:
number
[])
=>
const
downloadOperationById
=
(
ids
:
number
[])
=>
downloadOperationMaterialApi
(
ids
)
downloadOperationMaterialApi
(
ids
)
const
handleFastProductionSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
const
handleFastProductionSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
...
@@ -2909,9 +2913,7 @@ const handleViewDetail = async (item: operateOrderListData) => {
...
@@ -2909,9 +2913,7 @@ const handleViewDetail = async (item: operateOrderListData) => {
const
isLimitScan
=
ref
(
false
)
const
isLimitScan
=
ref
(
false
)
const
handleQuickProduction
=
()
=>
{
const
handleQuickProduction
=
()
=>
{
detailVisible
.
value
=
true
detailVisible
.
value
=
true
fastKey
.
value
=
[
'PENDING_PICK'
,
'PENDING_REPLENISH'
].
includes
(
status
.
value
)
fastKey
.
value
=
'productionScan'
?
'productionScan'
:
'fastProduction'
isLimitScan
.
value
=
true
isLimitScan
.
value
=
true
detailData
.
value
=
{
}
detailData
.
value
=
{
}
}
}
...
...
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