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
f1e2e8cc
Commit
f1e2e8cc
authored
Jun 18, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
c85eb33d
b50250e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
30 deletions
+112
-30
components.d.ts
+6
-7
src/types/api/logistics.ts
+1
-0
src/views/logistics/sortingConfiguration.vue
+105
-23
No files found.
components.d.ts
View file @
f1e2e8cc
...
...
@@ -7,10 +7,10 @@ export {}
declare
module
'vue'
{
export
interface
GlobalComponents
{
AmountInput
:
typeof
import
(
'./src/components/Form/AmountInput.vue'
)[
'default'
]
AmountInput
:
typeof
import
(
'./src/components/Form
.vue
/AmountInput.vue'
)[
'default'
]
CommonCard
:
typeof
import
(
'./src/components/CommonCard.vue'
)[
'default'
]
DatePicker
:
typeof
import
(
'./src/components/Form/DatePicker.vue'
)[
'default'
]
DateRangePicker
:
typeof
import
(
'./src/components/Form/DateRangePicker.vue'
)[
'default'
]
DatePicker
:
typeof
import
(
'./src/components/Form
.vue
/DatePicker.vue'
)[
'default'
]
DateRangePicker
:
typeof
import
(
'./src/components/Form
.vue
/DateRangePicker.vue'
)[
'default'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
ElCard
:
typeof
import
(
'element-plus/es'
)[
'ElCard'
]
ElCarousel
:
typeof
import
(
'element-plus/es'
)[
'ElCarousel'
]
...
...
@@ -53,19 +53,18 @@ declare module 'vue' {
ElTimelineItem
:
typeof
import
(
'element-plus/es'
)[
'ElTimelineItem'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTree
:
typeof
import
(
'element-plus/es'
)[
'ElTree'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
NavMenu
:
typeof
import
(
'./src/components/NavMenu.vue'
)[
'default'
]
RenderColumn
:
typeof
import
(
'./src/components/RenderColumn.vue'
)[
'default'
]
RightClickMenu
:
typeof
import
(
'./src/components/RightClickMenu.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
Select
:
typeof
import
(
'./src/components/Form/Select.vue'
)[
'default'
]
Select
:
typeof
import
(
'./src/components/Form
.vue
/Select.vue'
)[
'default'
]
ShipmentOrderDetail
:
typeof
import
(
'./src/components/ShipmentOrderDetail.vue'
)[
'default'
]
SplitDiv
:
typeof
import
(
'./src/components/splitDiv/splitDiv.vue'
)[
'default'
]
'Switch '
:
typeof
import
(
'./src/components/Form/Switch .vue'
)[
'default'
]
'Switch '
:
typeof
import
(
'./src/components/Form.vue/Switch .vue'
)[
'default'
]
TableRightMenu
:
typeof
import
(
'./src/components/TableRightMenu.vue'
)[
'default'
]
TableView
:
typeof
import
(
'./src/components/TableView.vue'
)[
'default'
]
UploadExcel
:
typeof
import
(
'./src/components/UploadExcel.vue'
)[
'default'
]
UploadImage
:
typeof
import
(
'./src/components/UploadImage.vue'
)[
'default'
]
...
...
src/types/api/logistics.ts
View file @
f1e2e8cc
...
...
@@ -15,6 +15,7 @@ export interface Ilogistics {
}
export
interface
IsortingInfo
{
id
?:
number
sortingFacility
?:
string
|
null
sortingArea
:
number
|
null
sortingAreaName
?:
string
|
null
serviceCode
:
string
|
null
...
...
src/views/logistics/sortingConfiguration.vue
View file @
f1e2e8cc
<
script
setup
lang=
"ts"
>
import
{
Ilogistics
,
IsortingInfo
}
from
'@/types/api/logistics'
import
{
Edit
,
Delete
}
from
'@element-plus/icons-vue'
import
{
Edit
,
Delete
,
CirclePlus
}
from
'@element-plus/icons-vue'
import
{
getsortingConfigListApi
,
usableAllList
,
createSortingApi
,
updateSortingApi
,
deleteSortingApi
,
}
from
'@/api/logistics
.ts
'
}
from
'@/api/logistics'
import
{
nextTick
,
ref
}
from
'vue'
import
SplitDiv
from
'@/components/splitDiv/splitDiv.vue'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
interface
InterForm
{
id
?:
number
sortingFacility
?:
string
|
null
sortingArea
:
number
|
null
sortingAreaName
?:
string
|
null
serviceCode
:
string
[]
}
const
searchForm
=
ref
({
sortingFacility
:
''
,
sortingArea
:
null
,
serviceCode
:
''
,
serviceCode
:
[]
,
})
const
selections
=
ref
<
IsortingInfo
[]
>
([])
const
formRef
=
ref
()
const
form
=
ref
<
IsortingInfo
>
({
const
form
=
ref
<
InterForm
>
({
sortingFacility
:
''
,
sortingArea
:
null
,
sortingAreaName
:
''
,
serviceCode
:
''
,
serviceCode
:
[]
,
})
const
createData
=
ref
({
title
:
''
,
show
:
false
,
isEdit
:
false
,
form
:
{
sortingFacility
:
''
,
sortingArea
:
null
,
sortingAreaName
:
''
,
serviceCode
:
''
,
serviceCode
:
[]
,
},
})
const
rules
=
{
sortingFacility
:
[
{
required
:
true
,
message
:
'请输入分拣设备'
,
trigger
:
'blur'
},
],
sortingArea
:
[{
required
:
true
,
message
:
'请选择分拣口'
,
trigger
:
'change'
}],
serviceCode
:
[
{
required
:
true
,
message
:
'请选择物流方式'
,
trigger
:
'change'
},
...
...
@@ -51,6 +65,7 @@ const {
getsortingConfigListApi
(
{
...
searchForm
.
value
,
serviceCode
:
searchForm
.
value
.
serviceCode
.
join
(
','
),
},
page
,
pageSize
,
...
...
@@ -100,7 +115,7 @@ const sortingList = ref<interSorting[]>([
},
{
label
:
'E0'
,
value
:
9
,
value
:
9
9
,
},
])
const
handleSelectionChange
=
(
data
:
IsortingInfo
[])
=>
{
...
...
@@ -109,9 +124,15 @@ const handleSelectionChange = (data: IsortingInfo[]) => {
const
handleConfirm
=
async
()
=>
{
await
formRef
.
value
?.
validate
()
if
(
!
createData
.
value
.
isEdit
)
{
await
createSortingApi
(
form
.
value
)
await
createSortingApi
({
...
form
.
value
,
serviceCode
:
form
.
value
.
serviceCode
.
join
(
','
),
})
}
else
{
await
updateSortingApi
(
form
.
value
)
await
updateSortingApi
({
...
form
.
value
,
serviceCode
:
form
.
value
.
serviceCode
.
join
(
','
),
})
}
createData
.
value
.
show
=
false
ElMessage
.
success
(
'操作成功'
)
...
...
@@ -134,15 +155,34 @@ const handleBatchDelete = async (row: IsortingInfo | null) => {
ElMessage
.
success
(
'删除成功'
)
await
search
()
}
const
addLogistics
=
()
=>
{
ElMessageBox
.
prompt
(
''
,
'物流方式'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputErrorMessage
:
'请输入物流方式'
,
inputPlaceholder
:
'请输入物流方式'
,
}).
then
(({
value
}:
{
value
:
string
})
=>
{
if
(
!
value
.
trim
())
{
ElMessage
.
error
(
'物流方式不能为空'
)
return
}
if
(
form
.
value
.
serviceCode
.
includes
(
value
))
{
ElMessage
.
warning
(
'物流方式已存在'
)
return
}
form
.
value
.
serviceCode
.
push
(
value
)
ElMessage
.
success
(
'添加成功'
)
})
}
const
createWarehouse
=
()
=>
{
createData
.
value
.
show
=
true
createData
.
value
.
isEdit
=
false
createData
.
value
.
title
=
'新增'
form
.
value
=
{
sortingFacility
:
''
,
sortingArea
:
null
,
sortingAreaName
:
''
,
serviceCode
:
''
,
serviceCode
:
[]
,
}
nextTick
(()
=>
{
formRef
.
value
?.
clearValidate
()
...
...
@@ -153,9 +193,11 @@ const updateSorting = (item: IsortingInfo) => {
createData
.
value
.
isEdit
=
true
createData
.
value
.
title
=
'修改'
form
.
value
=
{
id
:
item
.
id
,
sortingFacility
:
item
.
sortingFacility
,
sortingArea
:
item
.
sortingArea
,
sortingAreaName
:
item
.
sortingAreaName
,
serviceCode
:
item
.
serviceCode
,
serviceCode
:
item
.
serviceCode
?
item
.
serviceCode
.
split
(
','
)
:
[]
,
}
nextTick
(()
=>
{
formRef
.
value
?.
clearValidate
()
...
...
@@ -173,6 +215,13 @@ const sortingChange = (v: number) => {
<template
#
top
>
<el-card>
<el-form
inline
:model=
"searchForm"
>
<el-form-item
label=
"分拣设备"
>
<el-input
v-model
.
trim=
"searchForm.sortingFacility"
placeholder=
"分拣设备"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"分拣口"
>
<el-select
v-model=
"searchForm.sortingArea"
...
...
@@ -192,6 +241,7 @@ const sortingChange = (v: number) => {
v-model=
"searchForm.serviceCode"
clearable
filterable
multiple
style=
"width: 160px"
>
<el-option
...
...
@@ -225,7 +275,19 @@ const sortingChange = (v: number) => {
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
align=
"center"
label=
"分拣设备"
width=
"540"
show-overflow-tooltip
prop=
"sortingFacility"
></el-table-column>
<el-table-column
align=
"center"
label=
"分拣口名称"
...
...
@@ -234,6 +296,8 @@ const sortingChange = (v: number) => {
<el-table-column
align=
"center"
label=
"物流编码"
width=
"540"
show-overflow-tooltip
prop=
"serviceCode"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
...
...
@@ -261,15 +325,6 @@ const sortingChange = (v: number) => {
</el-table>
</div>
<div
class=
"pagination"
>
<!-- <el-pagination
v-model:current-page="pagination.currentPage"
v-model:page-size="pagination.pageSize"
:page-sizes="[50, 100, 150, 200]"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/> -->
<ElPagination
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
...
...
@@ -295,6 +350,13 @@ const sortingChange = (v: number) => {
:rules=
"rules"
:model=
"form"
>
<el-form-item
label=
"分拣设备"
prop=
"sortingFacility"
>
<el-input
v-model
.
trim=
"form.sortingFacility"
placeholder=
"分拣设备"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"分拣口"
prop=
"sortingArea"
>
<el-select
v-model=
"form.sortingArea"
...
...
@@ -310,7 +372,14 @@ const sortingChange = (v: number) => {
</el-select>
</el-form-item>
<el-form-item
label=
"物流方式"
prop=
"serviceCode"
>
<el-select
v-model=
"form.serviceCode"
clearable
filterable
>
<div
class=
"flex"
>
<el-select
v-model=
"form.serviceCode"
style=
"width: 320px"
clearable
filterable
multiple
>
<el-option
v-for=
"item in logisticsMethodsList"
:key=
"item.serviceCode"
...
...
@@ -318,6 +387,16 @@ const sortingChange = (v: number) => {
:value=
"item.serviceCode"
></el-option>
</el-select>
 
<el-icon
color=
"#409eff"
size=
"30"
title=
"添加物流方式"
class=
"add-btn"
@
click=
"addLogistics"
><CirclePlus
/></el-icon>
</div>
</el-form-item>
</el-form>
<
template
#
footer
>
...
...
@@ -379,4 +458,7 @@ const sortingChange = (v: number) => {
}
}
}
.add-btn
:hover
{
cursor
:
pointer
;
}
</
style
>
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