From 2152573c5e76d6a059e5a0fd0e59674e466031d0 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 2 May 2023 02:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=B8=E5=85=B3=E7=BB=84=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1116fb278bc5799839d7102322c0b5558374e70e) --- src/api/mall/product/management/spu.ts | 6 +-- src/utils/dict.ts | 3 +- .../management/components/BasicInfoForm.vue | 4 +- .../management/components/DescriptionForm.vue | 4 +- .../components/OtherSettingsForm.vue | 4 +- .../product/management/components/SkuList.vue | 18 ++++----- src/views/mall/product/management/index.vue | 40 +++++++++---------- 7 files changed, 43 insertions(+), 36 deletions(-) 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 326c58fd..23261790 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -148,5 +148,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 @@ - + - + - + - + - + - + - +