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
20d0eefb
Commit
20d0eefb
authored
Jun 06, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 升成完成入库接口联调
parent
b9e42c95
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
25 deletions
+71
-25
src/api/cancelOrderProcess.ts
+5
-5
src/api/warehouse.ts
+1
-1
src/types/api/warehouse.ts
+2
-0
src/views/order/cancelOrderProcess/index.vue
+63
-19
No files found.
src/api/cancelOrderProcess.ts
View file @
20d0eefb
...
...
@@ -21,7 +21,7 @@ function normalizePodOrderQueryPayload(
export
function
getCancelOrderProcessStateGroupMapApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
CancelOrderProcessStateGroupMap
>>
(
'factory/podOrderOperationForReclaim/find
StateGroupM
ap'
,
'factory/podOrderOperationForReclaim/find
-state-group-m
ap'
,
)
}
...
...
@@ -33,13 +33,13 @@ export function getCancelOrderProcessListApi(
)
{
const
body
=
normalizePodOrderQueryPayload
({
...
data
})
return
axios
.
post
<
never
,
BasePaginationData
<
operateOrderListData
>>
(
'factory/podOrderOperationForReclaim/list
_
page'
,
'factory/podOrderOperationForReclaim/list
-
page'
,
{
...
body
,
currentPage
,
pageSize
,
alreadyInStock
},
)
}
export
function
getOperationInfoByNoApi
(
operationNo
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
operateOrderListData
>>
(
`factory/podOrderOperationForReclaim/get
ByOperationN
o?operationNo=
${
operationNo
}
`
,
`factory/podOrderOperationForReclaim/get
-by-operation-n
o?operationNo=
${
operationNo
}
`
,
)
}
export
function
completeDeliveryByCancelOrderProcessApi
(
data
:
{
...
...
@@ -48,14 +48,14 @@ export function completeDeliveryByCancelOrderProcessApi(data: {
warehouseId
:
number
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrderOperationForReclaim/store
AfterS
can'
,
'factory/podOrderOperationForReclaim/store
-after-s
can'
,
data
,
)
}
export
function
getBySkuAndUserMarkAndInboundTypeApi
(
operationNo
:
string
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
InterskuList
[]
>>
(
'factory/podOrderOperationForReclaim/get
ProductByOperationN
o'
,
'factory/podOrderOperationForReclaim/get
-product-by-operation-n
o'
,
operationNo
,
)
}
src/api/warehouse.ts
View file @
20d0eefb
...
...
@@ -394,7 +394,7 @@ export function rejectInRecordApi({
)
}
export
function
addInRecordApi
(
form
:
InterWarehouseDetail
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
unknown
>>
(
'factory/warehouseInRecord/add'
,
{
...
form
,
...
...
src/types/api/warehouse.ts
View file @
20d0eefb
...
...
@@ -123,6 +123,8 @@ export interface InterskuList {
remark
?:
string
|
null
currencyName
?:
string
|
null
currencyCode
?:
string
|
null
buyStored
?:
number
|
null
totalPrice
?:
number
|
null
}
export
interface
ILocation
{
id
?:
number
...
...
src/views/order/cancelOrderProcess/index.vue
View file @
20d0eefb
...
...
@@ -385,7 +385,7 @@ import {
getCancelOrderProcessStateGroupMapApi
,
getOperationInfoByNoApi
,
completeDeliveryByCancelOrderProcessApi
,
getBySkuAndUserMarkAndInboundTypeApi
getBySkuAndUserMarkAndInboundTypeApi
,
}
from
'@/api/cancelOrderProcess'
import
type
{
CardLayoutListFetcher
}
from
'@/types/api/factoryOrderNew'
import
LogisticsWaySelect
from
'@/views/logistics/components/LogisticsWaySelect'
...
...
@@ -413,6 +413,7 @@ import {
warehouseInfoGetAll
,
}
from
'@/api/warehouse'
import
type
{
CancelOrderProcessStateGroupMap
}
from
'@/types/api/cancelOrderProcess'
import
BigNumber
from
'bignumber.js'
const
cardLayoutRef
=
ref
()
...
...
@@ -616,7 +617,10 @@ const { skuData, setCostPrice, filterSkuData } = useReceiptProductDialog({
selectSku
:
receiptSelectSku
,
userMarkList
:
receiptUserMarkList
,
})
function
mapInterskuToProduct
(
val
:
InterskuList
):
InterProductList
{
function
mapInterskuToProduct
(
val
:
InterskuList
,
type
:
'completeProduction'
|
'embryoInStock'
,
):
InterProductList
{
const
warehouseSku
=
val
.
warehouseSku
||
val
.
sku
||
''
const
skuNameVal
=
val
.
skuName
||
val
.
productName
||
''
let
customerId
:
number
|
null
=
null
...
...
@@ -624,6 +628,16 @@ function mapInterskuToProduct(val: InterskuList): InterProductList {
const
n
=
Number
(
val
.
customerId
)
if
(
!
Number
.
isNaN
(
n
))
customerId
=
n
}
if
(
type
===
'embryoInStock'
)
{
const
operationList
=
cardSelectList
.
value
.
filter
(
(
r
)
=>
r
.
thirdSkuCode
===
val
.
warehouseSku
,
)
val
.
buyStored
=
operationList
?
operationList
.
length
:
0
}
const
amount
=
new
BigNumber
(
val
.
buyStored
??
0
)
.
multipliedBy
(
val
.
costPrice
??
0
)
.
toFixed
(
2
)
val
.
totalPrice
=
Number
(
amount
)
as
number
return
{
skuImage
:
val
.
skuImage
||
val
.
image
||
''
,
warehouseSku
,
...
...
@@ -632,8 +646,8 @@ function mapInterskuToProduct(val: InterskuList): InterProductList {
locationCode
:
val
.
locationCode
??
''
,
locationId
:
val
.
locationId
??
null
,
costPrice
:
val
.
costPrice
??
null
,
buyStored
:
null
,
totalPrice
:
null
,
buyStored
:
val
.
buyStored
??
null
,
totalPrice
:
val
.
totalPrice
??
null
,
currencyName
:
val
.
currencyName
??
null
,
currencyCode
:
val
.
currencyCode
??
null
,
customerId
,
...
...
@@ -657,8 +671,19 @@ const handleEmbryoInFastStock = (inboundType: number) => {
const
handleEmbryoInStockByCard
=
async
(
type
:
'completeProduction'
|
'embryoInStock'
,
)
=>
{
const
firstWid
=
cardSelectList
.
value
[
0
].
warehouseId
if
(
cardSelectList
.
value
.
some
((
r
)
=>
r
.
warehouseId
!==
firstWid
))
{
let
operationList
if
(
type
===
'completeProduction'
)
{
operationList
=
cardSelectList
.
value
.
filter
((
r
)
=>
r
.
inboundType
!==
2
)
if
(
operationList
.
length
===
0
)
{
ElMessage
.
error
(
'客户定制商品,不能入库!'
)
return
}
}
else
{
operationList
=
cardSelectList
.
value
}
fastInboundType
.
value
=
type
===
'completeProduction'
?
1
:
0
const
firstWid
=
operationList
[
0
].
warehouseId
if
(
operationList
.
some
((
r
)
=>
r
.
warehouseId
!==
firstWid
))
{
return
ElMessage
.
error
(
'请选择相同仓库的库存SKU!'
)
}
resetReceiptEditForm
()
...
...
@@ -678,8 +703,7 @@ const handleEmbryoInStockByCard = async (
}
}
receiptEditForm
.
value
.
warehouseId
=
firstWid
receiptEditForm
.
value
.
warehouseName
=
cardSelectList
.
value
[
0
]
.
warehouseName
as
string
receiptEditForm
.
value
.
warehouseName
=
operationList
[
0
].
warehouseName
as
string
const
wh
=
warehouseList
.
value
.
find
((
w
)
=>
w
.
id
==
firstWid
)
if
(
wh
)
{
receiptEditForm
.
value
.
warehouseName
=
wh
.
name
...
...
@@ -689,14 +713,16 @@ const handleEmbryoInStockByCard = async (
background
:
'rgba(0, 0, 0, 0.3)'
,
})
try
{
const
skus
=
cardSelectList
.
value
.
map
((
r
)
=>
r
.
thirdSkuCode
as
string
)
const
skus
=
operationList
.
map
((
r
)
=>
r
.
thirdSkuCode
as
string
)
const
res
=
type
===
'embryoInStock'
?
await
getBySkuAndUserMarkApi
(
firstWid
,
skus
.
join
(
','
),
null
)
:
await
getBySkuAndUserMarkAndInboundTypeApi
(
cardSelectList
.
value
.
map
((
r
)
=>
r
.
operationNo
as
string
))
:
await
getBySkuAndUserMarkAndInboundTypeApi
(
operationList
.
map
((
r
)
=>
r
.
operationNo
as
string
),
)
if
(
res
.
code
!==
200
)
return
otherPurchaseData
.
value
=
res
.
data
.
map
((
item
:
InterskuList
)
=>
mapInterskuToProduct
(
item
),
mapInterskuToProduct
(
item
,
type
),
)
await
fetchReceiptLocationList
(
''
)
const
listRes
=
await
warehouseInfoGetAll
()
...
...
@@ -765,7 +791,17 @@ const handleReceiptSave = async () => {
}
catch
{
return
}
const
arr
=
otherPurchaseData
.
value
const
arr
=
otherPurchaseData
.
value
.
map
((
item
)
=>
{
const
operationForReclaimList
=
cardSelectList
.
value
.
filter
((
r
)
=>
fastInboundType
.
value
===
1
?
`
${
r
.
userMark
}${
r
.
variantSku
}
`
===
item
.
warehouseSku
:
r
.
thirdSkuCode
===
item
.
warehouseSku
,
)
return
{
...
item
,
operationForReclaimList
:
operationForReclaimList
,
}
})
if
(
arr
.
length
===
0
)
{
ElMessage
.
error
(
'请至少选择一条数据'
)
return
...
...
@@ -787,16 +823,28 @@ const handleReceiptSave = async () => {
}
}
const
params
=
{
forNewProduct
:
fastInboundType
.
value
===
1
,
...
receiptEditForm
.
value
,
productList
:
otherPurchaseData
.
value
,
productList
:
arr
,
}
const
loading
=
ElLoading
.
service
({
text
:
'保存中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
try
{
await
addInRecordApi
(
params
)
ElMessage
.
success
(
'保存成功'
)
const
res
=
await
addInRecordApi
(
params
)
if
(
res
.
code
!==
200
)
return
if
(
res
.
data
&&
Array
.
isArray
(
res
.
data
)
&&
res
.
data
.
length
>
0
)
{
ElMessageBox
.
alert
(
`操作单号:
${
res
.
data
.
map
((
e
:
number
)
=>
e
).
join
(
','
)}
入库失败`
,
'提示'
,
{
type
:
'error'
,
},
)
}
else
{
ElMessage
.
success
(
'保存成功'
)
}
receiptDialogVisible
.
value
=
false
search
()
loadOrderStatusCounts
()
...
...
@@ -809,10 +857,6 @@ const handleReceiptSave = async () => {
const
handleProductionCompleteInStock
=
()
=>
{
// 客户定制的单子不能操作生产完成入库,提示:客户定制商品,不能入库!
if
(
cardSelectList
.
value
.
length
!==
0
)
{
if
(
cardSelectList
.
value
.
some
((
r
)
=>
r
.
inboundType
===
2
))
{
ElMessage
.
error
(
'您选择的操作单包含客户定制商品,不能入库!'
)
return
}
handleEmbryoInStockByCard
(
'completeProduction'
)
}
else
{
handleEmbryoInFastStock
(
1
)
...
...
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