Commit 5bd78c78 by chenwq

优惠券和门店服务整合;样式修改

1 parent c2d45b05
......@@ -14,9 +14,16 @@
.icon-gift-create { width: 16px; height: 16px; background-position: -300px -227px;}
.icon-gift-del { width: 18px; height: 18px; background-position: -300px -197px;}
.icon-gift-icon { width: 44px; height: 44px; background-position: -270px -59px;}
.icon-gift-logo { width: 89px; height: 27px; background-position: -80px -180px;}
// .icon-gift-logo { width: 89px; height: 27px; background-position: -80px -180px;}
.icon-gift-logo { width: 89px; height: 27px; background-image: url(../images/logo-gift.png); background-size: 89px 27px;}
.icon-group-logo { width: 89px; height: 27px; background-image: url(../images/logo-group.png); background-size: 89px 27px;}
.icon-detail-group { width: 64px; height: 24px; background-image: url(../images/icon-detail-group.png); background-size: 64px 24px;}
.icon-goods-share { width: 16px; height: 16px; background-position: -179px -180px;}
.icon-poster-close { width: 20px; height: 20px; background-position: -270px -197px;}
.icon-scan { width: 16px; height: 16px; background-position: -205px -180px;}
.icon-share { width: 20px; height: 20px; background-position: -270px -227px;}
.icon-vip { width: 80px; height: 80px; background-position: -180px 0px;}
\ No newline at end of file
.icon-vip { width: 80px; height: 80px; background-position: -180px 0px;}
.icon-img-wh {
width: 58px;
height: 22px;
}
......@@ -44,10 +44,11 @@ export default {
return {
value: 0,
option: [
// v2.3.0,优惠券和门店服务整合到一起
{ text: '优惠券', value: 0 },
{ text: '精品礼券', value: 1 },
{ text: '商品订单', value: 2 },
{ text: '门店服务', value: 3 }
{ text: '商品订单', value: 2 }
// { text: '门店服务', value: 3 }
],
searchValue: ''
}
......@@ -116,4 +117,4 @@ export default {
width: 100%;
}
}
</style>
\ No newline at end of file
</style>
......@@ -87,6 +87,13 @@
</div>
</template>
</template>
<div class="item flex">
<div class="label">所属套餐</div>
<div class="value">
<div class="value">张三</div>
<div class="sprite-icon icon-detail-group"></div>
</div>
</div>
</div>
<div
......@@ -294,4 +301,4 @@ export default {
box-sizing: border-box;
}
}
</style>
\ No newline at end of file
</style>
......@@ -28,7 +28,8 @@
@click="jump(item)"
>
<!-- 0:优惠券 1:精品礼券 2:商品订单 3:门店服务 -->
<template v-if="type == 0 || type == 1">
<!-- v2.3.0,优惠券和门店服务整合在一起 -->
<template v-if="(type == 0 && item.discountType != 7) || type == 1">
<div class="title flex">
<div class="name text-hide">
<template v-if="type == 0">{{item.phone}}</template>
......@@ -64,10 +65,10 @@
</div>
</div>
</template>
<template v-if="type == 0">
<!-- <template v-if="type == 0">
<div :class="['sprite-icon','coupon-icon',`icon-coupon-${item.discountType== 4?1:0}`]"></div>
</template>
<template v-else>
</template> -->
<template v-if="type != 0">
<template v-if="tabIndex == 0">
<div :class="['sprite-icon','coupon-icon',item.upgradeFlag == 'Y'?'icon-coupon-success':'icon-coupon-lose']"></div>
</template>
......@@ -75,6 +76,7 @@
</div>
<template v-if="type == 0">
<div class="bottom flex">
<img class="icon-img-wh" :src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)" alt="">
<div class="name">
<template v-if="tabIndex == 0">
核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}}
......@@ -89,6 +91,65 @@
</div>
</template>
</template>
<div v-else-if="type == 0 && item.discountType == 7" class="type-3">
<div class="item">
<div class="title flex">
{{item.phone}}
<template v-if="item.directionalGiftId || item.directionalGiftName">
<div class="sprite-icon icon-gift-logo"></div>
</template>
</div>
<div class="page">
<div class="page-item flex">
<div class="label">券名</div>
<div class="value">{{item.couponName}}</div>
</div>
<!-- <div class="page-item flex">
<div class="label">有效期</div>
<div class="value">
<template v-if="item.useType == 0">
不限次数
</template>
<template v-else-if="item.useType == 1">
<template v-if="item.effectiveType == 1">{{item.effectiveDays}}天</template>
<template v-else-if="item.effectiveType == 2">{{new Date(item.effectiveStartTime).format('yyyy/MM/dd')}} ~ {{new Date(item.effectiveEndTime).format('yyyy/MM/dd')}}</template>
<template v-else>无有效期</template>
|
{{item.effectiveType > 2 ? '' : '有效期内'}}可用{{item.useAllAmount}}次
</template>
<template v-else>
<template v-if="item.effectiveType > 2">无有效期</template>每隔{{item.useLimitDays}}天
|
可用{{item.useAmount}}次
</template>
</div>
</div> -->
<template>
<div class="page-item flex">
<div class="label">发放人</div>
<div class="value">{{item.issueName}}</div>
</div>
</template>
<template v-if="item.verificationOperator">
<div class="page-item flex">
<div class="label">核销人</div>
<div class="value">{{item.verificationOperator}}</div>
</div>
</template>
</div>
<div class="bottom flex">
<!-- <div class="vip-btn text-center">
<template v-if="tabIndex == 0">已核销{{item.usedAmount}}次</template>
<template v-else>
<template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template>
<template v-else>不限次数</template>
</template>
</div> -->
<img class="icon-img-wh" :src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)" alt="">
<div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
</div>
</div>
</div>
<template v-else-if="type == 2">
<div class="title flex">
{{item.customerName}}
......@@ -120,56 +181,6 @@
>核销人:{{item.verificationOperator}}</div>
</div>
</template>
<template v-else>
<div class="title flex">
{{item.phone}}
<template v-if="item.directionalGiftId || item.directionalGiftName">
<div class="sprite-icon icon-gift-logo"></div>
</template>
</div>
<div class="page">
<div class="page-item flex">
<div class="label">服务名称</div>
<div class="value">{{item.couponName}}</div>
</div>
<div class="page-item flex">
<div class="label">有效期</div>
<div class="value">
<template v-if="item.useType == 0">
不限次数
</template>
<template v-else-if="item.useType == 1">
<template v-if="item.effectiveType == 1">{{item.effectiveDays}}天</template>
<template v-else-if="item.effectiveType == 2">{{new Date(item.effectiveStartTime).format('yyyy/MM/dd')}} ~ {{new Date(item.effectiveEndTime).format('yyyy/MM/dd')}}</template>
<template v-else>无有效期</template>
|
{{item.effectiveType > 2 ? '' : '有效期内'}}可用{{item.useAllAmount}}次
</template>
<template v-else>
<template v-if="item.effectiveType > 2">无有效期</template>每隔{{item.useLimitDays}}天
|
可用{{item.useAmount}}次
</template>
</div>
</div>
<template v-if="item.verificationOperator">
<div class="page-item flex">
<div class="label">核销人</div>
<div class="value">{{item.verificationOperator}}</div>
</div>
</template>
</div>
<div class="bottom flex">
<div class="vip-btn text-center">
<template v-if="tabIndex == 0">已核销{{item.usedAmount}}次</template>
<template v-else>
<template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template>
<template v-else>不限次数</template>
</template>
</div>
<div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
</div>
</template>
</div>
</template>
</scroll-view>
......@@ -240,6 +251,12 @@ export default {
updata: new Date().getTime(),
tabIndex: 0,
type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:门店服务*/
attrToIcon: {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
},
flag: false,
pageNum: 1,
itemObj,
......@@ -331,7 +348,8 @@ export default {
},
getList () {
let { tabIndex, type } = this
if (type == 0 || type == 3) {
// if (type == 0 || type == 3) {
if (type == 0) {
if (tabIndex == 0) this.getVerificationList(type, true)
else this.getUserCouponList({
userStatus: tabIndex == 1 ? 1 : 0,
......@@ -356,8 +374,8 @@ export default {
/**优惠券已核销 */
getVerificationList (type = 0, setData) {
let { userName, pageNum } = this
let discountTypes = [2, 3, 4]
if (type == 3) discountTypes = [7]
let discountTypes = [2, 3, 4, 7]
// if (type == 3) discountTypes = [7]
couponApi.getVerificationList({
pageNum,
userName,
......@@ -374,8 +392,8 @@ export default {
/**优惠券待核销 已领取 */
getUserCouponList ({ userStatus, type }, setData) {
let { userName, pageNum } = this
let discountTypes = [2, 3, 4]
if (type == 3) discountTypes = [7]
let discountTypes = [2, 3, 4, 7]
// if (type == 3) discountTypes = [7]
couponApi.getUserCouponList({
pageNum,
userName,
......@@ -615,7 +633,7 @@ export default {
}
}
.page {
min-height: 103px;
// min-height: 103px;
padding: 16px 12px;
box-sizing: border-box;
&-item {
......@@ -660,4 +678,4 @@ export default {
color: #fff;
font-size: 12px;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!