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
c518da1b
Commit
c518da1b
authored
Jan 28, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改弹窗单选
parent
3121cfd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
CustomerModal.vue
src/components/CustomerModal/CustomerModal.vue
+7
-3
ProductModal.vue
src/components/ProductModal/ProductModal.vue
+8
-3
UserModal.vue
src/components/UserModal/UserModal.vue
+8
-6
No files found.
src/components/CustomerModal/CustomerModal.vue
View file @
c518da1b
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</el-form>
</el-form>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"small"
height=
"400"
>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"small"
height=
"400"
>
<vxe-column
type=
"
checkbox
"
width=
"40"
></vxe-column>
<vxe-column
type=
"
radio
"
width=
"40"
></vxe-column>
<!--
<vxe-column
field=
"customerId"
title=
"客户id"
></vxe-column>
-->
<!--
<vxe-column
field=
"customerId"
title=
"客户id"
></vxe-column>
-->
<vxe-column
field=
"customerName"
title=
"客户名称"
></vxe-column>
<vxe-column
field=
"customerName"
title=
"客户名称"
></vxe-column>
<vxe-column
field=
"customerNickName"
title=
"客户简称"
></vxe-column>
<vxe-column
field=
"customerNickName"
title=
"客户简称"
></vxe-column>
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
getCustomerPage
}
from
'@/api/customer'
import
{
getCustomerPage
}
from
'@/api/customer'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'CustomerModal'
,
name
:
'CustomerModal'
,
...
@@ -97,8 +98,11 @@ export default defineComponent({
...
@@ -97,8 +98,11 @@ export default defineComponent({
}
}
const
confirmModal
=
()
=>
{
const
confirmModal
=
()
=>
{
const
list
=
xTable
.
value
?.
getCheckboxRecords
()
const
list
=
xTable
.
value
?.
getRadioRecord
()
emit
(
'confirm'
,
list
)
if
(
list
==
null
)
{
return
ElMessage
.
warning
(
'请选择一条数据!'
)
}
emit
(
'confirm'
,
[
list
])
emit
(
'update:visible'
,
false
)
emit
(
'update:visible'
,
false
)
}
}
...
...
src/components/ProductModal/ProductModal.vue
View file @
c518da1b
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
</el-form>
</el-form>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"mini"
height=
"400"
>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"mini"
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>
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
getProductList
}
from
'@/api/product'
import
{
getProductList
}
from
'@/api/product'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'ProductModal'
,
name
:
'ProductModal'
,
...
@@ -87,8 +88,12 @@
...
@@ -87,8 +88,12 @@
}
}
const
confirmModal
=
()
=>
{
const
confirmModal
=
()
=>
{
const
list
=
xTable
.
value
?.
getCheckboxRecords
()
const
list
=
xTable
.
value
?.
getRadioRecord
()
emit
(
'confirm'
,
list
)
if
(
list
==
null
)
{
return
ElMessage
.
warning
(
'请选择一条数据!'
)
}
emit
(
'confirm'
,
[
list
])
emit
(
'update:visible'
,
false
)
emit
(
'update:visible'
,
false
)
}
}
...
...
src/components/UserModal/UserModal.vue
View file @
c518da1b
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</el-form>
</el-form>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"small"
height=
"400"
>
<vxe-table
ref=
"xTable"
border
:data=
"tableData"
:loading=
"loading"
size=
"small"
height=
"400"
>
<vxe-column
type=
"
checkbox
"
width=
"40"
></vxe-column>
<vxe-column
type=
"
radio
"
width=
"40"
></vxe-column>
<vxe-column
field=
"nickName"
title=
"用户名称"
></vxe-column>
<vxe-column
field=
"nickName"
title=
"用户名称"
></vxe-column>
<vxe-column
field=
"phonenumber"
title=
"联系电话"
></vxe-column>
<vxe-column
field=
"phonenumber"
title=
"联系电话"
></vxe-column>
<vxe-column
field=
"email"
title=
"邮箱"
></vxe-column>
<vxe-column
field=
"email"
title=
"邮箱"
></vxe-column>
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
getUserList
}
from
'@/api/customer'
import
{
getUserList
}
from
'@/api/customer'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'UserModal'
,
name
:
'UserModal'
,
...
@@ -79,9 +80,7 @@ export default defineComponent({
...
@@ -79,9 +80,7 @@ export default defineComponent({
}
}
)
)
const
resetForm
=
()
=>
{
const
resetForm
=
()
=>
{}
}
const
queryUser
=
async
()
=>
{
const
queryUser
=
async
()
=>
{
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
...
@@ -93,8 +92,11 @@ export default defineComponent({
...
@@ -93,8 +92,11 @@ export default defineComponent({
}
}
const
confirmModal
=
()
=>
{
const
confirmModal
=
()
=>
{
const
list
=
xTable
.
value
?.
getCheckboxRecords
()
const
list
=
xTable
.
value
?.
getRadioRecord
()
emit
(
'confirm'
,
list
)
if
(
list
==
null
)
{
return
ElMessage
.
warning
(
'请选择一条数据!'
)
}
emit
(
'confirm'
,
[
list
])
emit
(
'update:visible'
,
false
)
emit
(
'update:visible'
,
false
)
}
}
...
...
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