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
aca920ec
Commit
aca920ec
authored
Jun 04, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!14
parents
9087cc7d
eeed6a29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
205 additions
and
27 deletions
+205
-27
components.d.ts
+0
-8
src/api/logistics.ts
+4
-0
src/components/CustomizeForm.tsx
+10
-6
src/components/Form.vue/Select.vue
+15
-4
src/views/logistics/components/LogisticsWaySelect.tsx
+114
-0
src/views/logistics/declarationRule.vue
+43
-2
src/views/logistics/logisticsMethod.vue
+13
-6
src/views/logistics/shippingAddress.vue
+5
-0
src/views/logistics/types/logistics.ts
+1
-1
No files found.
components.d.ts
View file @
aca920ec
...
@@ -13,17 +13,12 @@ declare module 'vue' {
...
@@ -13,17 +13,12 @@ declare module 'vue' {
DateRangePicker
:
typeof
import
(
'./src/components/Form.vue/DateRangePicker.vue'
)[
'default'
]
DateRangePicker
:
typeof
import
(
'./src/components/Form.vue/DateRangePicker.vue'
)[
'default'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElCard
:
typeof
import
(
'element-plus/es'
)[
'ElCard'
]
ElCard
:
typeof
import
(
'element-plus/es'
)[
'ElCard'
]
ElCarousel
:
typeof
import
(
'element-plus/es'
)[
'ElCarousel'
]
ElCarouselItem
:
typeof
import
(
'element-plus/es'
)[
'ElCarouselItem'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCheckbox
:
typeof
import
(
'element-plus/es'
)[
'ElCheckbox'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElCol
:
typeof
import
(
'element-plus/es'
)[
'ElCol'
]
ElConfigProvider
:
typeof
import
(
'element-plus/es'
)[
'ElConfigProvider'
]
ElConfigProvider
:
typeof
import
(
'element-plus/es'
)[
'ElConfigProvider'
]
ElDatePicker
:
typeof
import
(
'element-plus/es'
)[
'ElDatePicker'
]
ElDatePicker
:
typeof
import
(
'element-plus/es'
)[
'ElDatePicker'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDropdown
:
typeof
import
(
'element-plus/es'
)[
'ElDropdown'
]
ElDropdownItem
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownItem'
]
ElDropdownMenu
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownMenu'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElEmpty
:
typeof
import
(
'element-plus/es'
)[
'ElEmpty'
]
ElForm
:
typeof
import
(
'element-plus/es'
)[
'ElForm'
]
ElForm
:
typeof
import
(
'element-plus/es'
)[
'ElForm'
]
ElFormItem
:
typeof
import
(
'element-plus/es'
)[
'ElFormItem'
]
ElFormItem
:
typeof
import
(
'element-plus/es'
)[
'ElFormItem'
]
...
@@ -32,8 +27,6 @@ declare module 'vue' {
...
@@ -32,8 +27,6 @@ declare module 'vue' {
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInput
:
typeof
import
(
'element-plus/es'
)[
'ElInput'
]
ElInputNumber
:
typeof
import
(
'element-plus/es'
)[
'ElInputNumber'
]
ElInputNumber
:
typeof
import
(
'element-plus/es'
)[
'ElInputNumber'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElLink
:
typeof
import
(
'element-plus/es'
)[
'ElLink'
]
ElMenu
:
typeof
import
(
'element-plus/es'
)[
'ElMenu'
]
ElMenuItem
:
typeof
import
(
'element-plus/es'
)[
'ElMenuItem'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElOption
:
typeof
import
(
'element-plus/es'
)[
'ElOption'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPagination
:
typeof
import
(
'element-plus/es'
)[
'ElPagination'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
ElPopover
:
typeof
import
(
'element-plus/es'
)[
'ElPopover'
]
...
@@ -41,7 +34,6 @@ declare module 'vue' {
...
@@ -41,7 +34,6 @@ declare module 'vue' {
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRadioGroup
:
typeof
import
(
'element-plus/es'
)[
'ElRadioGroup'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElRow
:
typeof
import
(
'element-plus/es'
)[
'ElRow'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSelect
:
typeof
import
(
'element-plus/es'
)[
'ElSelect'
]
ElSubMenu
:
typeof
import
(
'element-plus/es'
)[
'ElSubMenu'
]
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
ElSwitch
:
typeof
import
(
'element-plus/es'
)[
'ElSwitch'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTable
:
typeof
import
(
'element-plus/es'
)[
'ElTable'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
ElTableColumn
:
typeof
import
(
'element-plus/es'
)[
'ElTableColumn'
]
...
...
src/api/logistics.ts
View file @
aca920ec
...
@@ -295,6 +295,10 @@ export function getLogisticsCustomsRuleList(params: {
...
@@ -295,6 +295,10 @@ export function getLogisticsCustomsRuleList(params: {
)
)
}
}
//物流方式列表
export
function
usableAllList
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'/logisticsWay/usableAllList'
)
}
//新增
//新增
export
function
addLogisticsCustomsRule
(
params
:
AddDeclarationRuleObj
)
{
export
function
addLogisticsCustomsRule
(
params
:
AddDeclarationRuleObj
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
src/components/CustomizeForm.tsx
View file @
aca920ec
...
@@ -86,7 +86,9 @@ export default defineComponent({
...
@@ -86,7 +86,9 @@ export default defineComponent({
watch
(
watch
(
()
=>
props
.
config
,
()
=>
props
.
config
,
(
val
)
=>
{
(
val
)
=>
{
tableConfig
.
value
=
val
console
.
log
(
89
,
val
)
tableConfig
.
value
=
val
.
filter
((
item
)
=>
!
item
.
isIncludeProp
)
},
},
{
immediate
:
true
,
deep
:
true
},
{
immediate
:
true
,
deep
:
true
},
)
)
...
@@ -127,7 +129,11 @@ export default defineComponent({
...
@@ -127,7 +129,11 @@ export default defineComponent({
// 表单验证方法
// 表单验证方法
const
clearValidate
=
async
(
clearFields
?:
string
[])
=>
{
const
clearValidate
=
async
(
clearFields
?:
string
[])
=>
{
if
(
!
formRef
.
value
)
return
false
if
(
!
formRef
.
value
)
return
false
return
await
formRef
.
value
.
clearValidate
(
clearFields
)
if
(
clearFields
)
{
return
await
formRef
.
value
?.
clearValidate
(
clearFields
)
}
else
{
return
await
formRef
.
value
?.
clearValidate
()
}
}
}
// 重置表单
// 重置表单
...
@@ -148,11 +154,9 @@ export default defineComponent({
...
@@ -148,11 +154,9 @@ export default defineComponent({
.
filter
((
item
)
=>
!
item
.
fixed
)
.
filter
((
item
)
=>
!
item
.
fixed
)
.
concat
(
tableConfig
.
value
.
filter
((
item
)
=>
item
.
fixed
))
.
concat
(
tableConfig
.
value
.
filter
((
item
)
=>
item
.
fixed
))
}
else
{
}
else
{
tableConfig
.
value
=
[
tableConfig
.
value
=
props
.
config
.
filter
((
item
)
=>
!
item
.
isIncludeProp
)
...
props
.
config
.
filter
((
item
)
=>
!
item
.
isIncludeProp
),
]
console
.
log
(
tableConfig
.
value
)
}
}
console
.
log
(
154
,
tableConfig
.
value
)
}
}
return
{
return
{
...
...
src/components/Form.vue/Select.vue
View file @
aca920ec
...
@@ -71,16 +71,26 @@ const allOption = {
...
@@ -71,16 +71,26 @@ const allOption = {
value
:
''
,
value
:
''
,
label
:
'全部'
,
label
:
'全部'
,
}
}
const
fields
=
reactive
<
{
value
:
string
;
label
:
string
}
>
({
const
fields
=
reactive
({
value
:
''
,
value
:
props
.
value
,
label
:
''
,
label
:
props
.
label
,
})
})
watch
(
[()
=>
props
.
value
,
()
=>
props
.
label
],
(
val
)
=>
{
console
.
log
(
'modelValue'
,
val
)
fields
[
'value'
]
=
val
[
0
]
fields
[
'label'
]
=
val
[
1
]
},
{
immediate
:
true
},
)
// 选项处理
// 选项处理
const
getOptions
=
computed
(()
=>
{
const
getOptions
=
computed
(()
=>
{
const
value
=
props
.
labelIsValue
?
fields
.
label
:
fields
.
value
const
value
=
props
.
labelIsValue
?
fields
.
label
:
fields
.
value
const
arr
=
cloneDeep
(
props
.
options
)
const
arr
=
cloneDeep
(
props
.
options
)
const
data
=
arr
.
map
((
item
)
=>
{
const
data
=
arr
.
map
((
item
)
=>
{
!
item
.
value
&&
(
item
.
value
=
eval
(
`item.
${
value
}
`
))
!
item
.
value
&&
(
item
.
value
=
eval
(
`item.
${
value
}
`
))
!
item
.
label
&&
(
item
.
label
=
eval
(
`item.
${
fields
.
label
}
`
))
!
item
.
label
&&
(
item
.
label
=
eval
(
`item.
${
fields
.
label
}
`
))
...
@@ -91,6 +101,7 @@ const getOptions = computed(() => {
...
@@ -91,6 +101,7 @@ const getOptions = computed(() => {
data
.
unshift
(
allOption
)
data
.
unshift
(
allOption
)
return
data
return
data
}
}
return
data
return
data
})
})
...
...
src/views/logistics/components/LogisticsWaySelect.tsx
0 → 100644
View file @
aca920ec
import
{
defineComponent
,
ref
}
from
'vue'
import
{
ElPopover
,
ElScrollbar
,
ElCheckbox
,
ElCheckboxGroup
,
ElInput
,
}
from
'element-plus'
import
{
usableAllList
}
from
'@/api/logistics'
const
styles
=
{
searchForm
:
{
position
:
'relative'
,
},
titleBox
:
{
display
:
'flex'
,
padding
:
'10px'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
},
checkboxGroup
:
{
display
:
'flex'
,
padding
:
'10px'
,
justifyContent
:
'space-between'
,
backgroundColor
:
'#efefef'
,
},
}
as
const
export
default
defineComponent
({
name
:
'CustomizeForm'
,
props
:
{
modelValue
:
{
type
:
Array
as
PropType
<
(
string
|
number
)[]
>
,
default
:
()
=>
[],
},
},
emits
:
[
'update:modelValue'
,
'validate'
],
setup
()
{
const
companySelectStatus
=
ref
([])
const
companyList
=
ref
([{
name
:
'1'
,
items
:
[{
name
:
'1'
,
id
:
'1'
}]
}])
const
selectedList
=
ref
<
(
string
|
number
)[]
>
([])
const
logisticsWayId
=
ref
([])
function
setCheckAll
()
{}
async
function
getAllList
()
{
try
{
const
res
=
await
Promise
.
allSettled
([
usableAllList
()])
res
.
forEach
(
(
item
:
PromiseSettledResult
<
{
code
:
number
;
data
:
never
[]
}
>
,
index
,
)
=>
{
if
(
item
?.
status
===
'fulfilled'
)
{
if
(
item
.
value
.
code
===
200
)
{
if
(
index
==
0
)
{
logisticsWayId
.
value
=
[...(
item
.
value
.
data
||
[])]
}
}
}
},
)
console
.
log
(
59
,
logisticsWayId
.
value
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
onMounted
(()
=>
{
getAllList
()
})
return
()
=>
(
<
ElPopover
width=
"650px"
placement=
"bottom-start"
trigger=
"click"
popper
-
style=
{
{
padding
:
0
}
}
v
-
slots=
{
{
reference
:
()
=>
(
<
ElInput
style=
{
{
width
:
'100%'
}
}
placeholder=
"请选择物流方式"
/>
),
}
}
>
<
ElScrollbar
class=
"scroll-container"
maxHeight=
"450px"
>
{
companyList
.
value
.
map
((
company
,
index
)
=>
(
<
div
class=
"companyBox"
key=
{
index
}
>
<
div
style=
{
styles
.
titleBox
}
>
<
div
class=
"title"
>
{
company
.
name
}
</
div
>
<
ElCheckbox
modelValue=
{
companySelectStatus
.
value
[
index
]
}
onChange=
{
()
=>
setCheckAll
()
}
class=
"selectAll"
>
全选
</
ElCheckbox
>
</
div
>
<
ElCheckboxGroup
modelValue=
{
selectedList
.
value
}
onUpdate
:
modelValue=
{
(
value
)
=>
(
selectedList
.
value
=
value
)
}
style=
{
styles
.
checkboxGroup
}
>
{
company
.
items
.
map
((
item
)
=>
(
<
ElCheckbox
label=
{
item
.
name
}
value=
{
item
.
id
}
key=
{
`item-${item.id}`
}
class=
"checkboxItem"
/>
))
}
</
ElCheckboxGroup
>
</
div
>
))
}
</
ElScrollbar
>
</
ElPopover
>
)
},
})
src/views/logistics/declarationRule.vue
View file @
aca920ec
...
@@ -90,7 +90,7 @@ import { debounce } from 'lodash-es'
...
@@ -90,7 +90,7 @@ import { debounce } from 'lodash-es'
import
{
AddDeclarationRuleObj
}
from
'./types/declarationRule'
import
{
AddDeclarationRuleObj
}
from
'./types/declarationRule'
import
{
Edit
,
Delete
,
List
}
from
'@element-plus/icons-vue'
import
{
Edit
,
Delete
,
List
}
from
'@element-plus/icons-vue'
import
{
ISeachFormConfig
}
from
'@/types/searchType'
import
{
ISeachFormConfig
}
from
'@/types/searchType'
import
LogisticsWaySelect
from
'./components/LogisticsWaySelect.tsx'
const
[
searchForm
]
=
useValue
({})
const
[
searchForm
]
=
useValue
({})
const
[
editForm
,
resetEditForm
]
=
useValue
<
AddDeclarationRuleObj
>
({
const
[
editForm
,
resetEditForm
]
=
useValue
<
AddDeclarationRuleObj
>
({
type
:
1
,
type
:
1
,
...
@@ -141,7 +141,7 @@ const mapData = ref(
...
@@ -141,7 +141,7 @@ const mapData = ref(
]),
]),
)
)
const
formConfig
=
ref
<
IFormConfig
[]
>
(
[
const
formConfig
=
computed
<
IFormConfig
[]
>
(()
=>
[
{
{
prop
:
'name'
,
prop
:
'name'
,
type
:
'input'
,
type
:
'input'
,
...
@@ -172,6 +172,21 @@ const formConfig = ref<IFormConfig[]>([
...
@@ -172,6 +172,21 @@ const formConfig = ref<IFormConfig[]>([
],
],
},
},
{
{
prop
:
'logisticsWay'
,
type
:
'select'
,
label
:
'物流方式'
,
render
:
()
=>
{
return
<
LogisticsWaySelect
><
/LogisticsWaySelect
>
},
rules
:
[
{
required
:
true
,
message
:
'请选择物流方式'
,
},
],
},
{
prop
:
'type'
,
prop
:
'type'
,
type
:
'select'
,
type
:
'select'
,
label
:
'申报类型'
,
label
:
'申报类型'
,
...
@@ -590,6 +605,32 @@ async function showLog(row: AddDeclarationRuleObj) {
...
@@ -590,6 +605,32 @@ async function showLog(row: AddDeclarationRuleObj) {
console
.
log
(
error
)
console
.
log
(
error
)
}
}
}
}
onMounted
(()
=>
{
// getAllList()
})
/**
* @description: 获取物流方式列表
*/
// const logisticsWayId = ref([])
// async function getAllList() {
// try {
// const res = await Promise.allSettled([usableAllList()])
// res.forEach(
// (item: PromiseSettledResult
<
{
code
:
number
;
data
:
never
[]
}
>
,
index
)
=>
{
// if (item?.status === 'fulfilled') {
// if (item.value.code === 200) {
// if (index == 0) {
// logisticsWayId.value = [...(item.value.data || [])]
// }
// }
// }
// },
// )
// } catch (error) {
// console.log(error)
// }
// }
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/logistics/logisticsMethod.vue
View file @
aca920ec
...
@@ -219,14 +219,14 @@ const formConfig = computed<IFormConfig[]>(() => [
...
@@ -219,14 +219,14 @@ const formConfig = computed<IFormConfig[]>(() => [
name
:
string
name
:
string
id
:
string
|
number
id
:
string
|
number
})
=>
{
})
=>
{
console
.
log
(
222
,
value
)
editForm
.
value
.
company
=
value
.
name
editForm
.
value
.
company
=
value
.
name
if
(
value
.
code
===
'UINUIN'
)
{
if
(
value
.
code
===
'UINUIN'
)
{
editFormRef
.
value
?.
refashConfig
([
'uinuinWarehouseId'
])
editFormRef
.
value
?.
refashConfig
([
'uinuinWarehouseId'
])
editFormRef
.
value
?.
clearValidate
()
}
else
{
}
else
{
editFormRef
.
value
?.
refashConfig
([])
editFormRef
.
value
?.
refashConfig
([])
editFormRef
.
value
?.
clearValidate
(
[
'uinuinWarehouseId'
]
)
editFormRef
.
value
?.
clearValidate
()
editForm
.
value
.
uinuinWarehouseId
=
undefined
editForm
.
value
.
uinuinWarehouseId
=
null
}
}
},
},
},
},
...
@@ -599,6 +599,11 @@ async function editWay(item: LogisticsMethod) {
...
@@ -599,6 +599,11 @@ async function editWay(item: LogisticsMethod) {
console
.
log
(
493
,
editForm
.
value
)
console
.
log
(
493
,
editForm
.
value
)
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
if
(
item
.
uinuinWarehouseId
)
{
nextTick
(()
=>
{
editFormRef
.
value
?.
refashConfig
([
'uinuinWarehouseId'
])
})
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
}
}
...
@@ -668,9 +673,9 @@ const save = debounce(async () => {
...
@@ -668,9 +673,9 @@ const save = debounce(async () => {
*/
*/
function
addDialog
()
{
function
addDialog
()
{
dialogVisible
.
value
=
true
dialogVisible
.
value
=
true
nextTick
(()
=>
{
//
nextTick(() => {
editFormRef
.
value
?.
refashConfig
([]
)
// editFormRef.value?.refashConfig(
)
})
//
})
}
}
/**
/**
...
@@ -751,6 +756,8 @@ async function getAllList() {
...
@@ -751,6 +756,8 @@ async function getAllList() {
if
(
index
==
0
)
{
if
(
index
==
0
)
{
warehouseList
.
value
=
item
.
value
.
data
||
[]
warehouseList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
1
)
{
}
else
if
(
index
==
1
)
{
console
.
log
(
758
,
item
.
value
.
data
)
ruleNameList
.
value
=
item
.
value
.
data
||
[]
ruleNameList
.
value
=
item
.
value
.
data
||
[]
}
else
if
(
index
==
2
)
{
}
else
if
(
index
==
2
)
{
platformList
.
value
=
item
.
value
.
data
||
[]
platformList
.
value
=
item
.
value
.
data
||
[]
...
...
src/views/logistics/shippingAddress.vue
View file @
aca920ec
...
@@ -121,6 +121,11 @@
...
@@ -121,6 +121,11 @@
</div>
</div>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"24"
v-if=
"tableData.length === 0"
>
<div
class=
"empty-box"
>
<el-empty
description=
"暂无发货地址"
/>
</div>
</el-col>
</el-row>
</el-row>
</div>
</div>
<ElPagination
<ElPagination
...
...
src/views/logistics/types/logistics.ts
View file @
aca920ec
...
@@ -12,7 +12,7 @@ export interface LogisticsMethod {
...
@@ -12,7 +12,7 @@ export interface LogisticsMethod {
ruleRef
:
ruleRefObj
ruleRef
:
ruleRefObj
ruleId
?:
string
|
number
ruleId
?:
string
|
number
ruleList
?:
ruleRefObj
[]
ruleList
?:
ruleRefObj
[]
uinuinWarehouseId
?:
number
|
string
uinuinWarehouseId
?:
number
|
string
|
null
}
}
export
interface
LogisticsMethodList
{
export
interface
LogisticsMethodList
{
...
...
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