Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-link
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 7231be84
authored
Mar 23, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
ef5d4d61
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
24 deletions
src/views/activityLink/components/selectGiftDialog.vue
src/views/activityLink/components/selectGoodsDialog.vue
src/views/activityLink/components/selectModel.vue
src/views/activityLink/editActivity.vue
src/views/activityLink/components/selectGiftDialog.vue
View file @
7231be8
...
@@ -224,6 +224,7 @@ export default {
...
@@ -224,6 +224,7 @@ export default {
getList
(
page
,
isResetPage
=
false
,
isMount
=
false
)
{
getList
(
page
,
isResetPage
=
false
,
isMount
=
false
)
{
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
...
this
.
searchForm
,
status
:
2
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
merchantId
:
this
.
merchantId
,
merchantId
:
this
.
merchantId
,
pageNum
:
isResetPage
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
,
pageNum
:
isResetPage
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
].
page
.
pageNum
,
...
@@ -295,7 +296,7 @@ export default {
...
@@ -295,7 +296,7 @@ export default {
if
(
list
&&
list
.
length
)
{
if
(
list
&&
list
.
length
)
{
list
.
forEach
(
row
=>
{
list
.
forEach
(
row
=>
{
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
if
(
idx
!=
-
1
&&
row
.
status
!=
'3'
)
{
if
(
idx
!=
-
1
)
{
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
true
)
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
true
)
}
}
})
})
...
@@ -322,7 +323,7 @@ export default {
...
@@ -322,7 +323,7 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
deleteList
.
forEach
(
row
=>
{
deleteList
.
forEach
(
row
=>
{
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
var
idx
=
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
if
(
idx
!=
-
1
&&
row
.
status
!=
'3'
)
{
if
(
idx
!=
-
1
)
{
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
false
)
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
giftList
[
idx
],
false
)
}
}
})
})
...
@@ -366,15 +367,13 @@ export default {
...
@@ -366,15 +367,13 @@ export default {
couponName
:
item
.
couponName
,
couponName
:
item
.
couponName
,
couponAmount
:
isSelected
?
list
.
find
(
k
=>
k
.
id
==
item
.
id
).
couponAmount
:
'1'
,
couponAmount
:
isSelected
?
list
.
find
(
k
=>
k
.
id
==
item
.
id
).
couponAmount
:
'1'
,
couponAnticipatedCost
:
item
.
couponAnticipatedCost
,
couponAnticipatedCost
:
item
.
couponAnticipatedCost
,
status
:
'2'
,
status
:
item
.
status
,
residueAmount
:
item
.
residueAmount
residueAmount
:
item
.
residueAmount
})
})
}
}
})
})
list
.
forEach
(
item
=>
{
list
.
forEach
(
item
=>
{
if
(
item
.
status
==
'3'
)
{
if
(
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
item
.
id
)
==
'-1'
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
findIndex
(
k
=>
k
.
id
==
item
.
id
)
==
'-1'
)
{
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
(
item
)
}
else
if
(
this
.
giftList
.
findIndex
(
k
=>
k
.
id
==
item
.
id
)
==
'-1'
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
findIndex
(
k
=>
k
.
id
==
item
.
id
)
==
'-1'
)
{
// 没有库存的券
// 没有库存的券
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
(
item
)
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
(
item
)
}
}
...
...
src/views/activityLink/components/selectGoodsDialog.vue
View file @
7231be8
...
@@ -363,11 +363,11 @@ export default {
...
@@ -363,11 +363,11 @@ export default {
goodsName
:
item
.
goodsName
,
goodsName
:
item
.
goodsName
,
denomination
:
item
.
denomination
,
denomination
:
item
.
denomination
,
effectiveDays
:
item
.
effectiveDays
,
effectiveDays
:
item
.
effectiveDays
,
rechargeDenomination
:
item
.
rechargeDenomination
rechargeDenomination
:
item
.
rechargeDenomination
,
status
:
item
.
status
})
})
}
}
})
})
console
.
log
(
this
.
selectedList
[
this
.
activeName
].
list
)
this
.
recoveryTotal
()
this
.
recoveryTotal
()
},
},
handleGoodsConfirm
()
{
handleGoodsConfirm
()
{
...
...
src/views/activityLink/components/selectModel.vue
View file @
7231be8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-18 18:47:05
* @Date: 2023-03-18 18:47:05
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-2
1 18:35:0
2
* @LastEditTime: 2023-03-2
2 17:24:4
2
* @FilePath: \scrm-micro-link\src\views\activityLink\components\selectModel.vue
* @FilePath: \scrm-micro-link\src\views\activityLink\components\selectModel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
-->
-->
...
...
src/views/activityLink/editActivity.vue
View file @
7231be8
...
@@ -85,14 +85,17 @@
...
@@ -85,14 +85,17 @@
<el-table
:data=
"selectedGoodsList"
border
style=
"width: 100%"
>
<el-table
:data=
"selectedGoodsList"
border
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"70"
></el-table-column>
<el-table-column
type=
"index"
label=
"序号"
width=
"70"
></el-table-column>
<el-table-column
prop=
"brandName"
label=
"品牌"
width=
"140"
></el-table-column>
<el-table-column
prop=
"brandName"
label=
"品牌"
width=
"140"
></el-table-column>
<el-table-column
prop=
"goodsName"
label=
"商户名称"
width=
"
20
0"
></el-table-column>
<el-table-column
prop=
"goodsName"
label=
"商户名称"
width=
"
17
0"
></el-table-column>
<el-table-column
prop=
"couponAmount"
label=
"数量"
width=
"
8
0"
></el-table-column>
<el-table-column
prop=
"couponAmount"
label=
"数量"
width=
"
7
0"
></el-table-column>
<el-table-column
prop=
"denomination"
label=
"劵面额"
width=
"1
4
0"
>
<el-table-column
prop=
"denomination"
label=
"劵面额"
width=
"1
1
0"
>
<template
slot-scope=
"scope"
>
{{
(
scope
.
row
.
denomination
/
100
).
toFixed
(
2
)
}}
元
</
template
>
<template
slot-scope=
"scope"
>
{{
(
scope
.
row
.
denomination
/
100
).
toFixed
(
2
)
}}
元
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"effectiveDays"
label=
"有效期"
width=
"1
2
0"
>
<el-table-column
prop=
"effectiveDays"
label=
"有效期"
width=
"1
1
0"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
effectiveDays
}}
天
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
effectiveDays
}}
天
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
==
1
?
'未生效'
:
scope
.
row
.
status
==
2
?
'生效中'
:
scope
.
row
.
status
==
3
?
'已失效'
:
''
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"handleDeleteGoods(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"handleDeleteGoods(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
...
@@ -113,13 +116,16 @@
...
@@ -113,13 +116,16 @@
<div
class=
"config-right"
>
<div
class=
"config-right"
>
<div
class=
"config-right-box"
>
<div
class=
"config-right-box"
>
<div
class=
"config-box-title"
>
{{ editForm.activityName }}
</div>
<div
class=
"config-box-title"
>
{{ editForm.activityName }}
</div>
<img
class=
"config-box-bg"
:src=
"activityModelImg"
/>
<img
class=
"config-box-bg"
:src=
"activityModelImg"
v-if=
"activityModelImg"
/>
<img
src=
"@/assets/activity-box.png"
/>
<img
src=
"@/assets/activity-box.png"
/>
</div>
</div>
</div>
</div>
<glsx-combi-form
class=
"edit-form-container"
ref=
"configEditFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"configEditFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"configEditFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"configEditFormData"
:formRules=
"editRule"
>
<
template
slot=
"selectGoodsBtn"
>
<
template
slot=
"selectGoodsBtn"
>
<el-button
type=
"default"
class=
"el-icon-plus"
@
click=
"handleRelateModelClose"
>
选择样式
</el-button>
<el-button
type=
"default"
class=
"el-icon-plus"
@
click=
"handleRelateModelClose"
>
选择样式
</el-button>
<div
class=
"style-panel"
v-if=
"activityModelImg"
>
<img
:src=
"activityModelImg"
/>
</div>
</
template
>
</
template
>
<div
slot=
"activityImg"
class=
"edit-tips m-t-8"
>
展示在首页的活动详情页
</div>
<div
slot=
"activityImg"
class=
"edit-tips m-t-8"
>
展示在首页的活动详情页
</div>
<
template
slot=
"activityTimeHtml"
slot-scope=
"scope"
>
<
template
slot=
"activityTimeHtml"
slot-scope=
"scope"
>
...
@@ -337,7 +343,7 @@
...
@@ -337,7 +343,7 @@
<el-button
@
click=
"handleCancel"
size=
"medium"
>
{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
{{ routeInfo.addOrEdit != 'detail' ? '取消' : '返回' }}
</el-button>
<el-button
@
click=
"handlePrev"
plain
size=
"medium"
v-if=
"step != 1"
>
上一步
</el-button>
<el-button
@
click=
"handlePrev"
plain
size=
"medium"
v-if=
"step != 1"
>
上一步
</el-button>
<el-button
@
click=
"handleNext"
size=
"medium"
type=
"primary"
v-if=
"step != 3"
>
下一步
</el-button>
<el-button
@
click=
"handleNext"
size=
"medium"
type=
"primary"
v-if=
"step != 3"
>
下一步
</el-button>
<el-button
v-if=
"routeInfo.addOrEdit != 'detail'
"
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
:loading=
"loading"
>
确定
</el-button>
<el-button
v-if=
"routeInfo.addOrEdit != 'detail'
&& step == 3"
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
</GLFooter>
</GLFooter>
<!-- 展示 -->
<!-- 展示 -->
<GLDialog
bigTitle=
"预览"
mode=
"big"
:visible
.
sync=
"wechatVisible"
@
onOk=
"handleWechat"
@
onCancel=
"handleWechat"
>
<GLDialog
bigTitle=
"预览"
mode=
"big"
:visible
.
sync=
"wechatVisible"
@
onOk=
"handleWechat"
@
onCancel=
"handleWechat"
>
...
@@ -434,6 +440,7 @@ export default {
...
@@ -434,6 +440,7 @@ export default {
}
}
return
{
return
{
step
:
1
,
step
:
1
,
activityModelImg
:
''
,
size
:
'small'
,
size
:
'small'
,
editChildRef
:
'editChildRef'
,
editChildRef
:
'editChildRef'
,
loading
:
false
,
loading
:
false
,
...
@@ -500,6 +507,7 @@ export default {
...
@@ -500,6 +507,7 @@ export default {
nameToValSpecsList
:
[],
nameToValSpecsList
:
[],
activityInfo
:
{},
activityInfo
:
{},
editForm
:
{
editForm
:
{
pageStyle
:
null
,
merchantId
:
null
,
merchantId
:
null
,
merchantName
:
''
,
merchantName
:
''
,
activityName
:
''
,
activityName
:
''
,
...
@@ -609,7 +617,7 @@ export default {
...
@@ -609,7 +617,7 @@ export default {
playingCustomer
:
[{
required
:
true
,
message
:
'请输入面向客户群'
,
trigger
:
'blur'
}],
playingCustomer
:
[{
required
:
true
,
message
:
'请输入面向客户群'
,
trigger
:
'blur'
}],
playingDiscountContent
:
[{
required
:
true
,
message
:
'请输入折扣内容'
,
trigger
:
'blur'
}],
playingDiscountContent
:
[{
required
:
true
,
message
:
'请输入折扣内容'
,
trigger
:
'blur'
}],
playingCouponDescription
:
[{
required
:
true
,
message
:
'请输入送券描述'
,
trigger
:
'blur'
}],
playingCouponDescription
:
[{
required
:
true
,
message
:
'请输入送券描述'
,
trigger
:
'blur'
}],
// activityImg: [{ required: true, message: '请选择活动宣传图
', trigger: 'change' }],
pageStyle
:
[{
required
:
true
,
message
:
'请选择页面样式
'
,
trigger
:
'change'
}],
// promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
// promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime
:
[{
required
:
true
,
message
:
'请选择链接时间'
,
trigger
:
'change'
}],
activityTime
:
[{
required
:
true
,
message
:
'请选择链接时间'
,
trigger
:
'change'
}],
expiresType
:
[{
required
:
true
,
message
:
'请选择链接时间'
,
trigger
:
'change'
}],
expiresType
:
[{
required
:
true
,
message
:
'请选择链接时间'
,
trigger
:
'change'
}],
...
@@ -942,7 +950,7 @@ export default {
...
@@ -942,7 +950,7 @@ export default {
configEditFormData
:
[
configEditFormData
:
[
{
{
label
:
'页面样式'
,
label
:
'页面样式'
,
name
:
'
goodsList
'
,
name
:
'
pageStyle
'
,
addHtml
:
'selectGoodsBtn'
addHtml
:
'selectGoodsBtn'
},
},
{
{
...
@@ -1160,12 +1168,14 @@ export default {
...
@@ -1160,12 +1168,14 @@ export default {
}
}
},
},
watch
:
{
watch
:
{
editForm
:
{
// editForm: {
handler
(
val
)
{
// handler(val) {
this
.
editStatus
=
true
// this.$nextTick(() => {
},
// this.editStatus = true
deep
:
true
// })
},
// },
// deep: true
// },
'editForm.merchantId'
()
{
'editForm.merchantId'
()
{
if
(
this
.
loading
)
{
if
(
this
.
loading
)
{
return
return
...
@@ -1187,12 +1197,19 @@ export default {
...
@@ -1187,12 +1197,19 @@ export default {
this
.
palyEditFormData
[
2
].
name
=
'playingCouponDescription'
this
.
palyEditFormData
[
2
].
name
=
'playingCouponDescription'
}
}
},
},
'editForm.pageStyle'
(
val
)
{
console
.
log
(
val
)
this
.
activityModelImg
=
`
${
this
.
staticImgUrl
}
activity-
${
val
}
.png`
},
step
()
{
step
()
{
document
.
querySelector
(
'.el-main-scroll .el-scrollbar__wrap'
).
scrollTop
=
0
document
.
querySelector
(
'.el-main-scroll .el-scrollbar__wrap'
).
scrollTop
=
0
},
},
'editForm.activityPrice'
(
newValue
,
oldValue
)
{
'editForm.activityPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
activityPrice
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
,
0
)
this
.
editForm
.
activityPrice
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
,
0
)
},
},
'editForm.verificationEncourage'
(
newValue
,
oldValue
)
{
this
.
editForm
.
verificationEncourage
=
limitPrice
(
newValue
,
oldValue
,
4
,
2
,
0
)
},
'editForm.crowdFundingPrice'
(
newValue
,
oldValue
)
{
'editForm.crowdFundingPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
crowdFundingPrice
=
limitPrice
(
newValue
,
oldValue
,
5
,
2
,
0
)
this
.
editForm
.
crowdFundingPrice
=
limitPrice
(
newValue
,
oldValue
,
5
,
2
,
0
)
},
},
...
@@ -1289,6 +1306,7 @@ export default {
...
@@ -1289,6 +1306,7 @@ export default {
this
.
isSelectGoodsVisible
=
!
this
.
isSelectGoodsVisible
this
.
isSelectGoodsVisible
=
!
this
.
isSelectGoodsVisible
},
},
handleGiftConfirm
(
selectedData
)
{
handleGiftConfirm
(
selectedData
)
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
'couponList'
)
this
.
handleGiftClose
()
this
.
handleGiftClose
()
this
.
couponObj
=
selectedData
this
.
couponObj
=
selectedData
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
...
@@ -1466,7 +1484,7 @@ export default {
...
@@ -1466,7 +1484,7 @@ export default {
console
.
log
(
this
.
relateModelVisible
)
console
.
log
(
this
.
relateModelVisible
)
},
},
handleRelateModelConfirm
(
val
)
{
handleRelateModelConfirm
(
val
)
{
this
.
activityModelImg
=
val
.
imgUrl
this
.
$refs
.
configEditFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
'pageStyle'
)
this
.
editForm
.
pageStyle
=
val
.
value
this
.
editForm
.
pageStyle
=
val
.
value
this
.
handleRelateModelClose
()
this
.
handleRelateModelClose
()
...
@@ -2168,12 +2186,22 @@ export default {
...
@@ -2168,12 +2186,22 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.style-panel
{
img
{
margin-top
:
10px
;
width
:
104px
;
height
:
104px
;
}
}
.play-panel
{
.play-panel
{
.card-panel
{
.card-panel
{
width
:
810px
;
width
:
810px
;
.el-tabs__nav
{
.el-tabs__nav
{
border
:
none
;
border
:
none
;
}
}
.el-tabs__header
{
margin
:
0
;
}
.el-tabs__item
{
.el-tabs__item
{
background
:
#fafafa
;
background
:
#fafafa
;
border
:
1px
solid
#e5e5e5
;
border
:
1px
solid
#e5e5e5
;
...
...
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