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
d9156ae7
Commit
d9156ae7
authored
Jun 03, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 工厂订单取消后挂起功能接口联调
parent
93c4ac4e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
31 deletions
+88
-31
components.d.ts
+1
-0
src/api/cancelOrderProcess.ts
+26
-3
src/types/api/cancelOrderProcess.ts
+4
-0
src/views/order/cancelOrderProcess/index.vue
+57
-28
No files found.
components.d.ts
View file @
d9156ae7
...
@@ -57,6 +57,7 @@ declare module 'vue' {
...
@@ -57,6 +57,7 @@ declare module 'vue' {
ElTimePicker
:
typeof
import
(
'element-plus/es'
)[
'ElTimePicker'
]
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'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
...
...
src/api/cancelOrderProcess.ts
View file @
d9156ae7
import
axios
from
'./axios'
import
axios
from
'./axios'
import
type
{
BasePaginationData
}
from
'@/types/api'
import
type
{
BasePaginationData
,
BaseRespData
}
from
'@/types/api'
import
type
{
CancelOrderProcessStateGroupMap
}
from
'@/types/api/cancelOrderProcess'
import
type
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
type
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
function
normalizePodOrderQueryPayload
(
function
normalizePodOrderQueryPayload
(
...
@@ -17,14 +18,36 @@ function normalizePodOrderQueryPayload(
...
@@ -17,14 +18,36 @@ function normalizePodOrderQueryPayload(
}
}
}
}
export
function
getCancelOrderProcessStateGroupMapApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
CancelOrderProcessStateGroupMap
>>
(
'factory/podOrderOperationForReclaim/findStateGroupMap'
,
)
}
export
function
getCancelOrderProcessListApi
(
export
function
getCancelOrderProcessListApi
(
data
:
Record
<
string
,
unknown
>
,
data
:
Record
<
string
,
unknown
>
,
currentPage
:
number
,
currentPage
:
number
,
pageSize
:
number
,
pageSize
:
number
,
alreadyInStock
:
boolean
,
)
{
)
{
const
body
=
normalizePodOrderQueryPayload
({
...
data
})
const
body
=
normalizePodOrderQueryPayload
({
...
data
})
return
axios
.
post
<
never
,
BasePaginationData
<
operateOrderListData
>>
(
return
axios
.
post
<
never
,
BasePaginationData
<
operateOrderListData
>>
(
'factory/podOrderOperation/list_page'
,
'factory/podOrderOperationForReclaim/list_page'
,
{
...
body
,
status
:
'PENDING_SCHEDULE'
,
currentPage
,
pageSize
},
{
...
body
,
currentPage
,
pageSize
,
alreadyInStock
},
)
}
export
function
getOperationInfoByNoApi
(
operationNo
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
>>
(
`factory/podOrderOperationForReclaim/getByOperationNo?operationNo=
${
operationNo
}
`
,
)
}
export
function
completeDeliveryByCancelOrderProcessApi
(
data
:
{
operationNo
:
string
inboundType
:
number
warehouseId
:
number
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrderOperationForReclaim/storeAfterScan'
,
data
,
)
)
}
}
src/types/api/cancelOrderProcess.ts
0 → 100644
View file @
d9156ae7
export
interface
CancelOrderProcessStateGroupMap
{
alreadyInStock
:
number
NotInStock
:
number
}
src/views/order/cancelOrderProcess/index.vue
View file @
d9156ae7
...
@@ -3,19 +3,19 @@
...
@@ -3,19 +3,19 @@
<div
class=
"order-status"
>
<div
class=
"order-status"
>
<div
<div
class=
"order-status-item"
class=
"order-status-item"
:class=
"
{ 'order-status-item-active': currentStatus === 'processed' }"
:class=
"
{ 'order-status-item-active': currentStatus === '
un
processed' }"
@click="handleOrderStatusClick('processed')"
@click="handleOrderStatusClick('
un
processed')"
>
>
<span>
已
处理
</span>
<span>
待
处理
</span>
<span>
(
{{
orderStatus
.
processed
}}
)
</span>
<span>
(
{{
orderStatus
.
NotInStock
}}
)
</span>
</div>
</div>
<div
<div
class=
"order-status-item"
class=
"order-status-item"
:class=
"
{ 'order-status-item-active': currentStatus === '
un
processed' }"
:class=
"
{ 'order-status-item-active': currentStatus === 'processed' }"
@click="handleOrderStatusClick('
un
processed')"
@click="handleOrderStatusClick('processed')"
>
>
<span>
未
处理
</span>
<span>
已
处理
</span>
<span>
(
{{
orderStatus
.
unprocessed
}}
)
</span>
<span>
(
{{
orderStatus
.
alreadyInStock
}}
)
</span>
</div>
</div>
</div>
</div>
<div
class=
"order-content flex-1 flex-column overflow-hidden"
>
<div
class=
"order-content flex-1 flex-column overflow-hidden"
>
...
@@ -303,12 +303,12 @@
...
@@ -303,12 +303,12 @@
</div>
</div>
</div>
</div>
<div
class=
"operation-list"
>
<div
class=
"operation-list"
>
<span
v-if=
"currentStatus === 'processed'"
class=
"item"
>
<span
v-if=
"currentStatus === '
un
processed'"
class=
"item"
>
<ElButton
type=
"primary"
@
click=
"handleEmbryoInStock"
<ElButton
type=
"primary"
@
click=
"handleEmbryoInStock"
>
胚衣入库
</ElButton
>
胚衣入库
</ElButton
>
>
</span>
</span>
<span
v-if=
"currentStatus === 'processed'"
class=
"item"
>
<span
v-if=
"currentStatus === '
un
processed'"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"handleProductionCompleteInStock"
<ElButton
type=
"success"
@
click=
"handleProductionCompleteInStock"
>
生产完成入库
</ElButton
>
生产完成入库
</ElButton
>
>
...
@@ -379,12 +379,13 @@ import CardLayout from '../factoryOrderNew/component/CardLayout.vue'
...
@@ -379,12 +379,13 @@ import CardLayout from '../factoryOrderNew/component/CardLayout.vue'
import
platformJson
from
'../../../json/platform.json'
import
platformJson
from
'../../../json/platform.json'
import
{
useOrderDictionaries
}
from
'../factoryOrderNew/hooks/useOrderDictionaries'
import
{
useOrderDictionaries
}
from
'../factoryOrderNew/hooks/useOrderDictionaries'
import
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
{
getFactoryOrderNewOperateDetailApi
}
from
'@/api/factoryOrderNew'
import
{
import
{
completeDelivery
Api
,
getCancelOrderProcessList
Api
,
get
ByOperationNoLog
Api
,
get
CancelOrderProcessStateGroupMap
Api
,
get
FactoryOrderNewOperateDetail
Api
,
get
OperationInfoByNo
Api
,
}
from
'@/api/factoryOrderNew'
completeDeliveryByCancelOrderProcessApi
,
import
{
getCancelOrderProcessListApi
}
from
'@/api/cancelOrderProcess'
}
from
'@/api/cancelOrderProcess'
import
type
{
CardLayoutListFetcher
}
from
'@/types/api/factoryOrderNew'
import
type
{
CardLayoutListFetcher
}
from
'@/types/api/factoryOrderNew'
import
LogisticsWaySelect
from
'@/views/logistics/components/LogisticsWaySelect'
import
LogisticsWaySelect
from
'@/views/logistics/components/LogisticsWaySelect'
import
{
SearchForm
}
from
'@/types/api/order/factoryOrderNew'
import
{
SearchForm
}
from
'@/types/api/order/factoryOrderNew'
...
@@ -410,11 +411,17 @@ import {
...
@@ -410,11 +411,17 @@ import {
warehouseInfo
,
warehouseInfo
,
warehouseInfoGetAll
,
warehouseInfoGetAll
,
}
from
'@/api/warehouse'
}
from
'@/api/warehouse'
import
type
{
CancelOrderProcessStateGroupMap
}
from
'@/types/api/cancelOrderProcess'
const
cardLayoutRef
=
ref
()
const
cardLayoutRef
=
ref
()
const
fetchCardList
:
CardLayoutListFetcher
=
async
(
payload
,
current
,
size
)
=>
{
const
fetchCardList
:
CardLayoutListFetcher
=
async
(
payload
,
current
,
size
)
=>
{
const
res
=
await
getCancelOrderProcessListApi
(
payload
,
current
,
size
)
const
res
=
await
getCancelOrderProcessListApi
(
payload
,
current
,
size
,
currentStatus
.
value
===
'processed'
,
)
return
res
.
data
return
res
.
data
}
}
...
@@ -480,8 +487,21 @@ const reset = () => {
...
@@ -480,8 +487,21 @@ const reset = () => {
search
()
search
()
})
})
}
}
const
loadOrderStatusCounts
=
async
()
=>
{
try
{
const
res
=
await
getCancelOrderProcessStateGroupMapApi
()
if
(
res
.
code
!==
200
)
return
orderStatus
.
value
=
{
alreadyInStock
:
res
.
data
.
alreadyInStock
??
0
,
NotInStock
:
res
.
data
.
NotInStock
??
0
,
}
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
search
=
()
=>
{
const
search
=
()
=>
{
cardLayoutRef
.
value
?.
clearSelection
()
cardLayoutRef
.
value
?.
clearSelection
()
nextTick
(()
=>
{
nextTick
(()
=>
{
cardLayoutRef
.
value
?.
refresh
()
cardLayoutRef
.
value
?.
refresh
()
})
})
...
@@ -512,8 +532,14 @@ const handleViewDetail = async (item: operateOrderListData) => {
...
@@ -512,8 +532,14 @@ const handleViewDetail = async (item: operateOrderListData) => {
}
}
}
}
const
getOperationByNo
=
(
operationNo
:
string
)
=>
const
getOperationByNo
=
(
operationNo
:
string
)
=>
getByOperationNoLogApi
(
operationNo
)
as
Promise
<
{
data
?:
unknown
}
>
getOperationInfoByNoApi
(
operationNo
)
as
Promise
<
{
data
?:
unknown
}
>
const
completeOperationById
=
(
ids
:
number
[])
=>
completeDeliveryApi
(
ids
)
const
fastInboundType
=
ref
(
0
)
const
completeOperationById
=
(
_
:
number
[],
detail
:
Record
<
string
,
unknown
>
)
=>
completeDeliveryByCancelOrderProcessApi
({
operationNo
:
detail
.
operationNo
as
string
,
warehouseId
:
detail
.
warehouseId
as
number
,
inboundType
:
fastInboundType
.
value
,
})
const
handleFastProductionSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
const
handleFastProductionSuccess
=
(
data
:
ResultInfoDataItem
[])
=>
{
const
result
=
data
[
0
]
const
result
=
data
[
0
]
if
(
!
result
.
status
)
{
if
(
!
result
.
status
)
{
...
@@ -540,14 +566,11 @@ const {
...
@@ -540,14 +566,11 @@ const {
productTypeGroups
,
productTypeGroups
,
loadAllDictionaries
,
loadAllDictionaries
,
}
=
useOrderDictionaries
()
}
=
useOrderDictionaries
()
const
orderStatus
=
ref
<
{
const
orderStatus
=
ref
<
CancelOrderProcessStateGroupMap
>
({
processed
:
number
alreadyInStock
:
0
,
unprocessed
:
number
NotInStock
:
0
,
}
>
({
processed
:
0
,
unprocessed
:
0
,
})
})
const
currentStatus
=
ref
<
'processed'
|
'unprocessed'
>
(
'processed'
)
const
currentStatus
=
ref
<
'processed'
|
'unprocessed'
>
(
'
un
processed'
)
const
handleOrderStatusClick
=
(
status
:
'processed'
|
'unprocessed'
)
=>
{
const
handleOrderStatusClick
=
(
status
:
'processed'
|
'unprocessed'
)
=>
{
currentStatus
.
value
=
status
currentStatus
.
value
=
status
search
()
search
()
...
@@ -615,10 +638,11 @@ const handleEmbryoInStock = async () => {
...
@@ -615,10 +638,11 @@ const handleEmbryoInStock = async () => {
if
(
cardSelectList
.
value
.
length
!==
0
)
{
if
(
cardSelectList
.
value
.
length
!==
0
)
{
handleEmbryoInStockByCard
()
handleEmbryoInStockByCard
()
}
else
{
}
else
{
handleEmbryoInFastStock
()
handleEmbryoInFastStock
(
0
)
}
}
}
}
const
handleEmbryoInFastStock
=
async
()
=>
{
const
handleEmbryoInFastStock
=
(
inboundType
:
number
)
=>
{
fastInboundType
.
value
=
inboundType
fastKey
.
value
=
'fastReceipt'
fastKey
.
value
=
'fastReceipt'
detailVisible
.
value
=
true
detailVisible
.
value
=
true
detailData
.
value
=
{}
detailData
.
value
=
{}
...
@@ -771,14 +795,19 @@ const handleReceiptSave = async () => {
...
@@ -771,14 +795,19 @@ const handleReceiptSave = async () => {
const
handleProductionCompleteInStock
=
()
=>
{
const
handleProductionCompleteInStock
=
()
=>
{
// 客户定制的单子不能操作生产完成入库,提示:客户定制商品,不能入库!
// 客户定制的单子不能操作生产完成入库,提示:客户定制商品,不能入库!
if
(
cardSelectList
.
value
.
length
!==
0
)
{
if
(
cardSelectList
.
value
.
length
!==
0
)
{
if
(
cardSelectList
.
value
.
some
((
r
)
=>
r
.
inboundType
===
2
))
{
ElMessage
.
error
(
'客户定制商品,不能入库!'
)
return
}
handleEmbryoInStockByCard
()
handleEmbryoInStockByCard
()
}
else
{
}
else
{
handleEmbryoInFastStock
()
handleEmbryoInFastStock
(
1
)
}
}
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
void
loadAllDictionaries
()
void
loadAllDictionaries
()
void
loadOrderStatusCounts
()
search
()
search
()
})
})
</
script
>
</
script
>
...
...
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