diff --git a/yudao-admin-vue3/src/views/mall/product/spu/form/MarketingForm.vue b/yudao-admin-vue3/src/views/mall/product/spu/form/MarketingForm.vue new file mode 100644 index 0000000..093f20a --- /dev/null +++ b/yudao-admin-vue3/src/views/mall/product/spu/form/MarketingForm.vue @@ -0,0 +1,126 @@ + + + diff --git a/yudao-admin-vue3/src/views/mall/product/spu/form/SkuForm.vue b/yudao-admin-vue3/src/views/mall/product/spu/form/SkuForm.vue index 89f3008..9cc6192 100644 --- a/yudao-admin-vue3/src/views/mall/product/spu/form/SkuForm.vue +++ b/yudao-admin-vue3/src/views/mall/product/spu/form/SkuForm.vue @@ -17,43 +17,6 @@ 多规格 - - - 热卖单品 - - - 促销单品 - - - 精品推荐 - - - 新品单品 - - - 优品推荐 - - ({ specType: false, // 商品规格 subCommissionType: false, // 分销类型 - recommendHot: 0, // 热卖推荐 - recommendBenefit: 0, // 优惠推荐 - recommendBest: 0, // 精品推荐 - recommendNew: 0, // 新品推荐 - recommendGood: 0, // 优品推荐 skus: [] }) const rules = reactive({ diff --git a/yudao-admin-vue3/src/views/mall/product/spu/form/index.vue b/yudao-admin-vue3/src/views/mall/product/spu/form/index.vue index 1ba5f5e..5f1c02d 100644 --- a/yudao-admin-vue3/src/views/mall/product/spu/form/index.vue +++ b/yudao-admin-vue3/src/views/mall/product/spu/form/index.vue @@ -33,6 +33,14 @@ :propFormData="formData" /> + + + + @@ -61,6 +70,7 @@ import DescriptionForm from './DescriptionForm.vue' import OtherForm from './OtherForm.vue' import SkuForm from './SkuForm.vue' import DeliveryForm from './DeliveryForm.vue' +import MarketingForm from './MarketingForm.vue' import { convertToInteger, floatToFixed2, formatToFraction } from '@/utils' defineOptions({ name: 'ProductSpuForm' }) @@ -79,6 +89,7 @@ const skuRef = ref() // 商品规格 Ref const deliveryRef = ref() // 物流设置 Ref const descriptionRef = ref() // 商品详情 Ref const otherRef = ref() // 其他设置 Ref +const marketingRef = ref() // 营销设置 Ref // SPU 表单数据 const formData = ref({ name: '', // 商品名称 @@ -97,6 +108,7 @@ const formData = ref({ recommendBest: 0, // 精品推荐 recommendNew: 0, // 新品推荐 recommendGood: 0, // 优品推荐 + onlyPaidMemberView: 0, // 仅限付费会员可见 skus: [ { price: 0, // 商品价格 @@ -164,6 +176,7 @@ const submitForm = async () => { await unref(deliveryRef)?.validate() await unref(descriptionRef)?.validate() await unref(otherRef)?.validate() + await unref(marketingRef)?.validate() // 深拷贝一份, 这样最终 server 端不满足,不需要影响原始数据 const deepCopyFormData = cloneDeep(unref(formData.value)) as ProductSpuApi.Spu deepCopyFormData.skus!.forEach((item) => {