diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts
index b38beda9..d5251630 100644
--- a/src/api/mall/product/spu.ts
+++ b/src/api/mall/product/spu.ts
@@ -25,6 +25,11 @@ export interface Sku {
salesCount?: number // 商品销量
}
+export interface GiveCouponTemplate {
+ id?: number
+ name?: string // 优惠券名称
+}
+
export interface Spu {
id?: number
name?: string // 商品名称
@@ -55,6 +60,7 @@ export interface Spu {
stock?: number // 商品库存
createTime?: Date // 商品创建时间
status?: number // 商品状态
+ giveCouponTemplate?: GiveCouponTemplate[]
}
// 获得 Spu 列表
diff --git a/src/views/mall/product/spu/form/CouponSelect.vue b/src/views/mall/product/spu/form/CouponSelect.vue
index de0a2ed4..e0f32af2 100644
--- a/src/views/mall/product/spu/form/CouponSelect.vue
+++ b/src/views/mall/product/spu/form/CouponSelect.vue
@@ -150,14 +150,15 @@ import {
} from '@/views/mall/promotion/coupon/formatter'
import { dateFormatter } from '@/utils/formatTime'
import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
+import type { GiveCouponTemplate } from '@/api/mall/product/spu'
defineOptions({ name: 'CouponSelect' })
defineProps<{
- multipleSelection: { id: number; name: string }[]
+ multipleSelection: GiveCouponTemplate[]
}>()
const emit = defineEmits<{
- (e: 'update:multipleSelection', v: { id: number; name: string }[])
+ (e: 'update:multipleSelection', v: GiveCouponTemplate[])
}>()
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('选择优惠卷') // 弹窗的标题
@@ -212,6 +213,8 @@ const handleSelectionChange = (val: CouponTemplateApi.CouponTemplateVO[]) => {
val.map((item) => ({ id: item.id, name: item.name }))
)
}
-const submitForm = async () => {}
+const submitForm = () => {
+ dialogVisible.value = false
+}
diff --git a/src/views/mall/product/spu/form/OtherSettingsForm.vue b/src/views/mall/product/spu/form/OtherSettingsForm.vue
index 0576427d..033806b6 100644
--- a/src/views/mall/product/spu/form/OtherSettingsForm.vue
+++ b/src/views/mall/product/spu/form/OtherSettingsForm.vue
@@ -82,16 +82,15 @@
{{ row.recommendGood ? '是' : '否' }}
- 默认
- 秒杀
- 砍价
- 拼团
+
+ {{ coupon.name }}
+
-
+