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
2dedec14
Commit
2dedec14
authored
Apr 01, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 商品申请补胚功能
parent
3a03af12
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
27 deletions
+50
-27
src/api/factoryOrderNew.ts
+6
-0
src/views/order/factoryOrderNew/component/OperateDetailsDialog.vue
+13
-21
src/views/order/factoryOrderNew/index.vue
+31
-6
No files found.
src/api/factoryOrderNew.ts
View file @
2dedec14
...
@@ -399,6 +399,12 @@ export function completeDeliveryApi(ids: (number | string)[]) {
...
@@ -399,6 +399,12 @@ export function completeDeliveryApi(ids: (number | string)[]) {
)
)
}
}
export
function
applyForProductByIdApi
(
id
:
string
,
url
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
[]
>>
(
url
,
{
params
:
{
podProductId
:
id
},
})
}
export
function
getByOperationNoLogApi
(
operationNo
:
string
)
{
export
function
getByOperationNoLogApi
(
operationNo
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
>>
(
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
>>
(
'factory/podOrderOperation/getByOperationNoLog'
,
'factory/podOrderOperation/getByOperationNoLog'
,
...
...
src/views/order/factoryOrderNew/component/OperateDetailsDialog.vue
View file @
2dedec14
...
@@ -128,16 +128,6 @@
...
@@ -128,16 +128,6 @@
>
>
{{
item
.
customizedQuantity
===
1
?
'单'
:
'多'
}}
{{
item
.
customizedQuantity
===
1
?
'单'
:
'多'
}}
</div>
</div>
<Icon
name=
"caozuorizhi"
style=
"width: 28px; height: 28px"
>
<template
#
title
>
<title>
操作日志
</title>
</
template
>
</Icon>
<Icon
name=
"chakanxiangqing"
>
<
template
#
title
>
<title>
查看详情
</title>
</
template
>
</Icon>
</div>
</div>
</
template
>
</
template
>
<
template
#
info
>
<
template
#
info
>
...
@@ -216,7 +206,7 @@
...
@@ -216,7 +206,7 @@
</div>
</div>
<div
class=
"card-info-row"
style=
"color: red"
>
<div
class=
"card-info-row"
style=
"color: red"
>
<span
class=
"info-label"
>
状态:
</span>
<span
class=
"info-label"
>
状态:
</span>
<span
class=
"info-value"
>
{{
item
.
statusName
}}
</span>
<span
class=
"info-value
ellipsis
"
>
{{
item
.
statusName
}}
</span>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -230,12 +220,7 @@
...
@@ -230,12 +220,7 @@
<
template
#
footer
>
<
template
#
footer
>
<div
style=
"text-align: center"
>
<div
style=
"text-align: center"
>
<ElButton
@
click=
"visible = false"
>
取消
</ElButton>
<ElButton
@
click=
"visible = false"
>
取消
</ElButton>
<ElButton
<ElButton
type=
"primary"
:loading=
"submitting"
@
click=
"handleConfirm"
>
v-if=
"pickable"
type=
"primary"
:loading=
"submitting"
@
click=
"handleConfirm"
>
确定
确定
</ElButton>
</ElButton>
</div>
</div>
...
@@ -247,7 +232,10 @@
...
@@ -247,7 +232,10 @@
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
CommonCard
from
'@/components/CommonCard.vue'
import
CommonCard
from
'@/components/CommonCard.vue'
import
{
applyForReplenishByIdApi
}
from
'@/api/factoryOrderNew'
import
{
applyForProductByIdApi
,
applyForReplenishByIdApi
,
}
from
'@/api/factoryOrderNew'
import
platformJson
from
'../../../../json/platform.json'
import
platformJson
from
'../../../../json/platform.json'
import
type
{
import
type
{
operateOrderListData
,
operateOrderListData
,
...
@@ -255,7 +243,7 @@ import type {
...
@@ -255,7 +243,7 @@ import type {
}
from
'@/types/api/factoryOrderNew'
}
from
'@/types/api/factoryOrderNew'
const
emit
=
defineEmits
([
'adjustPickOrderSuccess'
])
const
emit
=
defineEmits
([
'adjustPickOrderSuccess'
])
defineProps
<
{
const
props
=
defineProps
<
{
title
:
string
title
:
string
pickable
?:
boolean
pickable
?:
boolean
}
>
()
}
>
()
...
@@ -297,7 +285,9 @@ const open = async ({
...
@@ -297,7 +285,9 @@ const open = async ({
cardList
.
value
=
[]
cardList
.
value
=
[]
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
const
res
=
await
applyForReplenishByIdApi
(
ids
,
url
)
const
res
=
props
.
pickable
?
await
applyForReplenishByIdApi
(
ids
,
url
)
:
await
applyForProductByIdApi
(
ids
[
0
]
as
string
,
url
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
cardList
.
value
=
Array
.
isArray
(
res
.
data
)
?
res
.
data
:
[]
cardList
.
value
=
Array
.
isArray
(
res
.
data
)
?
res
.
data
:
[]
if
(
row
.
availableOrderIds
?.
length
)
{
if
(
row
.
availableOrderIds
?.
length
)
{
...
@@ -328,6 +318,7 @@ const handleConfirm = async () => {
...
@@ -328,6 +318,7 @@ const handleConfirm = async () => {
if
(
!
selectedItems
.
value
.
length
)
{
if
(
!
selectedItems
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请选择操作单'
)
return
ElMessage
.
warning
(
'请选择操作单'
)
}
}
if
(
props
.
pickable
)
{
if
(
if
(
selectedItems
.
value
.
length
>
selectedItems
.
value
.
length
>
(
selectedRow
.
value
?.
availableOrderIds
?.
length
??
0
)
(
selectedRow
.
value
?.
availableOrderIds
?.
length
??
0
)
...
@@ -347,6 +338,7 @@ const handleConfirm = async () => {
...
@@ -347,6 +338,7 @@ const handleConfirm = async () => {
},
},
)
)
}
}
}
emit
(
emit
(
'adjustPickOrderSuccess'
,
'adjustPickOrderSuccess'
,
null
,
null
,
...
@@ -398,7 +390,7 @@ defineExpose({ open })
...
@@ -398,7 +390,7 @@ defineExpose({ open })
.card-info-grid
{
.card-info-grid
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
1
fr
8
0px
;
grid-template-columns
:
1
fr
9
0px
;
gap
:
4px
;
gap
:
4px
;
font-size
:
12px
;
font-size
:
12px
;
margin-top
:
6px
;
margin-top
:
6px
;
...
...
src/views/order/factoryOrderNew/index.vue
View file @
2dedec14
...
@@ -848,7 +848,7 @@
...
@@ -848,7 +848,7 @@
<
OperateDetailsDialog
<
OperateDetailsDialog
ref
=
"operateDetailsDialogRef"
ref
=
"operateDetailsDialogRef"
title
=
"申请补胚"
title
=
"申请补胚"
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)
"
@
adjust
-
pick
-
order
-
success
=
"adjustPickOrderSuccess
"
/>
/>
<
PodMakeOrder
<
PodMakeOrder
...
@@ -1344,12 +1344,15 @@ const productColumns = computed(() => {
...
@@ -1344,12 +1344,15 @@ const productColumns = computed(() => {
key
:
'operation'
,
key
:
'operation'
,
prop
:
'operation'
,
prop
:
'operation'
,
label
:
'操作'
,
label
:
'操作'
,
width
:
120
,
width
:
160
,
fixed
:
'center'
,
align
:
'center'
,
render
:
({
row
}
:
{
row
:
ProductListData
}
)
=>
{
fixed
:
'right'
,
render
:
(
row
:
ProductListData
)
=>
{
return
(
return
(
<
div
>
<
span
class
=
"item"
>
<
el
-
button
<
el
-
button
type
=
"warning
"
type
=
"primary
"
link
link
size
=
"small"
size
=
"small"
onClick
=
{(
e
:
Event
)
=>
{
onClick
=
{(
e
:
Event
)
=>
{
...
@@ -1359,6 +1362,14 @@ const productColumns = computed(() => {
...
@@ -1359,6 +1362,14 @@ const productColumns = computed(() => {
>
>
申请补胚
申请补胚
<
/el-button
>
<
/el-button
>
<
/span
>
<
span
class
=
"item"
>
<
el
-
button
type
=
"primary"
link
size
=
"small"
>
下载素材
<
/el-button
>
<
/span
>
<
/div
>
)
)
}
,
}
,
}
,
}
,
...
@@ -1408,7 +1419,11 @@ const handleEditRemark = async (row: ProductListData) => {
...
@@ -1408,7 +1419,11 @@ const handleEditRemark = async (row: ProductListData) => {
}
}
const
handleSubApplyReplenish
=
(
row
:
ProductListData
)
=>
{
const
handleSubApplyReplenish
=
(
row
:
ProductListData
)
=>
{
operateDetailsDialogRef
.
value
?.
open
({
ids
:
[
row
.
id
],
url
:
''
}
)
operateDetailsDialogRef
.
value
?.
open
({
row
,
ids
:
[
row
.
id
],
url
:
'factory/podOrderOperation/getListByPodProductId'
,
}
)
}
}
const
handleConfirmOrder
=
()
=>
{
const
handleConfirmOrder
=
()
=>
{
...
@@ -1700,6 +1715,16 @@ const handleApplyReplenish = async () => {
...
@@ -1700,6 +1715,16 @@ const handleApplyReplenish = async () => {
refreshTree
:
true
,
refreshTree
:
true
,
}
)
}
)
}
}
const
adjustPickOrderSuccess
=
async
(
_
:
unknown
,
selectionOperationIds
:
number
[])
=>
{
try
{
const
res
=
await
applyReplenishApi
(
selectionOperationIds
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'申请补胚成功'
)
refreshCurrentView
({
isRefreshTree
:
true
}
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
handleProductionComplete
=
async
()
=>
{
const
handleProductionComplete
=
async
()
=>
{
await
executeBatchAction
({
await
executeBatchAction
({
getIds
:
getSelectedIds
,
getIds
:
getSelectedIds
,
...
...
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