diff --git a/src/views/mall/product/spu/form/BasicInfoForm.vue b/src/views/mall/product/spu/form/BasicInfoForm.vue
index 42059718..8d654381 100644
--- a/src/views/mall/product/spu/form/BasicInfoForm.vue
+++ b/src/views/mall/product/spu/form/BasicInfoForm.vue
@@ -47,17 +47,6 @@
-
-
-
-
-
-
@@ -71,15 +60,6 @@
{{ brandList.find((item) => item.id === row.brandId)?.name }}
-
- {{ deliveryTemplateList.find((item) => item.id === row.deliveryTemplateId)?.name }}
-
-
- {{ row.specType ? '多规格' : '单规格' }}
-
-
- {{ row.subCommissionType ? '单独设置' : '默认设置' }}
-
@@ -146,7 +126,6 @@ const formData = reactive({
picUrl: '', // 商品封面图
sliderPicUrls: [], // 商品轮播图
introduction: '', // 商品简介
- deliveryTemplateId: null, // 运费模版
brandId: null // 商品品牌
})
const rules = reactive({
@@ -156,7 +135,6 @@ const rules = reactive({
introduction: [required],
picUrl: [required],
sliderPicUrls: [required],
- deliveryTemplateId: [required],
brandId: [required]
})
@@ -207,14 +185,11 @@ const formatCategoryName = (categoryId: number) => {
}
const brandList = ref([]) // 精简商品品牌列表
-const deliveryTemplateList = ref([]) // 运费模版
onMounted(async () => {
// 获得分类树
const data = await ProductCategoryApi.getCategoryList({})
categoryList.value = handleTree(data, 'id', 'parentId')
// 获取商品品牌列表
brandList.value = await ProductBrandApi.getSimpleBrandList()
- // 获取运费模版
- deliveryTemplateList.value = await ExpressTemplateApi.getSimpleTemplateList()
})
diff --git a/src/views/mall/product/spu/form/DeliveryForm.vue b/src/views/mall/product/spu/form/DeliveryForm.vue
new file mode 100644
index 00000000..046d9a6b
--- /dev/null
+++ b/src/views/mall/product/spu/form/DeliveryForm.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ deliveryTemplateList.find((item) => item.id === row.deliveryTemplateId)?.name }}
+
+
+
+
diff --git a/src/views/mall/product/spu/form/index.vue b/src/views/mall/product/spu/form/index.vue
index 73225e03..c83e91c5 100644
--- a/src/views/mall/product/spu/form/index.vue
+++ b/src/views/mall/product/spu/form/index.vue
@@ -1,7 +1,7 @@
-
+
+
+
+
+
@@ -53,6 +62,7 @@ import BasicInfoForm from './BasicInfoForm.vue'
import DescriptionForm from './DescriptionForm.vue'
import OtherSettingsForm from './OtherSettingsForm.vue'
import SkuForm from './SkuForm.vue'
+import DeliveryForm from './DeliveryForm.vue'
import { convertToInteger, floatToFixed2, formatToFraction } from '@/utils'
defineOptions({ name: 'ProductSpuForm' })
@@ -68,6 +78,7 @@ const activeName = ref('basicInfo') // Tag 激活的窗口
const isDetail = ref(false) // 是否查看详情
const basicInfoRef = ref() // 商品信息 Ref
const skuRef = ref() // 商品规格 Ref
+const deliveryRef = ref() // 物流设置 Ref
const descriptionRef = ref() // 商品详情 Ref
const otherSettingsRef = ref() // 其他设置 Ref
// spu 表单数据
@@ -144,6 +155,7 @@ const submitForm = async () => {
try {
await unref(basicInfoRef)?.validate()
await unref(skuRef)?.validate()
+ await unref(deliveryRef)?.validate()
await unref(descriptionRef)?.validate()
await unref(otherSettingsRef)?.validate()
// 深拷贝一份, 这样最终 server 端不满足,不需要恢复,