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
2e37c7e2
Commit
2e37c7e2
authored
Mar 26, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 拣胚完成功能开发
parent
5ac50c9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
258 deletions
+44
-258
src/api/factoryOrderNew.ts
+3
-6
src/types/api/factoryOrderNew.ts
+2
-3
src/views/order/factoryOrderNew/component/ApplyReplenishDialog.vue
+0
-234
src/views/order/factoryOrderNew/component/CardLayout.vue
+1
-1
src/views/order/factoryOrderNew/component/OperateDetailsDialog.vue
+0
-0
src/views/order/factoryOrderNew/component/PickCompleteDialog.vue
+21
-2
src/views/order/factoryOrderNew/index.vue
+17
-12
No files found.
src/api/factoryOrderNew.ts
View file @
2e37c7e2
...
@@ -4,6 +4,7 @@ import type {
...
@@ -4,6 +4,7 @@ import type {
BatchManageData
,
BatchManageData
,
FactoryOrderNewListData
,
FactoryOrderNewListData
,
LogListData
,
LogListData
,
operateOrderListData
,
PickCompleteData
,
PickCompleteData
,
PickFailData
,
PickFailData
,
ProductListData
,
ProductListData
,
...
@@ -206,7 +207,6 @@ export function pickCompleteByIdsDataApi(ids: (number | string)[]) {
...
@@ -206,7 +207,6 @@ export function pickCompleteByIdsDataApi(ids: (number | string)[]) {
>
(
'factory/podOrderOperation/getPickingSituation'
,
ids
)
>
(
'factory/podOrderOperation/getPickingSituation'
,
ids
)
}
}
export
function
pickCompleteApi
(
ids
:
(
number
|
string
)[])
{
export
function
pickCompleteApi
(
ids
:
(
number
|
string
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
'factory/podOrderOperation/pickingComplete'
,
'factory/podOrderOperation/pickingComplete'
,
...
@@ -375,9 +375,6 @@ export function updateRemarkApi(id: number | string, remark: string) {
...
@@ -375,9 +375,6 @@ export function updateRemarkApi(id: number | string, remark: string) {
)
)
}
}
export
function
applyForReplenishByIdApi
(
id
:
number
|
string
)
{
export
function
applyForReplenishByIdApi
(
ids
:
(
number
|
string
)[],
url
:
string
)
{
return
axios
.
post
<
never
,
BaseRespData
<
unknown
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
operateOrderListData
[]
>>
(
url
,
ids
)
'factory/podOrder/applyForReplenish'
,
{
id
},
)
}
}
src/types/api/factoryOrderNew.ts
View file @
2e37c7e2
...
@@ -93,9 +93,8 @@ export interface ProductListData {
...
@@ -93,9 +93,8 @@ export interface ProductListData {
baseSku
?:
string
baseSku
?:
string
variantSku
?:
string
variantSku
?:
string
variantImage
?:
string
variantImage
?:
string
// 后端字段名兼容(部分接口返回 snake_case)
variant_image
?:
string
variant_image
?:
string
productMark
?:
'custom_part'
productMark
?:
string
diyId
?:
string
diyId
?:
string
templateType
?:
number
templateType
?:
number
customTemplateItemId
?:
number
customTemplateItemId
?:
number
...
@@ -219,7 +218,7 @@ export interface PickCompleteData {
...
@@ -219,7 +218,7 @@ export interface PickCompleteData {
occupyInventory
?:
number
occupyInventory
?:
number
pickingStatus
?:
string
pickingStatus
?:
string
availableOrderIds
?:
number
[]
availableOrderIds
?:
number
[]
allOrderIds
?
:
number
[]
allOrderIds
:
number
[]
}
}
export
interface
PickFailData
{
export
interface
PickFailData
{
...
...
src/views/order/factoryOrderNew/component/ApplyReplenishDialog.vue
deleted
100644 → 0
View file @
5ac50c9e
<
template
>
<ElDialog
v-model=
"visible"
title=
"申请补胚"
width=
"900px"
:close-on-click-modal=
"false"
>
<div
class=
"replenish-tip"
>
请选择具体的操作单,申请补胚
</div>
<div
v-loading=
"loading"
class=
"replenish-card-grid"
>
<div
v-for=
"item in cardList"
:key=
"item.id"
class=
"replenish-card-item"
@
click=
"toggleSelect(item)"
>
<CommonCard
:card-item=
"item"
:active=
"isSelected(item)"
:show-sku=
"false"
:show-product-info=
"false"
:image-field=
"'variantImage'"
>
<template
#
bottom_left
>
<span
v-if=
"item.factorySubOrderNumber"
class=
"operation-number"
:title=
"`操作单号:$
{item.factorySubOrderNumber}`"
>
{{
item
.
factorySubOrderNumber
}}
</span>
</
template
>
<
template
#
info
>
<div
class=
"card-info-grid"
>
<div
class=
"card-info-row full"
>
<span
class=
"info-value ellipsis"
:title=
"(item.productName as string) || ''"
>
{{
item
.
productName
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
工艺:
</span>
<span
class=
"info-value"
>
{{
item
.
craftName
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
店铺单号:
</span>
<span
class=
"info-value"
>
{{
item
.
shopNumber
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
客户号:
</span>
<span
class=
"info-value"
>
{{
item
.
userMark
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
变体SKU
</span>
<span
class=
"info-value ellipsis"
:title=
"(item.variantSku as string) || ''"
>
{{
item
.
variantSku
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
库存SKU
</span>
<span
class=
"info-value ellipsis"
:title=
"(item.thirdSkuCode as string) || ''"
>
{{
item
.
thirdSkuCode
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
款号:
</span>
<span
class=
"info-value"
>
{{
item
.
supplierProductNo
}}
</span>
</div>
<div
v-if=
"item.batchArrangeNumber"
class=
"card-info-row"
>
<span
class=
"info-label"
>
批次号:
</span>
<span
class=
"info-value"
>
{{
item
.
batchArrangeNumber
}}
</span>
</div>
<div
class=
"card-info-row"
>
<span
class=
"info-label"
>
状态:
</span>
<span
class=
"info-value"
>
{{
item
.
statusName
}}
</span>
</div>
</div>
</
template
>
</CommonCard>
</div>
<div
v-if=
"!loading && cardList.length === 0"
class=
"replenish-empty"
>
暂无数据
</div>
</div>
<
template
#
footer
>
<div
style=
"text-align: center"
>
<ElButton
@
click=
"visible = false"
>
取消
</ElButton>
<ElButton
type=
"primary"
:loading=
"submitting"
@
click=
"handleConfirm"
>
确定
</ElButton>
</div>
</
template
>
</ElDialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
CommonCard
from
'@/components/CommonCard.vue'
import
{
applyForReplenishByIdApi
}
from
'@/api/factoryOrderNew'
interface
CardItem
{
id
:
number
|
string
[
key
:
string
]:
unknown
}
const
emit
=
defineEmits
<
{
success
:
[]
}
>
()
const
visible
=
ref
(
false
)
const
loading
=
ref
(
false
)
const
submitting
=
ref
(
false
)
const
cardList
=
ref
<
CardItem
[]
>
([])
const
selectedItems
=
ref
<
CardItem
[]
>
([])
const
productId
=
ref
<
number
|
string
>
()
const
isSelected
=
(
item
:
CardItem
)
=>
selectedItems
.
value
.
some
((
s
)
=>
s
.
id
===
item
.
id
)
const
toggleSelect
=
(
item
:
CardItem
)
=>
{
const
idx
=
selectedItems
.
value
.
findIndex
((
s
)
=>
s
.
id
===
item
.
id
)
if
(
idx
>=
0
)
{
selectedItems
.
value
.
splice
(
idx
,
1
)
}
else
{
selectedItems
.
value
.
push
(
item
)
}
}
const
open
=
async
(
id
:
number
|
string
)
=>
{
productId
.
value
=
id
selectedItems
.
value
=
[]
cardList
.
value
=
[]
visible
.
value
=
true
loading
.
value
=
true
try
{
const
res
=
await
applyForReplenishByIdApi
(
id
)
cardList
.
value
=
Array
.
isArray
(
res
.
data
)
?
res
.
data
:
[]
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
loading
.
value
=
false
}
}
const
handleConfirm
=
async
()
=>
{
if
(
!
selectedItems
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请选择操作单'
)
}
submitting
.
value
=
true
try
{
await
applyForReplenishByIdApi
(
productId
.
value
!
)
ElMessage
.
success
(
'申请补胚成功'
)
visible
.
value
=
false
emit
(
'success'
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
submitting
.
value
=
false
}
}
defineExpose
({
open
})
</
script
>
<
style
scoped
lang=
"scss"
>
.replenish-tip
{
font-size
:
14px
;
color
:
#606266
;
margin-bottom
:
12px
;
}
.replenish-card-grid
{
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1
fr
);
gap
:
12px
;
max-height
:
500px
;
overflow-y
:
auto
;
min-height
:
200px
;
}
.replenish-card-item
{
cursor
:
pointer
;
}
.replenish-empty
{
grid-column
:
1
/
-1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#909399
;
font-size
:
14px
;
min-height
:
200px
;
}
.operation-number
{
font-size
:
12px
;
color
:
#409eff
;
}
.card-info-grid
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
gap
:
4px
;
font-size
:
12px
;
margin-top
:
6px
;
.full
{
grid-column
:
1
/
-1
;
}
}
.card-info-row
{
display
:
flex
;
overflow
:
hidden
;
}
.info-label
{
flex-shrink
:
0
;
color
:
#909399
;
}
.info-value
{
flex
:
1
;
min-width
:
0
;
&.ellipsis
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
</
style
>
src/views/order/factoryOrderNew/component/CardLayout.vue
View file @
2e37c7e2
...
@@ -364,7 +364,7 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
...
@@ -364,7 +364,7 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
.card-info-grid
{
.card-info-grid
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
)
;
grid-template-columns
:
1
fr
150px
;
gap
:
4px
;
gap
:
4px
;
font-size
:
12px
;
font-size
:
12px
;
margin-top
:
6px
;
margin-top
:
6px
;
...
...
src/views/order/factoryOrderNew/component/OperateDetailsDialog.vue
0 → 100644
View file @
2e37c7e2
This diff is collapsed.
Click to expand it.
src/views/order/factoryOrderNew/component/PickCompleteDialog.vue
View file @
2e37c7e2
...
@@ -49,7 +49,12 @@
...
@@ -49,7 +49,12 @@
✕ 无法拣胚
✕ 无法拣胚
</span>
</span>
<span
v-else-if=
"row.pickingStatus === 'partial'"
class=
"item"
>
<span
v-else-if=
"row.pickingStatus === 'partial'"
class=
"item"
>
<ElButton
type=
"warning"
size=
"small"
>
调整拣胚顺序
</ElButton>
<ElButton
type=
"warning"
size=
"small"
@
click=
"handleAdjustPickOrder(row)"
>
调整拣胚顺序
</ElButton
>
</span>
</span>
<span
<span
v-else-if=
"row.pickingStatus === 'success'"
v-else-if=
"row.pickingStatus === 'success'"
...
@@ -73,6 +78,12 @@
...
@@ -73,6 +78,12 @@
</div>
</div>
</
template
>
</
template
>
</ElDialog>
</ElDialog>
<OperateDetailsDialog
ref=
"operateDetailsDialogRef"
title=
"调整拣胚顺序"
:pickable=
"true"
@
adjust-pick-order-success=
"open"
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -85,6 +96,7 @@ import {
...
@@ -85,6 +96,7 @@ import {
import
type
{
PickCompleteData
}
from
'@/types/api/factoryOrderNew'
import
type
{
PickCompleteData
}
from
'@/types/api/factoryOrderNew'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
import
Icon
from
'@/components/Icon.vue'
import
Icon
from
'@/components/Icon.vue'
import
OperateDetailsDialog
from
'./OperateDetailsDialog.vue'
interface
PickData
{
interface
PickData
{
overallMessage
?:
string
overallMessage
?:
string
pickingSituationList
?:
PickCompleteData
[]
pickingSituationList
?:
PickCompleteData
[]
...
@@ -201,10 +213,17 @@ const handleClose = () => {
...
@@ -201,10 +213,17 @@ const handleClose = () => {
const
handleCreateInbound
=
()
=>
{
const
handleCreateInbound
=
()
=>
{
ElMessage
.
info
(
'创建入库单功能待实现'
)
ElMessage
.
info
(
'创建入库单功能待实现'
)
}
}
const
operateDetailsDialogRef
=
ref
()
const
handleSelectionChange
=
(
selection
:
PickCompleteData
[])
=>
{
const
handleSelectionChange
=
(
selection
:
PickCompleteData
[])
=>
{
selections
.
value
=
selection
selections
.
value
=
selection
}
}
const
handleAdjustPickOrder
=
async
(
row
:
PickCompleteData
)
=>
{
operateDetailsDialogRef
.
value
?.
open
({
row
,
ids
:
row
.
allOrderIds
as
(
number
|
string
)[],
url
:
'factory/podOrderOperation/listByIds'
,
})
}
const
handleSubmit
=
async
()
=>
{
const
handleSubmit
=
async
()
=>
{
const
loading
=
ElLoading
.
service
({
const
loading
=
ElLoading
.
service
({
...
...
src/views/order/factoryOrderNew/index.vue
View file @
2e37c7e2
...
@@ -823,8 +823,9 @@
...
@@ -823,8 +823,9 @@
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
/>
/>
<
ApplyReplenishDialog
<
OperateDetailsDialog
ref
=
"applyReplenishDialogRef"
ref
=
"operateDetailsDialogRef"
title
=
"申请补胚"
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
/>
/>
...
@@ -920,7 +921,7 @@ import CardLayout from './component/CardLayout.vue'
...
@@ -920,7 +921,7 @@ import CardLayout from './component/CardLayout.vue'
import
BatchManageTable
from
'./component/BatchManageTable.vue'
import
BatchManageTable
from
'./component/BatchManageTable.vue'
import
WaitingRestockTable
from
'./component/WaitingRestockTable.vue'
import
WaitingRestockTable
from
'./component/WaitingRestockTable.vue'
import
ArrangeDialog
from
'./component/ArrangeDialog.vue'
import
ArrangeDialog
from
'./component/ArrangeDialog.vue'
import
ApplyReplenishDialog
from
'./component/ApplyReplenish
Dialog.vue'
import
OperateDetailsDialog
from
'./component/OperateDetails
Dialog.vue'
import
CreateLogisticDialog
from
'@/views/order/podCN/components/CreateLogisticDialog.vue'
import
CreateLogisticDialog
from
'@/views/order/podCN/components/CreateLogisticDialog.vue'
import
UpdateCustomDeclarationInfoDialog
from
'@/views/order/podCN/components/UpdateCustomDeclarationInfoDialog.vue'
import
UpdateCustomDeclarationInfoDialog
from
'@/views/order/podCN/components/UpdateCustomDeclarationInfoDialog.vue'
...
@@ -1485,11 +1486,11 @@ const cancelOrderDialogRef = ref<InstanceType<typeof CancelOrderDialog>>()
...
@@ -1485,11 +1486,11 @@ const cancelOrderDialogRef = ref<InstanceType<typeof CancelOrderDialog>>()
const
suspendDialogRef
=
ref
<
InstanceType
<
typeof
SuspendDialog
>>
()
const
suspendDialogRef
=
ref
<
InstanceType
<
typeof
SuspendDialog
>>
()
const
pickCompleteDialogRef
=
ref
<
InstanceType
<
typeof
PickCompleteDialog
>>
()
const
pickCompleteDialogRef
=
ref
<
InstanceType
<
typeof
PickCompleteDialog
>>
()
const
pickFailDialogRef
=
ref
<
InstanceType
<
typeof
PickFailDialog
>>
()
const
pickFailDialogRef
=
ref
<
InstanceType
<
typeof
PickFailDialog
>>
()
const
operateDetailsDialogRef
=
ref
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
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
arrangeDialogRef
=
ref
<
InstanceType
<
typeof
ArrangeDialog
>>
()
const
arrangeDialogRef
=
ref
<
InstanceType
<
typeof
ArrangeDialog
>>
()
const
applyReplenishDialogRef
=
ref
<
InstanceType
<
typeof
ApplyReplenishDialog
>>
()
const
createLogisticDialogRef
=
ref
()
const
createLogisticDialogRef
=
ref
()
const
updateCustomsDialogVisible
=
ref
(
false
)
const
updateCustomsDialogVisible
=
ref
(
false
)
const
weightDialogRef
=
ref
()
const
weightDialogRef
=
ref
()
...
@@ -1596,7 +1597,7 @@ const getOrderDetailsById = async (tabName?: 'product' | 'log') => {
...
@@ -1596,7 +1597,7 @@ const getOrderDetailsById = async (tabName?: 'product' | 'log') => {
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
finally
{
}
finally
{
subLoading
.
value
=
false
subLoading
.
value
=
false
}
}
}
}
...
@@ -1647,7 +1648,7 @@ const handleEditRemark = async (row: ProductListData) => {
...
@@ -1647,7 +1648,7 @@ const handleEditRemark = async (row: ProductListData) => {
}
}
const
handleSubApplyReplenish
=
(
row
:
ProductListData
)
=>
{
const
handleSubApplyReplenish
=
(
row
:
ProductListData
)
=>
{
applyReplenishDialogRef
.
value
?.
open
(
row
.
id
)
operateDetailsDialogRef
.
value
?.
open
({
ids
:
[
row
.
id
],
url
:
''
}
)
}
}
const
handleConfirmOrder
=
()
=>
{
const
handleConfirmOrder
=
()
=>
{
...
@@ -1934,15 +1935,16 @@ const downloadPDF = (url: string) => {
...
@@ -1934,15 +1935,16 @@ const downloadPDF = (url: string) => {
}
}
const
handleDownloadMaterial
=
async
()
=>
{
const
handleDownloadMaterial
=
async
()
=>
{
if
(
!
ensureSelection
())
return
if
(
!
ensureSelection
())
return
const
usePodOrderDownloadStatuses
=
[
const
usePodOrderDownloadStatuses
=
[
'PENDING_DELIVERY'
,
'SUSPEND'
]
'PENDING_DELIVERY'
,
'SUSPEND'
,
]
const
usePodOrderDownload
=
usePodOrderDownloadStatuses
.
includes
(
status
.
value
)
const
usePodOrderDownload
=
usePodOrderDownloadStatuses
.
includes
(
status
.
value
)
const
ids
=
usePodOrderDownload
const
ids
=
usePodOrderDownload
?
selectedRows
.
value
.
map
((
row
)
=>
row
.
id
)
?
selectedRows
.
value
.
map
((
row
)
=>
row
.
id
)
:
cardSelectList
.
value
.
map
((
row
)
=>
row
.
podOrderProductId
)
:
cardSelectList
.
value
.
map
((
row
)
=>
row
.
podOrderProductId
)
console
.
log
(
usePodOrderDownload
,
ids
,
cardSelectList
.
value
.
map
((
row
)
=>
row
.
podOrderProductId
))
console
.
log
(
usePodOrderDownload
,
ids
,
cardSelectList
.
value
.
map
((
row
)
=>
row
.
podOrderProductId
),
)
const
loading
=
ElLoading
.
service
({
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
fullscreen
:
true
,
text
:
'操作中...'
,
text
:
'操作中...'
,
...
@@ -2193,7 +2195,10 @@ const getPendingReceiveCounts = async () => {
...
@@ -2193,7 +2195,10 @@ const getPendingReceiveCounts = async () => {
getListPageAcceptedSubStatus
(),
getListPageAcceptedSubStatus
(),
)
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
pendingAcceptCounts
.
value
=
res
.
data
||
{
pendingCount
:
0
,
acceptedOutOfStockCount
:
0
}
pendingAcceptCounts
.
value
=
res
.
data
||
{
pendingCount
:
0
,
acceptedOutOfStockCount
:
0
,
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
}
...
...
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