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
5004f367
Commit
5004f367
authored
Jun 06, 2025
by
zhuzhequan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
67591999
4d24ae1e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
68 deletions
+139
-68
src/api/logistics.ts
+6
-0
src/api/podUsOrder.ts
+27
-0
src/types/api/podUsOrder.ts
+2
-0
src/views/logistics/shippingAddress.vue
+86
-67
src/views/logistics/types/shippingAddress.ts
+10
-0
src/views/order/podUs/PodMakeOrder.vue
+8
-1
src/views/order/podUs/index.vue
+0
-0
No files found.
src/api/logistics.ts
View file @
5004f367
...
...
@@ -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 @
5004f367
...
...
@@ -16,6 +16,7 @@ export interface LogisticsData {
status
:
boolean
logisticsWayCode
:
string
// 物流编码
partition
:
string
// 所在分区
logisticsWayId
?:
number
|
null
}
export
function
getOrderTabData
()
{
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
...
...
@@ -270,3 +271,29 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
orderIds
,
)
}
// 更改物流
export
function
changeLogisticsApi
(
params
:
{
updateByIdParam
:
{
id
:
string
|
number
dataVersion
:
number
}
logisticsTrialCalculation
:
LogisticsData
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/changeLogistics'
,
params
,
)
}
// 创建物流
export
function
createLogisticsOrderApi
(
params
:
{
updateByIdParam
:
{
id
:
string
|
number
dataVersion
:
number
}
logisticsTrialCalculation
:
LogisticsData
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/createLogisticsOrder'
,
params
,
)
}
src/types/api/podUsOrder.ts
View file @
5004f367
...
...
@@ -57,6 +57,8 @@ export interface PodUsOrderListData {
version
?:
number
productList
?:
ProductList
[]
orderNumber
?:
string
logisticsWayId
?:
number
|
null
logisticsWayName
?:
string
}
export
interface
ProductList
{
id
:
number
...
...
src/views/logistics/shippingAddress.vue
View file @
5004f367
...
...
@@ -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 @
5004f367
...
...
@@ -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/PodMakeOrder.vue
View file @
5004f367
...
...
@@ -516,6 +516,8 @@ const userStore = useUserStore()
const
getPackingData
=
async
(
code
:
string
)
=>
{
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'加载中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
currentCode
=
code
try
{
...
...
@@ -592,6 +594,8 @@ const initOrderDetailBox = async () => {
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'加载中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
try
{
const
res
=
await
getPodBoxListApi
(
factoryNo
,
warehouseId
.
value
)
...
...
@@ -800,7 +804,10 @@ const handlePrinterChange = (value: string) => {
const
print
=
(
data
:
OrderData
,
forcePrint
=
false
,
callback
?:
()
=>
void
)
=>
{
const
_boxIndex
=
boxIndex
.
value
if
(
!
forcePrint
&&
data
.
printResult
)
return
if
(
!
forcePrint
&&
data
.
printResult
)
{
callback
&&
callback
()
return
}
props
.
printOrder
(
data
,
(
status
:
boolean
)
=>
{
callback
&&
callback
()
...
...
src/views/order/podUs/index.vue
View file @
5004f367
This diff is collapsed.
Click to expand it.
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