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
3bbd5f32
Commit
3bbd5f32
authored
Jun 11, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_product_scan' into 'dev'
Dev product scan See merge request
!211
parents
20b5f95f
086a2552
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
367 additions
and
29 deletions
+367
-29
components.d.ts
+0
-1
src/api/factoryOrderNew.ts
+15
-0
src/views/order/components/FastProduction.vue
+149
-20
src/views/order/factoryOrderNew/index.vue
+182
-6
src/views/order/podUs/PodMakeOrder.vue
+21
-2
No files found.
components.d.ts
View file @
3bbd5f32
...
@@ -54,7 +54,6 @@ declare module 'vue' {
...
@@ -54,7 +54,6 @@ 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 @
3bbd5f32
...
@@ -535,6 +535,14 @@ export function completeDeliveryApi(ids: (number | string)[]) {
...
@@ -535,6 +535,14 @@ export function completeDeliveryApi(ids: (number | string)[]) {
)
)
}
}
// 生产扫码
export
function
productionScanApi
(
id
:
number
|
string
,
status
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrderOperation/scan-produce'
,
{
params
:
{
id
,
status
}
},
)
}
export
function
applyForProductByIdApi
(
id
:
string
,
url
:
string
)
{
export
function
applyForProductByIdApi
(
id
:
string
,
url
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
[]
>>
(
url
,
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
[]
>>
(
url
,
{
params
:
{
podProductId
:
id
},
params
:
{
podProductId
:
id
},
...
@@ -550,6 +558,13 @@ export function getByOperationNoLogApi(operationNo: string) {
...
@@ -550,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 @
3bbd5f32
...
@@ -45,7 +45,11 @@
...
@@ -45,7 +45,11 @@
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<div
<div
v-if=
"['fastProduction', 'fastReceipt'].includes(fastKey)"
v-if=
"
['fastProduction', 'fastReceipt', 'productionScan'].includes(
fastKey,
)
"
class=
"input"
class=
"input"
>
>
<el-input
<el-input
...
@@ -70,10 +74,7 @@
...
@@ -70,10 +74,7 @@
{{
detail
?.
userMark
}}
{{
detail
?.
userMark
}}
</div>
</div>
</div>
</div>
<div
<div
:title=
"String(detail?.factoryOrderNumber)"
class=
"div-item"
>
:title=
"String(detail?.factoryOrderNumber)"
class=
"div-item"
>
<span
class=
"div-item-label"
style=
"font-size: 18px"
<span
class=
"div-item-label"
style=
"font-size: 18px"
>
订单号:
</span
>
订单号:
</span
>
>
...
@@ -145,8 +146,9 @@
...
@@ -145,8 +146,9 @@
>
>
<span
class=
"div-item-label"
>
挂起前状态:
</span>
<span
class=
"div-item-label"
>
挂起前状态:
</span>
<div
class=
"div-item-value"
>
<div
class=
"div-item-value"
>
<ElTag
v-if=
"detail.statusName"
type=
"primary"
>
{{
detail
.
statusName
||
''
}}
</ElTag
<ElTag
v-if=
"detail.statusName"
type=
"primary"
>
{{
>
detail
.
statusName
||
''
}}
</ElTag>
</div>
</div>
</div>
</div>
<div
<div
...
@@ -237,8 +239,11 @@
...
@@ -237,8 +239,11 @@
<div
class=
"btn"
>
<div
class=
"btn"
>
<div
<div
:style=
"
{
:style=
"
{
visibility:
visibility: [
fastKey === 'fastProduction' || fastKey === 'fastReceipt'
'fastProduction',
'fastReceipt',
'productionScan',
].includes(fastKey)
? 'visible'
? 'visible'
: 'hidden',
: 'hidden',
}"
}"
...
@@ -250,10 +255,19 @@
...
@@ -250,10 +255,19 @@
type=
"success"
type=
"success"
@
click=
"changeStatus"
@
click=
"changeStatus"
>
>
{{
fastKey
===
'fastProduction'
?
'生产完成'
:
'快捷入库'
}}
{{
[
'fastProduction'
,
'productionScan'
].
includes
(
fastKey
)
?
'生产完成'
:
'快捷入库'
}}
</el-button>
</el-button>
<div
class=
"check"
>
<div
class=
"check"
>
<el-checkbox
v-model=
"isAutoSure"
>
自动完成上一单
</el-checkbox>
<el-checkbox
v-if=
"fastKey !== 'productionScan'"
v-model=
"isAutoSure"
>
自动完成上一单
</el-checkbox>
</div>
</div>
</div>
</div>
<div
v-if=
"fastKey !== 'fastReceipt'"
class=
"btn-down"
>
<div
v-if=
"fastKey !== 'fastReceipt'"
class=
"btn-down"
>
...
@@ -311,6 +325,7 @@ import {
...
@@ -311,6 +325,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'
...
@@ -320,7 +335,7 @@ interface HistoryDataItem {
...
@@ -320,7 +335,7 @@ interface HistoryDataItem {
finished
:
boolean
finished
:
boolean
}
}
const
title
=
computed
(()
=>
{
const
title
=
computed
(()
=>
{
if
(
props
.
fastKey
===
'fastProduction'
)
{
if
(
[
'fastProduction'
,
'productionScan'
].
includes
(
props
.
fastKey
)
)
{
return
'快捷生产'
return
'快捷生产'
}
else
if
(
props
.
fastKey
===
'fastReceipt'
)
{
}
else
if
(
props
.
fastKey
===
'fastReceipt'
)
{
return
props
.
dialogTitle
return
props
.
dialogTitle
...
@@ -334,6 +349,7 @@ export type FastProductionDetail = PodOrderRes & {
...
@@ -334,6 +349,7 @@ export type FastProductionDetail = PodOrderRes & {
podOrderNo
?:
string
|
null
podOrderNo
?:
string
|
null
podOrderProductId
?:
number
|
null
podOrderProductId
?:
number
|
null
statusName
?:
string
|
null
statusName
?:
string
|
null
productMark
?:
string
|
null
}
}
const
trackingNumberRef
=
ref
()
const
trackingNumberRef
=
ref
()
const
historyData
=
ref
<
HistoryDataItem
[]
>
([])
const
historyData
=
ref
<
HistoryDataItem
[]
>
([])
...
@@ -384,6 +400,7 @@ const props = withDefaults(
...
@@ -384,6 +400,7 @@ const props = withDefaults(
completeApi
?:
(
completeApi
?:
(
ids
:
number
[],
ids
:
number
[],
detail
:
Record
<
string
,
unknown
>
,
detail
:
Record
<
string
,
unknown
>
,
trigger
?:
'manual'
|
'auto'
,
)
=>
Promise
<
unknown
>
)
=>
Promise
<
unknown
>
downloadApi
?:
(
downloadApi
?:
(
ids
:
number
[],
ids
:
number
[],
...
@@ -394,6 +411,10 @@ const props = withDefaults(
...
@@ -394,6 +411,10 @@ const props = withDefaults(
pendingOrderLabel
?:
string
pendingOrderLabel
?:
string
pleaseScanTip
?:
string
pleaseScanTip
?:
string
searchInputAudioTip
?:
string
searchInputAudioTip
?:
string
/** 是否限制扫码 */
isLimitScan
?:
boolean
/** 限制扫码的提示 */
limitScanMessage
?:
string
dialogTitle
?:
string
dialogTitle
?:
string
}
>
(),
}
>
(),
{
{
...
@@ -410,7 +431,8 @@ const props = withDefaults(
...
@@ -410,7 +431,8 @@ const props = withDefaults(
notFoundMessage
:
'生产单不存在'
,
notFoundMessage
:
'生产单不存在'
,
pendingOrderLabel
:
'生产单号'
,
pendingOrderLabel
:
'生产单号'
,
pleaseScanTip
:
'请扫码生产单号'
,
pleaseScanTip
:
'请扫码生产单号'
,
searchInputAudioTip
:
'请录入生产单号'
,
searchInputAudioTip
:
'请录入生产单号???'
,
isLimitScan
:
false
,
queryApi
:
(
orderNumber
:
string
)
=>
getSubOrderBySubOrderNumber
(
orderNumber
),
queryApi
:
(
orderNumber
:
string
)
=>
getSubOrderBySubOrderNumber
(
orderNumber
),
completeApi
:
(
ids
:
number
[],
detailData
:
Record
<
string
,
unknown
>
)
=>
completeApi
:
(
ids
:
number
[],
detailData
:
Record
<
string
,
unknown
>
)
=>
productionQueryApi
(
ids
[
0
],
Number
(
detailData
.
podJomallOrderCnId
||
-
1
)),
productionQueryApi
(
ids
[
0
],
Number
(
detailData
.
podJomallOrderCnId
||
-
1
)),
...
@@ -505,7 +527,9 @@ watch(
...
@@ -505,7 +527,9 @@ watch(
const
len
=
historyData
.
value
const
len
=
historyData
.
value
if
(
if
(
len
.
length
>
0
&&
len
.
length
>
0
&&
(
props
.
fastKey
===
'fastProduction'
||
props
.
fastKey
===
'fastReceipt'
)
[
'fastProduction'
,
'fastReceipt'
,
'productionScan'
].
includes
(
props
.
fastKey
,
)
)
{
)
{
confirmQuery
(
len
,
0
)
confirmQuery
(
len
,
0
)
}
}
...
@@ -537,7 +561,9 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => {
...
@@ -537,7 +561,9 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => {
const
el
=
len
[
i
]
const
el
=
len
[
i
]
showConfirm
(
showConfirm
(
`
${
props
.
pendingOrderLabel
}
${
el
.
orderNumber
}
${
`
${
props
.
pendingOrderLabel
}
${
el
.
orderNumber
}
${
props
.
fastKey
===
'fastProduction'
?
'未生产'
:
'未入库'
[
'fastProduction'
,
'productionScan'
].
includes
(
props
.
fastKey
)
?
'未生产'
:
'未入库'
}
完成,取消则不提醒?`
,
}
完成,取消则不提醒?`
,
{
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -549,7 +575,13 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => {
...
@@ -549,7 +575,13 @@ const confirmQuery = (len: HistoryDataItem[], i: number) => {
TrackingNumber
.
value
=
el
.
orderNumber
TrackingNumber
.
value
=
el
.
orderNumber
await
trackCodeInput
()
await
trackCodeInput
()
await
setData
(
el
.
orderNumber
)
await
setData
(
el
.
orderNumber
)
ElMessage
.
success
(
`
${
props
.
fastKey
===
'fastProduction'
?
'生产完成'
:
'入库完成'
}
`
)
ElMessage
.
success
(
`
${
[
'fastProduction'
,
'productionScan'
].
includes
(
props
.
fastKey
)
?
'生产完成'
:
'入库完成'
}
`
,
)
if
(
len
[
i
+
1
])
{
if
(
len
[
i
+
1
])
{
confirmQuery
(
len
,
i
+
1
)
confirmQuery
(
len
,
i
+
1
)
}
}
...
@@ -576,21 +608,32 @@ const changeStatus = async () => {
...
@@ -576,21 +608,32 @@ const changeStatus = async () => {
if
(
!
detail
.
value
||
Object
.
keys
(
detail
.
value
).
length
<=
1
)
{
if
(
!
detail
.
value
||
Object
.
keys
(
detail
.
value
).
length
<=
1
)
{
return
ElMessage
.
warning
(
props
.
pleaseScanTip
)
return
ElMessage
.
warning
(
props
.
pleaseScanTip
)
}
}
showConfirm
(
`确定
${
props
.
fastKey
===
'fastProduction'
?
'生产完成'
:
'入库完成'
}
?`
,
{
showConfirm
(
`确定
${
[
'fastProduction'
,
'productionScan'
].
includes
(
props
.
fastKey
)
?
'生产完成'
:
'入库完成'
}
?`
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
,
}).
then
(()
=>
{
},
).
then
(()
=>
{
setData
(
historyKeyFromDetail
(
detail
.
value
))
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
if
(
!
detail
.
value
||
detail
.
value
?.
id
===
-
1
)
return
try
{
try
{
const
id
=
detail
.
value
.
id
const
id
=
detail
.
value
.
id
const
res
=
(
await
props
.
completeApi
(
const
res
=
(
await
props
.
completeApi
(
[
id
],
[
id
],
detail
.
value
as
unknown
as
Record
<
string
,
unknown
>
,
detail
.
value
as
unknown
as
Record
<
string
,
unknown
>
,
trigger
,
))
as
unknown
as
BaseRespData
<
))
as
unknown
as
BaseRespData
<
{
{
factoryOrderNumber
?:
number
factoryOrderNumber
?:
number
...
@@ -614,16 +657,43 @@ const setData = async (orderNumber: string) => {
...
@@ -614,16 +657,43 @@ const setData = async (orderNumber: string) => {
}
}
emit
(
'onSuccess'
,
res
.
data
)
emit
(
'onSuccess'
,
res
.
data
)
playAudio
(
'weight_success'
)
playAudio
(
'weight_success'
)
if
(
trigger
===
'auto'
)
{
// new 快捷生产:扫码后直接将订单流转至生产中
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
}
else
{
detail
.
value
=
{
detail
.
value
=
{
id
:
-
1
,
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
as
cardImages
[],
imgList
:
[]
as
cardImages
[],
}
}
}
TrackingNumber
.
value
=
''
TrackingNumber
.
value
=
''
isDownloadImage
.
value
=
false
isDownloadImage
.
value
=
false
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
const
err
=
e
as
BaseRespData
<
{
inventory
:
number
producingQuantity
:
number
availableInventory
:
number
thirdSkuCode
?:
string
}
>
if
(
err
?.
code
===
301
)
{
await
ElMessageBox
.
alert
(
`
${
err
.
data
?.
thirdSkuCode
}
库存不足,无法进入生产!请联系仓库管理人员核对库存。
<
br
/>
库存数量:
$
{
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
'提示'
,
{
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
,
},
).
then
(()
=>
{
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
})
}
detail
.
value
=
{
detail
.
value
=
{
id
:
-
1
,
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
podJomallOrderCnId
:
-
1
,
...
@@ -725,9 +795,10 @@ const trackCodeInput = async () => {
...
@@ -725,9 +795,10 @@ const trackCodeInput = async () => {
const
orderNumber
=
TrackingNumber
.
value
const
orderNumber
=
TrackingNumber
.
value
if
(
isAutoSure
.
value
)
{
if
(
!
[
'productionScan'
].
includes
(
props
.
fastKey
)
&&
isAutoSure
.
value
)
{
await
setData
(
await
setData
(
historyData
.
value
[
historyData
.
value
.
length
-
1
].
orderNumber
||
''
,
historyData
.
value
[
historyData
.
value
.
length
-
1
].
orderNumber
||
''
,
'auto'
,
)
)
}
}
...
@@ -738,9 +809,67 @@ const trackCodeInput = async () => {
...
@@ -738,9 +809,67 @@ const trackCodeInput = async () => {
}
}
detail
.
value
=
normalizeDetail
(
res
.
data
)
detail
.
value
=
normalizeDetail
(
res
.
data
)
// 扫码后限制
if
(
props
.
isLimitScan
)
{
if
(
detail
.
value
.
productMark
&&
[
'custom_normal'
,
'normal'
].
includes
(
detail
.
value
.
productMark
)
)
{
detail
.
value
=
{
id
:
-
1
,
podJomallOrderCnId
:
-
1
,
imgList
:
[]
}
localStorage
.
setItem
(
props
.
historyStorageKey
,
JSON
.
stringify
([]))
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
TrackingNumber
.
value
=
''
return
showConfirm
(
props
.
limitScanMessage
||
''
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
}
}
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
thirdSkuCode
?:
string
}
>
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
(
`
${
err
.
data
?.
thirdSkuCode
}
库存不足,无法进入生产!请联系仓库管理人员核对库存。
<
br
/>
库存数量:
$
{
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
'提示'
,
{
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
,
},
)
return
}
throw
inventoryErr
}
await
setData
(
detail
.
value
.
id
.
toString
(),
'auto'
)
}
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 @
3bbd5f32
<
template
>
<
template
>
<div
class=
"page card h-100 flex-gap-10 overflow-hidden flex"
>
<div
class=
"page card h-100 flex-gap-10 overflow-hidden flex"
>
<div
class=
"order-status-wrapper"
:class=
"
{ 'is-collapsed': statusSidebarCollapsed }"
>
<div
class=
"order-status"
>
<div
class=
"order-status"
>
<ElTree
<ElTree
ref=
"treeRef"
ref=
"treeRef"
...
@@ -40,6 +44,17 @@
...
@@ -40,6 +44,17 @@
<
/template
>
<
/template
>
<
/ElTree
>
<
/ElTree
>
<
/div
>
<
/div
>
<
div
class
=
"sidebar-toggle"
title
=
"收起/展开"
@
click
=
"toggleStatusSidebar"
>
<
span
class
=
"sidebar-toggle-icon"
:
class
=
"{ 'is-collapsed': statusSidebarCollapsed
}
"
/>
<
/div
>
<
/div
>
<
div
class
=
"order-content flex-1 flex-column overflow-hidden"
>
<
div
class
=
"order-content flex-1 flex-column overflow-hidden"
>
<
div
v
-
if
=
"!isSpecialLayout"
class
=
"header"
>
<
div
v
-
if
=
"!isSpecialLayout"
class
=
"header"
>
<
div
class
=
"header-filter-form"
>
<
div
class
=
"header-filter-form"
>
...
@@ -551,6 +566,7 @@
...
@@ -551,6 +566,7 @@
>
拣胚完成
<
/ElButto
n
>
拣胚完成
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'PENDING_PICK'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'PENDING_PICK'"
class
=
"item"
>
<
ElButton
type
=
"danger"
@
click
=
"handlePickFail"
>
拣胚失败
<
/ElButton
>
<
ElButton
type
=
"danger"
@
click
=
"handlePickFail"
>
拣胚失败
<
/ElButton
>
<
/span
>
<
/span
>
...
@@ -566,7 +582,7 @@
...
@@ -566,7 +582,7 @@
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'PENDING_PACKING'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'PENDING_PACKING'"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleSeedingWall"
<
ElButton
type
=
"success"
@
click
=
"handleSeedingWall"
>
播种墙配货
<
/ElButto
n
>
配货打单
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'PENDING_PACKING'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'PENDING_PACKING'"
class
=
"item"
>
...
@@ -583,8 +599,8 @@
...
@@ -583,8 +599,8 @@
>
申请补胚
<
/ElButto
n
>
申请补胚
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"
status === 'IN_PRODUCTION'
"
class
=
"item"
>
<
span
v
-
if
=
"
['IN_PRODUCTION'].includes(status)
"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleQuickProduction"
<
ElButton
type
=
"success"
@
click
=
"handleQuickProduction
()
"
>
快捷生产
<
/ElButto
n
>
快捷生产
<
/ElButto
n
>
>
<
/span
>
<
/span
>
...
@@ -992,12 +1008,14 @@
...
@@ -992,12 +1008,14 @@
:
fast
-
key
=
"fastKey"
:
fast
-
key
=
"fastKey"
:
default
-
auto
-
sure
=
"true"
:
default
-
auto
-
sure
=
"true"
:
show
-
operation
-
no
-
row
=
"true"
:
show
-
operation
-
no
-
row
=
"true"
:
is
-
limit
-
scan
=
"isLimitScan"
limit
-
scan
-
message
=
"G和CB类的操作单无效操作"
not
-
found
-
message
=
"操作单不存在"
not
-
found
-
message
=
"操作单不存在"
pending
-
order
-
label
=
"操作单号"
pending
-
order
-
label
=
"操作单号"
please
-
scan
-
tip
=
"请扫码操作单号"
please
-
scan
-
tip
=
"请扫码操作单号"
search
-
input
-
audio
-
tip
=
"请录入操作单号"
search
-
input
-
audio
-
tip
=
"请录入操作单号"
history
-
storage
-
key
=
"historyFactoryOrderNewData"
history
-
storage
-
key
=
"historyFactoryOrderNewData"
tracking
-
placeholder
=
"扫描枪输入操作单号
,录入下一单本单自动生产完成,最后一单扫两次完成生产
"
tracking
-
placeholder
=
"扫描枪输入操作单号"
:
query
-
api
=
"getOperationByNo"
:
query
-
api
=
"getOperationByNo"
:
complete
-
api
=
"completeOperationById"
:
complete
-
api
=
"completeOperationById"
:
download
-
api
=
"downloadOperationById"
:
download
-
api
=
"downloadOperationById"
...
@@ -1177,6 +1195,7 @@ import {
...
@@ -1177,6 +1195,7 @@ import {
updateReceiverAddressApi
,
updateReceiverAddressApi
,
updateRemarkApi
,
updateRemarkApi
,
completeDeliveryApi
,
completeDeliveryApi
,
productionScanApi
,
getByOperationNoLogApi
,
getByOperationNoLogApi
,
listByNoPodOrderApi
,
listByNoPodOrderApi
,
orderWeighingPodOrderApi
,
orderWeighingPodOrderApi
,
...
@@ -1228,6 +1247,11 @@ import { ElTag } from 'element-plus'
...
@@ -1228,6 +1247,11 @@ import { ElTag } from 'element-plus'
const
resultInfo
=
ref
<
ResultInfoDataItem
[]
>
([])
const
resultInfo
=
ref
<
ResultInfoDataItem
[]
>
([])
const
resultRefs
=
ref
()
const
resultRefs
=
ref
()
const
statusSidebarCollapsed
=
ref
(
false
)
const
toggleStatusSidebar
=
()
=>
{
statusSidebarCollapsed
.
value
=
!
statusSidebarCollapsed
.
value
}
const
batchManageRef
=
ref
<
InstanceType
<
typeof
BatchManageTable
>>
()
const
batchManageRef
=
ref
<
InstanceType
<
typeof
BatchManageTable
>>
()
const
waitingRestockRef
=
ref
<
InstanceType
<
typeof
WaitingRestockTable
>>
()
const
waitingRestockRef
=
ref
<
InstanceType
<
typeof
WaitingRestockTable
>>
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
...
@@ -2857,10 +2881,25 @@ const handleReplenishFail = () => {
...
@@ -2857,10 +2881,25 @@ 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
[])
=>
completeDeliveryApi
(
ids
)
const
completeOperationById
=
(
ids
:
number
[],
detailData
?:
Record
<
string
,
unknown
>
,
trigger
:
'manual'
|
'auto'
=
'manual'
,
)
=>
{
if
(
trigger
===
'auto'
)
{
const
detailStatus
=
String
(
detailData
?.
status
??
''
)
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
[])
=>
{
if
(
fastKey
.
value
===
'productionScan'
)
{
ElMessage
.
success
(
'操作成功'
)
return
}
const
result
=
data
[
0
]
const
result
=
data
[
0
]
if
(
!
result
.
status
)
{
if
(
!
result
.
status
)
{
ElMessageBox
.
alert
(
ElMessageBox
.
alert
(
...
@@ -2871,6 +2910,8 @@ const handleFastProductionSuccess = (data: ResultInfoDataItem[]) => {
...
@@ -2871,6 +2910,8 @@ const handleFastProductionSuccess = (data: ResultInfoDataItem[]) => {
}
,
}
,
)
)
return
return
}
else
{
ElMessage
.
success
(
'操作成功'
)
}
}
}
}
const
createLogisticsSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
const
createLogisticsSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
...
@@ -2889,6 +2930,7 @@ const fastClose = () => {
...
@@ -2889,6 +2930,7 @@ const fastClose = () => {
refreshCurrentView
({
isRefreshTree
:
true
}
)
refreshCurrentView
({
isRefreshTree
:
true
}
)
}
}
const
handleViewDetail
=
async
(
item
:
operateOrderListData
)
=>
{
const
handleViewDetail
=
async
(
item
:
operateOrderListData
)
=>
{
isLimitScan
.
value
=
false
const
loading
=
ElLoading
.
service
({
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
fullscreen
:
true
,
text
:
'加载中...'
,
text
:
'加载中...'
,
...
@@ -2906,9 +2948,11 @@ const handleViewDetail = async (item: operateOrderListData) => {
...
@@ -2906,9 +2948,11 @@ const handleViewDetail = async (item: operateOrderListData) => {
loading
.
close
()
loading
.
close
()
}
}
}
}
const
isLimitScan
=
ref
(
false
)
const
handleQuickProduction
=
()
=>
{
const
handleQuickProduction
=
()
=>
{
detailVisible
.
value
=
true
detailVisible
.
value
=
true
fastKey
.
value
=
'fastProduction'
fastKey
.
value
=
'productionScan'
isLimitScan
.
value
=
true
detailData
.
value
=
{
}
detailData
.
value
=
{
}
}
}
const
handleSinglePrint
=
()
=>
{
const
handleSinglePrint
=
()
=>
{
...
@@ -3033,8 +3077,140 @@ onMounted(() => {
...
@@ -3033,8 +3077,140 @@ onMounted(() => {
flex
-
direction
:
column
;
flex
-
direction
:
column
;
gap
:
2
px
;
gap
:
2
px
;
}
}
.
order
-
status
-
wrapper
{
position
:
relative
;
flex
-
shrink
:
0
;
width
:
180
px
;
transition
:
width
0.3
s
ease
;
&
.
is
-
collapsed
{
width
:
0
;
.
order
-
status
{
opacity
:
0
;
visibility
:
hidden
;
}
}
}
.
sidebar
-
toggle
{
position
:
absolute
;
top
:
50
%
;
right
:
-
12
px
;
transform
:
translateY
(
-
50
%
);
z
-
index
:
10
;
width
:
12
px
;
height
:
48
px
;
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
background
:
#
fff
;
border
:
1
px
solid
#
dcdfe6
;
border
-
left
:
none
;
border
-
radius
:
0
4
px
4
px
0
;
cursor
:
pointer
;
box
-
shadow
:
1
px
0
4
px
rgba
(
0
,
0
,
0
,
0.06
);
user
-
select
:
none
;
&
:
hover
{
background
:
#
f5f7fa
;
.
sidebar
-
toggle
-
icon
{
border
-
right
-
color
:
#
409
eff
;
&
.
is
-
collapsed
{
border
-
right
-
color
:
transparent
;
border
-
left
-
color
:
#
409
eff
;
}
}
}
}
.
sidebar
-
toggle
-
icon
{
display
:
block
;
width
:
0
;
height
:
0
;
border
-
top
:
5
px
solid
transparent
;
border
-
bottom
:
5
px
solid
transparent
;
border
-
right
:
6
px
solid
#
909399
;
transition
:
border
-
color
0.2
s
;
&
.
is
-
collapsed
{
border
-
right
:
none
;
border
-
left
:
6
px
solid
#
909399
;
}
}
.
order
-
status
-
wrapper
{
position
:
relative
;
flex
-
shrink
:
0
;
width
:
180
px
;
transition
:
width
0.3
s
ease
;
&
.
is
-
collapsed
{
width
:
0
;
.
order
-
status
{
opacity
:
0
;
visibility
:
hidden
;
}
}
}
.
sidebar
-
toggle
{
position
:
absolute
;
top
:
50
%
;
right
:
-
12
px
;
transform
:
translateY
(
-
50
%
);
z
-
index
:
10
;
width
:
12
px
;
height
:
48
px
;
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
background
:
#
fff
;
border
:
1
px
solid
#
dcdfe6
;
border
-
left
:
none
;
border
-
radius
:
0
4
px
4
px
0
;
cursor
:
pointer
;
box
-
shadow
:
1
px
0
4
px
rgba
(
0
,
0
,
0
,
0.06
);
user
-
select
:
none
;
&
:
hover
{
background
:
#
f5f7fa
;
.
sidebar
-
toggle
-
icon
{
border
-
right
-
color
:
#
409
eff
;
&
.
is
-
collapsed
{
border
-
right
-
color
:
transparent
;
border
-
left
-
color
:
#
409
eff
;
}
}
}
}
.
sidebar
-
toggle
-
icon
{
display
:
block
;
width
:
0
;
height
:
0
;
border
-
top
:
5
px
solid
transparent
;
border
-
bottom
:
5
px
solid
transparent
;
border
-
right
:
6
px
solid
#
909399
;
transition
:
border
-
color
0.2
s
;
&
.
is
-
collapsed
{
border
-
right
:
none
;
border
-
left
:
6
px
solid
#
909399
;
}
}
.
order
-
status
{
.
order
-
status
{
width
:
180
px
;
width
:
180
px
;
height
:
100
%
;
overflow
:
auto
;
transition
:
opacity
0.3
s
ease
;
:
deep
(.
el
-
tree
-
node__content
)
{
:
deep
(.
el
-
tree
-
node__content
)
{
height
:
30
px
;
height
:
30
px
;
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
3bbd5f32
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
>
>
<template
#
header
>
<template
#
header
>
<div
class=
"title"
>
<div
class=
"title"
>
<span>
播种墙配货
</span>
<span>
{{
isNewOrder
?
'配货打单'
:
'播种墙配货'
}}
</span>
<span
v-if=
"socketConnect === 'online'"
class=
"online"
>
[在线]
</span>
<span
v-if=
"socketConnect === 'online'"
class=
"online"
>
[在线]
</span>
<span
v-else
class=
"offline"
>
[离线]
</span>
<span
v-else
class=
"offline"
>
[离线]
</span>
<ElButton
<ElButton
...
@@ -298,6 +298,7 @@ import socket from '@/utils/websocket'
...
@@ -298,6 +298,7 @@ import socket from '@/utils/websocket'
import
{
WarehouseListData
}
from
'@/types/index'
import
{
WarehouseListData
}
from
'@/types/index'
import
{
filePath
}
from
'@/api/axios.ts'
import
{
filePath
}
from
'@/api/axios.ts'
import
{
ElButton
,
ElIcon
,
ElTag
}
from
'element-plus'
import
{
ElButton
,
ElIcon
,
ElTag
}
from
'element-plus'
import
{
BaseRespData
}
from
'@/types/api'
const
{
getCLodop
}
=
useLodop
()
const
{
getCLodop
}
=
useLodop
()
...
@@ -803,6 +804,7 @@ const getPackingData = async (code: string) => {
...
@@ -803,6 +804,7 @@ const getPackingData = async (code: string) => {
}
}
}
}
const
res
=
await
getPackingDataApi
(
url
,
params
)
const
res
=
await
getPackingDataApi
(
url
,
params
)
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
ElMessage
.
warning
(
res
.
message
)
ElMessage
.
warning
(
res
.
message
)
isLock
.
value
=
false
isLock
.
value
=
false
...
@@ -839,7 +841,24 @@ const getPackingData = async (code: string) => {
...
@@ -839,7 +841,24 @@ const getPackingData = async (code: string) => {
// }
// }
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
const
err
=
error
as
BaseRespData
<
{
inventory
:
number
producingQuantity
:
number
availableInventory
:
number
thirdSkuCode
?:
string
}
>
if
(
props
.
isNewOrder
&&
err
?.
code
===
301
)
{
loading
.
close
()
await
ElMessageBox
.
alert
(
`
${
err
.
data
?.
thirdSkuCode
}
库存不足,无法进入生产!请联系仓库管理人员核对库存。
<
br
/>
库存数量:
$
{
err
.
data
?.
inventory
}
,生产中的数量:
$
{
err
.
data
?.
producingQuantity
}
,
<
span
style
=
"color: red"
>
可调配库存:
$
{
err
.
data
?.
availableInventory
}
<
/span>`
,
'提示'
,
{
type
:
'warning'
,
dangerouslyUseHTMLString
:
true
,
},
)
}
}
finally
{
}
finally
{
isLock
.
value
=
false
isLock
.
value
=
false
productionOrder
.
value
=
''
productionOrder
.
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