feat(order,goods): 详情页促销模块独立拆分与实物赠品多端随单履约展示

- 详情页重构:ShowGoods.vue 价格卡片与促销卡片解耦,促销卡片独立分行展示优惠券与满额活动;
- 买家端结算页:Pay.vue 清单中直观展示随单 0 元实物赠品明细行与数量;
- 买家端订单中心:MyOrder.vue 与 OrderDetail.vue 标注【赠品】红色徽标、原价划线展示并屏蔽单独售后申请;
- 管理端与商家端后台:orderDetail.vue 商品表格与待发货弹窗中醒目标注【赠品】及满赠活动类型。
This commit is contained in:
pikachu1995@126.com
2026-11-10 15:20:26 +08:00
parent f33c969d1e
commit 9761479c82
6 changed files with 826 additions and 145 deletions

View File

@@ -368,6 +368,7 @@
/>
<div class="goods-info">
<div class="goods-name">
<el-tag v-if="isGiftItem(row)" size="small" type="danger" effect="plain" class="mr_5">赠品</el-tag>
<span>{{ row.goodsName }}</span>
</div>
<div v-if="row.specs" class="goods-specs">
@@ -391,7 +392,11 @@
<el-table-column label="单价" width="150" align="center">
<template #default="{ row }">
<span class="font-mono font-bold">¥ {{ Number(row.unitPrice || 0).toFixed(2) }}</span>
<template v-if="isGiftItem(row)">
<div class="font-mono text-gray" style="text-decoration: line-through;">¥ {{ Number(row.unitPrice || 0).toFixed(2) }}</div>
<div class="text-danger font-bold">赠品 ¥ 0.00</div>
</template>
<span v-else class="font-mono font-bold">¥ {{ Number(row.unitPrice || 0).toFixed(2) }}</span>
</template>
</el-table-column>
@@ -1159,10 +1164,16 @@ function formatOperatorType(type) {
return map[type] || type || "系统";
}
function isGiftItem(row) {
if (!row) return false;
return row.promotionType === 'GIFT' || (Number(row.flowPrice) === 0 && row.promotionType === 'GIFT');
}
function getPromotionText(row) {
let resultText = "";
if (row && row.promotionType) {
const type = row.promotionType.split(",");
if (type.indexOf("GIFT") !== -1) resultText += "满赠赠品 ";
if (type.indexOf("PINTUAN") !== -1) resultText += "拼团 ";
if (type.indexOf("SECKILL") !== -1) resultText += "秒杀 ";
if (type.indexOf("COUPON") !== -1) resultText += "优惠券 ";