diff --git a/src/api/mall/product/management/spu.ts b/src/api/mall/product/management/spu.ts index d5bf52ee..1205b0f2 100644 --- a/src/api/mall/product/management/spu.ts +++ b/src/api/mall/product/management/spu.ts @@ -1,9 +1,9 @@ import request from '@/config/axios' import type { SpuType } from './type/spuType' -// 获得sku列表 -export const getSkuList = (params: any) => { - return request.get({ url: '/product/sku/list', params }) +// 获得spu列表 +export const getSpuList = (params: any) => { + return request.get({ url: '/product/spu/page', params }) } // 创建商品spu export const createSpu = (data: SpuType) => { diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f4e77c22..d11debc9 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -147,5 +147,6 @@ export enum DICT_TYPE { MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 // ========== MALL 模块 ========== - PRODUCT_UNIT = 'product_unit' // 商品单位 + PRODUCT_UNIT = 'product_unit', // 商品单位 + PRODUCT_SPU_STATUS = 'product_spu_status' //商品状态 } diff --git a/src/views/mall/product/management/components/BasicInfoForm.vue b/src/views/mall/product/management/components/BasicInfoForm.vue index b04a9ef3..1d3f93df 100644 --- a/src/views/mall/product/management/components/BasicInfoForm.vue +++ b/src/views/mall/product/management/components/BasicInfoForm.vue @@ -116,13 +116,15 @@ import { copyValueToTarget } from '@/utils/object' import { ProductAttributes, ProductAttributesAddForm, SkuList } from './index' // 业务Api import * as ProductCategoryApi from '@/api/mall/product/category' +import { propTypes } from '@/utils/propTypes' const message = useMessage() // 消息弹窗 const props = defineProps({ propFormData: { type: Object as PropType, default: () => {} - } + }, + activeName: propTypes.string.def('') }) const AttributesAddFormRef = ref() // 添加商品属性表单 const ProductManagementBasicInfoRef = ref() // 表单Ref diff --git a/src/views/mall/product/management/components/DescriptionForm.vue b/src/views/mall/product/management/components/DescriptionForm.vue index 541ff6b5..17f6e00f 100644 --- a/src/views/mall/product/management/components/DescriptionForm.vue +++ b/src/views/mall/product/management/components/DescriptionForm.vue @@ -11,13 +11,15 @@ import type { SpuType } from '@/api/mall/product/management/type/spuType' import { Editor } from '@/components/Editor' import { PropType } from 'vue' import { copyValueToTarget } from '@/utils/object' +import { propTypes } from '@/utils/propTypes' const message = useMessage() // 消息弹窗 const props = defineProps({ propFormData: { type: Object as PropType, default: () => {} - } + }, + activeName: propTypes.string.def('') }) const DescriptionFormRef = ref() // 表单Ref const formData = ref({ diff --git a/src/views/mall/product/management/components/OtherSettingsForm.vue b/src/views/mall/product/management/components/OtherSettingsForm.vue index 106eb748..4469962d 100644 --- a/src/views/mall/product/management/components/OtherSettingsForm.vue +++ b/src/views/mall/product/management/components/OtherSettingsForm.vue @@ -53,13 +53,15 @@ import type { SpuType } from '@/api/mall/product/management/type/spuType' import { PropType } from 'vue' import { copyValueToTarget } from '@/utils/object' +import { propTypes } from '@/utils/propTypes' const message = useMessage() // 消息弹窗 const props = defineProps({ propFormData: { type: Object as PropType, default: () => {} - } + }, + activeName: propTypes.string.def('') }) // 商品推荐选项 const recommend = [ diff --git a/src/views/mall/product/management/components/SkuList.vue b/src/views/mall/product/management/components/SkuList.vue index 9ed41f50..7ac596e9 100644 --- a/src/views/mall/product/management/components/SkuList.vue +++ b/src/views/mall/product/management/components/SkuList.vue @@ -19,17 +19,17 @@ - + - + - + - + - + - + - +