From a4b3ee325c7354579d495bc74a777e494e5ec38c Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 06 Feb 2026 18:18:44 +0800
Subject: [PATCH] 商品可以价格面议 选择走访时显示输入走访企业名 分会添加活动时要总会审核 分类添加人数限制,添加活动选择了填写人数限制的分类时活动名额下显示该分类人数限制为15 同一个企业30天内只能走访一次,在30天内走访同一个企业时提示该企业已被走访xx天后才可以从新走访
---
mobile/components/diy/product/productCity.vue | 69 +++++++++++++++++++++++++++++++++-
1 files changed, 66 insertions(+), 3 deletions(-)
diff --git a/mobile/components/diy/product/productCity.vue b/mobile/components/diy/product/productCity.vue
index 032802b..81f392d 100644
--- a/mobile/components/diy/product/productCity.vue
+++ b/mobile/components/diy/product/productCity.vue
@@ -34,7 +34,34 @@
<text>¥</text>
<text>{{ product.line_price }}</text>
</view>
+ </view><!-- 购物车操作组件 -->
+ <view class="cart-action">
+ <!-- 多规格商品显示选择规格按钮 -->
+ <view class="spec-select-btn" v-if="item.spec_type === 20"
+ @click.stop="showSpecPopup(item,index)">
+ <text>选择规格</text>
+ <!-- 购物车数量徽章 -->
+ <view class="cart-badge" v-if="(item.cart && item.cart.total_num > 0)">
+ <text class="cart-count">{{ item.cart.total_num || 0 }}</text>
</view>
+ </view>
+ <!-- 单规格商品显示购物车操作 -->
+ <template v-else>
+ <view class="cart-btn-add" v-if="!item.cart.total_num || item.cart.total_num <= 0"
+ @click.stop="addToCart(item,index)">
+ <text class="icon iconfont icon-jia"></text>
+ </view>
+ <view class="cart-number-controller" v-else>
+ <view class="cart-btn-sub" @click.stop="decreaseCart(item,index)">
+ <text class="icon iconfont icon-jian"></text>
+ </view>
+ <view class="cart-number">{{ item.cart.total_num }}</view>
+ <view class="cart-btn-add" @click.stop="increaseCart(item,index)">
+ <text class="icon iconfont icon-jia"></text>
+ </view>
+ </view>
+ </template>
+ </view>
</view>
</view>
</template>
@@ -48,10 +75,13 @@
<view v-if="itemData.style.show.productName == 1" class="product-title">{{ product.product_name }}</view>
<view class="price d-s-c">
<view v-if="itemData.style.show.productPrice == 1" class="red">
- <text class="f22">¥</text>
- <text class="">{{ product.product_price }}</text>
+ <text v-if="product.is_price_negotiable">价格面议</text>
+ <template v-else>
+ <text class="f22">¥</text>
+ <text class="">{{ product.product_price }}</text>
+ </template>
</view>
- <view class="ml20 gray9 text-d-line" v-if="itemData.style.show.linePrice == 1 && product.line_price > 0"><text
+ <view class="ml20 gray9 text-d-line" v-if="itemData.style.show.linePrice == 1 && product.line_price > 0 && !product.is_price_negotiable"><text
class="f22">¥</text>{{ product.line_price }}</view>
</view>
</view>
@@ -111,6 +141,39 @@
return true;
}
return false;
+ },
+
+ /*处理购物车操作 - 价格面议商品特殊处理*/
+ handleCartItemAction(item, index) {
+ // 如果是价格面议商品,提示联系客服
+ if (item.is_price_negotiable) {
+ uni.showModal({
+ title: '温馨提示',
+ content: '该商品为价格面议商品,请联系客服咨询具体价格',
+ confirmText: '联系客服',
+ cancelText: '取消',
+ success: (res) => {
+ if (res.confirm) {
+ // 跳转到商品详情页联系客服
+ this.gotoDetail(item.product_id);
+ }
+ }
+ });
+ } else {
+ // 非价格面议商品,正常添加到购物车
+ this.addToCart(item, index);
+ }
+ },
+
+ /*添加到购物车*/
+ addToCart(item, index) {
+ // 这里实现具体的添加购物车逻辑
+ console.log('添加到购物车:', item.product_id);
+ // 示例实现
+ uni.showToast({
+ title: '已添加到购物车',
+ icon: 'success'
+ });
}
}
};
--
Gitblit v1.9.2