Selaa lähdekoodia

feat:续费修改

zhanghui 5 kuukautta sitten
vanhempi
sitoutus
0249c904a2

+ 2 - 2
myPages/familyCard/index.vue

@@ -56,7 +56,7 @@
             </view>
 
             <view class="title">
-                <text>亲列表</text>
+                <text>亲列表</text>
             </view>
 
             <view class="loveCardNull" v-if="giveList.length === 0">
@@ -64,7 +64,7 @@
                     <image src="/static/me/zhanwu.png" class="nullIcon"></image>
                 </view>
                 <view class="flex-row justify-center nullMsg">
-                    <text>暂无亲列表</text>
+                    <text>暂无亲列表</text>
                 </view>
             </view>
 

+ 2 - 0
myPages/myActivityDetail/myActivityDetail.vue

@@ -208,6 +208,8 @@ export default {
     let shareActivityId = ''
     if (this.activity.shareActivityId){
        shareActivityId = this.activity.shareActivityId //分享的活动id
+    }else {
+      shareActivityId = this.activity.activityId //如果没有分享的活动id,则去原活动id
     }
     let inviteActivityId = this.activity.activityId  //邀请活动id
 

+ 48 - 4
orderPages/activityDetail/activityDetail.vue

@@ -178,14 +178,19 @@
     <!--    </view>-->
     <uni-popup ref="popup" type="bottom">
       <view class="addService">
-        <view class="popupTitle">
-          <text>选择服务对象</text>
+        <view class="flex-row justify-around">
+          <view :class="[type == 1 ? 'confirmButton' : 'cancelButton']"  @click="clickPopupTitleBtn(1)">
+            <text>选择服务对象</text>
+          </view>
+          <view :class="[type == 2 ? 'confirmButton' : 'cancelButton']"  @click="clickPopupTitleBtn(2)">
+            <text>选择推荐门店</text>
+          </view>
         </view>
 
         <scroll-view class="scrollY" scroll-y>
 
 
-            <view class="flex-row objectItem" v-for="(item,index) in serviceObjectList" :key="index"  :class="{'vBackGround': selectServiceObjectIndex === index}"  @click="selectServiceObjectIndex = index">
+            <view v-if="type == 1" class="flex-row objectItem" v-for="(item,index) in serviceObjectList" :key="index"  :class="{'vBackGround': selectServiceObjectIndex === index}"  @click="selectServiceObjectIndex = index">
               <image class="objectImage" :src="item.facePhotoUrl || '/static/ud4.png'"></image>
               <view class="flex-col objectName ">
                 <text>{{ item.nickName }}</text>
@@ -195,6 +200,14 @@
             </view>
 
 
+          <view v-if="type == 2" class="flex-row objectItem" v-for="(item,index) in storeList" :key="index"  :class="{'vBackGround': selectStoreIndex === index}"  @click="setSelectStoreIndex(index)">
+            <view class="flex-col objectName ">
+              <text>{{ item.name }}</text>
+            </view>
+            <image v-if="item[index].id === storeId" class="vImage"
+                   src="/static/index/xuanzhong.png"></image>
+          </view>
+
 
 
         </scroll-view>
@@ -221,7 +234,10 @@ export default {
   },
   data() {
     return {
+      type:1,
+      storeList: [],
       selectServiceObjectIndex: -1,
+      selectStoreIndex: -1,
       showRemarkId: '',
       userInfo: {},
       subOrderNo: '',
@@ -312,6 +328,20 @@ export default {
   },
 
   methods: {
+    setSelectStoreIndex(index){
+      if (this.selectStoreIndex === index){
+        this.storeId = null
+        this.selectStoreIndex = -1
+      }else {
+        this.storeId =  this.storeList[index].id
+        this.selectStoreIndex = index
+      }
+    },
+
+    clickPopupTitleBtn(type){
+      this.type = type
+    },
+
     showRemark(item) {
       if (this.showRemarkId == item.id) {
         this.showRemarkId = ''
@@ -486,7 +516,7 @@ export default {
         orderType: 7,
         serviceObjectId: this.serviceObjectId,
         activityId: this.activity.id,
-        storeId: this.storeId,
+        storeId: this.storeId ,
         inviteUserId: this.inviteUserId,
         inviteOrderId: this.inviteOrderId,
         inviteActivityId: this.inviteActivityId,
@@ -538,6 +568,20 @@ export default {
       this.$api.activityDetail(data).then(res => {
         console.log(res)
         this.activity = res.data.data
+
+        let ids = this.activity.partStoreIds.split(',')
+        let names = this.activity.partStoreName.split(',')
+        console.log(ids,names)
+        for (let i = 0; i < ids.length; i++) {
+          let store = {
+            id: ids[i],
+            name: names[i]
+          }
+          this.storeList.push(store)
+        }
+
+        console.log(this.storeList,'+++++++++store_list++++++++++')
+
         this.$set(this.activity)
         if (this.isShare) {
           console.log(this.activity)

+ 14 - 7
orderPages/activityDetail/index.rpx.scss

@@ -186,14 +186,21 @@
   border-radius: 24rpx 24rpx 0rpx 0rpx;
 }
 
-.popupTitle {
-  height: 44rpx;
-  font-size: 32rpx;
-  font-weight: 600;
-  color: #333333;
-  line-height: 44rpx;
-  margin-left: 34rpx;
+.popupTitle{
+  padding: 0 40rpx;
 }
+
+.popupTitleBtn {
+  padding: 10rpx;
+  background: #a1a1a1;
+  border-radius: 10rpx;
+}
+.popupTitleBtn1{
+  padding: 10rpx;
+  background: #ffe05c;
+  border-radius: 10rpx;
+}
+
 .scrollY {
   height: 504rpx;
   margin-top: 34rpx;

+ 10 - 5
orderPages/activityList/activityList.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="page">
-    <mescroll-item ref="MescrollItem" :i="0"  :index="0" :height="windowHeight" :renewServiceObjectId="renewServiceObjectId">
+    <mescroll-item ref="MescrollItem" v-if="flag" :i="0"  :index="0" :height="windowHeight" :renewServiceObjectId="renewServiceObjectId" :equityCardId="equityCardId">
     </mescroll-item>
   </view>
 </template>
@@ -16,18 +16,23 @@ export default {
   data() {
     return {
       windowHeight: '',
-      renewServiceObjectId: null
-
-
+      renewServiceObjectId: null,
+      equityCardId: null,
+      flag:false
     }
   },
   onLoad(e) {
-    console.log('+++++++++++e++++++++++++++',e)
     if (e.renewServiceObjectId){
       this.renewServiceObjectId = e.renewServiceObjectId
     }
+    if (e.equityCardId){
+      this.equityCardId  = e.equityCardId
+    }
     let sysInfo = uni.getSystemInfoSync()
     this.windowHeight = sysInfo.windowHeight + 'px'
+
+    //当参数加载完成,在创建mescroll-item组件。不然第一次查询的数据有问题
+    this.flag = true
   },
   methods: {}
 }

+ 10 - 1
orderPages/activityList/module/mescrollUni-item.vue

@@ -94,7 +94,12 @@ export default {
       default(){
         return null
       }
-
+    },
+    equityCardId:{
+      type:String,
+      default(){
+        return ''
+      }
     }
 
 	},
@@ -123,10 +128,14 @@ export default {
 		/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 		upCallback(page) {
 
+      console.log('+++++++++this.renewServiceObjectId++++++++',this.renewServiceObjectId)
+      console.log('+++++++++this.equityCardId++++++++',this.equityCardId)
+
 			//联网加载数据
 			let httpData = {
 				pageNum: page.num,
 				pageSize: 10,
+        equityCardIds: this.equityCardId
 			}
 			this.$api.activityList(httpData).then((res) => {
 				//联网成功的回调,隐藏下拉刷新和上拉加载的状态;

+ 25 - 24
orderPages/bookService/index.vue

@@ -297,6 +297,8 @@
 				})
 			},1000*60*5)
 
+      this.getExpireEquityCard();
+
 		},
 		onShow() {
 
@@ -333,11 +335,11 @@
           let list = item.activityId.split(',')
           if (list.length == 1){
             uni.navigateTo({
-              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId
+              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId +'&renewServiceObjectId=' + item.serviceObjectId
             })
           }else {
             uni.navigateTo({
-              url:'/orderPages/activityList/activityList'
+              url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId + '&equityCardId=' + item.equityCardId
             })
           }
         }else{
@@ -348,32 +350,32 @@
 
       },
 
-      getExpireEquityCard(serviceObjectId){
+      getExpireEquityCard(){
         this.$api.getExpireEquityCard({
-          serviceObjectId:serviceObjectId
+          serviceObjectId:0
         }).then((res)=>{
           this.expireEquityCard = res.data.data;
-          if (this.expireEquityCard.length > 0){
-            uni.showModal({
-              title:'温馨提示',
-              content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
-              confirmText:'立即续费',
-              success:(res)=>{
-                if (res.confirm) {
-                  console.log('用户点击确定');
-                  uni.navigateTo({
-                    url:'/storePages/myRights/index'
-                  })
-                } else if (res.cancel) {
-                  console.log('用户点击取消');
-                }
-              }
-            })
-          }
-
           // if (this.expireEquityCard.length > 0){
-          //   this.$refs.showExpireEquityCard.open()
+          //   uni.showModal({
+          //     title:'温馨提示',
+          //     content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
+          //     confirmText:'立即续费',
+          //     success:(res)=>{
+          //       if (res.confirm) {
+          //         console.log('用户点击确定');
+          //         uni.navigateTo({
+          //           url:'/storePages/myRights/index'
+          //         })
+          //       } else if (res.cancel) {
+          //         console.log('用户点击取消');
+          //       }
+          //     }
+          //   })
           // }
+
+          if (this.expireEquityCard.length > 0){
+            this.$refs.showExpireEquityCard.open()
+          }
         })
       },
 
@@ -637,7 +639,6 @@
 					}
 
 				} else {
-          this.getExpireEquityCard(item.id)
 					this.$api.getServicePersonTime({
 						personId: this.serviceTeacherList[0].personId,
 						date: this.periodDate.label,

+ 6 - 6
orderPages/orderDetail/index.vue

@@ -166,7 +166,7 @@
 				</view>
 
 				<view class="btn" @click="qenPayInfo">
-					<text class="text_33">一键付款</text>
+					<text class="text_33">提交</text>
 				</view>
 <!--				<view v-else class="btn" @click="orderFinish">-->
 <!--					<text  class="text_33">结束订单</text>-->
@@ -531,7 +531,7 @@
           this.availableChild.suggestCoupon = item
           if (item.discountsType == 1){
             //满减优惠券
-            this.availableChild.discountAmount = item.discountsPrice
+            this.availableChild.discountAmount = item.discountsPrice.toFixed(2)
             this.availableChild.payAmount =  (this.availableChild.servicePrice - item.discountsPrice).toFixed(2)
           }else {
             //折扣券
@@ -544,14 +544,14 @@
           this.availableChild.suggestType = 2
           this.availableChild.suggestEquityCard = item
           this.availableChild.discountAmount = (this.availableChild.servicePrice - item.faceValue).toFixed(2)
-          this.availableChild.payAmount =  item.faceValue
+          this.availableChild.payAmount =  item.faceValue.toFixed(2)
         }else {
           //不使用优惠
           this.availableChild.suggestType =  0
           this.availableChild.suggestCoupon = null
           this.availableChild.suggestEquityCard = null
           this.availableChild.discountAmount = 0
-          this.availableChild.payAmount =  this.availableChild.servicePrice
+          this.availableChild.payAmount =  this.availableChild.servicePrice.toFixed(2)
         }
         this.$set(this.order.child,this.availableIndex,this.availableChild)
         let payAmount = 0      //计算订单总支付金额
@@ -562,8 +562,8 @@
             discountAmount += child.discountAmount - 0
           }
         }
-        this.order.payAmount = payAmount
-        this.order.discountAmount = discountAmount
+        this.order.payAmount = payAmount.toFixed(2)
+        this.order.discountAmount = discountAmount.toFixed(2)
         this.availableChild = null
         this.availableIndex = null
         this.availableCouponList = []

+ 23 - 24
orderPages/storeService/index.vue

@@ -219,7 +219,7 @@
 					}
 				})
 			},1000*60*5)
-
+      this.getExpireEquityCard()
 		},
 		onShow() {
 
@@ -254,11 +254,11 @@
           let list = item.activityId.split(',')
           if (list.length == 1){
             uni.navigateTo({
-              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId
+              url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId +'&renewServiceObjectId=' + item.serviceObjectId
             })
           }else {
             uni.navigateTo({
-              url:'/orderPages/activityList/activityList'
+              url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId + '&equityCardId=' + item.equityCardId
             })
           }
         }else{
@@ -269,31 +269,31 @@
 
       },
 
-      getExpireEquityCard(serviceObjectId){
+      getExpireEquityCard(){
         this.$api.getExpireEquityCard({
-          serviceObjectId:serviceObjectId
+          serviceObjectId:0
         }).then((res)=>{
           this.expireEquityCard = res.data.data;
-          if (this.expireEquityCard.length > 0){
-            uni.showModal({
-              title:'温馨提示',
-              content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
-              confirmText:'立即续费',
-              success:(res)=>{
-                if (res.confirm) {
-                  console.log('用户点击确定');
-                  uni.navigateTo({
-                    url:'/storePages/myRights/index'
-                  })
-                } else if (res.cancel) {
-                  console.log('用户点击取消');
-                }
-              }
-            })
-          }
           // if (this.expireEquityCard.length > 0){
-          //   this.$refs.showExpireEquityCard.open()
+          //   uni.showModal({
+          //     title:'温馨提示',
+          //     content:'您有' + this.expireEquityCard.length + '张权益卡即将到期',
+          //     confirmText:'立即续费',
+          //     success:(res)=>{
+          //       if (res.confirm) {
+          //         console.log('用户点击确定');
+          //         uni.navigateTo({
+          //           url:'/storePages/myRights/index'
+          //         })
+          //       } else if (res.cancel) {
+          //         console.log('用户点击取消');
+          //       }
+          //     }
+          //   })
           // }
+          if (this.expireEquityCard.length > 0){
+            this.$refs.showExpireEquityCard.open()
+          }
         })
       },
 
@@ -462,7 +462,6 @@
 					this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
 						selectServiceObject.serviceObjectId !== item.id)
 				} else {
-          this.getExpireEquityCard(item.id)
 					let periodTimeList = JSON.parse(JSON.stringify(this.periodTimeList))
 					periodTimeList.forEach(i=>{
 						this.orderParam.childService.forEach(i1=>{

+ 3 - 2
storePages/myRights/index.vue

@@ -21,7 +21,7 @@
             <!--					<text>{{item.title}}</text>-->
             <!--				</view>-->
             <view class="flex-row justify-center" v-if="item.isShow">
-              <text style="font-size: 28rpx;font-weight: bold;color: red;" @click="navigateTo(item)">点击续费</text>
+              <text style="font-size: 28rpx;font-weight: bold;color: red;" @click.stop="navigateTo(item)">点击续费</text>
             </view>
           </view>
 
@@ -108,8 +108,9 @@
               url:'/orderPages/activityDetail/activityDetail?id=' + item.activityId +'&renewServiceObjectId=' + item.serviceObjectId
             })
           }else {
+
             uni.navigateTo({
-              url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId
+              url:'/orderPages/activityList/activityList?renewServiceObjectId=' + item.serviceObjectId + '&equityCardId=' + item.equityCardId
             })
           }
         }else{