diff --git a/src/views/mall/promotion/coupon/index.vue b/src/views/mall/promotion/coupon/index.vue
index bf296e9a..51369ed9 100755
--- a/src/views/mall/promotion/coupon/index.vue
+++ b/src/views/mall/promotion/coupon/index.vue
@@ -1,12 +1,19 @@
+
-
-
+
@@ -31,11 +37,6 @@
重置
-
-
-
@@ -86,23 +87,21 @@
回收
+ 回收
+
-
-
-
+
@@ -112,17 +111,14 @@
import { deleteCoupon, getCouponPage } from '@/api/mall/promotion/coupon'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
-import { FormInstance } from 'element-plus'
-// 消息弹窗
-const message = useMessage()
+defineOptions({ name: 'PromotionCoupon' })
-// 遮罩层
-const loading = ref(true)
-// 总条数
-const total = ref(0)
-// 优惠劵列表
-const list = ref([])
+const message = useMessage() // 消息弹窗
+
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 字典表格数据
// 查询参数
const queryParams = reactive({
pageNo: 1,
@@ -130,9 +126,9 @@ const queryParams = reactive({
createTime: [],
status: undefined
})
-// Tab 筛选
-const activeTab = ref('all')
+const queryFormRef = ref() // 搜索的表单
+const activeTab = ref('all') // Tab 筛选
const statusTabs = reactive([
{
label: '全部',
@@ -140,8 +136,6 @@ const statusTabs = reactive([
}
])
-const queryFormRef = ref(null)
-
/** 查询列表 */
const getList = async () => {
loading.value = true
@@ -168,16 +162,17 @@ const resetQuery = () => {
}
/** 删除按钮操作 */
-const handleDelete = async (row) => {
- const id = row.id
-
+const handleDelete = async (id: number) => {
try {
+ // 二次确认
await message.confirm(
'回收将会收回会员领取的待使用的优惠券,已使用的将无法回收,确定要回收所选优惠券吗?'
)
+ // 发起删除
await deleteCoupon(id)
- getList()
message.notifySuccess('回收成功')
+ // 重新加载列表
+ await getList()
} catch {}
}
@@ -187,6 +182,7 @@ const onTabChange = (tabName) => {
getList()
}
+/** 初始化 **/
onMounted(() => {
getList()
// 设置 statuses 过滤
diff --git a/src/views/mall/promotion/couponTemplate/CouponTemplateForm.vue b/src/views/mall/promotion/couponTemplate/CouponTemplateForm.vue
new file mode 100644
index 00000000..0767767f
--- /dev/null
+++ b/src/views/mall/promotion/couponTemplate/CouponTemplateForm.vue
@@ -0,0 +1,348 @@
+
+
+
+
diff --git a/src/views/mall/promotion/couponTemplate/index.vue b/src/views/mall/promotion/couponTemplate/index.vue
index 9161014b..38a0b3fc 100755
--- a/src/views/mall/promotion/couponTemplate/index.vue
+++ b/src/views/mall/promotion/couponTemplate/index.vue
@@ -65,31 +65,24 @@
搜索
重置
-
-
-
-
-
-
- 新增
+ 新增
会员优惠劵
-
-
-
+
+
@@ -124,7 +117,7 @@
label="有效期限"
align="center"
prop="validityType"
- width="180"
+ width="190"
:formatter="validityTypeFormat"
/>
@@ -147,255 +140,56 @@
-
修改
-
删除
+
+
-
-
-
-
-
-
-
-
-
-
-
- {{ dict.label }}
-
-
-
-
- 元
-
-
-
- 折
-
-
-
- 元
-
-
-
- 元
-
-
-
- 直接领取
- 指定发放
-
-
-
-
- 张
-
-
-
- 张
-
-
-
- {{ dict.label }}
-
-
-
-
-
-
- 第
-
- 至
-
- 天有效
-
-
-
- {{ dict.label }}
-
-
-
-
-
- {{ item.name }}
- ¥{{ (item.minPrice / 100.0).toFixed(2) }}
-
-
-
-
-
-
-
-
+
+
-