zhanghui 2 лет назад
Родитель
Сommit
3e7751c124
2 измененных файлов с 120 добавлено и 73 удалено
  1. 12 6
      orderPages/serviceItems/index.rpx.scss
  2. 108 67
      orderPages/serviceItems/index.vue

+ 12 - 6
orderPages/serviceItems/index.rpx.scss

@@ -308,7 +308,6 @@
   font-family: PingFangSC-Regular;
   font-family: PingFangSC-Regular;
   font-weight: normal;
   font-weight: normal;
   white-space: nowrap;
   white-space: nowrap;
-  line-height: 84rpx;
 }
 }
 
 
 .thumbnail_6 {
 .thumbnail_6 {
@@ -357,11 +356,6 @@
   margin-left: 24rpx;
   margin-left: 24rpx;
 }
 }
 .bottomView{
 .bottomView{
-  position: fixed;
-  bottom: 0;
-  width: 750rpx;
-  background: #FFFFFF;
-  padding-bottom: 32rpx;
 }
 }
 .outView{
 .outView{
   width: 600rpx;
   width: 600rpx;
@@ -388,3 +382,15 @@
   background: #FFE05C;
   background: #FFE05C;
   color: #FFFFFF;
   color: #FFFFFF;
 }
 }
+.selectType{
+  padding: 20rpx 34rpx;
+}
+.popupView{
+  height: 300rpx;
+  width: 750rpx;
+  border-top-left-radius: 20rpx;
+  border-top-right-radius: 20rpx;
+}
+.imageText{
+  margin-top: 20rpx;
+}

+ 108 - 67
orderPages/serviceItems/index.vue

@@ -1,15 +1,16 @@
 <template>
 <template>
-    <view class="content">
         <view class="page">
         <view class="page">
-                <view class="block_2 flex-row justify-start" v-for="(item,index) in projects.projectVos" :key="index" @click="clickItem(item)">
+            <view  :style="{'height':height}">
+                <scroll-view  :style="{'height':height}" scroll-y>
+                    <view class="block_2 flex-row justify-start " v-for="(item,index) in projects.projectVos" :key="index" @click="clickItem(item)" >
 
 
-                    <view class="flex-col justify-center ">
-                        <u-icon v-if="item.id === serviceProjectId" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
-                        <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
-                    </view>
+                        <view class="flex-col justify-center ">
+                            <u-icon v-if="item.id === serviceProjectId" name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
+                            <u-icon v-else name="/static/order/ud9.png" color="green" size="25"></u-icon>
+                        </view>
 
 
-                    <view class="outView ">
-                        <text lines="1" class="text_3">{{item.serviceName}}</text>
+                        <view class="outView ">
+                            <text lines="1" class="text_3">{{item.serviceName}}</text>
 
 
                             <view class="group_2 ">
                             <view class="group_2 ">
                                 <view class="image-text_2">
                                 <view class="image-text_2">
@@ -17,84 +18,113 @@
                                     <text lines="1" class="text-group_2">服务人员:</text>
                                     <text lines="1" class="text-group_2">服务人员:</text>
                                     <text lines="1" class="text_5">{{projects.personName}}</text>
                                     <text lines="1" class="text_5">{{projects.personName}}</text>
                                 </view>
                                 </view>
-<!--                                <view class="group_3">-->
-<!--                                    <u-icon name="clock" size="16"></u-icon>-->
-<!--                                    <text lines="1" class="text-group_2">服务时间:</text>-->
-<!--                                    <text lines="1" decode="true" class="text_5">2023-8-14&nbsp;12:33:55</text>-->
-<!--                                </view>-->
+                                <!--                                <view class="group_3">-->
+                                <!--                                    <u-icon name="clock" size="16"></u-icon>-->
+                                <!--                                    <text lines="1" class="text-group_2">服务时间:</text>-->
+                                <!--                                    <text lines="1" decode="true" class="text_5">2023-8-14&nbsp;12:33:55</text>-->
+                                <!--                                </view>-->
                             </view>
                             </view>
 
 
-                        <view class="text-wrapper_3  flex-row justify-start">
-                            <text lines="1" class="text_7">标准价:</text>
-                            <text lines="1" class="text_8">¥{{item.standardPrice}}</text>
-<!--                            <text lines="1" class="text_9 text_7">会员价:</text>-->
-<!--                            <text lines="1" class="text_8">¥{{item.memberPrice}}</text>-->
+                            <view class="text-wrapper_3  flex-row justify-start">
+                                <text lines="1" class="text_7">标准价:</text>
+                                <text lines="1" class="text_8">¥{{item.standardPrice}}</text>
+                                <!--                            <text lines="1" class="text_9 text_7">会员价:</text>-->
+                                <!--                            <text lines="1" class="text_8">¥{{item.memberPrice}}</text>-->
+                            </view>
+                            <view class="box_4"></view>
                         </view>
                         </view>
-                        <view class="box_4"></view>
-                    </view>
 
 
 
 
 
 
-                </view>
+                    </view>
+                </scroll-view>
+            </view>
 
 
-            <view class="tabBarLineHeight"></view>
+<!--            <view class="tabBarLineHeight"></view>-->
 
 
             <view class="bottomView">
             <view class="bottomView">
 
 
-                <view class="ticketView  flex-row">
-                    <view class="ticketBtn" :class="{'ticketColor': ticketBtnIndex === 1}" @click="clickTicketBtn(1)">
-                        <text>使用权益券</text>
-                    </view>
-                    <view class="ticketBtn" :class="{'ticketColor': ticketBtnIndex === 2}" @click="clickTicketBtn(2)">
-                        <text>使用优惠券</text>
-                    </view>
+<!--                <view class="ticketView  flex-row">-->
+<!--                    <view class="ticketBtn" :class="{'ticketColor': ticketBtnIndex === 1}" @click="clickTicketBtn(1)">-->
+<!--                        <text>使用权益券</text>-->
+<!--                    </view>-->
+<!--                    <view class="ticketBtn" :class="{'ticketColor': ticketBtnIndex === 2}" @click="clickTicketBtn(2)">-->
+<!--                        <text>使用优惠券</text>-->
+<!--                    </view>-->
+<!--                </view>-->
+
+<!--                <view v-if="ticketBtnIndex === 1" class="flex-row justify-center" @click="goUseRights">-->
+<!--                    <view class="block_3 ">-->
+<!--                        <text lines="1" class="text_15">权益卡</text>-->
+<!--                        <view>-->
+<!--                            <view class="flex-row justify-between" v-if="equitys.length>0">-->
+<!--                                <view class="flex-row">-->
+<!--                                    <text class="text-group_5" v-for="(iter,i) in equitys" :key="i">{{iter.description}}</text>-->
+<!--                                </view>-->
+<!--                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
+<!--                            </view>-->
+<!--                            <view v-else class="image-text_4 ">-->
+<!--                                <text  class="text-group_4">未选择</text>-->
+<!--                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
+<!--                            </view>-->
+<!--                        </view>-->
+
+<!--                    </view>-->
+<!--                </view>-->
+
+<!--                <view v-if="ticketBtnIndex === 2" class="flex-row justify-center" @click="goUseCoupons">-->
+<!--                    <view class="block_3 ">-->
+<!--                        <text lines="1" class="text_15">优惠券</text>-->
+<!--                        <view>-->
+<!--                            <view class="flex-row justify-between" v-if="coupons.length>0">-->
+<!--                                <view class="flex-row">-->
+<!--                                    <text class="text-group_5" v-for="(iter,i) in coupons" :key="i">{{iter.name}}:-¥{{iter.discountsPrice}}</text>-->
+<!--                                </view>-->
+<!--                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
+<!--                            </view>-->
+<!--                            <view v-else class="image-text_4 ">-->
+<!--                                <text  class="text-group_4">未选择</text>-->
+<!--                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>-->
+<!--                            </view>-->
+<!--                        </view>-->
+<!--                    </view>-->
+<!--                </view>-->
+
+                <view class="selectType flex-row justify-between" @click="popupClick">
+                    <text>请选择优惠方式</text>
+                    <text class="text-group_5" v-if="ticketBtnIndex === 1" v-for="(iter,i) in equitys" :key="i">{{iter.description}}</text>
+                    <text class="text-group_5" v-if="ticketBtnIndex === 2" v-for="(iter,i) in coupons" :key="i">{{iter.name}}:-¥{{iter.discountsPrice}}</text>
+                    <u-icon name="arrow-right" color="#666" size="18"></u-icon>
                 </view>
                 </view>
 
 
-                <view v-if="ticketBtnIndex === 1" class="flex-row justify-center" @click="goUseRights">
-                    <view class="block_3 ">
-                        <text lines="1" class="text_15">权益卡</text>
-                        <view>
-                            <view class="flex-row justify-between" v-if="equitys.length>0">
-                                <view class="flex-row">
-                                    <text class="text-group_5" v-for="(iter,i) in equitys" :key="i">{{iter.description}}</text>
-                                </view>
-                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
-                            </view>
-                            <view v-else class="image-text_4 ">
-                                <text  class="text-group_4">未选择</text>
-                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
-                            </view>
-                        </view>
-
-                    </view>
+                <view class="flex-row justify-center">
+                    <view class="submitButton" @click="addChildProject">确定</view>
                 </view>
                 </view>
+            </view>
+            <uni-popup ref="popup" type="bottom" background-color="#fff">
+                <view class="popupView flex-row justify-around">
 
 
-                <view v-if="ticketBtnIndex === 2" class="flex-row justify-center" @click="goUseCoupons">
-                    <view class="block_3 ">
-                        <text lines="1" class="text_15">优惠券</text>
-                        <view>
-                            <view class="flex-row justify-between" v-if="coupons.length>0">
-                                <view class="flex-row">
-                                    <text class="text-group_5" v-for="(iter,i) in coupons" :key="i">{{iter.name}}:-¥{{iter.discountsPrice}}</text>
-                                </view>
-                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
-                            </view>
-                            <view v-else class="image-text_4 ">
-                                <text  class="text-group_4">未选择</text>
-                                <u-icon name="arrow-right" color="#666" size="18"></u-icon>
-                            </view>
+                    <view class="flex-col justify-center"  @click="goUseRights">
+                        <view class="flex-row justify-center">
+                            <u-icon name="/static/me/u694.png" color="#666" size="40"></u-icon>
+                        </view>
+                        <view class="imageText flex-row justify-center">
+                            <text>权益券</text>
                         </view>
                         </view>
-
                     </view>
                     </view>
-                </view>
 
 
-                <view class="flex-row justify-center">
-                    <view class="submitButton" @click="addChildProject">确定</view>
+                    <view class="flex-col justify-center " @click="goUseCoupons">
+                        <view class="flex-row justify-center">
+                            <u-icon name="/static/me/u687.png" color="#666" size="40"></u-icon>
+                        </view>
+                        <view class="imageText flex-row justify-center">
+                            <text>优惠券</text>
+                        </view>
+                    </view>
                 </view>
                 </view>
-            </view>
+            </uni-popup>
 
 
         </view>
         </view>
-    </view>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -103,6 +133,7 @@ export default {
     },
     },
     data() {
     data() {
         return {
         return {
+            height:'',
             coupons:[],
             coupons:[],
             equitys:[],
             equitys:[],
             couponIds:'',
             couponIds:'',
@@ -117,6 +148,9 @@ export default {
         }
         }
     },
     },
     onLoad(e) {
     onLoad(e) {
+        // 判断Openid是否为空
+        let sysInfo=uni.getSystemInfoSync();
+        this.height= sysInfo.windowHeight -120  +'px';
         this.orderId=e.orderId
         this.orderId=e.orderId
         this.serviceStationId=e.serviceStationId
         this.serviceStationId=e.serviceStationId
         this.serviceObjectId=e.serviceObjectId
         this.serviceObjectId=e.serviceObjectId
@@ -130,6 +164,10 @@ export default {
 
 
     methods: {
     methods: {
 
 
+        popupClick(){
+            this.$refs.popup.open()
+        },
+
         clickTicketBtn(ticketBtnIndex){
         clickTicketBtn(ticketBtnIndex){
             this.ticketBtnIndex =ticketBtnIndex
             this.ticketBtnIndex =ticketBtnIndex
         },
         },
@@ -139,11 +177,12 @@ export default {
         },
         },
 
 
         goUseRights(){
         goUseRights(){
-
+            this.$refs.popup.close()
             if (this.serviceProjectId.length === 0){
             if (this.serviceProjectId.length === 0){
                 uni.$u.toast('请先选择服务项目')
                 uni.$u.toast('请先选择服务项目')
                 return
                 return
             }
             }
+            this.ticketBtnIndex = 1
             uni.navigateTo({
             uni.navigateTo({
                 url:'/storePages/useRights/index?serviceProjectId=' + this.serviceProjectId + '&serviceObjectId=' + this.serviceObjectId
                 url:'/storePages/useRights/index?serviceProjectId=' + this.serviceProjectId + '&serviceObjectId=' + this.serviceObjectId
             })
             })
@@ -162,10 +201,12 @@ export default {
         },
         },
 
 
         goUseCoupons(){
         goUseCoupons(){
+            this.$refs.popup.close()
             if (this.serviceProjectId.length === 0){
             if (this.serviceProjectId.length === 0){
                 uni.$u.toast('请先选择服务项目')
                 uni.$u.toast('请先选择服务项目')
                 return
                 return
             }
             }
+            this.ticketBtnIndex = 2
             uni.navigateTo({
             uni.navigateTo({
                 url: '/orderPages/useCoupons/index?standardPrice='+this.serviceProject.standardPrice
                 url: '/orderPages/useCoupons/index?standardPrice='+this.serviceProject.standardPrice
             })
             })