feat(activityManagement): 新增活动策略详情的已用优惠券列表展示
修复活动添加页面中distributionRulesAfterUse字段的绑定错误,标准化优惠券列表数据格式并新增对应展示样式
| | |
| | | name: item.name || '', |
| | | distributionRules: Number(item.distributionRules) as 1 | 2 | 3 || 1, |
| | | distributionTime: parseTimePoint(item.distributionTime), |
| | | distributionAfterUse: parseDistributionRulesAfterUse(item.distributionRulesAfterUse ?? item.distributionAfterUse), |
| | | distributionRulesAfterUse: parseDistributionRulesAfterUse(item.distributionRulesAfterUse ?? item.distributionAfterUse), |
| | | effectiveRules: Number(item.effectiveRules) as 1 | 2 || 1, |
| | | effectiveDays: item.effectiveDays ? new Date(item.effectiveDays).getTime() : null, |
| | | distributionsTotal: item.distributionsTotal ?? null, |
| | |
| | | return { |
| | | name: source.name || '-', |
| | | couponList: Array.isArray(source.couponList) ? source.couponList : [], |
| | | usedCouponList: toArray(source.usedCouponList), |
| | | distributionRule: ({ |
| | | 1: '每日循环发放', |
| | | 2: '仅发放一次', |
| | |
| | | <div class="rule-item"> |
| | | <span class="rule-label">生效规则</span> |
| | | <span class="rule-value">{{ strategyInfo.effectRule }}</span> |
| | | </div> |
| | | <div v-if="strategyInfo.usedCouponList.length" class="rule-item rule-item--full"> |
| | | <span class="rule-label">指定优惠券</span> |
| | | <NDataTable |
| | | :columns="couponColumns" |
| | | :data="strategyInfo.usedCouponList" |
| | | :bordered="false" |
| | | :loading="loading" |
| | | :pagination="false" |
| | | class="mt-8px" |
| | | > |
| | | <template #empty> |
| | | <div class="flex-center"> |
| | | <img src="/src/assets/element-img/no-data.png" style="width:123px;height:125px" @error="(e: any) => { e.target.src = 'https://huishou-1323682843.cos.ap-nanjing.myqcloud.com/images/9bed493b-a6aa-4ef6-ac10-7f67f5c6adc5.png' }"> |
| | | </div> |
| | | </template> |
| | | </NDataTable> |
| | | </div> |
| | | <div class="rule-item"> |
| | | <span class="rule-label">失效规则</span> |
| | |
| | | gap: 4px; |
| | | } |
| | | |
| | | .rule-item--full { |
| | | grid-column: 1 / -1; |
| | | } |
| | | |
| | | .rule-label { |
| | | font-size: 13px; |
| | | color: rgba(23, 31, 38, 0.6); |