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
7539643f
Commit
7539643f
authored
Jun 06, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/linjinhong' into dev
parents
0fd5f886
63e91d11
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
156 additions
and
87 deletions
+156
-87
src/api/logistics.ts
+6
-0
src/api/podUsOrder.ts
+2
-2
src/types/api/podUsOrder.ts
+1
-0
src/views/logistics/shippingAddress.vue
+86
-67
src/views/logistics/types/shippingAddress.ts
+10
-0
src/views/order/podUs/index.vue
+51
-18
No files found.
src/api/logistics.ts
View file @
7539643f
...
...
@@ -193,6 +193,12 @@ export function deleteAddressByIds(params: { ids: string }) {
},
)
}
//获取国家名称及代码
export
function
getAllCountryApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'/logisticsAddress/getAllCountry'
,
)
}
/**
* @description 物流报价
...
...
src/api/podUsOrder.ts
View file @
7539643f
...
...
@@ -273,9 +273,9 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
}
// 更改物流
export
function
changeLogisticsApi
(
params
:
{
U
pdateByIdParam
:
{
u
pdateByIdParam
:
{
id
:
string
|
number
dataVersion
:
string
dataVersion
:
number
}
logisticsTrialCalculation
:
LogisticsData
})
{
...
...
src/types/api/podUsOrder.ts
View file @
7539643f
...
...
@@ -58,6 +58,7 @@ export interface PodUsOrderListData {
productList
?:
ProductList
[]
orderNumber
?:
string
logisticsWayId
?:
number
|
null
logisticsWayName
?:
string
}
export
interface
ProductList
{
id
:
number
...
...
src/views/logistics/shippingAddress.vue
View file @
7539643f
...
...
@@ -43,36 +43,11 @@
</el-tag>
</div>
<p
:title=
"
[
item.countryName,
// item.countryCode,
item.stateProvince,
// item.stateProvinceAbbr,
item.district,
// item.districtCode,
item.city,
// item.cityCode,
]
.filter((el) => el != null && el !== '')
.join(' ')
"
style=
"white-space: pre"
:title=
"getJosn(item)"
class=
"address"
>
{{
[
item
.
countryName
,
// item.countryCode,
item
.
stateProvince
,
// item.stateProvinceAbbr,
item
.
district
,
// item.districtCode,
item
.
city
,
// item.cityCode,
]
.
filter
((
el
)
=>
el
!=
null
&&
el
!==
''
)
.
join
(
' '
)
}}
{{
getJosn
(
item
)
}}
</p>
<p
:title=
"
...
...
@@ -187,6 +162,7 @@ import {
updateAddress
,
getLogisticsLog
,
deleteAddressByIds
,
getAllCountryApi
,
}
from
'@/api/logistics'
import
{
IFormConfig
}
from
'@/components/CustomizeForm.tsx'
...
...
@@ -196,7 +172,7 @@ import CustomizeForm from '@/components/CustomizeForm.tsx'
import
{
Edit
,
Delete
,
List
}
from
'@element-plus/icons-vue'
import
{
debounce
}
from
'lodash-es'
import
{
ShippingAddressObj
}
from
'./types/shippingAddress.ts'
import
{
ShippingAddressObj
,
ICountryObj
}
from
'./types/shippingAddress.ts'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
useValue
}
from
'./hooks/useValue'
import
{
showConfirm
}
from
'@/utils/ui'
...
...
@@ -226,8 +202,9 @@ const {
const
dialogVisible
=
ref
(
false
)
const
logDialogVisible
=
ref
(
false
)
const
editFormRef
=
ref
<
InstanceType
<
typeof
CustomizeForm
>
|
null
>
(
null
)
const
countryList
=
ref
([])
const
formConfig
=
ref
<
IFormConfig
[]
>
(
[
const
formConfig
=
computed
<
IFormConfig
[]
>
(()
=>
[
{
prop
:
'shipperName'
,
type
:
'input'
,
...
...
@@ -266,88 +243,101 @@ const formConfig = ref<IFormConfig[]>([
},
},
{
prop
:
'c
ity
'
,
type
:
'
inpu
t'
,
label
:
'
城市
'
,
prop
:
'c
ountryCode
'
,
type
:
'
selec
t'
,
label
:
'
国家代码
'
,
attrs
:
{
// options: [],
placeholder
:
'请输入城市'
,
options
:
countryList
.
value
,
label
:
'countryCode'
,
value
:
'countryCode'
,
placeholder
:
'请选择国家代码'
,
onChange
:
(
val
:
ICountryObj
)
=>
{
editForm
.
value
.
countryName
=
val
.
nameCn
},
},
rules
:
[{
required
:
true
,
message
:
'请
输入城市
'
}],
rules
:
[{
required
:
true
,
message
:
'请
选择国家代码
'
}],
},
{
prop
:
'c
ityCod
e'
,
type
:
'
inpu
t'
,
label
:
'
城市编码
'
,
prop
:
'c
ountryNam
e'
,
type
:
'
selec
t'
,
label
:
'
国家名称
'
,
attrs
:
{
// options: [],
placeholder
:
'请输入城市编码'
,
options
:
countryList
.
value
,
label
:
'nameCn'
,
value
:
'nameCn'
,
placeholder
:
'请选择国家名称'
,
onChange
:
(
val
:
ICountryObj
)
=>
{
editForm
.
value
.
countryCode
=
val
.
countryCode
},
},
rules
:
[{
required
:
true
,
message
:
'请选择国家名称'
}],
},
{
prop
:
'
district
'
,
prop
:
'
stateProvince
'
,
type
:
'input'
,
label
:
'
区
'
,
label
:
'
州/省
'
,
attrs
:
{
// options: [],
placeholder
:
'请
选择区
'
,
placeholder
:
'请
输入州/省
'
,
},
},
{
prop
:
'
districtCode
'
,
prop
:
'
stateProvinceAbbr
'
,
type
:
'input'
,
label
:
'
区编码
'
,
label
:
'
州/省简称
'
,
attrs
:
{
// options: [],
placeholder
:
'请
选择区
'
,
placeholder
:
'请
输入州/省简称
'
,
},
},
{
prop
:
'
postal
Code'
,
prop
:
'
city
Code'
,
type
:
'input'
,
label
:
'
邮编
'
,
label
:
'
城市编码
'
,
attrs
:
{
placeholder
:
'请输入邮编'
,
// options: [],
placeholder
:
'请输入城市编码'
,
},
},
{
prop
:
'
stateProvince
'
,
prop
:
'
city
'
,
type
:
'input'
,
label
:
'
州/省
'
,
label
:
'
城市
'
,
attrs
:
{
// options: [],
placeholder
:
'请输入
州/省
'
,
placeholder
:
'请输入
城市
'
,
},
rules
:
[{
required
:
true
,
message
:
'请输入城市'
}],
},
{
prop
:
'
stateProvinceAbbr
'
,
prop
:
'
districtCode
'
,
type
:
'input'
,
label
:
'
州/省简称
'
,
label
:
'
区编码
'
,
attrs
:
{
// options: [],
placeholder
:
'请
输入州/省简称
'
,
placeholder
:
'请
选择区
'
,
},
},
{
prop
:
'
countryName
'
,
prop
:
'
district
'
,
type
:
'input'
,
label
:
'
国家名称
'
,
label
:
'
区
'
,
attrs
:
{
// options: [],
placeholder
:
'请
输入国家名称
'
,
placeholder
:
'请
选择区
'
,
},
rules
:
[{
required
:
true
,
message
:
'请输入国家名称'
}],
},
{
prop
:
'
country
Code'
,
prop
:
'
postal
Code'
,
type
:
'input'
,
label
:
'
国家代码
'
,
label
:
'
邮编
'
,
attrs
:
{
// options: [],
placeholder
:
'请输入国家代码'
,
placeholder
:
'请输入邮编'
,
},
rules
:
[{
required
:
true
,
message
:
'请输入邮编'
}],
},
{
prop
:
'phoneNumber'
,
...
...
@@ -365,7 +355,36 @@ const formConfig = ref<IFormConfig[]>([
},
])
// const loading = ref(false)
async
function
getCountryList
()
{
try
{
const
{
data
}
=
await
getAllCountryApi
()
countryList
.
value
=
data
console
.
log
(
372
,
countryList
.
value
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
function
getJosn
(
item
:
ShippingAddressObj
)
{
return
[
[
item
.
countryName
,
item
.
countryCode
],
[
item
.
stateProvince
,
item
.
stateProvinceAbbr
],
[
item
.
district
,
item
.
districtCode
],
[
item
.
city
,
item
.
cityCode
],
]
.
map
(([
value
,
code
])
=>
{
if
(
value
&&
code
)
return
`
${
value
}
(
${
code
}
)`
if
(
value
)
return
value
if
(
code
)
return
code
// 当 value 不存在但 code 存在时,不使用括号
return
null
})
.
filter
(
Boolean
)
.
join
(
` `
)
// 使用三个空格作为分隔符增大间距
}
onMounted
(()
=>
{
getCountryList
()
})
/**
* @description: 取消按钮
...
...
src/views/logistics/types/shippingAddress.ts
View file @
7539643f
...
...
@@ -22,3 +22,13 @@ export interface ShippingAddressObj {
updateTime
?:
string
checked
?:
boolean
}
export
interface
ICountryObj
{
aeCountryCode
:
string
continentCode
:
string
countryCode
:
string
id
:
number
nameCn
:
string
nameEn
:
string
needProviceAbbr
:
number
}
src/views/order/podUs/index.vue
View file @
7539643f
...
...
@@ -901,9 +901,11 @@
<
el
-
dialog
v
-
model
=
"isChangeWay"
:
close
-
on
-
click
-
modal
=
"false"
title
=
"更换物流
"
:
title
=
"`切换物流(当前物流方式:${selection[0]?.logisticsWayName
}
)`
"
>
<
el
-
table
v
-
loading
=
"isChangeWayLoading"
ref
=
"changeWayRef"
height
=
"400px"
class
=
"production-client-table"
:
data
=
"logisticsWayData"
...
...
@@ -947,8 +949,16 @@
<
/el-table-column
>
<
/el-table
>
<
template
#
footer
>
<
el
-
button
@
click
=
"isChangeWay = false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"changeWaySubmit"
>
确定
<
/el-button
>
<
el
-
button
:
disabled
=
"isChangeWayLoading"
@
click
=
"isChangeWay = false"
>
取消
<
/el-button
>
<
el
-
button
:
loading
=
"isChangeWayLoading"
type
=
"primary"
@
click
=
"changeWaySubmit"
>
确定
<
/el-button
>
<
/template
>
<
/el-dialog
>
<
/template
>
...
...
@@ -981,8 +991,9 @@ import {
getTrackingNumberApi
,
getfaceSimplexFileApi
,
cancelLogisticsOrderApi
,
//
changeLogisticsApi,
changeLogisticsApi
,
}
from
'@/api/podUsOrder'
import
TableView
from
'@/components/TableView.vue'
import
{
LogListData
,
...
...
@@ -1717,11 +1728,26 @@ const getOrderByIdApi = async (type: string) => {
return
}
}
//展示返回结果
const
resultInfo
=
ref
([])
const
resultConfim
=
()
=>
{
search
()
}
/**
* @description: 更改物流方式
*/
const
changeWayRow
=
ref
<
LogisticsData
>
({
}
as
LogisticsData
)
const
isChangeWayLoading
=
ref
(
false
)
const
changeWayRef
=
ref
()
const
currentChangeWay
=
(
row
:
LogisticsData
)
=>
{
if
(
row
.
logisticsWayId
==
selection
.
value
[
0
]?.
logisticsWayId
)
{
changeWayRow
.
value
=
{
}
as
LogisticsData
return
changeWayRef
.
value
?.
setCurrentRow
()
}
changeWayRow
.
value
=
row
}
const
changeWaySubmit
=
()
=>
{
const
changeWaySubmit
=
async
()
=>
{
if
(
!
changeWayRow
.
value
?.
logisticsWayId
)
{
return
ElMessage
.
warning
(
'请选择一条物流方式'
)
}
...
...
@@ -1733,21 +1759,28 @@ const changeWaySubmit = () => {
if
(
!
changeWayRow
.
value
.
status
)
{
return
ElMessage
.
warning
(
'请选择状态为成功的物流方式'
)
}
isChangeWayLoading
.
value
=
true
try
{
const
params
=
{
updateByIdParam
:
{
id
:
selection
.
value
[
0
]?.
id
,
dataVersion
:
selection
.
value
[
0
]?.
version
as
number
,
}
,
logisticsTrialCalculation
:
{
...
changeWayRow
.
value
}
,
}
// const params =
{
// UpdateByIdParam:
{
// id: selection.value[0]?.id,
// dataVersion: selection.value[0]?.version,
//
}
,
// logisticsTrialCalculation:
{
...
changeWayRow
.
value
}
,
//
}
await
changeLogisticsApi
(
params
)
isChangeWay
.
value
=
false
isChangeWay
.
value
=
false
// changeLogisticsApi(params)
}
const
resultInfo
=
ref
([])
const
resultConfim
=
()
=>
{
search
()
isChangeWayLoading
.
value
=
false
search
()
loadTabData
()
}
catch
(
error
)
{
console
.
log
(
error
)
}
finally
{
isChangeWayLoading
.
value
=
false
}
}
// 添加补货成功行的状态
...
...
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