Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
sso-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa34de91
authored
Mar 23, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改弹窗逻辑
1 parent
969ce4bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
src/views/templateConfig/components/selectCouponDialog.vue
src/views/templateConfig/components/selectCouponDialog.vue
View file @
fa34de9
...
@@ -161,13 +161,11 @@ export default {
...
@@ -161,13 +161,11 @@ export default {
this
.
$emit
(
'closeDialog'
)
this
.
$emit
(
'closeDialog'
)
},
},
// 点击选中卡券
// 点击选中卡券
selectionTable
(){
selectionTable
(
e
){
let
list
=
[...
this
.
$refs
.
tableRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
],
...
this
.
copyList
]
||
[]
if
(
this
.
resetTable
){
if
(
this
.
resetTable
)
{
return
list
=
[...
this
.
signList
.
directChargeList
,
...
this
.
signList
.
couponList
]
||
[]
}
this
.
copyList
=
utils
.
deepClone
(
list
)
let
list
=
this
.
$refs
.
tableRef
?.
mutiSelectArr
?.[
this
.
tableParams
?.
mutiSelectName
]
||
[]
this
.
resetTable
=
false
};
list
.
map
(
item
=>
this
.
$set
(
item
,
'couponAmount'
,
1
))
list
.
map
(
item
=>
this
.
$set
(
item
,
'couponAmount'
,
1
))
this
.
filterCoupon
(
list
)
this
.
filterCoupon
(
list
)
},
},
...
@@ -191,6 +189,7 @@ export default {
...
@@ -191,6 +189,7 @@ export default {
//删除选中行
//删除选中行
delSelectedRow
(
row
){
delSelectedRow
(
row
){
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
console
.
log
(
222
)
let
idx
=
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
let
idx
=
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
if
(
idx
>
-
1
)
{
if
(
idx
>
-
1
)
{
try
{
try
{
...
@@ -210,22 +209,14 @@ export default {
...
@@ -210,22 +209,14 @@ export default {
},
},
//更新表格设置选中的行
//更新表格设置选中的行
setTableFinishFun
()
{
setTableFinishFun
()
{
console
.
log
(
this
.
signList
.
directChargeList
,
this
.
signList
.
couponList
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
firstOpen
){
this
.
copyList
=
utils
.
deepClone
(
this
.
selectedGoodsList
)
console
.
log
(
333
)
this
.
filterCoupon
(
this
.
copyList
)
this
.
firstOpen
=
false
}
let
list
=
[...
this
.
signList
.
directChargeList
,
...
this
.
signList
.
couponList
]
let
list
=
[...
this
.
signList
.
directChargeList
,
...
this
.
signList
.
couponList
]
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
]?.
data
?.
forEach
((
row
,
rowIdx
)
=>
{
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
]?.
data
?.
forEach
((
row
,
rowIdx
)
=>
{
let
idx
=
list
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
let
idx
=
list
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
try
{
try
{
console
.
log
(
444
)
if
(
idx
>-
1
){
if
(
idx
>-
1
){
let
id
=
this
.
copyList
.
findIndex
(
item
=>
item
.
id
==
row
.
id
)
//
let id = this.copyList.findIndex(item => item.id == row.id)
if
(
id
>
-
1
&&
this
.
copyList
?.
length
)
this
.
copyList
.
splice
(
id
,
1
)
//
if (id > -1 && this.copyList?.length) this.copyList.splice(id, 1)
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
rowIdx
],
true
)
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
rowIdx
],
true
)
}
else
{
}
else
{
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
rowIdx
],
false
)
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
tableRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
rowIdx
],
false
)
...
@@ -233,7 +224,8 @@ export default {
...
@@ -233,7 +224,8 @@ export default {
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
}
}
})
})
this
.
resetTable
=
false
})
})
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment