فهرست منبع

花掌柜收银端--客户列表VIP显示调整

shizhongqi 3 ماه پیش
والد
کامیت
d452520900
1فایلهای تغییر یافته به همراه7 افزوده شده و 16 حذف شده
  1. 7 16
      hdPad/src/pages/home/components/customList.vue

+ 7 - 16
hdPad/src/pages/home/components/customList.vue

@@ -3,7 +3,7 @@
         <view class="title">列表</view>
         <view class="order-status">
             <view @tap="changeType(0)" :class="[{'checked':type===0}]">全部</view>
-            <view v-if="useVip" @tap="changeType(5)" :class="[{'checked':type===5}]">会员</view>
+            <view v-if="haveVip" @tap="changeType(5)" :class="[{'checked':type===5}]">会员</view>
             <view @tap="changeType(2)" :class="[{'checked':type===2}]">余额</view>
             <view @tap="changeType(1)" :class="[{'checked':type===1}]">消费</view>
             <view @tap="changeType(3)" :class="[{'checked':type===3}]">生日</view>
@@ -46,7 +46,6 @@
                     <view class="customer-info">
                         <view class="customer-name">
                             <text class="name-text">{{ item.name }}</text>
-                            <text v-if="Number(item.vip) === 1" class="vip-tag">VIP</text>
                         </view>
                         <view class="customer-balance-level">
                             <block v-if="item.passStatus == 1">
@@ -64,7 +63,8 @@
                             <block v-else>
                                 <text class="balance">待审核</text>
                             </block>
-                            <text class="level">{{ item.memberName }}</text>
+                            <text v-if="useVip" v-show="Number(item.vip) == 1" class="level">{{ item.memberName }}</text>
+                            <text v-else class="level">{{ item.memberName }}</text>
                         </view>
                         <view class="customer-details">
                             <text class="mobile">{{ item.mobile }}</text>
@@ -94,13 +94,15 @@ export default {
             searchText: '',
             searchTimer: null,
             searchStyle:0,
+            haveVip:false,
             useVip:0 // 是否启用VIP
         }
     },
     created(){
         this.getCustomData()
+
         const shopInfo = this.$store.getters.getMyShopInfo.shop
-        this.useVip = shopInfo.reachVip != "-1.00"
+        this.useVip = shopInfo.reachVip != "0.00"
     },
     methods:{
         changeSearchStyle(){
@@ -165,6 +167,7 @@ export default {
             let params = {page:this.list.page,pageSize:20,type:this.type,searchStyle:this.searchStyle,searchText:this.searchText}
             return getCustomList(params).then(res=>{
                 if(res.code == 1){
+                    this.haveVip = res.data.vip > 0
                     this.completes(res)
                     if(this.list.data && this.list.data[0]){
                         this.getCustomInfo(this.list.data[0])
@@ -340,18 +343,6 @@ export default {
                             margin-left: 5upx;
                             flex-shrink: 0;
                         }
-
-                        & .vip-tag {
-                            margin-right: auto;
-                            font-size: 8upx;
-                            color: #ffffff;
-                            font-weight: bold;
-                            background: linear-gradient(135deg, #F7B733, #FC4A1A);
-                            padding: 1upx 4upx;
-                            border-radius: 3upx;
-                            flex-shrink: 0;
-                            line-height: 1.3;
-                        }
                     }
                     
                     & .customer-balance-level {