Commit 5bd78c78 by chenwq

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

1 parent c2d45b05
...@@ -14,9 +14,16 @@ ...@@ -14,9 +14,16 @@
.icon-gift-create { width: 16px; height: 16px; background-position: -300px -227px;} .icon-gift-create { width: 16px; height: 16px; background-position: -300px -227px;}
.icon-gift-del { width: 18px; height: 18px; background-position: -300px -197px;} .icon-gift-del { width: 18px; height: 18px; background-position: -300px -197px;}
.icon-gift-icon { width: 44px; height: 44px; background-position: -270px -59px;} .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-goods-share { width: 16px; height: 16px; background-position: -179px -180px;}
.icon-poster-close { width: 20px; height: 20px; background-position: -270px -197px;} .icon-poster-close { width: 20px; height: 20px; background-position: -270px -197px;}
.icon-scan { width: 16px; height: 16px; background-position: -205px -180px;} .icon-scan { width: 16px; height: 16px; background-position: -205px -180px;}
.icon-share { width: 20px; height: 20px; background-position: -270px -227px;} .icon-share { width: 20px; height: 20px; background-position: -270px -227px;}
.icon-vip { width: 80px; height: 80px; background-position: -180px 0px;} .icon-vip { width: 80px; height: 80px; background-position: -180px 0px;}
.icon-img-wh {
width: 58px;
height: 22px;
}
...@@ -44,10 +44,11 @@ export default { ...@@ -44,10 +44,11 @@ export default {
return { return {
value: 0, value: 0,
option: [ option: [
// v2.3.0,优惠券和门店服务整合到一起
{ text: '优惠券', value: 0 }, { text: '优惠券', value: 0 },
{ text: '精品礼券', value: 1 }, { text: '精品礼券', value: 1 },
{ text: '商品订单', value: 2 }, { text: '商品订单', value: 2 }
{ text: '门店服务', value: 3 } // { text: '门店服务', value: 3 }
], ],
searchValue: '' searchValue: ''
} }
......
...@@ -87,6 +87,13 @@ ...@@ -87,6 +87,13 @@
</div> </div>
</template> </template>
</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>
<div <div
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
@click="jump(item)" @click="jump(item)"
> >
<!-- 0:优惠券 1:精品礼券 2:商品订单 3:门店服务 --> <!-- 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="title flex">
<div class="name text-hide"> <div class="name text-hide">
<template v-if="type == 0">{{item.phone}}</template> <template v-if="type == 0">{{item.phone}}</template>
...@@ -64,10 +65,10 @@ ...@@ -64,10 +65,10 @@
</div> </div>
</div> </div>
</template> </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> <div :class="['sprite-icon','coupon-icon',`icon-coupon-${item.discountType== 4?1:0}`]"></div>
</template> </template> -->
<template v-else> <template v-if="type != 0">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<div :class="['sprite-icon','coupon-icon',item.upgradeFlag == 'Y'?'icon-coupon-success':'icon-coupon-lose']"></div> <div :class="['sprite-icon','coupon-icon',item.upgradeFlag == 'Y'?'icon-coupon-success':'icon-coupon-lose']"></div>
</template> </template>
...@@ -75,6 +76,7 @@ ...@@ -75,6 +76,7 @@
</div> </div>
<template v-if="type == 0"> <template v-if="type == 0">
<div class="bottom flex"> <div class="bottom flex">
<img class="icon-img-wh" :src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)" alt="">
<div class="name"> <div class="name">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}} 核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}}
...@@ -89,38 +91,8 @@ ...@@ -89,38 +91,8 @@
</div> </div>
</template> </template>
</template> </template>
<template v-else-if="type == 2"> <div v-else-if="type == 0 && item.discountType == 7" class="type-3">
<div class="title flex"> <div class="item">
{{item.customerName}}
<span class="time">{{tabIndex == 0?'核销时间':'下单时间'}}:{{new Date(tabIndex == 0 ?item.verificationDate:item.orderDate).format('yyyy/MM/dd')}}</span>
</div>
<div class="goods flex">
<img
:src="item.goodsImage"
class="icon"
/>
<div class="info">
<div class="flex">
<div class="name text-hide">{{item.goodsName}}</div>
<div class="price">
<span class="unit">¥</span>{{item.retailPrice}}
</div>
</div>
<div class="flex">
<div class="name specificationData text-hide">{{item.specificationData || ''}}</div>
<div class="num">x{{item.goodsNumber || 1}}</div>
</div>
</div>
</div>
<div class="bottom flex">
订单编号{{item.orderCode}}
<div
class="name"
v-if="item.verificationOperator"
>核销人:{{item.verificationOperator}}</div>
</div>
</template>
<template v-else>
<div class="title flex"> <div class="title flex">
{{item.phone}} {{item.phone}}
<template v-if="item.directionalGiftId || item.directionalGiftName"> <template v-if="item.directionalGiftId || item.directionalGiftName">
...@@ -129,10 +101,10 @@ ...@@ -129,10 +101,10 @@
</div> </div>
<div class="page"> <div class="page">
<div class="page-item flex"> <div class="page-item flex">
<div class="label">服务名称</div> <div class="label">券名</div>
<div class="value">{{item.couponName}}</div> <div class="value">{{item.couponName}}</div>
</div> </div>
<div class="page-item flex"> <!-- <div class="page-item flex">
<div class="label">有效期</div> <div class="label">有效期</div>
<div class="value"> <div class="value">
<template v-if="item.useType == 0"> <template v-if="item.useType == 0">
...@@ -151,7 +123,13 @@ ...@@ -151,7 +123,13 @@
可用{{item.useAmount}}次 可用{{item.useAmount}}次
</template> </template>
</div> </div>
</div> -->
<template>
<div class="page-item flex">
<div class="label">发放人</div>
<div class="value">{{item.issueName}}</div>
</div> </div>
</template>
<template v-if="item.verificationOperator"> <template v-if="item.verificationOperator">
<div class="page-item flex"> <div class="page-item flex">
<div class="label">核销人</div> <div class="label">核销人</div>
...@@ -160,15 +138,48 @@ ...@@ -160,15 +138,48 @@
</template> </template>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="vip-btn text-center"> <!-- <div class="vip-btn text-center">
<template v-if="tabIndex == 0">已核销{{item.usedAmount}}次</template> <template v-if="tabIndex == 0">已核销{{item.usedAmount}}次</template>
<template v-else> <template v-else>
<template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template> <template v-if="item.residueAmount">剩余可用{{item.residueAmount}}次</template>
<template v-else>不限次数</template> <template v-else>不限次数</template>
</template> </template>
</div> </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 class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
</div> </div>
</div>
</div>
<template v-else-if="type == 2">
<div class="title flex">
{{item.customerName}}
<span class="time">{{tabIndex == 0?'核销时间':'下单时间'}}:{{new Date(tabIndex == 0 ?item.verificationDate:item.orderDate).format('yyyy/MM/dd')}}</span>
</div>
<div class="goods flex">
<img
:src="item.goodsImage"
class="icon"
/>
<div class="info">
<div class="flex">
<div class="name text-hide">{{item.goodsName}}</div>
<div class="price">
<span class="unit">¥</span>{{item.retailPrice}}
</div>
</div>
<div class="flex">
<div class="name specificationData text-hide">{{item.specificationData || ''}}</div>
<div class="num">x{{item.goodsNumber || 1}}</div>
</div>
</div>
</div>
<div class="bottom flex">
订单编号{{item.orderCode}}
<div
class="name"
v-if="item.verificationOperator"
>核销人:{{item.verificationOperator}}</div>
</div>
</template> </template>
</div> </div>
</template> </template>
...@@ -240,6 +251,12 @@ export default { ...@@ -240,6 +251,12 @@ export default {
updata: new Date().getTime(), updata: new Date().getTime(),
tabIndex: 0, tabIndex: 0,
type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:门店服务*/ type: 0, /**0:优惠券 1:精品礼券 2:商品订单 3:门店服务*/
attrToIcon: {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
},
flag: false, flag: false,
pageNum: 1, pageNum: 1,
itemObj, itemObj,
...@@ -331,7 +348,8 @@ export default { ...@@ -331,7 +348,8 @@ export default {
}, },
getList () { getList () {
let { tabIndex, type } = this let { tabIndex, type } = this
if (type == 0 || type == 3) { // if (type == 0 || type == 3) {
if (type == 0) {
if (tabIndex == 0) this.getVerificationList(type, true) if (tabIndex == 0) this.getVerificationList(type, true)
else this.getUserCouponList({ else this.getUserCouponList({
userStatus: tabIndex == 1 ? 1 : 0, userStatus: tabIndex == 1 ? 1 : 0,
...@@ -356,8 +374,8 @@ export default { ...@@ -356,8 +374,8 @@ export default {
/**优惠券已核销 */ /**优惠券已核销 */
getVerificationList (type = 0, setData) { getVerificationList (type = 0, setData) {
let { userName, pageNum } = this let { userName, pageNum } = this
let discountTypes = [2, 3, 4] let discountTypes = [2, 3, 4, 7]
if (type == 3) discountTypes = [7] // if (type == 3) discountTypes = [7]
couponApi.getVerificationList({ couponApi.getVerificationList({
pageNum, pageNum,
userName, userName,
...@@ -374,8 +392,8 @@ export default { ...@@ -374,8 +392,8 @@ export default {
/**优惠券待核销 已领取 */ /**优惠券待核销 已领取 */
getUserCouponList ({ userStatus, type }, setData) { getUserCouponList ({ userStatus, type }, setData) {
let { userName, pageNum } = this let { userName, pageNum } = this
let discountTypes = [2, 3, 4] let discountTypes = [2, 3, 4, 7]
if (type == 3) discountTypes = [7] // if (type == 3) discountTypes = [7]
couponApi.getUserCouponList({ couponApi.getUserCouponList({
pageNum, pageNum,
userName, userName,
...@@ -615,7 +633,7 @@ export default { ...@@ -615,7 +633,7 @@ export default {
} }
} }
.page { .page {
min-height: 103px; // min-height: 103px;
padding: 16px 12px; padding: 16px 12px;
box-sizing: border-box; box-sizing: border-box;
&-item { &-item {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!