Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 1d5bda04
authored
Dec 06, 2021
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增需求及BUG修改
1 parent
39f19c11
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
301 additions
and
63 deletions
src/api/modules/couponManage.js
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/index.vue
src/views/couponManage/receiveDetail.vue
src/views/couponManage/writeOffDetail.vue
src/api/modules/couponManage.js
View file @
1d5bda0
...
@@ -48,6 +48,28 @@ const getVerificationListApi = params => {
...
@@ -48,6 +48,28 @@ const getVerificationListApi = params => {
})
})
}
}
//领取记录列表
const
getListReceiveRecordApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
listReceiveRecordByCouponId`
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//导出领取记录列表
const
exportReceiveRecordApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
exportReceiveRecordByCouponId`
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
//查看优惠券
//查看优惠券
const
getCouponDetailApi
=
params
=>
{
const
getCouponDetailApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
detail`
params
.
method
=
`
${
defaultPath
}
detail`
...
@@ -107,4 +129,4 @@ const getAllGoodsApi = params => {
...
@@ -107,4 +129,4 @@ const getAllGoodsApi = params => {
}
}
export
default
{
getMerchantListApi
,
getVerificationListApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
}
export
default
{
getMerchantListApi
,
getVerificationListApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
,
getListReceiveRecordApi
,
exportReceiveRecordApi
}
src/views/couponManage/editCashCoupon.vue
View file @
1d5bda0
<!-- 编辑代金券 -->
<!-- 编辑代金券 -->
<
template
>
<
template
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
style=
"position: relative;"
>
<div
class=
"right_show"
>
<div
class=
"right_show"
>
<div
class=
"card-top"
></div>
<div
class=
"card-top"
></div>
<div
class=
"card-middle"
>
<div
class=
"card-middle"
>
...
@@ -24,10 +24,10 @@
...
@@ -24,10 +24,10 @@
</div>
</div>
</div>
</div>
<p
class=
"edit-title"
>
{{
title
}}
代金券
</p>
<p
class=
"edit-title"
>
{{
title
}}
代金券
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
labelWidth=
"144px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
style=
"min-height: 570px;"
ref=
"editFormRef"
labelWidth=
"144px"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<template
slot=
"useChannelHtml"
>
<template
slot=
"useChannelHtml"
>
<el-radio
v-model=
"editForm.useChannel"
label=
"1"
:disabled=
"apear!='couponAdd'"
>
线上商品
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"1"
:disabled=
"apear!='couponAdd'"
>
线上商品
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"2"
:disabled=
"apear!='couponAdd'"
@
change=
"clickUseChannel"
>
到店核销
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"2"
:disabled=
"apear!='couponAdd'"
>
到店核销
</el-radio>
</
template
>
</
template
>
<
template
slot=
"effectiveHtml"
>
<
template
slot=
"effectiveHtml"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear!='couponAdd'"
>
无有效期
</el-radio><br>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear!='couponAdd'"
>
无有效期
</el-radio><br>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
slot=
"denominationHtml"
>
<
template
slot=
"denominationHtml"
>
<el-input
v-model=
"editForm.denomination"
style=
"width: 150px"
:disabled=
"apear!='couponAdd'"
@
blur
.
native
.
capture=
"
denominationBlur
"
>
<el-input
v-model=
"editForm.denomination"
style=
"width: 150px"
:disabled=
"apear!='couponAdd'"
@
blur
.
native
.
capture=
"
editForm.useChannel == 1 && denominationBlur($event)
"
>
<span
slot=
"append"
>
元
</span>
<span
slot=
"append"
>
元
</span>
</el-input>
</el-input>
<span
style=
"color:red;margin-left:15px"
v-if=
"priceFlag"
>
存在零售价低于代金券的商品
</span>
<span
style=
"color:red;margin-left:15px"
v-if=
"priceFlag"
>
存在零售价低于代金券的商品
</span>
...
@@ -71,7 +71,8 @@
...
@@ -71,7 +71,8 @@
<el-button
type=
"primary"
v-if=
"editForm.goods == 2"
@
click=
"chooseGoods"
>
选择商品
</el-button>
<el-button
type=
"primary"
v-if=
"editForm.goods == 2"
@
click=
"chooseGoods"
>
选择商品
</el-button>
</el-radio>
</el-radio>
</
template
>
</
template
>
<div
slot=
"proTable"
class=
"select-pro"
>
<div
slot=
"proTable"
class=
"select-pro"
v-if=
"editForm.useChannel == 1"
>
<div
style=
"height:110px"
v-if=
"editForm.goodsRefList.length"
></div>
<GLTable
v-show=
"editForm.goodsRefList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.goodsRefList"
>
<GLTable
v-show=
"editForm.goodsRefList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.goodsRefList"
>
<
template
slot=
"goodsImage"
slot-scope=
"scope"
>
<
template
slot=
"goodsImage"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.goodsImage"
/>
<img
class=
"img-60"
:src=
"scope.scope.goodsImage"
/>
...
@@ -86,47 +87,6 @@
...
@@ -86,47 +87,6 @@
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
<!-- <div class="view pull-left">
<img src="@/images/wechat_top.png">
<div class='view-box'>
<div class='coupon-img'>
<img src="@/images/wechatCoupon.png">
<div class="conpon-left">
<div>
<b style="font-weight: normal;font-size:20px">{{editForm.denomination}}</b><span>元</span>
<p>{{editForm.useBarriers==1?'无限制':'满'+ editForm.full + '可用'}}</p>
</div>
</div>
<div class="conpon-right">
<div class="coupon_name text-ellipsis">{{editForm.couponName}}</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 1'>有效期:领取后{{editForm.effectiveDays||0}}天</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 2'>有效期:{{couponTime}}</div>
</div>
</div>
<div class="mt3">
<div style="border-bottom: 1px solid #EEEEEE;">
<div style='padding:0 0 12px 0;'>使用说明</div>
<div style="margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;" v-for="(item,index) in remarksView" :key="index">{{item}}</div>
</div>
<div>
<div style='padding:0 0 12px 0;'>适用门店</div>
<div class="user" style='margin-top: -8px;'>
<img src="@/images/test.png" style="margin-left: -20px;" />
</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'></div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>营业时间:</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>联系电话:</div>
</div>
</div>
</div>
<div class="view-btn">
<div>
<img src="@/images/wechat_home.png">
<div>首页</div>
</div>
<div>立即领取</div>
</div>
</div> -->
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type=
"default"
v-if=
"apear!='couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"default"
v-if=
"apear!='couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"primary"
v-if=
"apear!='couponSee'"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
v-if=
"apear!='couponSee'"
@
click=
"handleConfirm"
>
确定
</el-button>
...
@@ -263,7 +223,8 @@ export default {
...
@@ -263,7 +223,8 @@ export default {
{
{
label
:
'适用商品'
,
label
:
'适用商品'
,
name
:
'goods'
,
name
:
'goods'
,
addHtml
:
'goodsHtml'
addHtml
:
'goodsHtml'
,
isHide
:
false
},
},
{
{
// label: '门店',
// label: '门店',
...
@@ -328,7 +289,17 @@ export default {
...
@@ -328,7 +289,17 @@ export default {
if
(
newValue
){
if
(
newValue
){
this
.
remarksView
=
newValue
.
split
(
'\n'
)
this
.
remarksView
=
newValue
.
split
(
'\n'
)
}
}
}
},
'editForm.useChannel'
(
newValue
,
oldValue
){
console
.
log
(
newValue
);
if
(
newValue
==
1
){
this
.
editFormData
[
6
].
isHide
=
false
}
else
{
this
.
editForm
.
useBarriers
=
'1'
this
.
editForm
.
full
=
''
this
.
editFormData
[
6
].
isHide
=
true
}
},
},
},
methods
:
{
methods
:
{
...
@@ -405,6 +376,7 @@ export default {
...
@@ -405,6 +376,7 @@ export default {
},
},
denominationBlur
(
event
){
denominationBlur
(
event
){
console
.
log
(
'111'
);
if
(
event
.
target
.
value
*
100
>
this
.
minPirce
){
if
(
event
.
target
.
value
*
100
>
this
.
minPirce
){
this
.
priceFlag
=
true
this
.
priceFlag
=
true
}
else
{
}
else
{
...
@@ -433,13 +405,14 @@ export default {
...
@@ -433,13 +405,14 @@ export default {
this
.
editForm
.
goodsRefList
.
push
(
good
)
this
.
editForm
.
goodsRefList
.
push
(
good
)
})
})
}
}
this
.
tableParams
.
tableOption
=
false
this
.
tableParams
.
tableOption
=
false
//去掉操作栏
})
})
},
},
//选择到店核销使用限制默认无使用门槛
//选择到店核销使用限制默认无使用门槛
clickUseChannel
(){
clickUseChannel
(){
this
.
editForm
.
useBarriers
=
'1'
this
.
editForm
.
useBarriers
=
'1'
this
.
editFormData
[
6
].
isHide
=
true
},
},
validateRules
(){
validateRules
(){
...
@@ -510,11 +483,13 @@ export default {
...
@@ -510,11 +483,13 @@ export default {
//有效期或者间隔天数使用次数
//有效期或者间隔天数使用次数
obj
.
useAmount
=
1
obj
.
useAmount
=
1
//适用商品
if
(
form
.
useChannel
==
1
){
//使用途径选择线上商品才需要对应的商品
if
(
form
.
goods
==
1
){
//全部商品
//适用商品
obj
.
goodsIdList
=
this
.
selectedAllProList
.
length
?
this
.
selectedAllProList
.
map
(
item
=>
item
.
id
)
:
[]
if
(
form
.
goods
==
1
){
//全部商品
}
else
{
//指定商品
obj
.
goodsIdList
=
this
.
selectedAllProList
.
length
?
this
.
selectedAllProList
.
map
(
item
=>
item
.
id
)
:
[]
obj
.
goodsIdList
=
form
.
goodsRefList
.
length
?
form
.
goodsRefList
.
map
(
item
=>
item
.
id
)
:
[]
}
else
{
//指定商品
obj
.
goodsIdList
=
form
.
goodsRefList
.
length
?
form
.
goodsRefList
.
map
(
item
=>
item
.
id
)
:
[]
}
}
}
}
}
//使用描述
//使用描述
...
@@ -531,7 +506,7 @@ export default {
...
@@ -531,7 +506,7 @@ export default {
}
}
var
params
=
this
.
getCouponInfoParams
()
var
params
=
this
.
getCouponInfoParams
()
console
.
log
(
params
);
console
.
log
(
params
);
if
(
this
.
apear
==
'couponAdd'
&&
!
params
.
goodsIdList
.
length
){
if
(
this
.
apear
==
'couponAdd'
&&
params
.
useChannel
==
1
&&
!
params
.
goodsIdList
.
length
){
this
.
$message
({
this
.
$message
({
message
:
'未选择商品'
,
message
:
'未选择商品'
,
type
:
'error'
type
:
'error'
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
1d5bda0
<!-- 编辑代金券 -->
<!-- 编辑代金券 -->
<
template
>
<
template
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"container edit-container"
style=
"height: 630px;"
>
<div
class=
"container edit-container"
style=
"height: 630px;
position: relative;
"
>
<div
class=
"right_show"
>
<div
class=
"right_show"
>
<div
class=
"card-top"
></div>
<div
class=
"card-top"
></div>
<div
class=
"card-middle"
>
<div
class=
"card-middle"
>
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
1d5bda0
<!-- 编辑代金券 -->
<!-- 编辑代金券 -->
<
template
>
<
template
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"edit-share marketing p-t-20"
>
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
style=
"height: 630px;position: relative;"
>
<div
class=
"right_show"
>
<div
class=
"right_show"
>
<div
class=
"card-top"
></div>
<div
class=
"card-top"
></div>
<div
class=
"card-middle"
>
<div
class=
"card-middle"
>
...
...
src/views/couponManage/index.vue
View file @
1d5bda0
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<el-button
v-if=
"scope.scope.status == '2' || scope.scope.status == '3'"
type=
"text"
@
click=
"handleEdit(3,scope.scope)"
>
查看
</el-button>
<el-button
v-if=
"scope.scope.status == '2' || scope.scope.status == '3'"
type=
"text"
@
click=
"handleEdit(3,scope.scope)"
>
查看
</el-button>
<el-button
v-if=
"scope.scope.status == '1' || scope.scope.status == '3'"
type=
"text"
@
click=
"del(scope.scope)"
>
删除
</el-button>
<el-button
v-if=
"scope.scope.status == '1' || scope.scope.status == '3'"
type=
"text"
@
click=
"del(scope.scope)"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"writeOffDetail(scope.scope)"
>
核销详情
</el-button>
<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 -->
...
@@ -65,7 +66,6 @@ export default {
...
@@ -65,7 +66,6 @@ export default {
label
:
'名称'
,
label
:
'名称'
,
name
:
'couponName'
,
name
:
'couponName'
,
type
:
'input'
,
type
:
'input'
,
width
:
'215px'
,
maxlength
:
20
maxlength
:
20
},
},
// {
// {
...
@@ -79,7 +79,6 @@ export default {
...
@@ -79,7 +79,6 @@ export default {
label
:
'优惠券类型'
,
label
:
'优惠券类型'
,
name
:
'discountType'
,
name
:
'discountType'
,
type
:
'select'
,
type
:
'select'
,
width
:
'215px'
,
optionList
:
[],
optionList
:
[],
optionId
:
'confId'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
...
@@ -89,7 +88,6 @@ export default {
...
@@ -89,7 +88,6 @@ export default {
label
:
'优惠券状态'
,
label
:
'优惠券状态'
,
name
:
'status'
,
name
:
'status'
,
type
:
'select'
,
type
:
'select'
,
width
:
'215px'
,
optionList
:
[],
optionList
:
[],
optionId
:
'confId'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
...
@@ -248,6 +246,11 @@ export default {
...
@@ -248,6 +246,11 @@ export default {
this
.
$router
.
push
(
'/couponManage/writeOffDetail/'
+
row
.
id
)
this
.
$router
.
push
(
'/couponManage/writeOffDetail/'
+
row
.
id
)
},
},
//领取记录
receiveDetail
(
row
){
this
.
$router
.
push
(
'/couponManage/receiveDetail/'
+
row
.
id
)
},
//删除
//删除
del
(
row
){
del
(
row
){
var
params
=
{}
var
params
=
{}
...
...
src/views/couponManage/receiveDetail.vue
0 → 100644
View file @
1d5bda0
<!-- 领取详情 -->
<
template
>
<div
class=
"marketing pro-group p-t-20"
>
<div
class=
"container"
>
<div>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"100px"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"exportExcel"
>
导出
</el-button>
<el-button
:size=
"size"
@
click=
"goback"
>
返回
</el-button>
</span>
</glsx-combi-form>
</div>
<div
class=
"icon-tips icon-green"
style=
"width: 98%;display: inline-block; margin-bottom: 20px;"
>
<img
src=
"../../images/comment.png"
/>
<span>
优惠券名称:
<i>
{{
coupon
.
couponName
}}
</i></span>
<span>
发行总量:
<i>
{{
coupon
.
stock
}}
</i></span>
<span>
领取量:
<i>
{{
coupon
.
getAmount
}}
</i></span>
<span>
有效期:
<i>
{{
effective
}}
</i></span>
<span>
使用限制:
<i>
{{
useB
}}
</i></span>
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"receiveList"
:getListApi=
"getListApi"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</
template
>
<
script
>
import
*
as
dayjs
from
'dayjs'
export
default
{
name
:
'receiveDetail'
,
data
()
{
return
{
size
:
'small'
,
coupon
:
{
couponName
:
''
,
stock
:
''
,
getAmount
:
''
},
effective
:
''
,
useB
:
''
,
// 表格
searchForm
:
{
phone
:
''
},
tableSearchForm
:
{},
// 搜索
searchFormData
:
[
{
label
:
'手机号'
,
name
:
'phone'
,
type
:
'input'
,
maxlength
:
11
}
],
// 表格
getListApi
:
this
.
$apis
.
couponManage
.
getListReceiveRecordApi
,
tableParams
:
{
listName
:
'list'
,
tableOption
:
false
,
tableColumns
:
[
{
label
:
'手机号'
,
prop
:
'phone'
},
{
label
:
'领取时间'
,
prop
:
'createdDate'
,
formatter
:
cellValue
=>
{
return
dayjs
(
cellValue
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
baseData
:
{
},
exportLoading
:
false
}
},
components
:
{
},
mounted
()
{
this
.
getOptionsList
(
'searchFormData'
)
this
.
getInfo
(
this
.
$route
.
params
.
id
)
},
methods
:
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
params
.
couponId
=
this
.
$route
.
params
.
id
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
resolve
()
})
},
getInfo
(
couponId
)
{
var
params
=
{}
params
.
couponId
=
couponId
this
.
$apis
.
couponManage
.
getCouponDetailApi
(
params
).
then
(
res
=>
{
this
.
coupon
=
res
this
.
effective
=
''
this
.
useB
=
''
var
coupon
=
res
//有效期
if
(
coupon
.
effectiveType
==
1
){
//固定天数,领取后计算
this
.
effective
=
coupon
.
effectiveDays
+
'天'
}
else
if
(
coupon
.
effectiveType
==
2
){
//时间段
this
.
effective
=
coupon
.
effectiveStartTime
+
' - '
+
coupon
.
effectiveEndTime
}
else
if
(
coupon
.
effectiveType
==
3
){
//无有效期
this
.
effective
=
'无有效期'
}
if
(
coupon
.
discountType
==
3
){
//代金券
//使用限制
if
(
coupon
.
useBarriers
==
1
){
//无限制
this
.
useB
=
'无限制'
}
else
if
(
coupon
.
useBarriers
==
2
){
//满减
this
.
useB
=
'满'
+
coupon
.
full
+
'元可用'
}
}
if
(
coupon
.
discountType
==
7
){
//会员服务
//使用限制
if
(
coupon
.
useType
==
0
){
//无限制
this
.
useB
=
'无限制'
}
else
if
(
coupon
.
useType
==
1
){
//有效期内可使用次数
this
.
useB
=
'有效期内可使用'
+
coupon
.
useAmount
+
'次'
}
else
if
(
coupon
.
useType
==
2
){
//有效期内多少天内可使用次数
this
.
useB
=
'有效期内'
+
coupon
.
useLimitDays
+
'天可使用'
+
coupon
.
usedAmount
+
'次'
}
}
})
},
writeOff
(){
this
.
writeOffVisible
=
!
this
.
writeOffVisible
},
/**导出excel */
exportExcel
(){
this
.
exportLoading
=
true
var
params
=
this
.
getParams
()
this
.
$apis
.
couponManage
.
exportReceiveRecordApi
(
params
).
then
(
res
=>
{
this
.
exportLoading
=
false
window
.
location
.
href
=
res
})
},
//返回
goback
(){
this
.
$router
.
push
(
'/couponManage/index'
)
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
})
}
},
handleSearch
()
{
this
.
$refs
.
receiveList
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
phone
:
''
}
this
.
handleSearch
()
}
}
}
</
script
>
<
style
scoped
>
.modal-title
span
{
font-size
:
12px
;
font-weight
:
400
;
}
.icon-green
{
background-color
:
rgba
(
3
,
153
,
69
,
.2
);
border
:
1px
solid
rgba
(
3
,
153
,
69
,
.2
);
}
.icon-tips
{
border-radius
:
2px
;
font-size
:
12px
;
color
:
#333
;
line-height
:
30px
;
padding
:
0
10px
0
30px
;
position
:
relative
;
}
.icon-tips
span
{
margin-right
:
10px
;
}
.icon-tips
i
{
font-style
:
normal
;
color
:
#ff3f3f
;
margin
:
0
3px
;
}
.icon-tips
img
{
position
:
absolute
;
top
:
8px
;
left
:
10px
;
}
</
style
>
src/views/couponManage/writeOffDetail.vue
View file @
1d5bda0
<!--
商品管理-门店
-->
<!--
核销详情
-->
<
template
>
<
template
>
<div
class=
"marketing pro-group p-t-20"
>
<div
class=
"marketing pro-group p-t-20"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -166,7 +166,7 @@ export default {
...
@@ -166,7 +166,7 @@ export default {
}
else
if
(
coupon
.
useType
==
1
){
//有效期内可使用次数
}
else
if
(
coupon
.
useType
==
1
){
//有效期内可使用次数
this
.
useB
=
'有效期内可使用'
+
coupon
.
useAmount
+
'次'
this
.
useB
=
'有效期内可使用'
+
coupon
.
useAmount
+
'次'
}
else
if
(
coupon
.
useType
==
2
){
//有效期内多少天内可使用次数
}
else
if
(
coupon
.
useType
==
2
){
//有效期内多少天内可使用次数
this
.
useB
=
'有效期内'
+
coupon
.
useLimitDays
+
'天可使用'
+
coupon
.
use
d
Amount
+
'次'
this
.
useB
=
'有效期内'
+
coupon
.
useLimitDays
+
'天可使用'
+
coupon
.
useAmount
+
'次'
}
}
}
}
})
})
...
...
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