diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue
index 3eac9b2..7ea6e62 100644
--- a/pages/order/MyOrder/index.vue
+++ b/pages/order/MyOrder/index.vue
@@ -1001,7 +1001,8 @@ export default {
return Number(order && order._status && order._status._type)
},
isCollectiveWholesalerOrder(order) {
- return this.getCollectiveScenarioCode(order) === 22
+ // 22=集采批发,25=直购批发
+ return [22, 25].includes(this.getCollectiveScenarioCode(order))
},
isCollectiveCustomGiftOrder(order) {
return this.getCollectiveScenarioCode(order) === 24
diff --git a/pages/order/OrderSubmission/index.vue b/pages/order/OrderSubmission/index.vue
index 47422d0..92c20d0 100644
--- a/pages/order/OrderSubmission/index.vue
+++ b/pages/order/OrderSubmission/index.vue
@@ -514,7 +514,8 @@ export default {
usePoints: this.usePointsCheck ? 1 : 0,
shipping_type: parseInt(this.shipping_type) + 1
}).then(res => {
- this.couponList = res.data.result.couponList
+ // 批发商品不参与优惠券,后端返回 couponList 为 null,兜底保证结构一致
+ this.couponList = res.data.result.couponList || { usable: [], unusable: [] }
if (this.isLotteryOrder()) {
this.couponTitle = ''
if (this.couponId !== 0) {
@@ -556,7 +557,8 @@ export default {
_this.offlinePayStatus = data.offline_pay_status
_this.orderGroupInfo = data
_this.deduction = data.deduction
- _this.couponList = data.couponList
+ // 批发商品不参与优惠券,后端返回 couponList 为 null,兜底保证结构一致
+ _this.couponList = data.couponList || { usable: [], unusable: [] }
if (_this.couponId > 0) {
_this.couponList['usable'].map((item, index) => {
if (item.id === _this.couponId) {
diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue
index 20df328..ee52ab1 100644
--- a/pages/shop/GoodsCon/index.vue
+++ b/pages/shop/GoodsCon/index.vue
@@ -67,7 +67,7 @@
{{ storeInfo.storeName }}
-
-
+
{{ CartCount }}
购物车
-
+
{{ CartCount }}
@@ -468,6 +468,7 @@
style="background: transparent !important;border-radius: 0 !important;"
>
@@ -610,6 +612,7 @@ export default {
productValueArr: [],
id: null,
partnerId: null,
+ purchaseGrantUuid: '', // 批发商品采购授权uuid,从聊天卡片带入;有值即为批发模式
activityId: 0, // v4 add
source: '', // v4 add
preInfo: {},
@@ -783,6 +786,7 @@ export default {
} else if (options.id) {
this.id = pageQuery.id || options.id || null
this.partnerId = pageQuery.partnerId || options.partnerId || null
+ this.purchaseGrantUuid = pageQuery.purchaseGrantUuid || options.purchaseGrantUuid || ''
this.activityId = Number(pageQuery.activityId || pageQuery.drawActivityId || 0)
this.source = pageQuery.from || ''
} else {
@@ -1147,6 +1151,10 @@ export default {
if (this.source === 'kill') {
from.seckillId = this.activityId
}
+ // 批发商品详情需要携带采购授权uuid才返回数据
+ if (this.purchaseGrantUuid) {
+ from.purchaseGrantUuid = this.purchaseGrantUuid
+ }
uni.showLoading({
title: '加载中',
mask: true
@@ -1511,6 +1519,10 @@ export default {
uniqueId: that.attr.productSelect !== undefined ?
that.attr.productSelect.unique : ""
}
+ // 批发商品加购/直购需要携带采购授权uuid
+ if (this.purchaseGrantUuid) {
+ q.purchaseGrantUuid = this.purchaseGrantUuid
+ }
// v4 新增活动ID
switch (this.source) {
case "pre":
@@ -1933,6 +1945,11 @@ export default {
color: #FFFFFF;
}
+ // 批发模式隐藏了加入购物车按钮,立即购买占满按钮区
+ .btn-buy-full {
+ width: 420rpx;
+ }
+
.btn-buy-disabled {
background: #9D9D9D !important;
color: #FFFFFF !important;
diff --git a/pagesOrder/order/OrderDetails/index.vue b/pagesOrder/order/OrderDetails/index.vue
index f5f405c..6ddc583 100644
--- a/pagesOrder/order/OrderDetails/index.vue
+++ b/pagesOrder/order/OrderDetails/index.vue
@@ -882,8 +882,8 @@ export default {
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder, scenarioCode) {
if(isGiftCardReceiveBlind) return
if(isDrawOrder) return
- // 采购批发订单(集采中心)商品卡片不跳转批发商品详情页
- if (Number(scenarioCode) === 22) return
+ // 采购批发订单(集采中心/直购批发)商品卡片不跳转批发商品详情页
+ if ([22, 25].includes(Number(scenarioCode))) return
if (Number(scenarioCode) === 24) return
const activityId = Number(
item.drawActivityId ||
@@ -1065,7 +1065,8 @@ export default {
return Number(order && order.scenarioCode)
},
isWholesalerOrder(order = this.orderInfo) {
- return this.getOrderScenarioCode(order) === 22
+ // 22=集采批发,25=直购批发
+ return [22, 25].includes(this.getOrderScenarioCode(order))
},
isCustomGiftOrder(order = this.orderInfo) {
return this.getOrderScenarioCode(order) === 24
diff --git a/pkg_common/views/room.vue b/pkg_common/views/room.vue
index 9854a38..ccb7c92 100644
--- a/pkg_common/views/room.vue
+++ b/pkg_common/views/room.vue
@@ -13,6 +13,27 @@
+
+
+
+
+
+
+
+ {{ wsJson(item.msg_content).goodsName }}
+
+
+ {{ wsJson(item.msg_content).skuStr }}
+
+
+
+ ¥{{ wsJson(item.msg_content).price }}
+
+
+ 价格面议
+
+
+
@@ -155,7 +176,9 @@ export default {
methods: {
toGoods(item) {
const itemJson = this.wsJson(item.msg_content)
- if(!itemJson.goodsId) {
+ // 兼容不同来源字段:自家发的是 goodsId,供应商发的是 productId
+ const goodsId = itemJson.goodsId || itemJson.productId
+ if (!goodsId) {
// 提示数据错误
// uni.showToast({
// title: '数据错误',
@@ -163,12 +186,13 @@ export default {
// })
return
}
-
+
+ const query = { id: goodsId }
+ // 批发商品采购授权uuid,详情接口和加购接口都需要
+ if (itemJson.uuid) query.purchaseGrantUuid = itemJson.uuid
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
- query: {
- id: itemJson.goodsId
- }
+ query
})
},
wsJson(json) {