Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 9398da98
authored
Feb 25, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增礼包-选择礼包弹窗
1 parent
9fcf5a1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
22 deletions
src/views/giftBag/selectGiftDialog.vue
src/views/giftBag/selectStaffDialog.vue
src/views/giftBag/selectGiftDialog.vue
View file @
9398da9
...
@@ -197,26 +197,31 @@ export default {
...
@@ -197,26 +197,31 @@ export default {
mounted
()
{
mounted
()
{
this
.
userInfo
=
this
.
$globalState
.
session
this
.
userInfo
=
this
.
$globalState
.
session
this
.
getList
({},
true
)
this
.
getList
({},
true
,
true
)
},
},
methods
:
{
methods
:
{
getList
(
page
,
isReset
=
false
)
{
getList
(
page
,
isReset
Page
=
false
,
isMount
=
false
)
{
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
...
this
.
searchForm
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
pageNum
:
isReset
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
,
pageNum
:
isReset
Page
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
,
pageSize
:
isReset
?
10
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageSize
pageSize
:
isReset
Page
?
10
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageSize
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
giftBag
this
.
$apis
.
giftBag
.
getDirectionalGiftListApi
(
params
)
.
getDirectionalGiftListApi
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
// 重置分页组件
if
(
this
.
$refs
[
this
.
activeName
+
'Ref'
]
&&
isResetPage
)
{
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
=
1
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageSize
=
10
}
this
.
giftList
=
res
.
list
this
.
giftList
=
res
.
list
this
.
giftList
.
forEach
(
item
=>
{
this
.
giftList
.
forEach
(
item
=>
{
item
.
couponAnticipatedCost
=
item
.
anticipatedCost
item
.
couponAnticipatedCost
=
item
.
anticipatedCost
})
})
this
.
fnCallBack
=
true
//
this.fnCallBack = true
this
.
$refs
[
this
.
activeName
+
'Ref'
].
tableTotal
=
res
.
total
this
.
$refs
[
this
.
activeName
+
'Ref'
].
tableTotal
=
res
.
total
this
.
recoverySelected
()
this
.
recoverySelected
()
this
.
recoveryTotal
()
this
.
recoveryTotal
()
...
@@ -229,10 +234,12 @@ export default {
...
@@ -229,10 +234,12 @@ export default {
handleTabClick
()
{
handleTabClick
()
{
this
.
getList
({},
true
)
this
.
getList
({},
true
)
this
.
recoverySelected
()
},
},
handleSearch
()
{
handleSearch
()
{
this
.
getList
({},
true
)
this
.
getList
({},
true
)
this
.
recoverySelected
()
},
},
toLabelText
(
row
)
{
toLabelText
(
row
)
{
...
@@ -266,31 +273,49 @@ export default {
...
@@ -266,31 +273,49 @@ export default {
},
},
// 恢复选择
// 恢复选择
addSelected
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
length
)
{
this
.
selectedGiftList
[
this
.
activeName
].
list
.
forEach
(
row
=>
{
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
if
(
idx
!=
-
1
&&
row
.
status
!=
'3'
)
{
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
true
)
}
})
}
})
},
recoverySelected
()
{
recoverySelected
()
{
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
length
)
{
// 翻页,去掉已选项
this
.
selectedGiftList
[
this
.
activeName
].
list
.
forEach
(
row
=>
{
var
selectedData
=
this
.
$refs
[
this
.
activeName
+
'Ref'
].
mutiSelectArr
.
list
if
(
row
.
status
!=
'3'
)
{
var
deleteList
=
[]
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
,
true
)
this
.
addSelected
()
if
(
selectedData
)
{
selectedData
.
forEach
(
item
=>
{
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
.
findIndex
(
subItem
=>
subItem
.
id
==
item
.
id
)
==
-
1
)
{
deleteList
.
push
(
item
)
}
}
})
})
}
else
{
this
.
deleteSelected
(
deleteList
)
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
clearSelection
()
}
}
},
},
// 删除选中
// 删除选中
deleteSelected
(
deleteItem
)
{
deleteSelected
(
deleteList
)
{
deleteItem
.
forEach
(
row
=>
{
this
.
$nextTick
(()
=>
{
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
deleteList
.
forEach
(
row
=>
{
if
(
idx
!=
-
1
&&
row
.
status
!=
'3'
)
{
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
false
)
if
(
idx
!=
-
1
&&
row
.
status
!=
'3'
)
{
}
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
false
)
}
})
})
})
},
},
handleGiftDelete
(
attr
,
idx
)
{
handleGiftDelete
(
attr
,
idx
)
{
var
delete
Item
=
this
.
selectedGiftList
[
attr
].
list
.
splice
(
idx
,
1
)
var
delete
List
=
this
.
selectedGiftList
[
attr
].
list
.
splice
(
idx
,
1
)
this
.
deleteSelected
(
delete
Item
)
this
.
deleteSelected
(
delete
List
)
this
.
recoveryTotal
()
this
.
recoveryTotal
()
},
},
...
...
src/views/giftBag/selectStaffDialog.vue
View file @
9398da9
...
@@ -76,14 +76,19 @@ export default {
...
@@ -76,14 +76,19 @@ export default {
},
},
methods
:
{
methods
:
{
getList
(
page
,
isReset
=
false
)
{
getList
(
page
,
isReset
Page
=
false
)
{
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
...
this
.
searchForm
,
pageNum
:
isReset
?
1
:
this
.
$refs
.
mutiProRef
.
page
.
pageNum
,
pageNum
:
isReset
Page
?
1
:
this
.
$refs
.
mutiProRef
.
page
.
pageNum
,
pageSize
:
isReset
?
10
:
this
.
$refs
.
mutiProRef
.
page
.
pageSize
pageSize
:
isReset
Page
?
10
:
this
.
$refs
.
mutiProRef
.
page
.
pageSize
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
giftBag
.
getFollowerStaffListApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
giftBag
.
getFollowerStaffListApi
(
params
).
then
(
res
=>
{
// 重置分页组件
if
(
this
.
$refs
.
mutiProRef
&&
isResetPage
)
{
this
.
$refs
.
mutiProRef
.
page
.
pageNum
=
1
this
.
$refs
.
mutiProRef
.
page
.
pageSize
=
10
}
this
.
staffList
=
res
.
data
this
.
staffList
=
res
.
data
this
.
loading
=
false
this
.
loading
=
false
this
.
fnCallBack
=
true
this
.
fnCallBack
=
true
...
...
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