feat: 新增广告唯一标识并优化相关功能

- 在广告模型中添加唯一标识字段
-优化广告编辑界面布局和提示文本
- 调整搜索按钮禁用逻辑,移除与 websiteId 相关的条件
- 修复优惠券列表中的数值格式化问题
- 优化经销商申请编辑界面布局
- 更新环境变量配置,注释掉 API URL
This commit is contained in:
2025-08-22 12:28:39 +08:00
parent 9aaaec8c26
commit d65cbc5d65
22 changed files with 62 additions and 46 deletions

View File

@@ -22,7 +22,6 @@
<a-input
allow-clear
:maxlength="20"
:disabled="isUpdate"
placeholder="请输入真实姓名"
v-model:value="form.realName"
/>

View File

@@ -133,16 +133,16 @@
<template v-if="column.key === 'value'">
<div class="coupon-value">
<template v-if="record.type === 10">
<span class="value-amount">¥{{ record.reducePrice?.toFixed(2) || '0.00' }}</span>
<div class="value-condition">¥{{ record.minPrice?.toFixed(2) || '0.00' }}可用</div>
<span class="value-amount">¥{{ Number(record.reducePrice).toFixed(2) || '0.00' }}</span>
<div class="value-condition">¥{{ Number(record.minPrice).toFixed(2) || '0.00' }}可用</div>
</template>
<template v-else-if="record.type === 20">
<span class="value-discount">{{ record.discount }}</span>
<div class="value-condition">¥{{ record.minPrice?.toFixed(2) || '0.00' }}可用</div>
<div class="value-condition">¥{{ Number(record.minPrice)?.toFixed(2) || '0.00' }}可用</div>
</template>
<template v-else-if="record.type === 30">
<span class="value-free">免费券</span>
<div class="value-condition">¥{{ record.minPrice?.toFixed(2) || '0.00' }}可用</div>
<div class="value-condition">¥{{ Number(record.minPrice)?.toFixed(2) || '0.00' }}可用</div>
</template>
</div>
</template>
@@ -272,10 +272,9 @@ const loading = ref(false);
// 搜索表单
const searchForm = reactive<ShopCouponParam>({
name: '',
type: undefined,
expireType: undefined,
isExpire: undefined
keywords: '',
name: undefined,
type: 0
});
// 表格数据源
@@ -467,7 +466,7 @@ const formatDate = (dateStr: string) => {
const getUsagePercent = (record: ShopCoupon) => {
if (record.totalCount === -1) return 0;
return Math.round(((record.issuedCount || 0) / record.totalCount) * 100);
return Math.round(((record.issuedCount || 0) / Number(record.totalCount)) * 100);
};
const getUsageColor = (record: ShopCoupon) => {

View File

@@ -92,17 +92,17 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="审核时间" name="auditTime" v-if="form.applyStatus === 20 || form.applyStatus === 30">
<a-date-picker
v-model:value="form.auditTime"
show-time
format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择审核时间"
style="width: 100%"
/>
</a-form-item>
</a-col>
<!-- <a-col :span="12">-->
<!-- <a-form-item label="审核时间" name="auditTime" v-if="form.applyStatus === 20 || form.applyStatus === 30">-->
<!-- <a-date-picker-->
<!-- v-model:value="form.auditTime"-->
<!-- show-time-->
<!-- format="YYYY-MM-DD HH:mm:ss"-->
<!-- placeholder="请选择审核时间"-->
<!-- style="width: 100%"-->
<!-- />-->
<!-- </a-form-item>-->
<!-- </a-col>-->
</a-row>
<a-row :gutter="16" v-if="form.applyStatus === 30">