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 6703d00d
authored
May 19, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
冗余代码;会员服务-服务券
1 parent
d60e81b8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
154 deletions
src/views/couponManage/editMemberService.vue
src/views/couponManage/index.vue
src/views/couponManage/receiveDetail.vue
src/views/couponManage/recordList.vue
src/views/couponManage/editMemberService.vue
View file @
6703d00
<!-- 编辑
会员服务
-->
<!-- 编辑
服务券
-->
<
template
>
<
template
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
v-loading=
"loading"
>
<div
class=
"container edit-container"
v-loading=
"loading"
>
<p
class=
"edit-title"
>
{{
title
}}
会员服务
</p>
<p
class=
"edit-title"
>
{{
title
}}
服务券
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<template
slot=
"effectiveHtml"
>
<template
slot=
"effectiveHtml"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
无有效期
</el-radio>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
无有效期
</el-radio>
...
@@ -349,7 +349,7 @@ export default {
...
@@ -349,7 +349,7 @@ export default {
//编辑时只允许编辑使用说明
//编辑时只允许编辑使用说明
//优惠券名称
//优惠券名称
obj
.
couponName
=
form
.
couponName
obj
.
couponName
=
form
.
couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:
会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:
服务券
obj
.
discountType
=
'7'
obj
.
discountType
=
'7'
//有效期
//有效期
...
...
src/views/couponManage/index.vue
View file @
6703d00
...
@@ -6,10 +6,6 @@
...
@@ -6,10 +6,6 @@
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addCashCoupon()"
fn=
"新建代金券"
display=
"disabled"
mode=
"el-button"
>
新建代金券
</GLButton>
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addCashCoupon()"
fn=
"新建代金券"
display=
"disabled"
mode=
"el-button"
>
新建代金券
</GLButton>
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addDiscountCoupon()"
fn=
"新建折扣劵"
display=
"disabled"
mode=
"el-button"
>
新建折扣劵
</GLButton>
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addDiscountCoupon()"
fn=
"新建折扣劵"
display=
"disabled"
mode=
"el-button"
>
新建折扣劵
</GLButton>
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addExchangeCoupon()"
fn=
"新建兑换券"
display=
"disabled"
mode=
"el-button"
>
新建兑换券
</GLButton>
<GLButton
:size=
"size"
type=
"default"
class=
"el-icon-plus default-blue-btn color-transparent"
@
click=
"addExchangeCoupon()"
fn=
"新建兑换券"
display=
"disabled"
mode=
"el-button"
>
新建兑换券
</GLButton>
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
@
click=
"addCashCoupon()"
>
新建代金券
</el-button>
-->
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
style=
"margin-left:30px;"
@
click=
"addService()"
>
新建会员服务
</el-button>
-->
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
style=
"margin-left: 30px"
@
click=
"addDiscountCoupon()"
>
新建折扣劵
</el-button>
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
style=
"margin-left: 30px"
@
click=
"addExchangeCoupon()"
>
新建兑换券
</el-button>
-->
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<div>
...
@@ -37,17 +33,10 @@
...
@@ -37,17 +33,10 @@
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLButton
v-if=
"scope.scope.status == '1'"
type=
"text"
@
click=
"start(scope.scope)"
fn=
"生效"
display=
"disabled"
mode=
"el-button"
>
生效
</GLButton>
<GLButton
v-if=
"scope.scope.status == '1'"
type=
"text"
@
click=
"start(scope.scope)"
fn=
"生效"
display=
"disabled"
mode=
"el-button"
>
生效
</GLButton>
<!-- <el-button v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)">生效</el-button> -->
<el-button
v-if=
"scope.scope.status == '2'"
type=
"text"
@
click=
"end(scope.scope)"
>
失效
</el-button>
<el-button
v-if=
"scope.scope.status == '2'"
type=
"text"
@
click=
"end(scope.scope)"
>
失效
</el-button>
<!-- <el-button v-if="scope.scope.status == '1'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton
v-if=
"scope.scope.status == '2' || scope.scope.status == '3'"
type=
"text"
@
click=
"handleEdit(3, scope.scope)"
:fn=
"scope.scope.discountType == 3 ? '查看代金券' : scope.scope.discountType == 7 ? '查看服务券' : scope.scope.discountType == 2 ? '查看折扣券' : '查看兑换券'"
mode=
"el-button"
>
查看
</GLButton>
<GLButton
v-if=
"scope.scope.status == '2' || scope.scope.status == '3'"
type=
"text"
@
click=
"handleEdit(3, scope.scope)"
:fn=
"scope.scope.discountType == 3 ? '查看代金券' : scope.scope.discountType == 7 ? '查看会员服务' : scope.scope.discountType == 2 ? '查看折扣券' : '查看兑换券'"
mode=
"el-button"
>
查看
</GLButton>
<!-- <el-button v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton
v-if=
"scope.scope.status == '1' || scope.scope.status == '3'"
type=
"text"
@
click=
"del(scope.scope)"
fn=
"删除"
mode=
"el-button"
display=
"disabled"
>
删除
</GLButton>
<GLButton
v-if=
"scope.scope.status == '1' || scope.scope.status == '3'"
type=
"text"
@
click=
"del(scope.scope)"
fn=
"删除"
mode=
"el-button"
display=
"disabled"
>
删除
</GLButton>
<!-- <el-button v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)">删除</el-button> -->
<!-- <GLButton type="text" @click="writeOffDetail(scope.scope)" fn="核销详情" mode="el-button">核销详情</GLButton> -->
<GLButton
type=
"text"
@
click=
"receiveDetail(scope.scope)"
fn=
"领取详情"
mode=
"el-button"
>
领取详情
</GLButton>
<GLButton
type=
"text"
@
click=
"receiveDetail(scope.scope)"
fn=
"领取详情"
mode=
"el-button"
>
领取详情
</GLButton>
<!-- <el-button type="text" @click="writeOffDetail(scope.scope)">核销详情</el-button>
<el-button type="text" @click="receiveDetail(scope.scope)">领取详情</el-button> -->
</div>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -112,15 +101,6 @@ export default {
...
@@ -112,15 +101,6 @@ export default {
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
optionsName
:
'statusList'
optionsName
:
'statusList'
}
}
// {
// label: '使用规则',
// name: 'directionalFlag',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'directionalFlagList'
// }
],
],
// 表格
// 表格
getListApi
:
this
.
$apis
.
couponManage
.
getCouponListApi
,
getListApi
:
this
.
$apis
.
couponManage
.
getCouponListApi
,
...
@@ -194,37 +174,6 @@ export default {
...
@@ -194,37 +174,6 @@ export default {
return
useChannel
return
useChannel
}
}
},
},
// {
// label: '预估成本/元',
// prop: 'anticipatedCost ',
// formatter: cellValue => {
// return cellValue.anticipatedCost / 100
// }
// },
// {
// label: '已领取',
// prop: 'getAmount'
// },
// {
// label: '已核销',
// prop: 'usedAmount'
// },
// {
// label: '未核销',
// prop: 'unUsedAmount'
// },
// {
// label: '剩余',
// prop: 'residueAmount'
// },
// {
// label: '使用规则',
// name: 'directionalFlag',
// width: '150px',
// formatter: cellValue => {
// return this.baseData.directionalFlagList.find(item => item.confId == cellValue.directionalFlag).confName
// }
// },
{
{
label
:
'状态'
,
label
:
'状态'
,
name
:
'status'
,
name
:
'status'
,
...
@@ -278,20 +227,6 @@ export default {
...
@@ -278,20 +227,6 @@ export default {
confName
:
'服务券'
confName
:
'服务券'
}
}
],
],
// directionalFlagList: [
// {
// confId: '1',
// confName: '所有客户可用'
// },
// {
// confId: '2',
// confName: '定向礼包专用'
// },
// {
// confId: '3',
// confName: '关联商品可用'
// }
// ],
statusList
:
[
statusList
:
[
{
{
confId
:
'1'
,
confId
:
'1'
,
...
@@ -412,7 +347,7 @@ export default {
...
@@ -412,7 +347,7 @@ export default {
this
.
$router
.
push
(
'/couponManage/editCashCoupon/1'
)
this
.
$router
.
push
(
'/couponManage/editCashCoupon/1'
)
},
},
//新增
会员服务
//新增
服务券
addService
()
{
addService
()
{
this
.
$router
.
push
(
'/couponManage/editMemberService/1'
)
this
.
$router
.
push
(
'/couponManage/editMemberService/1'
)
},
},
...
@@ -430,12 +365,12 @@ export default {
...
@@ -430,12 +365,12 @@ export default {
// addOrEdit:1-新增;2-编辑;3-查看
// addOrEdit:1-新增;2-编辑;3-查看
handleEdit
(
addOrEdit
,
row
)
{
handleEdit
(
addOrEdit
,
row
)
{
var
goto
=
''
var
goto
=
''
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:
会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:
服务券
if
(
row
.
discountType
==
'3'
)
{
if
(
row
.
discountType
==
'3'
)
{
//代金券
//代金券
goto
=
'/couponManage/editCashCoupon/'
goto
=
'/couponManage/editCashCoupon/'
}
else
if
(
row
.
discountType
==
'7'
)
{
}
else
if
(
row
.
discountType
==
'7'
)
{
//
会员服务
//
服务券
goto
=
'/couponManage/editMemberService/'
goto
=
'/couponManage/editMemberService/'
}
else
if
(
row
.
discountType
==
'2'
)
{
}
else
if
(
row
.
discountType
==
'2'
)
{
//折扣劵
//折扣劵
...
...
src/views/couponManage/receiveDetail.vue
View file @
6703d00
...
@@ -298,7 +298,7 @@ export default {
...
@@ -298,7 +298,7 @@ export default {
}
}
}
}
if
(
coupon
.
discountType
==
7
)
{
if
(
coupon
.
discountType
==
7
)
{
//
会员服务
//
服务券
//使用限制
//使用限制
if
(
coupon
.
useType
==
0
)
{
if
(
coupon
.
useType
==
0
)
{
//无限制
//无限制
...
...
src/views/couponManage/recordList.vue
View file @
6703d00
...
@@ -17,35 +17,6 @@
...
@@ -17,35 +17,6 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<!--
<div
class=
"flex"
>
<el-form
:inline=
"true"
style=
"width: 100%"
:model=
"searchForm"
label-width=
"85px"
label-position=
"right"
>
<el-row>
<el-form-item
size=
"small"
label=
"服务名称"
>
<el-input
:size=
"size"
v-model=
"searchForm.couponName"
placeholder=
"请输入服务名称"
clearable
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"核销用户"
>
<el-input
:size=
"size"
v-model=
"searchForm.userReq"
placeholder=
"请输入核销用户"
clearable
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"核销员"
style=
"margin-left: -10px"
>
<el-input
:size=
"size"
v-model=
"searchForm.verificationOperator"
placeholder=
"请输入核销员"
clearable
></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item
size=
"small"
label=
"关联信息"
>
<el-input
:size=
"size"
v-model=
"searchForm.orderCode"
placeholder=
"请输入关联信息"
clearable
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"核销日期"
>
<el-date-picker
:size=
"size"
v-model=
"searchForm.daterange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOptions ||
{}">
</el-date-picker>
</el-form-item>
<el-form-item
size=
"small"
class=
"fr-mr0"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-row>
</el-form>
</div>
-->
<div
class=
"flex m-b-10 w-100-percent"
>
<div
class=
"flex m-b-10 w-100-percent"
>
<span
class=
"table-title"
></span>
<span
class=
"table-title"
></span>
...
@@ -59,9 +30,6 @@
...
@@ -59,9 +30,6 @@
<span
class=
"cursor-pointer"
@
click=
"couponNameHandleDetail(scope.scope)"
v-if=
"scope.scope.directionalGiftId"
>
{{ scope.scope.directionalGiftName }}
</span>
<span
class=
"cursor-pointer"
@
click=
"couponNameHandleDetail(scope.scope)"
v-if=
"scope.scope.directionalGiftId"
>
{{ scope.scope.directionalGiftName }}
</span>
<span
class=
"cursor-pointer"
@
click=
"orderCodeHandleDetail(scope.scope)"
v-else
>
{{ scope.scope.orderCode }}
</span>
<span
class=
"cursor-pointer"
@
click=
"orderCodeHandleDetail(scope.scope)"
v-else
>
{{ scope.scope.orderCode }}
</span>
</span>
</span>
<!-- <span slot="verificationTime" slot-scope="scope">
<span>{{ dateFormatFun(scope.scope.verificationTime) }}</span>
</span> -->
</GLTable>
</GLTable>
<glsx-dialog
title=
"优惠券核销(请确保用户到店后核销,避免引起不必要问题)"
:hasScroll=
"false"
width=
"580px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleConfirm"
>
<glsx-dialog
title=
"优惠券核销(请确保用户到店后核销,避免引起不必要问题)"
:hasScroll=
"false"
width=
"580px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleConfirm"
>
<div
class=
"content-body"
>
<div
class=
"content-body"
>
...
@@ -99,18 +67,12 @@ export default {
...
@@ -99,18 +67,12 @@ export default {
},
},
url
:
url
,
url
:
url
,
isReload
:
true
,
isReload
:
true
,
// pickerOptions: {
// disabledDate(time) {
// return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
// }
// },
size
:
'small'
,
size
:
'small'
,
searchForm
:
{
searchForm
:
{
couponName
:
''
,
couponName
:
''
,
userReq
:
''
,
userReq
:
''
,
verificationOperator
:
''
,
verificationOperator
:
''
,
orderCode
:
''
,
orderCode
:
''
,
merchantId
:
0
,
packageId
:
''
,
packageId
:
''
,
discountType
:
''
,
discountType
:
''
,
discountTypes
:
[
2
,
3
,
4
,
7
]
discountTypes
:
[
2
,
3
,
4
,
7
]
...
@@ -242,35 +204,9 @@ export default {
...
@@ -242,35 +204,9 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
dateFormat
(
cellValue
.
verificationTime
)
return
dateFormat
(
cellValue
.
verificationTime
)
}
}
// addHtml: 'verificationTime'
}
}
// {
// label: '剩余待核销次数',
// prop: 'residueAmount',
// formatter: cellValue => {
// return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数'
// }
// },
// {
// label: '核销用户',
// prop: 'phone'
// },
// {
// label: '核销员',
// prop: 'verificationOperator'
// },
// {
// label: '关联信息',
// addHtml: 'orderCodeHtml'
// },
// {
// label: '核销日期',
// prop: 'verificationTime',
// addHtml: 'verificationTime'
// }
]
]
},
},
merchantId
:
0
,
attrToIcon
:
{
attrToIcon
:
{
2
:
'discount'
,
2
:
'discount'
,
3
:
'cash'
,
3
:
'cash'
,
...
@@ -293,7 +229,7 @@ export default {
...
@@ -293,7 +229,7 @@ export default {
},
},
{
{
confId
:
'7'
,
confId
:
'7'
,
confName
:
'
会员服务
'
confName
:
'
服务券
'
}
}
],
],
packageList
:
[]
packageList
:
[]
...
@@ -301,11 +237,6 @@ export default {
...
@@ -301,11 +237,6 @@ export default {
}
}
},
},
created
()
{
created
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
{
//运行在qiankun容器中
this
.
merchantId
=
this
.
$globalState
.
session
.
merchantId
this
.
searchForm
.
merchantId
=
this
.
merchantId
}
console
.
log
(
this
.
$globalState
.
session
)
console
.
log
(
this
.
$globalState
.
session
)
if
(
this
.
$isGroupUp
)
{
if
(
this
.
$isGroupUp
)
{
this
.
getPackageList
()
this
.
getPackageList
()
...
@@ -451,20 +382,12 @@ export default {
...
@@ -451,20 +382,12 @@ export default {
},
},
// 1-新增;2-编辑
// 1-新增;2-编辑
handleEdit
(
addOrEdit
,
row
)
{
handleEdit
(
addOrEdit
,
row
)
{
// console.log(row)
// this.$history.push('services/liveRoom/editLiveRoom', { addOrEdit: addOrEdit, row: row || {} })
// this.eventBus.$emit('editRoom', {
// addOrEdit: addOrEdit,
// id: row ? row.id : ''
// })
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'ServicesLiveRoomEditLiveRoom'
,
name
:
'ServicesLiveRoomEditLiveRoom'
,
params
:
{
params
:
{
addOrEdit
:
addOrEdit
,
addOrEdit
:
addOrEdit
,
id
:
row
?
row
.
id
:
'-1'
id
:
row
?
row
.
id
:
'-1'
}
}
// name: 'editLiveRoom',
// path: '/liveRoom/editLiveRoom'
})
})
},
},
...
@@ -479,11 +402,8 @@ export default {
...
@@ -479,11 +402,8 @@ export default {
this
.
$refs
.
memberRecordRef
.
refreshTable
()
this
.
$refs
.
memberRecordRef
.
refreshTable
()
},
},
handleReset
()
{
handleReset
()
{
// this.searchForm = { merchantId: 44184606 }
// this.handleSearch()
this
.
isReload
=
false
this
.
isReload
=
false
this
.
searchForm
=
{
this
.
searchForm
=
{
merchantId
:
this
.
merchantId
,
couponName
:
''
,
couponName
:
''
,
userReq
:
''
,
userReq
:
''
,
verificationOperator
:
''
,
verificationOperator
:
''
,
...
...
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