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 168d7270
authored
Oct 08, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
d2215c10
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
19 deletions
src/views/redEnvelope/components/RedEnvelopeConfig/edit.vue
src/views/redEnvelope/components/RedEnvelopeConfig/index.vue
src/views/redEnvelope/components/RedEnvelopeConfig/linkDetail.vue
src/views/redEnvelope/components/RedEnvelopeRecord/importRecord.vue
src/views/redEnvelope/components/common/fun.js
src/views/redEnvelope/components/RedEnvelopeConfig/edit.vue
View file @
168d727
...
@@ -106,6 +106,12 @@
...
@@ -106,6 +106,12 @@
href=
"https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/红包链接.xlsx"
href=
"https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/红包链接.xlsx"
target=
"_blank"
target=
"_blank"
>
下载导入模板
</a>
>
下载导入模板
</a>
<template
v-if=
"configForm.exportUrl"
>
<div
class=
"file-info flex"
>
{{
fileName
}}
<div
class=
"el-icon-success"
></div>
</div>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -180,7 +186,8 @@ export default {
...
@@ -180,7 +186,8 @@ export default {
}
}
],
],
},
},
merchantList
:
[]
merchantList
:
[],
fileName
:
''
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -201,7 +208,7 @@ export default {
...
@@ -201,7 +208,7 @@ export default {
activityName
:
res
.
activityName
,
activityName
:
res
.
activityName
,
activityType
:
res
.
activityType
,
activityType
:
res
.
activityType
,
merchantId
:
String
(
res
.
merchantId
),
merchantId
:
String
(
res
.
merchantId
),
activityTime
:
[
dayjs
(
res
.
activityStartTime
)
,
dayjs
(
res
.
activityEndTime
)],
activityTime
:
[
dayjs
(
res
.
activityStartTime
)
.
toDate
(),
dayjs
(
res
.
activityEndTime
).
toDate
(
)],
id
id
}
}
this
.
disabled
=
true
this
.
disabled
=
true
...
@@ -230,6 +237,7 @@ export default {
...
@@ -230,6 +237,7 @@ export default {
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
configRef
.
validate
(
async
(
valid
)
=>
{
this
.
$refs
.
configRef
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
try
{
const
{
configForm
,
merchantList
}
=
this
const
{
configForm
,
merchantList
}
=
this
let
params
=
this
.
$common
.
utils
.
deepClone
(
configForm
),
let
params
=
this
.
$common
.
utils
.
deepClone
(
configForm
),
targetName
=
params
.
id
?
'updateActivityRedEnvelope'
:
'createActivityRedEnvelope'
targetName
=
params
.
id
?
'updateActivityRedEnvelope'
:
'createActivityRedEnvelope'
...
@@ -249,7 +257,6 @@ export default {
...
@@ -249,7 +257,6 @@ export default {
this
.
$parent
.
handleSearch
()
this
.
$parent
.
handleSearch
()
}
}
else
throw
params
.
id
?
'编辑失败'
:
'创建失败'
else
throw
params
.
id
?
'编辑失败'
:
'创建失败'
try
{
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
$message
.
error
(
error
)
this
.
$message
.
error
(
error
)
}
}
...
@@ -260,19 +267,21 @@ export default {
...
@@ -260,19 +267,21 @@ export default {
const
{
id
}
=
this
.
configForm
,
const
{
id
}
=
this
.
configForm
,
target
=
id
?
'updateCheckFile'
:
'createCheckFile'
target
=
id
?
'updateCheckFile'
:
'createCheckFile'
try
{
try
{
const
res
=
await
commonFun
.
uploadFile
(
e
,
this
),
const
{
url
,
name
}
=
await
commonFun
.
uploadFile
(
e
,
this
),
params
=
{
exportUrl
:
res
}
params
=
{
exportUrl
:
url
}
if
(
id
)
params
.
id
=
id
if
(
id
)
params
.
id
=
id
this
.
$refs
.
file
.
value
=
''
this
.
$refs
.
file
.
value
=
''
const
{
failCount
}
=
await
this
.
$apis
.
redenvelope
[
target
](
params
)
const
res
=
await
this
.
$apis
.
redenvelope
[
target
](
params
)
if
(
failCount
&&
failCount
>
0
)
return
this
.
$message
.
error
(
'红包链接导入失败'
)
if
(
res
)
{
this
.
configForm
.
exportUrl
=
res
if
(
res
.
failCount
>
0
)
return
this
.
$message
.
error
(
'红包链接导入失败'
)
this
.
configForm
.
exportUrl
=
url
this
.
fileName
=
name
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
this
.
$refs
.
file
.
value
=
''
this
.
$refs
.
file
.
value
=
''
}
}
}
}
}
}
}
}
...
@@ -281,6 +290,7 @@ export default {
...
@@ -281,6 +290,7 @@ export default {
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
'scss'
>
.activity-link
{
.activity-link
{
display
:
flex
;
display
:
flex
;
width
:
500px
;
cursor
:
pointer
;
cursor
:
pointer
;
.upload-btn
{
.upload-btn
{
position
:
relative
;
position
:
relative
;
...
@@ -305,5 +315,12 @@ export default {
...
@@ -305,5 +315,12 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.file-info
{
margin-left
:
8px
;
.el-icon-success
{
margin-left
:
8px
;
color
:
#67c23a
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/redEnvelope/components/RedEnvelopeConfig/index.vue
View file @
168d727
...
@@ -122,9 +122,8 @@ export default {
...
@@ -122,9 +122,8 @@ export default {
},
},
{
{
label
:
'活动形式'
,
label
:
'活动形式'
,
prop
:
'activityType'
,
prop
:
'activityType
Str
'
,
minWidth
:
100
minWidth
:
100
},
},
{
{
label
:
'红包链接总数'
,
label
:
'红包链接总数'
,
...
...
src/views/redEnvelope/components/RedEnvelopeConfig/linkDetail.vue
View file @
168d727
...
@@ -127,6 +127,7 @@ export default {
...
@@ -127,6 +127,7 @@ export default {
},
},
watch
:
{
watch
:
{
'linkDetailObj'
(
n
)
{
'linkDetailObj'
(
n
)
{
this
.
searchForm
=
this
.
$options
.
data
.
call
(
this
).
searchForm
if
(
n
.
id
)
this
.
refreshTable
()
if
(
n
.
id
)
this
.
refreshTable
()
}
}
},
},
...
...
src/views/redEnvelope/components/RedEnvelopeRecord/importRecord.vue
View file @
168d727
...
@@ -50,6 +50,12 @@
...
@@ -50,6 +50,12 @@
href=
"https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/中奖记录.xlsx"
href=
"https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/中奖记录.xlsx"
target=
"_blank"
target=
"_blank"
>
下载中奖记录模板
</a>
>
下载中奖记录模板
</a>
<template
v-if=
"recordForm.exportUrl"
>
<div
class=
"file-info flex"
>
{{
fileName
}}
<div
class=
"el-icon-success"
></div>
</div>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -100,6 +106,7 @@ export default {
...
@@ -100,6 +106,7 @@ export default {
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
recordRef
.
validate
(
async
(
valid
)
=>
{
this
.
$refs
.
recordRef
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
try
{
const
{
recordForm
}
=
this
,
const
{
recordForm
}
=
this
,
res
=
await
this
.
$apis
.
redenvelope
.
importRedEnvelopeRecord
(
recordForm
)
res
=
await
this
.
$apis
.
redenvelope
.
importRedEnvelopeRecord
(
recordForm
)
if
(
res
)
{
if
(
res
)
{
...
@@ -111,7 +118,6 @@ export default {
...
@@ -111,7 +118,6 @@ export default {
this
.
$parent
.
handleSearch
()
this
.
$parent
.
handleSearch
()
}
}
else
throw
'导入成功'
else
throw
'导入成功'
try
{
}
catch
(
error
)
{
}
catch
(
error
)
{
this
.
$message
.
error
(
error
)
this
.
$message
.
error
(
error
)
}
}
...
@@ -120,17 +126,19 @@ export default {
...
@@ -120,17 +126,19 @@ export default {
},
},
async
uploadFile
(
e
)
{
async
uploadFile
(
e
)
{
try
{
try
{
const
res
=
await
commonFun
.
uploadFile
(
e
,
this
),
const
{
url
,
name
}
=
await
commonFun
.
uploadFile
(
e
,
this
),
{
importType
}
=
this
.
recordForm
{
importType
}
=
this
.
recordForm
this
.
$refs
.
file
.
value
=
''
this
.
$refs
.
file
.
value
=
''
const
{
failCount
}
=
await
this
.
$apis
.
redenvelope
.
checkImport
({
importType
,
exportUrl
:
res
})
const
res
=
await
this
.
$apis
.
redenvelope
.
checkImport
({
importType
,
exportUrl
:
url
})
if
(
failCount
&&
failCount
>
0
)
return
this
.
$message
.
error
(
'红包记录导入失败'
)
if
(
res
)
{
this
.
recordForm
.
exportUrl
=
res
if
(
res
.
failCount
>
0
)
return
this
.
$message
.
error
(
'红包记录导入失败'
)
this
.
recordForm
.
exportUrl
=
url
this
.
fileName
=
name
}
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
}
}
}
}
}
}
}
}
...
@@ -140,6 +148,7 @@ export default {
...
@@ -140,6 +148,7 @@ export default {
.activity-link
{
.activity-link
{
display
:
flex
;
display
:
flex
;
cursor
:
pointer
;
cursor
:
pointer
;
width
:
500px
;
.upload-btn
{
.upload-btn
{
position
:
relative
;
position
:
relative
;
width
:
110px
;
width
:
110px
;
...
@@ -163,5 +172,12 @@ export default {
...
@@ -163,5 +172,12 @@ export default {
color
:
#5850ff
;
color
:
#5850ff
;
font-size
:
14px
;
font-size
:
14px
;
}
}
.file-info
{
margin-left
:
8px
;
.el-icon-success
{
margin-left
:
8px
;
color
:
#67c23a
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/redEnvelope/components/common/fun.js
View file @
168d727
...
@@ -24,8 +24,7 @@ export default {
...
@@ -24,8 +24,7 @@ export default {
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
const
fileUrl
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
const
res
=
await
_this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
})
const
res
=
await
_this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
})
console
.
log
(
res
)
if
(
res
)
resolve
({
url
:
res
,
name
:
file
.
name
})
if
(
res
)
resolve
(
res
)
else
reject
(
'上传失败'
)
else
reject
(
'上传失败'
)
}
}
})
})
...
...
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