lhl hace 3 meses
padre
commit
da437b0a2f
Se han modificado 2 ficheros con 12 adiciones y 3 borrados
  1. 5 1
      src/pages/cashier/index.vue
  2. 7 2
      src/pages/cashier/reservation.vue

+ 5 - 1
src/pages/cashier/index.vue

@@ -1262,9 +1262,10 @@
 						this.$Message.error(err.msg);
 					});
 			},
-			payPrice(payType) {
+			async payPrice(payType) {
 				console.log(this.payType,payType)
 				this.payType = payType;
+				
 				if (payType == "" || payType == "yue") {
 					this.createOrder.userCode = "";
 					this.createOrder.auth_code = "";
@@ -1279,6 +1280,7 @@
 				this.createOrder.pay_type = payType;
 				this.createOrder.staff_id = this.storeInfos.id;
 				// this.fapi.resetFields();
+				this.cartCompute();
 			},
 			modalPayCancel() {
 				this.$Message.destroy();
@@ -1507,6 +1509,7 @@
 					coupon: this.coupon,
 					coupon_id: this.couponId,
 					cart_id: ids,
+					payType: this.payType
 				};
 				if (cartId) {
 					data.new = 1;
@@ -1514,6 +1517,7 @@
 				cashierCompute(this.userInfo.uid, data)
 					.then((res) => {
 						this.priceInfo = res.data;
+						this.settleMoney = res.data.payPrice
 						this.unchangedPrice = this.priceInfo.payPrice || 0;
 						this.formItem.price = this.priceInfo.payPrice || 0;
 						this.tapPrice();

+ 7 - 2
src/pages/cashier/reservation.vue

@@ -768,8 +768,11 @@
 						this.$Message.error(err.msg);
 					});
 			},
-			payPrice(payType) {
+			async payPrice(payType) {
 				this.payType = payType;
+				// console.log(this.payType,'this.payType')
+				
+				await this.computedServe()
 				if (payType == "" || payType == "yue") {
 					this.createOrder.userCode = "";
 					this.createOrder.auth_code = "";
@@ -892,9 +895,11 @@
 					computedServe({
 						uid: that.userInfo.uid,
 						products: arr.join(','),
-						preferential_price: that.formItem.prices
+						preferential_price: that.formItem.prices,
+						payType: that.payType
 					}).then(res => {
 						that.payInfo = res.data
+						that.settleMoney = that.payInfo.pay_price
 					})
 				} else {
 					that.payInfo = {}