diff --git a/src/views/mall/promotion/combination/activity/index.vue b/src/views/mall/promotion/combination/activity/index.vue index a6839a74..2d2d0373 100644 --- a/src/views/mall/promotion/combination/activity/index.vue +++ b/src/views/mall/promotion/combination/activity/index.vue @@ -71,26 +71,23 @@ <el-table-column label="商品标题" prop="spuName" min-width="300" /> <el-table-column label="原价" - prop="combinationFirstPrice" + prop="marketPrice" min-width="100" :formatter="fenToYuanFormat" /> - <el-table-column - label="拼团价" - prop="combinationMinPrice" - min-width="100" - :formatter="fenToYuanFormat" - /> - <el-table-column label="拼团人数" prop="recordUserCount" min-width="100" /> - <el-table-column label="参与人数" prop="recordSuccessUserCount" min-width="110" /> - <el-table-column label="成团人数" prop="helpUserCount" min-width="100" /> + <el-table-column label="拼团价" prop="seckillPrice" min-width="100"> + <template #default="scope"> + {{ formatCombinationPrice(scope.row.products) }} + </template> + </el-table-column> + <el-table-column label="开团组数" prop="groupCount" min-width="100" /> + <el-table-column label="成团组数" prop="groupSuccessCount" min-width="100" /> + <el-table-column label="购买次数" prop="recordCount" min-width="100" /> <el-table-column label="活动状态" align="center" prop="status" min-width="100"> <template #default="scope"> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> </template> </el-table-column> - <el-table-column label="库存" align="center" prop="stock" min-width="80" /> - <el-table-column label="总库存" align="center" prop="totalStock" min-width="80" /> <el-table-column label="创建时间" align="center" @@ -149,6 +146,7 @@ import * as CombinationActivityApi from '@/api/mall/promotion/combination/combin import CombinationActivityForm from './CombinationActivityForm.vue' import { formatDate } from '@/utils/formatTime' import { fenToYuanFormat } from '@/utils/formatter' +import { fenToYuan } from '@/utils' defineOptions({ name: 'PromotionBargainActivity' }) @@ -224,6 +222,11 @@ const handleDelete = async (id: number) => { } catch {} } +const formatCombinationPrice = (products) => { + const combinationPrice = Math.min(...products.map((item) => item.combinationPrice)) + return `¥${fenToYuan(combinationPrice)}` +} + /** 初始化 **/ onMounted(async () => { await getList() diff --git a/src/views/mall/promotion/seckill/activity/index.vue b/src/views/mall/promotion/seckill/activity/index.vue index 8e26840d..c102751f 100644 --- a/src/views/mall/promotion/seckill/activity/index.vue +++ b/src/views/mall/promotion/seckill/activity/index.vue @@ -87,7 +87,8 @@ min-width="100" :formatter="fenToYuanFormat" /> - <el-table-column label="秒杀价" prop="marketPrice" min-width="100"> + <el-table-column label="原价" prop="marketPrice" min-width="100" /> + <el-table-column label="秒杀价" prop="seckillPrice" min-width="100"> <template #default="scope"> {{ formatSeckillPrice(scope.row.products) }} </template>