shish 5 miesięcy temu
rodzic
commit
4935a2a382

+ 8 - 2
ghsPad/src/pages/home/components/console.vue

@@ -33,7 +33,7 @@
 
     <!-- 扫码付款 -->
     <uni-popup ref="toPayRef" background-color="#fff" type="center" :animation="false" :is-mask-click="false">
-        <toPayWay @cancelPay="cancelPay()" @payFinish="payFinish()" @selectPayWayBack="selectPayWayBack" :orderId.sync="orderId" :price.sync="price"></toPayWay>
+        <toPayWay @cancelPay="cancelPay()" @payFinish="payFinish()" @selectPayWayBack="selectPayWayBack" :orderId.sync="orderId" :price.sync="price" :reachDiscountPrice.sync="reachDiscountPrice" :orderReachDiscountPrice.sync="orderReachDiscountPrice"></toPayWay>
     </uni-popup>
 
 	<!-- 临时收款 -->
@@ -117,6 +117,8 @@ export default {
 			calc:'add',
 			settleOpenStatus:0,
 			price:0,
+			orderReachDiscountPrice:0,
+			reachDiscountPrice:0,
 			fastAction:1
         }
     },
@@ -239,7 +241,7 @@ export default {
 						this.$refs.toPayRef.open('center')
 						this.$refs.gatheringRef.close()
 						this.orderId = res.data.id
-						this.price = res.data.mainPay ? Number(res.data.mainPay) : 0
+						this.price = res.data.actPrice ? Number(res.data.actPrice) : 0
 					}else{
 						this.$refs.gatheringRef.close()
 						uni.showToast({title: '操作成功' })
@@ -299,6 +301,10 @@ export default {
 					if(res.data.status == 1){
 						this.orderId = res.data.id
 						this.price = res.data.actPrice ? Number(res.data.actPrice) : 0
+
+						this.orderReachDiscountPrice = res.data.orderReachDiscountPrice ? Number(res.data.orderReachDiscountPrice):0
+						this.reachDiscountPrice = res.data.reachDiscountPrice ? Number(res.data.reachDiscountPrice):0
+
 						this.$refs.toPayRef.open('center')
 					}else{
 						this.removeFromSaveDirect()

+ 25 - 6
ghsPad/src/pages/home/components/toPay.vue

@@ -3,7 +3,18 @@
         <view v-if="showSuccess == false">
             <view class="collect-code_box">
                 <image class="img" :src="`${constant.imgUrl}/icon/scan/scan.png`" mode="scaleToFill" @click="beginScan()" />
-                <view style="margin-top:20upx;font-weight:bold;font-size:35upx;color:black;">¥{{price}}</view>
+
+<view style="margin-top:20upx;font-weight:bold;font-size:26upx;text-decoration:line-through;color:#8a7f7f;" v-if="Number(reachDiscountPrice) > 0 || Number(orderReachDiscountPrice) > 0">
+    ¥{{ parseFloat((Number(reachDiscountPrice)+Number(price)+Number(orderReachDiscountPrice)).toFixed(2)) }}
+</view>
+<view style="margin-top:10upx;font-weight:bold;font-size:26upx;color:red;" v-if="Number(reachDiscountPrice)>0">
+    花材满减 -¥{{ parseFloat(reachDiscountPrice) }}
+</view>
+<view style="margin-top:10upx;font-weight:bold;font-size:26upx;color:red;" v-if="Number(orderReachDiscountPrice)>0">
+    整单满减 -¥{{ parseFloat(orderReachDiscountPrice) }}
+</view>
+<view style="margin-top:10upx;font-weight:bold;font-size:34upx;color:black;">¥{{price}}</view>
+
                 <view class="show-code" v-if="goPay == 0">请出示付款码</view>
                 <view class="paying" v-if="goPay == 1">请求中</view>
                 <view style="font-size:18upx;margin:45upx auto 10upx auto;color:red;font-weight:bold;" v-if="goPay == 2">
@@ -13,7 +24,7 @@
                     </text>
                 </view>
                 <image style="width:40upx;height:40upx;position:absolute;top:190upx;left:205upx;" :src="`${constant.imgUrl}/icon/loading.gif`" v-if="goPay == 1" mode="scaleToFill" />
-                <view style="margin-top:30upx;">
+                <view style="margin-top:10upx;">
                     <view @click="cancelPayFn" class="btn-default">取消</view>
                 </view>
             </view>
@@ -64,6 +75,14 @@ export default {
         price:{
 			type: Number,
 			default: 0
+        },
+        reachDiscountPrice:{
+			type: Number,
+			default: 0
+        },
+        orderReachDiscountPrice:{
+			type: Number,
+			default: 0
         }
     },
 	mounted(){
@@ -212,17 +231,17 @@ export default {
         flex-direction: column;
         padding-top:15upx;
         & > .img {
-            width: 100upx;
-            height: 100upx;
+            width: 80upx;
+            height: 80upx;
         }
         & .show-code{
             font-size: 19upx;
-            margin: 45upx 0 10upx 0;
+            margin: 10upx 0 10upx 0;
             font-weight:bold;
         }
         & .paying{
             font-size: 19upx;
-            margin: 45upx 0 10upx 0;
+            margin: 10upx 0 10upx 0;
             font-weight:bold;
         }
         & .btn-default {