diff --git a/.env.dev b/.env.dev index a52eec30..843ea018 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,5 @@ # 开发环境 -NODE_ENV=production +NODE_ENV=development VITE_DEV=false @@ -19,13 +19,13 @@ VITE_API_URL=/admin-api VITE_BASE_PATH=/ # 是否删除debugger -VITE_DROP_DEBUGGER=false +VITE_DROP_DEBUGGER=true # 是否删除console.log VITE_DROP_CONSOLE=false # 是否sourcemap -VITE_SOURCEMAP=true +VITE_SOURCEMAP=false # 输出路径 VITE_OUT_DIR=dist-dev diff --git a/package.json b/package.json index d0394c29..34b95027 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "url": "^0.11.1", "video.js": "^8.3.0", "vue": "3.3.4", + "vue-dompurify-html": "^4.1.4", "vue-i18n": "9.2.2", "vue-router": "^4.2.4", "vue-types": "^5.1.0", diff --git a/src/api/mall/product/spu.ts b/src/api/mall/product/spu.ts index fd55e126..d7ccfc5c 100644 --- a/src/api/mall/product/spu.ts +++ b/src/api/mall/product/spu.ts @@ -7,8 +7,7 @@ export interface Property { valueName?: string // 属性值名称 } -// TODO puhui999:是不是直接叫 Sku 更简洁一点哈。type 待后面,总感觉有个类型? -export interface SkuType { +export interface Sku { id?: number // 商品 SKU 编号 spuId?: number // SPU 编号 properties?: Property[] // 属性数组 @@ -25,8 +24,7 @@ export interface SkuType { salesCount?: number // 商品销量 } -// TODO puhui999:是不是直接叫 Spu 更简洁一点哈。type 待后面,总感觉有个类型? -export interface SpuType { +export interface Spu { id?: number name?: string // 商品名称 categoryId?: number | null // 商品分类 @@ -39,9 +37,9 @@ export interface SpuType { brandId?: number | null // 商品品牌编号 specType?: boolean // 商品规格 subCommissionType?: boolean // 分销类型 - skus: SkuType[] // sku数组 + skus?: Sku[] // sku数组 description?: string // 商品详情 - sort?: string // 商品排序 + sort?: number // 商品排序 giveIntegral?: number // 赠送积分 virtualSalesCount?: number // 虚拟销量 recommendHot?: boolean // 是否热卖 @@ -49,6 +47,13 @@ export interface SpuType { recommendBest?: boolean // 是否精品 recommendNew?: boolean // 是否新品 recommendGood?: boolean // 是否优品 + price?: number // 商品价格 + salesCount?: number // 商品销量 + marketPrice?: number // 市场价 + costPrice?: number // 成本价 + stock?: number // 商品库存 + createTime?: Date // 商品创建时间 + status?: number // 商品状态 } // 获得 Spu 列表 @@ -62,12 +67,12 @@ export const getTabsCount = () => { } // 创建商品 Spu -export const createSpu = (data: SpuType) => { +export const createSpu = (data: Spu) => { return request.post({ url: '/product/spu/create', data }) } // 更新商品 Spu -export const updateSpu = (data: SpuType) => { +export const updateSpu = (data: Spu) => { return request.put({ url: '/product/spu/update', data }) } @@ -90,3 +95,8 @@ export const deleteSpu = (id: number) => { export const exportSpu = async (params) => { return await request.download({ url: '/product/spu/export', params }) } + +// 获得商品 SPU 精简列表 +export const getSpuSimpleList = async () => { + return request.get({ url: '/product/spu/get-simple-list' }) +} diff --git a/src/api/mall/promotion/coupon.ts b/src/api/mall/promotion/coupon.ts new file mode 100755 index 00000000..565b86f7 --- /dev/null +++ b/src/api/mall/promotion/coupon.ts @@ -0,0 +1,18 @@ +import request from '@/config/axios' + +// TODO @dhb52:vo 缺少 + +// 删除优惠劵 +export const deleteCoupon = async (id: number) => { + return request.delete({ + url: `/promotion/coupon/delete?id=${id}` + }) +} + +// 获得优惠劵分页 +export const getCouponPage = async (params: PageParam) => { + return request.get({ + url: '/promotion/coupon/page', + params: params + }) +} diff --git a/src/api/mall/promotion/couponTemplate.ts b/src/api/mall/promotion/couponTemplate.ts new file mode 100755 index 00000000..6a58876e --- /dev/null +++ b/src/api/mall/promotion/couponTemplate.ts @@ -0,0 +1,83 @@ +import request from '@/config/axios' + +export interface CouponTemplateVO { + id: number + name: string + status: number + totalCount: number + takeLimitCount: number + takeType: number + usePrice: number + productScope: number + productSpuIds: string + validityType: number + validStartTime: Date + validEndTime: Date + fixedStartTerm: number + fixedEndTerm: number + discountType: number + discountPercent: number + discountPrice: number + discountLimitPrice: number + takeCount: number + useCount: number +} + +// 创建优惠劵模板 +export function createCouponTemplate(data: CouponTemplateVO) { + return request.post({ + url: '/promotion/coupon-template/create', + data: data + }) +} + +// 更新优惠劵模板 +export function updateCouponTemplate(data: CouponTemplateVO) { + return request.put({ + url: '/promotion/coupon-template/update', + data: data + }) +} + +// 更新优惠劵模板的状态 +export function updateCouponTemplateStatus(id: number, status: [0, 1]) { + const data = { + id, + status + } + return request.put({ + url: '/promotion/coupon-template/update-status', + data: data + }) +} + +// 删除优惠劵模板 +export function deleteCouponTemplate(id: number) { + return request.delete({ + url: '/promotion/coupon-template/delete?id=' + id + }) +} + +// 获得优惠劵模板 +export function getCouponTemplate(id: number) { + return request.get({ + url: '/promotion/coupon-template/get?id=' + id + }) +} + +// 获得优惠劵模板分页 +export function getCouponTemplatePage(params: PageParam) { + return request.get({ + url: '/promotion/coupon-template/page', + params: params + }) +} + +// 导出优惠劵模板 Excel +export function exportCouponTemplateExcel(params: PageParam) { + return request.get({ + url: '/promotion/coupon-template/export-excel', + params: params, + responseType: 'blob' + }) +} diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts new file mode 100644 index 00000000..0f1f08d1 --- /dev/null +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' +import { Sku, Spu } from '@/api/mall/product/spu' + +export interface SeckillActivityVO { + id: number + spuIds: number[] + name: string + status: number + remark: string + startTime: Date + endTime: Date + sort: number + configIds: string + orderCount: number + userCount: number + totalPrice: number + totalLimitCount: number + singleLimitCount: number + stock: number + totalStock: number + products: SeckillProductVO[] +} + +// 秒杀活动所需属性 +export interface SeckillProductVO { + spuId: number + skuId: number + seckillPrice: number + stock: number +} + +// 扩展 Sku 配置 +type SkuExtension = Sku & { + productConfig: SeckillProductVO +} + +export interface SpuExtension extends Spu { + skus: SkuExtension[] // 重写类型 +} + +// 查询秒杀活动列表 +export const getSeckillActivityPage = async (params) => { + return await request.get({ url: '/promotion/seckill-activity/page', params }) +} + +// 查询秒杀活动详情 +export const getSeckillActivity = async (id: number) => { + return await request.get({ url: '/promotion/seckill-activity/get?id=' + id }) +} + +// 新增秒杀活动 +export const createSeckillActivity = async (data: SeckillActivityVO) => { + return await request.post({ url: '/promotion/seckill-activity/create', data }) +} + +// 修改秒杀活动 +export const updateSeckillActivity = async (data: SeckillActivityVO) => { + return await request.put({ url: '/promotion/seckill-activity/update', data }) +} + +// 删除秒杀活动 +export const deleteSeckillActivity = async (id: number) => { + return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id }) +} diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts new file mode 100644 index 00000000..07b7d55c --- /dev/null +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +export interface SeckillConfigVO { + id: number + name: string + startTime: string + endTime: string + picUrl: string + status: number +} + +// 查询秒杀时段配置列表 +export const getSeckillConfigPage = async (params) => { + return await request.get({ url: '/promotion/seckill-config/page', params }) +} + +// 查询秒杀时段配置详情 +export const getSeckillConfig = async (id: number) => { + return await request.get({ url: '/promotion/seckill-config/get?id=' + id }) +} + +// 获得所有开启状态的秒杀时段精简列表 +export const getListAllSimple = async () => { + return await request.get({ url: '/promotion/seckill-config/list-all-simple' }) +} + +// 新增秒杀时段配置 +export const createSeckillConfig = async (data: SeckillConfigVO) => { + return await request.post({ url: '/promotion/seckill-config/create', data }) +} + +// 修改秒杀时段配置 +export const updateSeckillConfig = async (data: SeckillConfigVO) => { + return await request.put({ url: '/promotion/seckill-config/update', data }) +} + +// 修改时段配置状态 +export const updateSeckillConfigStatus = (id: number, status: number) => { + const data = { + id, + status + } + return request.put({ url: '/promotion/seckill-config/update-status', data: data }) +} + +// 删除秒杀时段配置 +export const deleteSeckillConfig = async (id: number) => { + return await request.delete({ url: '/promotion/seckill-config/delete?id=' + id }) +} diff --git a/src/api/mall/trade/delivery/expressTemplate/index.ts b/src/api/mall/trade/delivery/expressTemplate/index.ts index 9414c847..9ed23bc1 100644 --- a/src/api/mall/trade/delivery/expressTemplate/index.ts +++ b/src/api/mall/trade/delivery/expressTemplate/index.ts @@ -33,6 +33,11 @@ export const getDeliveryExpressTemplate = async (id: number) => { return await request.get({ url: '/trade/delivery/express-template/get?id=' + id }) } +// 查询快递运费模板详情 +export const getSimpleTemplateList = async () => { + return await request.get({ url: '/trade/delivery/express-template/list-all-simple' }) +} + // 新增快递运费模板 export const createDeliveryExpressTemplate = async (data: DeliveryExpressTemplateVO) => { return await request.post({ url: '/trade/delivery/express-template/create', data }) @@ -47,8 +52,3 @@ export const updateDeliveryExpressTemplate = async (data: DeliveryExpressTemplat export const deleteDeliveryExpressTemplate = async (id: number) => { return await request.delete({ url: '/trade/delivery/express-template/delete?id=' + id }) } - -// 导出快递运费模板 Excel -export const exportDeliveryExpressTemplateApi = async (params) => { - return await request.download({ url: '/trade/delivery/express-template/export-excel', params }) -} diff --git a/src/api/mall/trade/delivery/pickUpStore/index.ts b/src/api/mall/trade/delivery/pickUpStore/index.ts new file mode 100644 index 00000000..90fb3d01 --- /dev/null +++ b/src/api/mall/trade/delivery/pickUpStore/index.ts @@ -0,0 +1,46 @@ +import request from '@/config/axios' + +export interface DeliveryPickUpStoreVO { + id: number + name: string + introduction: string + phone: string + areaId: number + detailAddress: string + logo: string + openingTime: string + closingTime: string + latitude: number + longitude: number + status: number +} + +// 查询自提门店列表 +export const getDeliveryPickUpStorePage = async (params: DeliveryPickUpStorePageReqVO) => { + return await request.get({ url: '/trade/delivery/pick-up-store/page', params }) +} + +// 查询自提门店详情 +export const getDeliveryPickUpStore = async (id: number) => { + return await request.get({ url: '/trade/delivery/pick-up-store/get?id=' + id }) +} + +// 新增自提门店 +export const createDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) => { + return await request.post({ url: '/trade/delivery/pick-up-store/create', data }) +} + +// 修改自提门店 +export const updateDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) => { + return await request.put({ url: '/trade/delivery/pick-up-store/update', data }) +} + +// 删除自提门店 +export const deleteDeliveryPickUpStore = async (id: number) => { + return await request.delete({ url: '/trade/delivery/pick-up-store/delete?id=' + id }) +} + +// 导出自提门店 Excel +export const exportDeliveryPickUpStoreApi = async (params) => { + return await request.download({ url: '/trade/delivery/pick-up-store/export-excel', params }) +} diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts new file mode 100644 index 00000000..9d0fab2e --- /dev/null +++ b/src/api/mall/trade/order/index.ts @@ -0,0 +1,12 @@ +import request from '@/config/axios' + +// 获得交易订单分页 +// TODO @xiaobai:改成 getOrderPage +export const getOrderList = (params: PageParam) => { + return request.get({ url: '/trade/order/page', params }) +} + +// 获得交易订单详情 +export const getOrderDetail = (id: number) => { + return request.get({ url: '/trade/order/get-detail?id=' + id }) +} diff --git a/src/api/mall/trade/order/type/orderType.ts b/src/api/mall/trade/order/type/orderType.ts new file mode 100644 index 00000000..e5185769 --- /dev/null +++ b/src/api/mall/trade/order/type/orderType.ts @@ -0,0 +1,228 @@ +// TODO @xiaobai:这个放到 order/index.ts 里哈 +// TODO @xiaobai:注释放到变量后面,这样简洁一点 +// TODO @xiaobai:这个改成 TradeOrderRespVO +export interface TradeOrderPageItemRespVO { + // 订单编号 + id?: number + // 订单流水号 + no?: string + // 下单时间 + createTime?: Date + // 订单类型 + type?: number + // 订单来源 + terminal?: number + // 用户编号 + userId?: number + // 用户 IP + userIp?: string + // 用户备注 + userRemark?: string + // 订单状态 + status?: number + // 购买的商品数量 + productCount?: number + // 订单完成时间 + finishTime?: Date + // 订单取消时间 + cancelTime?: Date + // 取消类型 + cancelType?: number + // 商家备注 + remark?: string + // 支付订单编号 + payOrderId: number + // 是否已支付 + payed?: boolean + // 付款时间 + payTime?: Date + // 支付渠道 + payChannelCode?: string + // 商品原价(总) + originalPrice?: number + // 订单原价(总) + orderPrice?: number + // 订单优惠(总) + discountPrice?: number + // 运费金额 + deliveryPrice?: number + // 订单调价(总) + adjustPrice?: number + // 应付金额(总) + payPrice?: number + // 配送模板编号 + deliveryTemplateId?: number + // 发货物流公司编号 + logisticsId?: number + // 发货物流单号 + logisticsNo?: string + // 发货状态 + deliveryStatus?: number + // 发货时间 + deliveryTime?: Date + // 收货时间 + receiveTime?: Date + // 收件人名称 + receiverName?: string + // 收件人手机 + receiverMobile?: string + // 收件人地区编号 + receiverAreaId?: number + // 收件人邮编 + receiverPostCode?: number + // 收件人详细地址 + receiverDetailAddress?: string + // 售后状态 + afterSaleStatus?: number + // 退款金额 + refundPrice?: number + // 优惠劵编号 + couponId?: number + // 优惠劵减免金额 + couponPrice?: number + // 积分抵扣的金额 + pointPrice?: number + //收件人地区名字 + receiverAreaName?: string + // 订单项列表 + items?: TradeOrderItemBaseVO[] + //用户信息 + user?: MemberUserRespDTO +} + +// TODO @xiaobai:这个改成 TradeOrderItemRespVO +/** + * 交易订单项 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +export interface TradeOrderItemBaseVO { + // ========== 订单项基本信息 ========== + /** + * 编号 + */ + id?: number + /** + * 用户编号 + */ + userId?: number + /** + * 订单编号 + */ + orderId?: number + // ========== 商品基本信息 ========== + /** + * 商品 SPU 编号 + */ + spuId?: number + /** + * 商品 SPU 名称 + */ + spuName?: string + /** + * 商品 SKU 编号 + */ + skuId?: number + /** + * 商品图片 + */ + picUrl?: string + /** + * 购买数量 + */ + count?: number + // ========== 价格 + 支付基本信息 ========== + /** + * 商品原价(总) + */ + originalPrice?: number + /** + * 商品原价(单) + */ + originalUnitPrice?: number + /** + * 商品优惠(总) + */ + discountPrice?: number + /** + * 商品实付金额(总) + */ + payPrice?: number + /** + * 子订单分摊金额(总) + */ + orderPartPrice?: number + /** + * 分摊后子订单实付金额(总) + */ + orderDividePrice?: number + // ========== 营销基本信息 ========== + // TODO 芋艿:在捉摸一下 + // ========== 售后基本信息 ========== + /** + * 售后状态 + */ + afterSaleStatus?: number + //属性数组 + properties?: ProductPropertyValueDetailRespVO[] +} + +/** + * 管理后台 - 商品属性值的明细 Response VO + */ +export interface ProductPropertyValueDetailRespVO { + /** + * 属性的编号 + */ + propertyId?: number + /** + * 属性的名称 + */ + propertyName?: string + /** + * 属性值的编号 + */ + valueId?: number + /** + * 属性值的名称 + */ + valueName?: string +} + +/** + * 订单详情查询 请求 + */ +export interface TradeOrderPageReqVO { + pageNo: number + pageSize: number + no?: string + userId?: string + userNickname?: string + userMobile?: string + receiverName?: string + receiverMobile?: string + terminal?: string + type?: number + status?: number + payChannelCode?: string + createTime?: [Date, Date] + spuName?: string + itemCount?: string + all?: string +} + +//用户信息 +export interface MemberUserRespDTO { + id?: number + nickname?: string + status?: number + avatar?: string + mobile?: string +} +//订单详情选中type +export interface SelectType { + queryParams: TradeOrderPageReqVO + selectTotal: number //选中的数量 + selectAllFlag: boolean //全选标识 + selectData: Map> //存放涉及选中得页面以及每页选中得数据订单号 全选时根据条件查询 排除取消的list订单 + unSelectList: Set //登记取消的list 全选标识为true 时登记单独取消的list,再次选中时排除, 全选标识为false 时清空list +} diff --git a/src/api/point/config/index.ts b/src/api/point/config/index.ts index 1bf7b094..00adc3f1 100644 --- a/src/api/point/config/index.ts +++ b/src/api/point/config/index.ts @@ -8,32 +8,12 @@ export interface ConfigVO { tradeGivePoint: number } -// 查询积分设置列表 -export const getConfigPage = async (params) => { - return await request.get({ url: `/point/config/page`, params }) -} - // 查询积分设置详情 -export const getConfig = async (id: number) => { - return await request.get({ url: `/point/config/get?id=` + id }) +export const getConfig = async () => { + return await request.get({ url: `/point/config/get` }) } -// 新增积分设置 -export const createConfig = async (data: ConfigVO) => { - return await request.post({ url: `/point/config/create`, data }) -} - -// 修改积分设置 -export const updateConfig = async (data: ConfigVO) => { - return await request.put({ url: `/point/config/update`, data }) -} - -// 删除积分设置 -export const deleteConfig = async (id: number) => { - return await request.delete({ url: `/point/config/delete?id=` + id }) -} - -// 导出积分设置 Excel -export const exportConfig = async (params) => { - return await request.download({ url: `/point/config/export-excel`, params }) +// 新增修改积分设置 +export const saveConfig = async (data: ConfigVO) => { + return await request.put({ url: `/point/config/save`, data }) } diff --git a/src/components/Dialog/src/Dialog.vue b/src/components/Dialog/src/Dialog.vue index 8fb71759..c1114d36 100644 --- a/src/components/Dialog/src/Dialog.vue +++ b/src/components/Dialog/src/Dialog.vue @@ -17,7 +17,7 @@ const props = defineProps({ }) const getBindValue = computed(() => { - const delArr: string[] = ['fullscreen', 'title', 'maxHeight'] + const delArr: string[] = ['fullscreen', 'title', 'maxHeight', 'appendToBody'] const attrs = useAttrs() const obj = { ...attrs, ...props } for (const key in obj) { diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 56b0f429..9742babe 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -1,16 +1,16 @@ diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue index 0b0a88cf..e16e5066 100644 --- a/src/views/infra/build/index.vue +++ b/src/views/infra/build/index.vue @@ -16,8 +16,8 @@ - -
+ +
{{ t('common.copy') }} @@ -30,6 +30,7 @@
diff --git a/src/views/mall/product/spu/components/DescriptionForm.vue b/src/views/mall/product/spu/components/DescriptionForm.vue index 73fa8fa7..d23106d0 100644 --- a/src/views/mall/product/spu/components/DescriptionForm.vue +++ b/src/views/mall/product/spu/components/DescriptionForm.vue @@ -1,30 +1,54 @@ diff --git a/src/views/mall/product/spu/components/index.ts b/src/views/mall/product/spu/components/index.ts index f908e7d3..ca61ff6b 100644 --- a/src/views/mall/product/spu/components/index.ts +++ b/src/views/mall/product/spu/components/index.ts @@ -2,14 +2,70 @@ import BasicInfoForm from './BasicInfoForm.vue' import DescriptionForm from './DescriptionForm.vue' import OtherSettingsForm from './OtherSettingsForm.vue' import ProductAttributes from './ProductAttributes.vue' -import ProductAttributesAddForm from './ProductAttributesAddForm.vue' +import ProductPropertyAddForm from './ProductPropertyAddForm.vue' import SkuList from './SkuList.vue' +import { Spu } from '@/api/mall/product/spu' + +// TODO @puhui999:Properties 改成 Property 更合适? +interface Properties { + id: number + name: string + values?: Properties[] +} + +interface RuleConfig { + // 需要校验的字段 + // 例:name: 'name' 则表示校验 sku.name 的值 + // 例:name: 'productConfig.stock' 则表示校验 sku.productConfig.name 的值,此处 productConfig 表示我在 Sku 上扩展的属性 + name: string + // 校验规格为一个毁掉函数,其中 arg 为需要校验的字段的值。 + // 例:需要校验价格必须大于0.01 + // { + // name:'price', + // rule:(arg) => arg > 0.01 + // } + rule: (arg: any) => boolean + // 校验不通过时的消息提示 + message: string +} + +/** + * 获得商品的规格列表 + * + * @param spu + * @return Property 规格列表 + */ +const getPropertyList = (spu: Spu): Properties[] => { + // 直接拿返回的 skus 属性逆向生成出 propertyList + const properties: Properties[] = [] + // 只有是多规格才处理 + if (spu.specType) { + spu.skus?.forEach((sku) => { + sku.properties?.forEach(({ propertyId, propertyName, valueId, valueName }) => { + // 添加属性 + if (!properties?.some((item) => item.id === propertyId)) { + properties.push({ id: propertyId!, name: propertyName!, values: [] }) + } + // 添加属性值 + const index = properties?.findIndex((item) => item.id === propertyId) + if (!properties[index].values?.some((value) => value.id === valueId)) { + properties[index].values?.push({ id: valueId!, name: valueName! }) + } + }) + }) + } + return properties +} + export { BasicInfoForm, DescriptionForm, OtherSettingsForm, ProductAttributes, - ProductAttributesAddForm, - SkuList + ProductPropertyAddForm, + SkuList, + getPropertyList, + Properties, + RuleConfig } diff --git a/src/views/mall/product/spu/components/spu.data.ts b/src/views/mall/product/spu/components/spu.data.ts new file mode 100644 index 00000000..41c43df9 --- /dev/null +++ b/src/views/mall/product/spu/components/spu.data.ts @@ -0,0 +1,105 @@ +import { CrudSchema } from '@/hooks/web/useCrudSchemas' + +export const basicInfoSchema = reactive([ + { + label: '商品名称', + field: 'name' + }, + { + label: '关键字', + field: 'keyword' + }, + { + label: '商品简介', + field: 'introduction' + }, + { + label: '商品分类', + field: 'categoryId' + }, + { + label: '商品品牌', + field: 'brandId' + }, + { + label: '商品封面图', + field: 'picUrl' + }, + { + label: '商品轮播图', + field: 'sliderPicUrls' + }, + { + label: '商品视频', + field: 'videoUrl' + }, + { + label: '单位', + field: 'unit', + dictType: DICT_TYPE.PRODUCT_UNIT + }, + { + label: '规格类型', + field: 'specType' + }, + { + label: '分销类型', + field: 'subCommissionType' + }, + { + label: '物流模版', + field: 'deliveryTemplateId' + }, + { + label: '商品属性列表', + field: 'skus' + } +]) +export const descriptionSchema = reactive([ + { + label: '商品详情', + field: 'description' + } +]) +export const otherSettingsSchema = reactive([ + { + label: '商品排序', + field: 'sort' + }, + { + label: '赠送积分', + field: 'giveIntegral' + }, + { + label: '虚拟销量', + field: 'virtualSalesCount' + }, + { + label: '是否热卖推荐', + field: 'recommendHot' + }, + { + label: '是否优惠推荐', + field: 'recommendBenefit' + }, + { + label: '是否精品推荐', + field: 'recommendBest' + }, + { + label: '是否新品推荐', + field: 'recommendNew' + }, + { + label: '是否优品推荐', + field: 'recommendGood' + }, + { + label: '赠送的优惠劵', + field: 'giveCouponTemplateIds' + }, + { + label: '活动显示排序', + field: 'activityOrders' + } +]) diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue index 4a0c674a..75bd02e0 100644 --- a/src/views/mall/product/spu/index.vue +++ b/src/views/mall/product/spu/index.vue @@ -8,18 +8,15 @@ class="-mb-15px" label-width="68px" > - - + - - @@ -80,31 +78,54 @@ /> - @@ -143,8 +164,12 @@