Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-outbound
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 8f8074b6
authored
Oct 27, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新紧急版本代码
1 parent
8eac9ab5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
119 additions
and
45 deletions
src/api/modules/redenvelope.js
src/views/redEnvelope/components/RedEnvelopeConfig/index.vue
src/views/redEnvelope/components/RedEnvelopeConfig/whiteList.vue
src/views/redEnvelope/components/RedEnvelopeConfig/whiteListImport.vue
src/views/redEnvelope/components/RedEnvelopeConfig/whiteListSearch.vue
src/api/modules/redenvelope.js
View file @
8f8074b
...
...
@@ -149,6 +149,39 @@ export default {
url
,
data
:
params
})
},
// 获取白名单列表
getWhiteListPage
(
params
){
params
.
method
=
'marketing.api.activityRedEnvelope.whiteList.page'
return
http
({
url
,
data
:
params
})
},
// 校验红包活动白名单导入
checkImportWhiteList
(
params
){
params
.
method
=
'marketing.api.activityRedEnvelope.whiteList.checkImport'
return
http
({
url
,
data
:
params
})
},
// 红包活动白名单导入
whiteListImport
(
params
){
params
.
method
=
'marketing.api.activityRedEnvelope.whiteList.import'
return
http
({
url
,
data
:
params
})
},
whiteListDelete
(
params
){
params
.
method
=
'marketing.api.activityRedEnvelope.whiteList.delete'
return
http
({
url
,
data
:
params
})
}
}
src/views/redEnvelope/components/RedEnvelopeConfig/index.vue
View file @
8f8074b
...
...
@@ -47,7 +47,7 @@
</div>
<link-detail
:linkDetailObj
.
sync=
"linkDetailObj"
></link-detail>
<edit
:editObj
.
sync=
"editObj"
></edit>
<whiteList
:
linkDetail
Obj
.
sync=
"whiteListObj"
>
<whiteList
:
whiteList
Obj
.
sync=
"whiteListObj"
>
</whiteList>
</div>
</
template
>
...
...
src/views/redEnvelope/components/RedEnvelopeConfig/whiteList.vue
View file @
8f8074b
...
...
@@ -5,7 +5,7 @@
bigTitle=
"白名单"
:hasFooter=
"true"
:before-close=
"handleClose"
:visible
.
sync=
"
linkDetail
Obj.show"
:visible
.
sync=
"
whiteList
Obj.show"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
...
...
@@ -19,6 +19,8 @@
<div
class=
"component"
>
<component
:is=
"currentComponent"
:DetailObj=
"whiteListObj"
v-if=
"currentComponent"
ref=
"componentRef"
></component>
</div>
...
...
@@ -35,7 +37,7 @@ export default {
WhiteListSearch
,
WhiteListImport
},
props
:
{
linkDetail
Obj
:
{
whiteList
Obj
:
{
type
:
Object
,
default
:
()
=>
{
}
}
...
...
@@ -56,16 +58,25 @@ export default {
}
},
mounted
()
{
// this.currentComponent = this.tabPaneList[0].name;
},
methods
:
{
handleConfirm
(){
if
(
this
.
currentComponent
==
'WhiteListSearch'
){
this
.
$message
.
success
(
'确定成功'
)
this
.
handleClose
()
}
if
(
this
.
currentComponent
==
'WhiteListImport'
){
this
.
$refs
.
componentRef
.
handleConfirm
()
}
},
handleClose
()
{
this
.
$emit
(
'update:linkDetailObj'
,
{})
this
.
$emit
(
'update:whiteListObj'
,
{
id
:
this
.
whiteListObj
.
id
,
show
:
false
})
this
.
currentComponent
=
this
.
tabPaneList
[
0
].
name
;
},
}
...
...
src/views/redEnvelope/components/RedEnvelopeConfig/whiteListImport.vue
View file @
8f8074b
...
...
@@ -31,7 +31,7 @@
>
下载导入模板
</a>
<template
v-if=
"recordForm.exportUrl"
>
<div
class=
"file-info flex"
>
{{
fileName
}}
{{
fileName
}}
<div
class=
"el-icon-success"
></div>
</div>
</
template
>
...
...
@@ -55,10 +55,17 @@ import commonFun from "../common/fun";
export
default
{
name
:
"whiteListImport"
,
data
(){
return
{
props
:
{
DetailObj
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
recordForm
:
{
importType
:
5
,
activityRedEnvelopeId
:
this
.
DetailObj
.
id
,
exportUrl
:
''
},
configRules
:
{
...
...
@@ -73,44 +80,44 @@ export default {
fileError
:
''
}
},
methods
:{
handleClose
()
{
methods
:
{
handleClose
()
{
this
.
recordForm
=
this
.
$options
.
data
.
call
(
this
).
recordForm
this
.
fileError
=
''
this
.
$refs
.
recordRef
.
resetFields
()
this
.
$emit
(
'update:show'
,
false
)
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
recordRef
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
try
{
const
{
recordForm
}
=
this
,
res
=
await
this
.
$apis
.
redenvelope
.
importRedEnvelopeRecord
(
recordForm
)
const
{
recordForm
}
=
this
,
res
=
await
this
.
$apis
.
redenvelope
.
whiteListImport
(
recordForm
)
if
(
res
)
{
this
.
$message
({
message
:
'导入成功'
,
type
:
'success'
})
this
.
handleClose
()
this
.
$parent
.
handle
Search
()
this
.
$parent
.
handle
Close
()
}
else
throw
'导入成功'
}
catch
(
error
)
{
this
.
$message
.
error
(
error
)
}
}
})
},
async
uploadFile
(
e
)
{
async
uploadFile
(
e
)
{
try
{
const
{
url
,
name
}
=
await
commonFun
.
uploadFile
(
e
,
this
),
{
importType
}
=
this
.
recordForm
const
{
url
,
name
}
=
await
commonFun
.
uploadFile
(
e
,
this
),
{
activityRedEnvelopeId
}
=
this
.
recordForm
this
.
$refs
.
file
.
value
=
''
const
res
=
await
this
.
$apis
.
redenvelope
.
checkImport
({
importType
,
exportUrl
:
url
})
const
res
=
await
this
.
$apis
.
redenvelope
.
checkImport
WhiteList
({
activityRedEnvelopeId
,
exportUrl
:
url
})
if
(
res
)
{
if
(
res
.
totalCount
==
0
||
res
.
failCount
>
0
)
{
this
.
fileError
=
res
.
errorUrl
this
.
$message
.
error
(
'
红包记录
导入失败'
)
this
.
$message
.
error
(
'导入失败'
)
this
.
recordForm
.
exportUrl
=
''
return
}
...
...
@@ -123,7 +130,6 @@ export default {
this
.
fileName
=
name
}
}
catch
(
error
)
{
console
.
log
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
}
}
...
...
@@ -132,20 +138,24 @@ export default {
</
script
>
<
style
scoped
lang=
'scss'
>
.whiteListImport
{
.whiteListImport
{
margin-top
:
20px
;
}
.activity-link
{
display
:
flex
;
width
:
500px
;
.upload-btn
{
position
:
relative
;
width
:
110px
;
height
:
32px
;
.el-button--small
{
width
:
100%
;
height
:
100%
;
}
input
{
cursor
:
pointer
;
position
:
absolute
;
...
...
@@ -156,6 +166,7 @@ export default {
font-size
:
0px
;
}
}
a
,
.error
{
margin-left
:
8px
;
...
...
@@ -163,12 +174,15 @@ export default {
font-size
:
14px
;
cursor
:
pointer
;
}
.file-info
{
margin-left
:
8px
;
.el-icon-success
{
margin-left
:
8px
;
color
:
#67c23a
;
}
.el-icon-error
{
margin-left
:
8px
;
color
:
red
;
...
...
src/views/redEnvelope/components/RedEnvelopeConfig/whiteListSearch.vue
View file @
8f8074b
...
...
@@ -13,6 +13,7 @@
:getListApi=
"getListApi"
:tableData=
"tableData"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
@
refreshTable=
"refreshTable"
:tableTotal=
"tableTotal"
...
...
@@ -35,22 +36,29 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
*
as
dayjs
from
"dayjs"
;
export
default
{
name
:
"whiteListSearch"
,
data
()
{
props
:
{
DetailObj
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
url
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
searchForm
:
{
status
:
''
,
wechatName
:
''
,
userPhone
:
''
activityRedEnvelopeId
:
this
.
DetailObj
.
id
,
phone
:
''
},
getListApi
:
this
.
$apis
.
redenvelope
.
get
RedEnvelopeRecordList
,
getListApi
:
this
.
$apis
.
redenvelope
.
get
WhiteListPage
,
searchFormData
:
[
{
label
:
'手机号码'
,
name
:
'
userP
hone'
,
name
:
'
p
hone'
,
type
:
'input'
,
maxlength
:
11
}
...
...
@@ -61,13 +69,13 @@ export default {
tableColumns
:
[
{
label
:
'手机号'
,
prop
:
'
userP
hone'
,
prop
:
'
p
hone'
,
minWidth
:
100
},
{
label
:
'导入时间'
,
prop
:
'
ex
portTime'
,
prop
:
'
im
portTime'
,
minWidth
:
180
},
...
...
@@ -92,31 +100,39 @@ export default {
},
methods
:
{
handleSearch
()
{
handleSearch
()
{
console
.
log
(
this
.
DetailObj
)
this
.
$refs
.
listRef
.
refreshTable
()
},
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
this
.
handleSearch
()
},
showDelFun
({
id
}){
const
params
=
{
id
}
this
.
$apis
.
redenvelope
.
deleteWhiteList
(
params
).
then
(
res
=>
{
if
(
res
){
this
.
$message
.
success
(
'删除成功'
)
this
.
handleSearch
()
}
showDelFun
({
id
})
{
this
.
$confirm
(
'是否确认删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
const
params
=
{
id
}
this
.
$apis
.
redenvelope
.
whiteListDelete
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
handleSearch
()
}
})
})
.
catch
(()
=>
{})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.whiteListSearch
{
.whiteListSearch
{
margin-top
:
20px
;
}
...
...
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