Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-excel
Commits
ea52a2ce
Commit
ea52a2ce
authored
Dec 17, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制只能选择一个产品
parent
5235c366
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
MultipleProductModal.vue
src/components/ProductModal/MultipleProductModal.vue
+14
-9
ChooseFile.vue
src/views/var/varExcel/components/ChooseFile/ChooseFile.vue
+1
-1
No files found.
src/components/ProductModal/MultipleProductModal.vue
View file @
ea52a2ce
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
size="mini"
size="mini"
height="400"
height="400"
>
>
<vxe-column
type=
"
checkbox
"
width=
"40"
></vxe-column>
<vxe-column
type=
"
radio
"
width=
"40"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"200"
></vxe-column>
<vxe-column
field=
"productCode"
title=
"产品编码"
width=
"200"
></vxe-column>
<vxe-column
field=
"productName"
title=
"产品名称"
></vxe-column>
<vxe-column
field=
"productName"
title=
"产品名称"
></vxe-column>
<vxe-column
field=
"productCategoryId_dictText"
title=
"产品类型"
width=
"200"
></vxe-column>
<vxe-column
field=
"productCategoryId_dictText"
title=
"产品类型"
width=
"200"
></vxe-column>
...
@@ -158,7 +158,7 @@ export default defineComponent({
...
@@ -158,7 +158,7 @@ export default defineComponent({
showEdit
.
value
=
val
showEdit
.
value
=
val
val
&&
val
&&
nextTick
(()
=>
{
nextTick
(()
=>
{
xTable
.
value
?.
setCheckboxRow
(
props
.
selectProd
,
true
)
//
xTable.value?.setCheckboxRow(props.selectProd, true)
})
})
}
}
)
)
...
@@ -176,6 +176,7 @@ export default defineComponent({
...
@@ -176,6 +176,7 @@ export default defineComponent({
// (formState.currentPage - 1) * 5,
// (formState.currentPage - 1) * 5,
// formState.pageSize * formState.currentPage
// formState.pageSize * formState.currentPage
// )
// )
// formState.total = +dataSource.length
const
params
=
queryParamsFilter
(
unref
(
formState
))
const
params
=
queryParamsFilter
(
unref
(
formState
))
const
{
data
}
=
await
getProductList
(
params
)
const
{
data
}
=
await
getProductList
(
params
)
tableData
.
value
=
data
.
result
.
records
tableData
.
value
=
data
.
result
.
records
...
@@ -185,20 +186,24 @@ export default defineComponent({
...
@@ -185,20 +186,24 @@ export default defineComponent({
}
}
const
confirmModal
=
()
=>
{
const
confirmModal
=
()
=>
{
const
list
=
xTable
.
value
?.
getCheckboxRecords
()
||
[]
// const list = xTable.value?.getCheckboxRecords() || []
const
reserveList
=
xTable
.
value
?.
getCheckboxReserveRecords
()
||
[]
// const reserveList = xTable.value?.getCheckboxReserveRecords() || []
const
res
=
[...
list
,
...
reserveList
]
// const res = [...list, ...reserveList]
const
res
=
xTable
.
value
?.
getRadioRecord
()
if
(
!
res
?.
length
)
{
// if (!res?.length) {
// return ElMessage.warning('请选择一条数据!')
// }
if
(
res
===
null
)
{
return
ElMessage
.
warning
(
'请选择一条数据!'
)
return
ElMessage
.
warning
(
'请选择一条数据!'
)
}
}
emit
(
'confirm'
,
res
)
emit
(
'confirm'
,
[
res
]
)
emit
(
'update:visible'
,
false
)
emit
(
'update:visible'
,
false
)
}
}
const
onHide
=
()
=>
{
const
onHide
=
()
=>
{
xTable
.
value
?.
clearCheckboxReserve
()
//
xTable.value?.clearCheckboxReserve()
xTable
.
value
?.
clearCheckboxRow
()
//
xTable.value?.clearCheckboxRow()
emit
(
'update:visible'
,
false
)
emit
(
'update:visible'
,
false
)
}
}
...
...
src/views/var/varExcel/components/ChooseFile/ChooseFile.vue
View file @
ea52a2ce
...
@@ -138,7 +138,7 @@ const submitForm = async () => {
...
@@ -138,7 +138,7 @@ const submitForm = async () => {
await
formRef
.
value
.
validate
()
await
formRef
.
value
.
validate
()
if
(
!
tableData
.
value
.
length
)
{
if
(
!
tableData
.
value
.
length
)
{
return
return
ElMessage
.
warning
(
'请选择文件!'
)
}
}
const
params
=
{
const
params
=
{
filePaths
:
tableData
.
value
.
map
((
item
)
=>
item
.
url
),
filePaths
:
tableData
.
value
.
map
((
item
)
=>
item
.
url
),
...
...
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