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
0
Merge Requests
0
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
1991c11a
Commit
1991c11a
authored
May 25, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 工厂订单发货前支持更换地址,重新创建物流订单 #1004198
parent
a89226e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
23 deletions
+114
-23
src/api/factoryOrderNew.ts
+21
-0
src/types/api/order/factoryOrderNew.ts
+2
-0
src/views/order/factoryOrderNew/index.vue
+81
-20
src/views/order/podCN/components/ChangeWayDialog.vue
+10
-3
No files found.
src/api/factoryOrderNew.ts
View file @
1991c11a
...
...
@@ -15,6 +15,7 @@ import type {
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
import
{
ExportParams
}
from
'@/types/api/order/factoryOrderNew'
import
type
{
OrderData
}
from
'@/types/api/podMakeOrder'
import
type
{
LogisticsData
}
from
'@/types/api/podCnOrder'
import
type
{
PrintData
}
from
'@/types/api/podOrder'
function
normalizePodOrderQueryPayload
(
data
:
Record
<
string
,
unknown
>
,
...
...
@@ -467,6 +468,26 @@ export function syncReceiverAddress(data: number[]) {
)
}
export
function
getLogisticsCalculation
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/getLogisticsCalculation'
,
{
params
:
{
id
}
},
)
}
export
function
changeLogisticsApi
(
params
:
{
updateByIdParam
:
{
id
:
string
|
number
dataVersion
:
number
}
logisticsTrialCalculation
:
LogisticsData
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/changeLogistics'
,
params
,
)
}
export
function
updateReceiverAddressApi
(
data
:
object
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/updateReceiverAddress'
,
...
...
src/types/api/order/factoryOrderNew.ts
View file @
1991c11a
...
...
@@ -90,6 +90,8 @@ export interface FactoryOrderNewListData {
source
?:
string
logisticsCompanyName
?:
string
logisticsCompanyCode
?:
string
logisticsWayId
?:
number
|
string
logisticsWayName
?:
string
selfOwned
?:
boolean
createTime
?:
string
updateTime
?:
string
...
...
src/views/order/factoryOrderNew/index.vue
View file @
1991c11a
...
...
@@ -725,14 +725,35 @@
修改地址
<
/ElButton
>
<
ElButton
v
-
if
=
"status === 'PENDING_CREATE_LOGISTICS'"
type
=
"primary"
v
-
if
=
"showChangeLogistics(row)"
type
=
"warning"
link
size
=
"small"
@
click
.
stop
=
"handleChangeLogistics(row)"
>
更换物流
<
/ElButton
>
<
ElButton
v
-
if
=
"
[
'PENDING_RECEIVE',
'PENDING_CREATE_LOGISTICS',
'PENDING_SCHEDULE',
'PICKING',
'PENDING_DELIVERY',
'SUSPEND',
].includes(status)
"
type
=
"success"
link
size
=
"small"
@
click
.
stop
=
"handleRefreshReceiverAddress(row)"
>
刷新地址
{{
row
.
shipmentType
===
0
?
'同步物流/地址'
:
'同步地址'
}}
<
/ElButton
>
<
ElButton
v
-
if
=
"status === 'SUSPEND'"
type
=
"primary"
...
...
@@ -915,6 +936,13 @@
:
submit
-
address
-
api
=
"submitFactoryOrderReceiverAddress"
@
success
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
/>
<
ChangeWayDialog
ref
=
"changeWayDialogRef"
:
row
-
data
=
"changeWayCurrentItem"
:
get
-
table
-
fn
=
"getLogisticsCalculation"
:
change
-
logistics
-
api
=
"changeLogisticsApi"
@
confirm
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
/>
<
ElDialog
v
-
model
=
"exportVisible"
title
=
"导出选项"
...
...
@@ -977,6 +1005,8 @@ import {
composingNewPodOrderDesignImages
,
printNewPodOrderProductionOrderApi
,
syncReceiverAddress
,
getLogisticsCalculation
,
changeLogisticsApi
,
updateReceiverAddressApi
,
updateRemarkApi
,
completeDeliveryApi
,
...
...
@@ -1015,6 +1045,7 @@ import PodMakeOrder from '@/views/order/podUs/PodMakeOrder.vue'
import
PodDistributionOrder
from
'@/views/order/podCN/PodDistributionOrder.vue'
import
PrintWarehouseSkuTag
from
'@/views/order/components/printWarehouseSkuTag.vue'
import
UpdateAddress
from
'@/views/order/podCN/components/updateAddress.vue'
import
ChangeWayDialog
from
'@/views/order/podCN/components/ChangeWayDialog.vue'
import
{
ResultInfoDataItem
}
from
'@/types/api/order/common'
import
type
{
FactoryOrderSearchQueryVisibilityContext
}
from
'@/types/api/factoryOrderNew/searchQueryVisibility'
import
{
useOrderDictionaries
}
from
'./hooks/useOrderDictionaries'
...
...
@@ -1222,11 +1253,33 @@ const receiverAddressForm = ref<AddressInfo>({
}
)
const
showPendingLogisticsUpdateAddress
=
(
row
:
FactoryOrderNewListData
)
=>
status
.
value
===
'PENDING_CREATE_LOGISTICS'
&&
row
.
shipmentType
===
1
[
'PENDING_RECEIVE'
,
'PENDING_CREATE_LOGISTICS'
,
'PENDING_SCHEDULE'
,
'PICKING'
,
'PENDING_DELIVERY'
,
'SUSPEND'
,
].
includes
(
status
.
value
)
&&
row
.
shipmentType
===
1
const
showChangeLogistics
=
(
row
:
FactoryOrderNewListData
)
=>
[
'PENDING_SCHEDULE'
,
'PICKING'
,
'PENDING_DELIVERY'
,
'SUSPEND'
].
includes
(
status
.
value
,
)
&&
row
.
shipmentType
===
1
const
submitFactoryOrderReceiverAddress
=
(
data
:
AddressInfo
)
=>
updateReceiverAddressApi
(
data
)
const
changeWayDialogRef
=
ref
<
InstanceType
<
typeof
ChangeWayDialog
>>
()
const
changeWayCurrentItem
=
ref
<
FactoryOrderNewListData
|
null
>
(
null
)
const
handleChangeLogistics
=
(
row
:
FactoryOrderNewListData
)
=>
{
changeWayCurrentItem
.
value
=
row
nextTick
(()
=>
{
changeWayDialogRef
.
value
?.
showDialog
()
}
)
}
const
openUpdateReceiverAddress
=
(
row
:
FactoryOrderNewListData
)
=>
{
receiverAddressForm
.
value
=
{
rfcNumber
:
''
,
...
...
@@ -1246,25 +1299,33 @@ const openUpdateReceiverAddress = (row: FactoryOrderNewListData) => {
const
handleRefreshReceiverAddress
=
async
(
row
:
FactoryOrderNewListData
)
=>
{
try
{
await
ElMessageBox
.
confirm
(
'确定刷新地址吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
await
ElMessageBox
.
confirm
(
row
.
shipmentType
===
0
?
'确定同步物流/地址吗?'
:
'确定同步地址吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
,
)
}
catch
{
return
}
await
syncReceiverAddress
([
row
.
id
])
await
ElMessageBox
.
alert
(
'请修改/刷新地址后取消物流或者更换物流再重新创建物流订单、获取跟踪号、获取打印面单'
,
'提示'
,
{
type
:
'warning'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
showCancelButton
:
true
,
}
,
)
if
(
row
.
shipmentType
===
1
)
{
await
ElMessageBox
.
alert
(
'请修改/刷新地址后取消物流或者更换物流再重新创建物流订单、获取跟踪号、获取打印面单'
,
'提示'
,
{
type
:
'warning'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
showCancelButton
:
true
,
}
,
)
}
else
{
ElMessage
.
success
(
'操作成功'
)
}
refreshCurrentView
({
isRefreshTree
:
true
}
)
}
...
...
@@ -1446,7 +1507,7 @@ const mainColumns = computed(() => [
{
prop
:
'operation'
,
label
:
'操作'
,
minWidth
:
2
0
0
,
minWidth
:
2
2
0
,
align
:
'center'
,
slot
:
'operation'
,
fixed
:
'right'
,
...
...
src/views/order/podCN/components/ChangeWayDialog.vue
View file @
1991c11a
...
...
@@ -65,7 +65,14 @@
</template>
<
script
lang=
"ts"
setup
>
import
{
PodCnOrderListData
,
LogisticsData
}
from
'@/types/api/podCnOrder'
import
{
LogisticsData
}
from
'@/types/api/podCnOrder'
export
interface
ChangeWayRowData
{
id
?:
number
|
string
version
?:
number
logisticsWayId
?:
number
|
string
|
null
logisticsWayName
?:
string
}
const
isChangeWay
=
ref
(
false
)
const
isChangeWayLoading
=
ref
(
false
)
const
changeWayRow
=
ref
<
LogisticsData
>
({}
as
LogisticsData
)
...
...
@@ -76,13 +83,13 @@ const wayDialogTitle = ref('')
const
props
=
withDefaults
(
defineProps
<
{
rowData
:
PodCnOrderList
Data
|
null
rowData
:
ChangeWayRow
Data
|
null
getTableFn
?:
(...
args
:
any
[])
=>
any
submitFn
?:
(...
args
:
any
[])
=>
any
changeLogisticsApi
?:
(...
args
:
any
[])
=>
any
}
>
(),
{
rowData
:
()
=>
({}
as
PodCnOrderList
Data
),
rowData
:
()
=>
({}
as
ChangeWayRow
Data
),
getTableFn
:
()
=>
{},
submitFn
:
()
=>
{},
changeLogisticsApi
:
()
=>
{},
...
...
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