From 06be1c7ccc7533612e4cc7b0e730080d0dd3d2a1 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 16 Jan 2026 11:43:36 +0800
Subject: [PATCH] 商品可以赠送优惠券 商品属性增加团购 入驻商家增加实物和团购选项 团购和实物商户分类分开 增加团购商家页面 后台添加页面增加团购组件

---
 mobile/pages/order/confirm-order.vue |  127 +++++++++++++++++++++++++++++++++---------
 1 files changed, 99 insertions(+), 28 deletions(-)

diff --git a/mobile/pages/order/confirm-order.vue b/mobile/pages/order/confirm-order.vue
index 0059b51..7d8ae24 100644
--- a/mobile/pages/order/confirm-order.vue
+++ b/mobile/pages/order/confirm-order.vue
@@ -19,7 +19,7 @@
 							<view class="info">
 								<view class="d-b-s">
 									<view class="flex-1">
-										<view class="title f32 gray3">{{ item.product_name }}</view>
+										<view class="title f30 gray3 pr20">{{ item.product_name }}</view>
 										<view class="theme-price mt10 f18">
 											¥<text class="f26">{{ item.product_price }}</text>
 										</view>
@@ -50,7 +50,7 @@
 						</view>
 					</view>
 					
-					<Verifystoreinfo v-if="supplier_item.orderData.delivery==30 && supplier_item.productList[0].is_virtual == 1" ref="getShopinfoData" :extract_store="extract_store"
+					<Verifystoreinfo v-if="supplier_item.orderData.delivery==30 && (supplier_item.productList[0].is_virtual == 1||supplier_item.productList[0].is_virtual == 3)" ref="getShopinfoData" :extract_store="extract_store"
 					 :last_extract="last_extract" :verify_data="verify_data"></Verifystoreinfo>
 
 					<view class="d-f-c">
@@ -143,6 +143,12 @@
 								<view class="theme-price f24">-¥{{supplier_item.orderData.points_money}}</view>
 							</view>
 						</view>
+						<view v-if="is_use_consumption==1&&!OrderData.force_points&&supplier_item.orderData.consumption_money>0">
+							<view class="d-f-c">
+								<view>{{consumption_name()}}抵扣金额</view>
+								<view class="theme-price f24">-¥{{supplier_item.orderData.consumption_money}}</view>
+							</view>
+						</view>
 						<view class="d-f-c">
 							<view class="ww100">
 								<view class="mb20">订单备注</view>
@@ -206,6 +212,14 @@
 				<view class="">
 					<text class="theme-price f24">-¥{{toDecimal2(OrderData.points_money)}}</text>
 					<switch style="transform: scale(0.7); margin-right: -10rpx;" checked=true @change="onShowPoints" />
+				</view>
+			</view>
+			<view class="item"
+				v-if="OrderData.is_allow_consumption && OrderData.force_points == false &&OrderData.consumption_money != 0">
+				<text class="key">可用{{consumption_name()}}抵扣:</text>
+				<view class="">
+					<text class="theme-price f24">-¥{{toDecimal2(OrderData.consumption_money)}}</text>
+					<switch style="transform: scale(0.7); margin-right: -10rpx;" checked=true @change="onShowConsumption" />
 				</view>
 			</view>
 		</view>
@@ -292,6 +306,8 @@
 				coupon_id: -1,
 				/*是否使用积分,默认使用*/
 				is_use_points: 1,
+				/*是否使用消费券,默认使用*/
+				is_use_consumption: 1,
 				remark: '',
 				/*支付方式*/
 				pay_type: 20,
@@ -330,12 +346,14 @@
 				delivery_store:{},
 				delivery_store_list: {},
 				verify_data: [] ,//虚拟商品 核销数据
+				branch_activity_id: 0,
 			};
 		},
 		onLoad(options) {
 			let self = this;
 			self.options = options;
 			self.room_id = options.room_id ? options.room_id : 0;
+			self.branch_activity_id = options.branch_activity_id ? options.branch_activity_id : 0; //分会活动的购物车提交
 			self.$fire.on('selectStoreId', function(e) {
 				self.extract_store = e;
 				self.choose_store_id = e.store_id;
@@ -425,6 +443,16 @@
 					self.is_use_points = 1;
 				} else {
 					self.is_use_points = 0;
+				}
+				self.getData();
+			},
+			/*是否使用消费券选择*/
+			onShowConsumption: function(e) {
+				let self = this;
+				if (e.target.value == true) {
+					self.is_use_consumption = 1;
+				} else {
+					self.is_use_consumption = 0;
 				}
 				self.getData();
 			},
@@ -524,6 +552,7 @@
 					store_id: self.store_id,
 					coupon_id: self.coupon_id,
 					is_use_points: self.is_use_points,
+					is_use_consumption: self.is_use_consumption,
 					// pay_source: self.getPlatform()
 					pay_source: 'android'
 				};
@@ -537,20 +566,38 @@
 				}
 				//直接购买
 				if (self.options.order_type === 'buy') {
-					self._get(
-						'order.order/buy', {
-							params: JSON.stringify(
-								Object.assign({}, params, {
-									product_id: self.options.product_id,
-									product_num: self.options.product_num,
-									product_sku_id: self.options.product_sku_id,
-								})
-							)
-						},
-						function(res) {
-							callback(res);
-						}
-					);
+					if(self.branch_activity_id > 0){
+						self._get(
+							'branch.activityOrder/buy', {
+								params: JSON.stringify(
+									Object.assign({}, params, {
+										activity_id:self.branch_activity_id,
+										product_id: self.options.product_id,
+										product_num: self.options.product_num,
+										product_sku_id: self.options.product_sku_id,
+									})
+								)
+							},
+							function(res) {
+								callback(res);
+							}
+						);
+					} else {
+						self._get(
+							'order.order/buy', {
+								params: JSON.stringify(
+									Object.assign({}, params, {
+										product_id: self.options.product_id,
+										product_num: self.options.product_num,
+										product_sku_id: self.options.product_sku_id,
+									})
+								)
+							},
+							function(res) {
+								callback(res);
+							}
+						);
+					}
 				}
 				//定金
 				else if (self.options.order_type === 'deposit') {
@@ -596,18 +643,34 @@
 				}
 				// 购物车结算
 				else if (self.options.order_type === 'cart') {
-					self._get(
-						'order.order/cart', {
-							params: JSON.stringify(
-								Object.assign({}, params, {
-									cart_ids: self.options.cart_ids || 0
-								})
-							)
-						},
-						function(res) {
-							callback(res);
-						}
-					);
+					if(self.branch_activity_id > 0){
+						self._get(
+							'branch.activityOrder/cart', {
+								params: JSON.stringify(
+									Object.assign({}, params, {
+										activity_id:self.branch_activity_id,
+										cart_ids: self.options.cart_ids || 0
+									})
+								)
+							},
+							function(res) {
+								callback(res);
+							}
+						);
+					} else {
+						self._get(
+							'order.order/cart', {
+								params: JSON.stringify(
+									Object.assign({}, params, {
+										cart_ids: self.options.cart_ids || 0
+									})
+								)
+							},
+							function(res) {
+								callback(res);
+							}
+						);
+					}
 				}
 				// 积分兑换结算
 				else if (self.options.order_type == 'points') {
@@ -793,10 +856,12 @@
 					});
 					
 					let params = {
+						activity_id: self.branch_activity_id, // 分会活动购物
 						pay_type: self.pay_type,
 						room_id: self.room_id,
 						coupon_id: self.coupon_id,
 						is_use_points: self.is_use_points,
+						is_use_consumption: self.is_use_consumption,
 						// pay_source: self.getPlatform()
 					};
 
@@ -808,6 +873,9 @@
 					let url = '';
 					if (self.options.order_type === 'buy') {
 						url = 'order.order/buy';
+						if(self.branch_activity_id > 0){
+							url = 'branch.activityOrder/buy';
+						}
 						params = Object.assign(params, {
 							product_id: self.options.product_id,
 							product_num: self.options.product_num,
@@ -837,6 +905,9 @@
 					// 创建订单-购物车结算
 					if (self.options.order_type === 'cart') {
 						url = 'order.order/cart';
+						if(self.branch_activity_id > 0){
+							url = 'branch.activityOrder/cart';
+						}
 						params = Object.assign(params, {
 							cart_ids: self.options.cart_ids || 0,
 							// video_id: self.options.video_id || 0,

--
Gitblit v1.9.2