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
16f6e6fb
Commit
16f6e6fb
authored
Jun 03, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物流方式添加uninuin字段
parent
703fa4a0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
19 deletions
+89
-19
src/api/logistics.ts
+11
-0
src/components/CustomizeForm.tsx
+5
-6
src/views/logistics/logisticsMethod.vue
+55
-10
src/views/logistics/logisticsPartition.vue
+9
-1
src/views/logistics/logisticsQuotation.vue
+9
-2
No files found.
src/api/logistics.ts
View file @
16f6e6fb
...
...
@@ -133,6 +133,17 @@ export function getPlatformList() {
export
function
getLogisticsCompanyList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'/logisticsCompany/all_options'
)
}
//获取物流公司列表
export
function
getUniuniList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'/logistics/logisticsUinuinWarehouse/listByCountryCode'
,
{
params
:
{
countryCode
:
'US'
,
},
},
)
}
/**
* @description 发货地址
...
...
src/components/CustomizeForm.tsx
View file @
16f6e6fb
...
...
@@ -86,7 +86,6 @@ export default defineComponent({
watch
(
()
=>
props
.
config
,
(
val
)
=>
{
console
.
log
(
'tableConfig'
,
val
)
tableConfig
.
value
=
val
},
{
immediate
:
true
,
deep
:
true
},
...
...
@@ -104,8 +103,6 @@ export default defineComponent({
watch
(
()
=>
props
.
modelValue
,
(
val
)
=>
{
console
.
log
(
84
,
val
)
formData
.
value
=
val
},
{
immediate
:
true
,
deep
:
true
},
...
...
@@ -128,9 +125,9 @@ export default defineComponent({
return
await
formRef
.
value
.
validate
()
}
// 表单验证方法
const
clearValidate
=
async
()
=>
{
const
clearValidate
=
async
(
clearFields
?:
string
[]
)
=>
{
if
(
!
formRef
.
value
)
return
false
return
await
formRef
.
value
.
clearValidate
()
return
await
formRef
.
value
.
clearValidate
(
clearFields
)
}
// 重置表单
...
...
@@ -151,7 +148,9 @@ export default defineComponent({
.
filter
((
item
)
=>
!
item
.
fixed
)
.
concat
(
tableConfig
.
value
.
filter
((
item
)
=>
item
.
fixed
))
}
else
{
tableConfig
.
value
=
[...
props
.
config
]
tableConfig
.
value
=
[
...
props
.
config
.
filter
((
item
)
=>
!
item
.
isIncludeProp
),
]
console
.
log
(
tableConfig
.
value
)
}
}
...
...
src/views/logistics/logisticsMethod.vue
View file @
16f6e6fb
...
...
@@ -80,6 +80,7 @@ import {
getPlatformList
,
getLogisticsLog
,
getLogisticsCompanyList
,
getUniuniList
,
}
from
'@/api/logistics'
import
{
ISeachFormConfig
}
from
'@/types/searchType'
import
{
TableColumn
}
from
'@/components/VxeTable'
...
...
@@ -166,6 +167,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
const
platformList
=
ref
([])
const
warehouseList
=
ref
([])
const
ruleNameList
=
ref
([])
const
uniuniList
=
ref
([])
const
logisticsCompanyList
=
ref
([])
const
formConfig
=
computed
<
IFormConfig
[]
>
(()
=>
[
{
title
:
'物流基础信息'
},
...
...
@@ -212,8 +214,20 @@ const formConfig = computed<IFormConfig[]>(() => [
label
:
'name'
,
value
:
'id'
,
options
:
[...(
logisticsCompanyList
.
value
||
[])],
onChange
:
(
value
:
{
name
:
string
;
id
:
string
|
number
})
=>
{
onChange
:
(
value
:
{
code
:
string
name
:
string
id
:
string
|
number
})
=>
{
console
.
log
(
222
,
value
)
editForm
.
value
.
company
=
value
.
name
if
(
value
.
code
===
'UINUIN'
)
{
editFormRef
.
value
?.
refashConfig
([
'uinuinWarehouseId'
])
}
else
{
editFormRef
.
value
?.
refashConfig
([])
editFormRef
.
value
?.
clearValidate
([
'uinuinWarehouseId'
])
editForm
.
value
.
uinuinWarehouseId
=
undefined
}
},
},
rules
:
[
...
...
@@ -224,9 +238,28 @@ const formConfig = computed<IFormConfig[]>(() => [
],
},
{
prop
:
'uinuinWarehouseId'
,
type
:
'select'
,
label
:
'uniuni仓库'
,
isIncludeProp
:
true
,
attrs
:
{
placeholder
:
'请选择uniuni仓库'
,
label
:
'warehouseName'
,
value
:
'warehouseId'
,
options
:
[...(
uniuniList
.
value
||
[])],
},
rules
:
[
{
required
:
true
,
message
:
'请选择uniuni仓库'
,
},
],
},
{
prop
:
'ruleId'
,
type
:
'select'
,
label
:
'申报规则'
,
fixed
:
'last'
,
attrs
:
{
placeholder
:
'请选择申报规则'
,
label
:
'name'
,
...
...
@@ -248,6 +281,7 @@ const formConfig = computed<IFormConfig[]>(() => [
prop
:
'serviceCode'
,
type
:
'input'
,
label
:
'物流编码'
,
fixed
:
'last'
,
attrs
:
{
placeholder
:
'请输入物流编码'
,
},
...
...
@@ -262,6 +296,7 @@ const formConfig = computed<IFormConfig[]>(() => [
prop
:
'siteUrl'
,
type
:
'input'
,
label
:
'查询网址'
,
fixed
:
'last'
,
attrs
:
{
placeholder
:
'请输入查询网址'
,
},
...
...
@@ -276,6 +311,7 @@ const formConfig = computed<IFormConfig[]>(() => [
prop
:
'status'
,
type
:
'switch'
,
label
:
'启用状态'
,
fixed
:
'last'
,
attrs
:
{
activeValue
:
1
,
inactiveValue
:
0
,
...
...
@@ -283,6 +319,7 @@ const formConfig = computed<IFormConfig[]>(() => [
},
{
title
:
'平台物流名称'
,
fixed
:
'last'
,
render
:
(
item
,
formData
)
=>
{
console
.
log
(
283
,
item
,
formData
)
...
...
@@ -631,6 +668,9 @@ const save = debounce(async () => {
*/
function
addDialog
()
{
dialogVisible
.
value
=
true
nextTick
(()
=>
{
editFormRef
.
value
?.
refashConfig
([])
})
}
/**
...
...
@@ -702,17 +742,22 @@ async function getAllList() {
getRuleList
(),
getPlatformList
(),
getLogisticsCompanyList
(),
getUniuniList
(),
])
res
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
code
===
200
)
{
if
(
index
==
0
)
{
warehouseList
.
value
=
item
.
data
||
[]
}
else
if
(
index
==
1
)
{
ruleNameList
.
value
=
item
.
data
||
[]
}
else
if
(
index
==
2
)
{
platformList
.
value
=
item
.
data
||
[]
}
else
if
(
index
==
3
)
{
logisticsCompanyList
.
value
=
item
.
data
||
[]
if
(
item
.
status
===
'fulfilled'
)
{
if
(
item
.
value
.
code
===
200
)
{
if
(
index
==
0
)
{
warehouseList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
1
)
{
ruleNameList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
2
)
{
platformList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
3
)
{
logisticsCompanyList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
4
)
{
uniuniList
.
value
=
item
.
value
.
data
||
[]
}
}
}
})
...
...
src/views/logistics/logisticsPartition.vue
View file @
16f6e6fb
...
...
@@ -348,7 +348,15 @@ function setCellStyle() {
async
function
getAllList
()
{
try
{
const
res
=
await
Promise
.
allSettled
([
getlogisticsWayAllList
(),
getList
()])
searchConfig
.
value
[
0
].
attrs
!
.
options
=
[...(
res
[
0
]?.
data
||
[])]
res
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
status
===
'fulfilled'
)
{
if
(
item
.
value
.
code
===
200
)
{
if
(
index
==
0
)
{
searchConfig
.
value
[
0
].
attrs
!
.
options
=
[...(
item
.
value
.
data
||
[])]
}
}
}
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
...
...
src/views/logistics/logisticsQuotation.vue
View file @
16f6e6fb
...
...
@@ -628,8 +628,15 @@ const logisticsWayList = ref([])
async
function
getAllList
()
{
try
{
const
res
=
await
Promise
.
allSettled
([
getlogisticsWayAllList
(),
getList
()])
console
.
log
(
545
,
res
)
logisticsWayList
.
value
=
res
[
0
]?.
data
||
[]
res
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
status
===
'fulfilled'
)
{
if
(
item
.
value
.
code
===
200
)
{
if
(
index
==
0
)
{
logisticsWayList
.
value
=
[...(
item
.
value
.
data
||
[])]
}
}
}
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
...
...
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