py 2 år sedan
förälder
incheckning
86509909c7
4 ändrade filer med 58 tillägg och 5 borttagningar
  1. 2 2
      pages-buy/save-ticket.vue
  2. 10 0
      pages-order/express-info.vue
  3. 2 2
      pages-takeout/goods-order.vue
  4. 44 1
      pages/order/index.vue

+ 2 - 2
pages-buy/save-ticket.vue

@@ -47,7 +47,7 @@
 				<view class="box-buttom text-align-right">
 					<span class="fs-28 fc-9 fw-400">共{{fromData.number}}件,</span>
 					<span class="fs-28 fc-0 fw-400">合计¥</span>
-					<span class="fs-44 fc-0 fw-b">{{goodsData.price?Number(goodsData.price)*fromData.number:''}}</span>
+					<span class="fs-44 fc-0 fw-b">{{goodsData.price?(Number(goodsData.price)*fromData.number).toFixed(2):''}}</span>
 				</view>
 			</view>
 
@@ -70,7 +70,7 @@
 				<view class="align-items-flex-end box-1">
 					<span class="fs-28 fc-f fw-600">¥</span>
 					<span
-						class="fs-44 fc-f fw-600">{{goodsData.price?Number(goodsData.price)*fromData.number:''}}</span>
+						class="fs-44 fc-f fw-600">{{goodsData.price?(Number(goodsData.price)*fromData.number).toFixed(2):''}}</span>
 				</view>
 				<view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
 			</view>

+ 10 - 0
pages-order/express-info.vue

@@ -278,6 +278,10 @@
 			},
 			getExpressPay(id) {
 				// 代取支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				getExpressPay({
 					order_id: id
 				}).then((ret) => {
@@ -307,14 +311,20 @@
 			},
 			cancelOrder() {
 				// 代取取消订单
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				expressOrderCancel({
 					order_id: this.infoData.id
 				}).then((res) => {
 					if (res.code == 1) {
 						tools.success(res.msg)
 						this.expressOrderInfo(this.infoData.id)
+						this.isAJAX = false;
 					} else {
 						tools.error(res.msg)
+						this.isAJAX = false;
 					}
 				})
 			},

+ 2 - 2
pages-takeout/goods-order.vue

@@ -71,7 +71,7 @@
 					<span class="fc-9 fs-28">共{{cardData.total_num||0}}件,</span>
 					<span class="fw-400 fc-0 fs-28">合计¥</span>
 					<span
-						class="fw-600 fc-0 fs-44">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney)||0}}</span>
+						class="fw-600 fc-0 fs-44">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney).toFixed(2)||0}}</span>
 				</view>
 			</view>
 
@@ -111,7 +111,7 @@
 				<view class="align-items-flex-end box-1">
 					<span class="fs-28 fc-f fw-600">¥</span>
 					<span
-						class="fs-44 fc-f fw-600">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney)||0}}</span>
+						class="fs-44 fc-f fw-600">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney).toFixed(2)||0}}</span>
 				</view>
 				<view class="text-align-center box-2 fs-32 fc-f fw-600" @click="toSave()">立即支付</view>
 			</view>

+ 44 - 1
pages/order/index.vue

@@ -244,11 +244,14 @@
 			};
 		},
 		onShow() {
+			console.log('返回刷新');
 			let orderPayType = uni.getStorageSync('orderPayType')
 			if (orderPayType) {
 				this.selectType(orderPayType)
+				console.log('固定type');
 			} else {
 				this.resetList();
+				console.log('默认type');
 			}
 		},
 		methods: {
@@ -361,10 +364,12 @@
 				this.getList();
 			},
 			selectType(type) {
-				if (type != this.type) {
+				let orderPayType = uni.getStorageSync('orderPayType')
+				if (type != this.type || orderPayType) {
 					this.type = type;
 					this.navTypeKey = 0
 					this.resetList();
+					uni.removeStorageSync('orderPayType')
 				}
 			},
 			assess(item) {
@@ -376,6 +381,10 @@
 			},
 			tackOut(item) {
 				// 外卖取消订单
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				orderCancel({
 					order_id: item.id
 				}).then((res) => {
@@ -384,13 +393,19 @@
 						this.page = 1;
 						this.list = [];
 						this.orderList()
+						this.isAJAX = false;
 					} else {
 						tools.error(res.msg)
+						this.isAJAX = false;
 					}
 				})
 			},
 			expressCancel(item) {
 				// 代取取消订单
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				expressOrderCancel({
 					order_id: item.id
 				}).then((res) => {
@@ -399,13 +414,19 @@
 						this.page = 1;
 						this.list = [];
 						this.expressOrderList()
+						this.isAJAX = false;
 					} else {
 						tools.error(res.msg)
+						this.isAJAX = false;
 					}
 				})
 			},
 			cancel(item) {
 				// 干洗取消订单
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				laundryOrderCancel({
 					order_id: item.id
 				}).then((res) => {
@@ -414,8 +435,10 @@
 						this.page = 1;
 						this.list = [];
 						this.laundryOrderList()
+						this.isAJAX = false;
 					} else {
 						tools.error(res.msg)
+						this.isAJAX = false;
 					}
 				})
 			},
@@ -559,6 +582,10 @@
 			},
 			takeawayPay(id) {
 				// 外卖支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				orderPay({
 					order_id: id
 				}).then((ret) => {
@@ -590,6 +617,10 @@
 			},
 			getExpressPay(id) {
 				// 代取支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				getExpressPay({
 					order_id: id
 				}).then((ret) => {
@@ -621,6 +652,10 @@
 			},
 			groupPay(id) {
 				// 团购支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				groupPay({
 					order_id: id
 				}).then((ret) => {
@@ -652,6 +687,10 @@
 			},
 			ticketPay(id) {
 				// 票务支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				ticketPay({
 					order_id: id
 				}).then((ret) => {
@@ -683,6 +722,10 @@
 			},
 			laundryPay(id) {
 				// 干洗支付
+				if (!this.isAJAX) {
+					return
+				}
+				this.isAJAX = true;
 				laundryPay({
 					order_id: id
 				}).then((ret) => {