Kaynağa Gözat

商品改为产品

zrd 4 ay önce
ebeveyn
işleme
aa011978c5
100 değiştirilmiş dosya ile 1020 ekleme ve 1000 silme
  1. 7 7
      src/api/mall/product/brand.ts
  2. 5 5
      src/api/mall/product/category.ts
  3. 2 2
      src/api/mall/product/comment.ts
  4. 1 1
      src/api/mall/product/favorite.ts
  5. 1 1
      src/api/mall/product/history.ts
  6. 1 1
      src/api/mall/product/property.ts
  7. 31 31
      src/api/mall/product/spu.ts
  8. 1 1
      src/api/mall/promotion/bargain/bargainActivity.ts
  9. 2 2
      src/api/mall/promotion/combination/combinationRecord.ts
  10. 11 11
      src/api/mall/promotion/point/index.ts
  11. 1 1
      src/api/mall/promotion/reward/rewardActivity.ts
  12. 5 5
      src/api/mall/statistics/product.ts
  13. 1 1
      src/api/mall/statistics/trade.ts
  14. 5 5
      src/api/mall/trade/afterSale/index.ts
  15. 11 11
      src/api/mall/trade/order/index.ts
  16. 15 15
      src/components/AppLinkInput/data.ts
  17. 1 1
      src/components/DiyEditor/components/mobile/CouponCard/config.ts
  18. 12 12
      src/components/DiyEditor/components/mobile/CouponCard/index.vue
  19. 11 11
      src/components/DiyEditor/components/mobile/ProductCard/config.ts
  20. 22 22
      src/components/DiyEditor/components/mobile/ProductCard/index.vue
  21. 21 21
      src/components/DiyEditor/components/mobile/ProductCard/property.vue
  22. 7 7
      src/components/DiyEditor/components/mobile/ProductList/config.ts
  23. 22 22
      src/components/DiyEditor/components/mobile/ProductList/index.vue
  24. 17 17
      src/components/DiyEditor/components/mobile/ProductList/property.vue
  25. 1 1
      src/components/DiyEditor/components/mobile/PromotionArticle/index.vue
  26. 7 7
      src/components/DiyEditor/components/mobile/PromotionCombination/config.ts
  27. 21 21
      src/components/DiyEditor/components/mobile/PromotionCombination/index.vue
  28. 20 20
      src/components/DiyEditor/components/mobile/PromotionCombination/property.vue
  29. 7 7
      src/components/DiyEditor/components/mobile/PromotionPoint/config.ts
  30. 8 8
      src/components/DiyEditor/components/mobile/PromotionPoint/index.vue
  31. 7 7
      src/components/DiyEditor/components/mobile/PromotionPoint/property.vue
  32. 7 7
      src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts
  33. 21 21
      src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue
  34. 20 20
      src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue
  35. 1 1
      src/components/DiyEditor/components/mobile/SearchBar/config.ts
  36. 8 7
      src/components/DiyEditor/components/mobile/SearchBar/index.vue
  37. 1 1
      src/components/DiyEditor/util.ts
  38. 5 5
      src/router/modules/remaining.ts
  39. 4 4
      src/utils/constants.ts
  40. 4 4
      src/utils/dict.ts
  41. 3 3
      src/views/mall/home/components/OperationDataCard.vue
  42. 1 1
      src/views/mall/home/components/ShortcutCard.vue
  43. 3 3
      src/views/mall/product/category/components/ProductCategorySelect.vue
  44. 3 3
      src/views/mall/product/category/index.vue
  45. 3 3
      src/views/mall/product/comment/CommentForm.vue
  46. 40 40
      src/views/mall/product/comment/index.vue
  47. 3 3
      src/views/mall/product/property/index.vue
  48. 15 15
      src/views/mall/product/spu/components/SkuList.vue
  49. 4 4
      src/views/mall/product/spu/components/SkuTableSelect.vue
  50. 11 11
      src/views/mall/product/spu/components/SpuShowcase.vue
  51. 24 24
      src/views/mall/product/spu/components/SpuTableSelect.vue
  52. 1 1
      src/views/mall/product/spu/components/index.ts
  53. 4 4
      src/views/mall/product/spu/form/DeliveryForm.vue
  54. 5 5
      src/views/mall/product/spu/form/DescriptionForm.vue
  55. 22 22
      src/views/mall/product/spu/form/InfoForm.vue
  56. 7 7
      src/views/mall/product/spu/form/OtherForm.vue
  57. 4 4
      src/views/mall/product/spu/form/ProductAttributes.vue
  58. 5 5
      src/views/mall/product/spu/form/ProductPropertyAddForm.vue
  59. 13 13
      src/views/mall/product/spu/form/SkuForm.vue
  60. 17 17
      src/views/mall/product/spu/form/index.vue
  61. 15 15
      src/views/mall/product/spu/index.vue
  62. 4 4
      src/views/mall/promotion/article/ArticleForm.vue
  63. 1 1
      src/views/mall/promotion/article/index.vue
  64. 7 7
      src/views/mall/promotion/bargain/activity/BargainActivityForm.vue
  65. 1 1
      src/views/mall/promotion/bargain/activity/bargainActivity.data.ts
  66. 46 40
      src/views/mall/promotion/bargain/activity/index.vue
  67. 5 5
      src/views/mall/promotion/combination/activity/CombinationActivityForm.vue
  68. 1 1
      src/views/mall/promotion/combination/activity/combinationActivity.data.ts
  69. 2 2
      src/views/mall/promotion/combination/activity/index.vue
  70. 22 22
      src/views/mall/promotion/combination/components/CombinationTableSelect.vue
  71. 10 10
      src/views/mall/promotion/combination/record/index.vue
  72. 7 7
      src/views/mall/promotion/components/SpuAndSkuList.vue
  73. 22 22
      src/views/mall/promotion/components/SpuSelect.vue
  74. 1 1
      src/views/mall/promotion/components/index.ts
  75. 9 9
      src/views/mall/promotion/coupon/template/CouponTemplateForm.vue
  76. 5 5
      src/views/mall/promotion/discountActivity/DiscountActivityForm.vue
  77. 1 1
      src/views/mall/promotion/discountActivity/discountActivity.data.ts
  78. 49 44
      src/views/mall/promotion/discountActivity/index.vue
  79. 1 1
      src/views/mall/promotion/kefu/components/KeFuConversationList.vue
  80. 1 1
      src/views/mall/promotion/kefu/components/KeFuMessageList.vue
  81. 1 1
      src/views/mall/promotion/kefu/components/message/OrderItem.vue
  82. 3 3
      src/views/mall/promotion/kefu/components/message/ProductItem.vue
  83. 1 1
      src/views/mall/promotion/kefu/components/tools/constants.ts
  84. 8 8
      src/views/mall/promotion/point/activity/PointActivityForm.vue
  85. 3 3
      src/views/mall/promotion/point/activity/index.vue
  86. 1 1
      src/views/mall/promotion/point/activity/pointActivity.data.ts
  87. 3 3
      src/views/mall/promotion/point/components/PointTableSelect.vue
  88. 8 8
      src/views/mall/promotion/rewardActivity/RewardForm.vue
  89. 6 6
      src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue
  90. 44 38
      src/views/mall/promotion/seckill/activity/index.vue
  91. 1 1
      src/views/mall/promotion/seckill/activity/seckillActivity.data.ts
  92. 22 22
      src/views/mall/promotion/seckill/components/SeckillTableSelect.vue
  93. 1 1
      src/views/mall/statistics/member/index.vue
  94. 19 19
      src/views/mall/statistics/product/components/ProductRank.vue
  95. 63 62
      src/views/mall/statistics/product/components/ProductSummary.vue
  96. 4 4
      src/views/mall/statistics/product/index.vue
  97. 70 69
      src/views/mall/statistics/trade/index.vue
  98. 4 4
      src/views/mall/trade/afterSale/detail/index.vue
  99. 4 4
      src/views/mall/trade/afterSale/index.vue
  100. 1 1
      src/views/mall/trade/config/index.vue

+ 7 - 7
src/api/mall/product/brand.ts

@@ -1,7 +1,7 @@
 import request from '@/config/axios'
 
 /**
- * 品品牌
+ * 品品牌
  */
 export interface BrandVO {
   /**
@@ -30,32 +30,32 @@ export interface BrandVO {
   status: number
 }
 
-// 创建品品牌
+// 创建品品牌
 export const createBrand = (data: BrandVO) => {
   return request.post({ url: '/product/brand/create', data })
 }
 
-// 更新品品牌
+// 更新品品牌
 export const updateBrand = (data: BrandVO) => {
   return request.put({ url: '/product/brand/update', data })
 }
 
-// 删除品品牌
+// 删除品品牌
 export const deleteBrand = (id: number) => {
   return request.delete({ url: `/product/brand/delete?id=${id}` })
 }
 
-// 获得品品牌
+// 获得品品牌
 export const getBrand = (id: number) => {
   return request.get({ url: `/product/brand/get?id=${id}` })
 }
 
-// 获得品品牌列表
+// 获得品品牌列表
 export const getBrandParam = (params: PageParam) => {
   return request.get({ url: '/product/brand/page', params })
 }
 
-// 获得品品牌精简信息列表
+// 获得品品牌精简信息列表
 export const getSimpleBrandList = () => {
   return request.get({ url: '/product/brand/list-all-simple' })
 }

+ 5 - 5
src/api/mall/product/category.ts

@@ -30,27 +30,27 @@ export interface CategoryVO {
   status: number
 }
 
-// 创建品分类
+// 创建品分类
 export const createCategory = (data: CategoryVO) => {
   return request.post({ url: '/product/category/create', data })
 }
 
-// 更新品分类
+// 更新品分类
 export const updateCategory = (data: CategoryVO) => {
   return request.put({ url: '/product/category/update', data })
 }
 
-// 删除品分类
+// 删除品分类
 export const deleteCategory = (id: number) => {
   return request.delete({ url: `/product/category/delete?id=${id}` })
 }
 
-// 获得品分类
+// 获得品分类
 export const getCategory = (id: number) => {
   return request.get({ url: `/product/category/get?id=${id}` })
 }
 
-// 获得品分类列表
+// 获得品分类列表
 export const getCategoryList = (params: any) => {
   return request.get({ url: '/product/category/list', params })
 }

+ 2 - 2
src/api/mall/product/comment.ts

@@ -23,12 +23,12 @@ export interface CommentVO {
   replyTime: Date
 }
 
-// 查询品评论列表
+// 查询品评论列表
 export const getCommentPage = async (params) => {
   return await request.get({ url: `/product/comment/page`, params })
 }
 
-// 查询品评论详情
+// 查询品评论详情
 export const getComment = async (id: number) => {
   return await request.get({ url: `/product/comment/get?id=` + id })
 }

+ 1 - 1
src/api/mall/product/favorite.ts

@@ -3,7 +3,7 @@ import request from '@/config/axios'
 export interface Favorite {
   id?: number
   userId?: string // 用户编号
-  spuId?: number | null // 品 SPU 编号
+  spuId?: number | null // 品 SPU 编号
 }
 
 // 获得 ProductFavorite 列表

+ 1 - 1
src/api/mall/product/history.ts

@@ -1,7 +1,7 @@
 import request from '@/config/axios'
 
 /**
- * 获得品浏览记录分页
+ * 获得品浏览记录分页
  *
  * @param params 请求参数
  */

+ 1 - 1
src/api/mall/product/property.ts

@@ -1,7 +1,7 @@
 import request from '@/config/axios'
 
 /**
- * 品属性
+ * 品属性
  */
 export interface PropertyVO {
   id?: number

+ 31 - 31
src/api/mall/product/spu.ts

@@ -8,21 +8,21 @@ export interface Property {
 }
 
 export interface Sku {
-  id?: number // 品 SKU 编号
-  name?: string // 品 SKU 名称
+  id?: number // 品 SKU 编号
+  name?: string // 品 SKU 名称
   spuId?: number // SPU 编号
   properties?: Property[] // 属性数组
-  price?: number | string // 品价格
+  price?: number | string // 品价格
   marketPrice?: number | string // 市场价
   costPrice?: number | string // 成本价
-  barCode?: string // 品条码
+  barCode?: string // 品条码
   picUrl?: string // 图片地址
   stock?: number // 库存
-  weight?: number // 品重量,单位:kg 千克
-  volume?: number // 品体积,单位:m^3 平米
+  weight?: number // 品重量,单位:kg 千克
+  volume?: number // 品体积,单位:m^3 平米
   firstBrokeragePrice?: number | string // 一级分销的佣金
   secondBrokeragePrice?: number | string // 二级分销的佣金
-  salesCount?: number // 品销量
+  salesCount?: number // 品销量
 }
 
 export interface GiveCouponTemplate {
@@ -32,32 +32,32 @@ export interface GiveCouponTemplate {
 
 export interface Spu {
   id?: number
-  name?: string // 品名称
-  categoryId?: number // 品分类
+  name?: string // 品名称
+  categoryId?: number // 品分类
   keyword?: string // 关键字
   unit?: number | undefined // 单位
-  picUrl?: string // 品封面图
-  sliderPicUrls?: string[] // 品轮播图
-  introduction?: string // 品简介
+  picUrl?: string // 品封面图
+  sliderPicUrls?: string[] // 品轮播图
+  introduction?: string // 品简介
   deliveryTypes?: number[] // 配送方式
   deliveryTemplateId?: number | undefined // 运费模版
-  brandId?: number // 品品牌编号
-  specType?: boolean // 品规格
+  brandId?: number // 品品牌编号
+  specType?: boolean // 品规格
   subCommissionType?: boolean // 分销类型
   skus?: Sku[] // sku数组
-  description?: string // 品详情
-  sort?: number // 品排序
+  description?: string // 品详情
+  sort?: number // 品排序
   giveIntegral?: number // 赠送积分
   virtualSalesCount?: number // 虚拟销量
-  price?: number // 品价格
-  combinationPrice?: number // 品拼团价格
-  seckillPrice?: number // 品秒杀价格
-  salesCount?: number // 品销量
+  price?: number // 品价格
+  combinationPrice?: number // 品拼团价格
+  seckillPrice?: number // 品秒杀价格
+  salesCount?: number // 品销量
   marketPrice?: number // 市场价
   costPrice?: number // 成本价
-  stock?: number // 品库存
-  createTime?: Date // 品创建时间
-  status?: number // 品状态
+  stock?: number // 品库存
+  createTime?: Date // 品创建时间
+  status?: number // 品状态
 }
 
 // 获得 Spu 列表
@@ -70,42 +70,42 @@ export const getTabsCount = () => {
   return request.get({ url: '/product/spu/get-count' })
 }
 
-// 创建品 Spu
+// 创建品 Spu
 export const createSpu = (data: Spu) => {
   return request.post({ url: '/product/spu/create', data })
 }
 
-// 更新品 Spu
+// 更新品 Spu
 export const updateSpu = (data: Spu) => {
   return request.put({ url: '/product/spu/update', data })
 }
 
-// 更新品 Spu status
+// 更新品 Spu status
 export const updateStatus = (data: { id: number; status: number }) => {
   return request.put({ url: '/product/spu/update-status', data })
 }
 
-// 获得品 Spu
+// 获得品 Spu
 export const getSpu = (id: number) => {
   return request.get({ url: `/product/spu/get-detail?id=${id}` })
 }
 
-// 获得品 Spu 详情列表
+// 获得品 Spu 详情列表
 export const getSpuDetailList = (ids: number[]) => {
   return request.get({ url: `/product/spu/list?spuIds=${ids}` })
 }
 
-// 删除品 Spu
+// 删除品 Spu
 export const deleteSpu = (id: number) => {
   return request.delete({ url: `/product/spu/delete?id=${id}` })
 }
 
-// 导出品 Spu Excel
+// 导出品 Spu Excel
 export const exportSpu = async (params: any) => {
   return await request.download({ url: '/product/spu/export', params })
 }
 
-// 获得品 SPU 精简列表
+// 获得品 SPU 精简列表
 export const getSpuSimpleList = async () => {
   return request.get({ url: '/product/spu/list-all-simple' })
 }

+ 1 - 1
src/api/mall/promotion/bargain/bargainActivity.ts

@@ -19,7 +19,7 @@ export interface BargainActivityVO {
   randomMaxPrice?: number // 用户每次砍价的最大金额,单位:分
 }
 
-// 砍价活动所需属性。选择的品和属性的时候使用方便使用活动的通用封装
+// 砍价活动所需属性。选择的品和属性的时候使用方便使用活动的通用封装
 export interface BargainProductVO {
   spuId: number
   skuId: number

+ 2 - 2
src/api/mall/promotion/combination/combinationRecord.ts

@@ -10,8 +10,8 @@ export interface CombinationRecordVO {
   userSize: number // 可参团人数
   userCount: number // 已参团人数
   status: number // 拼团状态
-  spuName: string // 品名字
-  picUrl: string // 品图片
+  spuName: string // 品名字
+  picUrl: string // 品图片
   virtualGroup: boolean // 是否虚拟成团
   startTime: string // 开始时间 (订单付款后开始的时间)
   endTime: string // 结束时间(成团时间/失败时间)

+ 11 - 11
src/api/mall/promotion/point/index.ts

@@ -4,19 +4,19 @@ import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO
 // 积分商城活动 VO
 export interface PointActivityVO {
   id: number // 积分商城活动编号
-  spuId: number // 积分商城活动
+  spuId: number // 积分商城活动
   status: number // 活动状态
   stock: number // 积分商城活动库存
   totalStock: number // 积分商城活动总库存
   remark?: string // 备注
   sort: number // 排序
   createTime: string // 创建时间
-  products: PointProductVO[] // 积分商城
+  products: PointProductVO[] // 积分商城
 
-  // ========== 品字段 ==========
-  spuName: string // 品名称
-  picUrl: string // 品主图
-  marketPrice: number // 品市场价,单位:分
+  // ========== 品字段 ==========
+  spuName: string // 品名称
+  picUrl: string // 品主图
+  marketPrice: number // 品市场价,单位:分
 
   //======================= 显示所需兑换积分最少的 sku 信息 =======================
   point: number // 兑换积分
@@ -25,15 +25,15 @@ export interface PointActivityVO {
 
 // 秒杀活动所需属性
 export interface PointProductVO {
-  id?: number // 积分商城品编号
+  id?: number // 积分商城品编号
   activityId?: number // 积分商城活动 id
-  spuId?: number // 品 SPU 编号
-  skuId: number // 品 SKU 编号
+  spuId?: number // 品 SPU 编号
+  skuId: number // 品 SKU 编号
   count: number // 可兑换数量
   point: number // 兑换积分
   price: number // 兑换金额,单位:分
-  stock: number // 积分商城品库存
-  activityStatus?: number // 积分商城品状态
+  stock: number // 积分商城品库存
+  activityStatus?: number // 积分商城品状态
 }
 
 // 扩展 Sku 配置

+ 1 - 1
src/api/mall/promotion/reward/rewardActivity.ts

@@ -11,7 +11,7 @@ export interface RewardActivityVO {
   productScope?: number
   rules: RewardRule[]
   // 如下仅用于表单,不提交
-  productScopeValues?: number[] // 商品范围:值为品类编号列表、商品编号列表
+  productScopeValues?: number[] // 产品范围:值为品类编号列表、产品编号列表
   productCategoryIds?: number[]
   productSpuIds?: number[]
 }

+ 5 - 5
src/api/mall/statistics/product.ts

@@ -19,30 +19,30 @@ export interface ProductStatisticsVO {
   browseConvertPercent: number
 }
 
-// 品统计 API
+// 品统计 API
 export const ProductStatisticsApi = {
-  // 获得品统计分析
+  // 获得品统计分析
   getProductStatisticsAnalyse: (params: any) => {
     return request.get<DataComparisonRespVO<ProductStatisticsVO>>({
       url: '/statistics/product/analyse',
       params
     })
   },
-  // 获得品状况明细
+  // 获得品状况明细
   getProductStatisticsList: (params: any) => {
     return request.get<ProductStatisticsVO[]>({
       url: '/statistics/product/list',
       params
     })
   },
-  // 导出获得品状况明细 Excel
+  // 导出获得品状况明细 Excel
   exportProductStatisticsExcel: (params: any) => {
     return request.download({
       url: '/statistics/product/export-excel',
       params
     })
   },
-  // 获得品排行榜分页
+  // 获得品排行榜分页
   getProductStatisticsRankPage: async (params: any) => {
     return await request.get({
       url: `/statistics/product/rank-page`,

+ 1 - 1
src/api/mall/statistics/trade.ts

@@ -42,7 +42,7 @@ export interface TradeOrderCountRespVO {
 
 /** 交易订单统计 Response VO */
 export interface TradeOrderSummaryRespVO {
-  /** 支付订单品数 */
+  /** 支付订单品数 */
   orderPayCount?: number
   /** 总支付金额,单位:分 */
   orderPayPrice?: number

+ 5 - 5
src/api/mall/trade/afterSale/index.ts

@@ -13,12 +13,12 @@ export interface TradeAfterSaleVO {
   orderId?: number | null // 交易订单编号
   orderNo?: string // 订单流水号
   orderItemId?: number | null // 交易订单项编号
-  spuId?: number | null // 品 SPU 编号
-  spuName?: string // 品 SPU 名称
-  skuId?: number | null // 品 SKU 编号
+  spuId?: number | null // 品 SPU 编号
+  spuName?: string // 品 SPU 名称
+  skuId?: number | null // 品 SKU 编号
   properties?: ProductPropertiesVO[] // 属性数组
-  picUrl?: string // 品图片
-  count?: number | null // 退货品数量
+  picUrl?: string // 品图片
+  count?: number | null // 退货品数量
   auditTime?: Date // 审批时间
   auditUserId?: number | null // 审批人
   auditReason?: string // 审批备注

+ 11 - 11
src/api/mall/trade/order/index.ts

@@ -11,7 +11,7 @@ export interface OrderVO {
   userIp?: string // 用户 IP
   userRemark?: string // 用户备注
   status?: number | null // 订单状态
-  productCount?: number | null // 购买的品数量
+  productCount?: number | null // 购买的品数量
   finishTime?: Date | null // 订单完成时间
   cancelTime?: Date | null // 订单取消时间
   cancelType?: number | null // 取消类型
@@ -22,7 +22,7 @@ export interface OrderVO {
   payStatus?: boolean // 是否已支付
   payTime?: Date | null // 付款时间
   payChannelCode?: string // 支付渠道
-  totalPrice?: number | null // 品原价(总)
+  totalPrice?: number | null // 品原价(总)
   discountPrice?: number | null // 订单优惠(总)
   deliveryPrice?: number | null // 运费金额
   adjustPrice?: number | null // 订单调价(总)
@@ -81,17 +81,17 @@ export interface OrderItemRespVO {
   id?: number | null // 编号
   userId?: number | null // 用户编号
   orderId?: number | null // 订单编号
-  // ========== 品基本信息 ==========
-  spuId?: number | null // 品 SPU 编号
-  spuName?: string //品 SPU 名称
-  skuId?: number | null // 品 SKU 编号
-  picUrl?: string //品图片
+  // ========== 品基本信息 ==========
+  spuId?: number | null // 品 SPU 编号
+  spuName?: string //品 SPU 名称
+  skuId?: number | null // 品 SKU 编号
+  picUrl?: string //品图片
   count?: number | null //购买数量
   // ========== 价格 + 支付基本信息 ==========
-  originalPrice?: number | null //品原价(总)
-  originalUnitPrice?: number | null //品原价(单)
-  discountPrice?: number | null //品优惠(总)
-  payPrice?: number | null //品实付金额(总)
+  originalPrice?: number | null //品原价(总)
+  originalUnitPrice?: number | null //品原价(单)
+  discountPrice?: number | null //品优惠(总)
+  payPrice?: number | null //品实付金额(总)
   orderPartPrice?: number | null //子订单分摊金额(总)
   orderDividePrice?: number | null //分摊后子订单实付金额(总)
   // ========== 营销基本信息 ==========

+ 15 - 15
src/components/AppLinkInput/data.ts

@@ -16,7 +16,7 @@ export interface AppLink {
   type?: APP_LINK_TYPE_ENUM
 }
 
-// APP 链接类型(需要特殊处理,例如品详情)
+// APP 链接类型(需要特殊处理,例如品详情)
 export const enum APP_LINK_TYPE_ENUM {
   // 拼团活动
   ACTIVITY_COMBINATION,
@@ -32,13 +32,13 @@ export const enum APP_LINK_TYPE_ENUM {
   DIY_PAGE_DETAIL,
   // 品类列表
   PRODUCT_CATEGORY_LIST,
-  // 品列表
+  // 品列表
   PRODUCT_LIST,
-  // 品详情
+  // 品详情
   PRODUCT_DETAIL_NORMAL,
-  // 拼团品详情
+  // 拼团品详情
   PRODUCT_DETAIL_COMBINATION,
-  // 秒杀品详情
+  // 秒杀品详情
   PRODUCT_DETAIL_SECKILL
 }
 
@@ -52,7 +52,7 @@ export const APP_LINK_GROUP_LIST = [
         path: '/pages/index/index'
       },
       {
-        name: '品分类',
+        name: '品分类',
         path: '/pages/index/category',
         type: APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST
       },
@@ -65,7 +65,7 @@ export const APP_LINK_GROUP_LIST = [
         path: '/pages/index/user'
       },
       {
-        name: '品搜索',
+        name: '品搜索',
         path: '/pages/index/search'
       },
       {
@@ -88,25 +88,25 @@ export const APP_LINK_GROUP_LIST = [
     ]
   },
   {
-    name: '品',
+    name: '品',
     links: [
       {
-        name: '品列表',
+        name: '品列表',
         path: '/pages/goods/list',
         type: APP_LINK_TYPE_ENUM.PRODUCT_LIST
       },
       {
-        name: '品详情',
+        name: '品详情',
         path: '/pages/goods/index',
         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_NORMAL
       },
       {
-        name: '拼团品详情',
+        name: '拼团品详情',
         path: '/pages/goods/groupon',
         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_COMBINATION
       },
       {
-        name: '秒杀品详情',
+        name: '秒杀品详情',
         path: '/pages/goods/seckill',
         type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
       }
@@ -120,7 +120,7 @@ export const APP_LINK_GROUP_LIST = [
         path: '/pages/activity/groupon/order'
       },
       {
-        name: '营销品',
+        name: '营销品',
         path: '/pages/activity/index'
       },
       {
@@ -166,7 +166,7 @@ export const APP_LINK_GROUP_LIST = [
         path: '/pages/commission/index'
       },
       {
-        name: '推广品',
+        name: '推广品',
         path: '/pages/commission/goods'
       },
       {
@@ -208,7 +208,7 @@ export const APP_LINK_GROUP_LIST = [
         path: '/pages/order/aftersale/list'
       },
       {
-        name: '品收藏',
+        name: '品收藏',
         path: '/pages/user/goods-collect'
       },
       {

+ 1 - 1
src/components/DiyEditor/components/mobile/CouponCard/config.ts

@@ -1,6 +1,6 @@
 import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
 
-/** 品卡片属性 */
+/** 品卡片属性 */
 export interface CouponCardProperty {
   // 列数
   columns: number

+ 12 - 12
src/components/DiyEditor/components/mobile/CouponCard/index.vue

@@ -1,14 +1,15 @@
 <template>
-  <el-scrollbar class="z-1 min-h-30px" wrap-class="w-full" ref="containerRef">
+  <el-scrollbar ref="containerRef" class="z-1 min-h-30px" wrap-class="w-full">
     <div
-      class="flex flex-row text-12px"
       :style="{
         gap: `${property.space}px`,
         width: scrollbarWidth
       }"
+      class="flex flex-row text-12px"
     >
       <div
-        class="box-content"
+        v-for="(coupon, index) in couponList"
+        :key="index"
         :style="{
           background: property.bgImg
             ? `url(${property.bgImg}) 100% center / 100% 100% no-repeat`
@@ -16,8 +17,7 @@
           width: `${couponWidth}px`,
           color: property.textColor
         }"
-        v-for="(coupon, index) in couponList"
-        :key="index"
+        class="box-content"
       >
         <!-- 布局1:1列-->
         <div v-if="property.columns === 1" class="m-l-16px flex flex-row justify-between p-8px">
@@ -31,11 +31,11 @@
           </div>
           <div class="flex flex-col justify-evenly">
             <div
-              class="rounded-20px p-x-8px p-y-2px"
               :style="{
                 color: property.button.color,
                 background: property.button.bgColor
               }"
+              class="rounded-20px p-x-8px p-y-2px"
             >
               立即领取
             </div>
@@ -53,11 +53,11 @@
           </div>
           <div class="flex flex-col">
             <div
-              class="h-full w-20px rounded-20px p-x-2px p-y-8px text-center"
               :style="{
                 color: property.button.color,
                 background: property.button.bgColor
               }"
+              class="h-full w-20px rounded-20px p-x-2px p-y-8px text-center"
             >
               立即领取
             </div>
@@ -69,11 +69,11 @@
           <CouponDiscount :coupon="coupon" />
           <div>{{ coupon.name }}</div>
           <div
-            class="rounded-20px p-x-8px p-y-2px"
             :style="{
               color: property.button.color,
               background: property.button.bgColor
             }"
+            class="rounded-20px p-x-8px p-y-2px"
           >
             立即领取
           </div>
@@ -82,7 +82,7 @@
     </div>
   </el-scrollbar>
 </template>
-<script setup lang="ts">
+<script lang="ts" setup>
 import { CouponCardProperty } from './config'
 import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
 import { CouponDiscount } from './component'
@@ -91,11 +91,11 @@ import {
   CouponValidTerm
 } from '@/components/DiyEditor/components/mobile/CouponCard/component'
 
-/** 品卡片 */
+/** 品卡片 */
 defineOptions({ name: 'CouponCard' })
 // 定义属性
 const props = defineProps<{ property: CouponCardProperty }>()
-// 品列表
+// 品列表
 const couponList = ref<CouponTemplateApi.CouponTemplateVO[]>([])
 watch(
   () => props.property.couponIds,
@@ -139,4 +139,4 @@ onMounted(() => {
   phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 375
 })
 </script>
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 11 - 11
src/components/DiyEditor/components/mobile/ProductCard/config.ts

@@ -1,22 +1,22 @@
 import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
 
-/** 品卡片属性 */
+/** 品卡片属性 */
 export interface ProductCardProperty {
   // 布局类型:单列大图 | 单列小图 | 双列
   layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
-  // 品字段
+  // 品字段
   fields: {
-    // 品名称
+    // 品名称
     name: ProductCardFieldProperty
-    // 品简介
+    // 品简介
     introduction: ProductCardFieldProperty
-    // 品价格
+    // 品价格
     price: ProductCardFieldProperty
-    // 品市场价
+    // 品市场价
     marketPrice: ProductCardFieldProperty
-    // 品销量
+    // 品销量
     salesCount: ProductCardFieldProperty
-    // 品库存
+    // 品库存
     stock: ProductCardFieldProperty
   }
   // 角标
@@ -45,12 +45,12 @@ export interface ProductCardProperty {
   borderRadiusBottom: number
   // 间距
   space: number
-  // 品编号列表
+  // 品编号列表
   spuIds: number[]
   // 组件样式
   style: ComponentStyle
 }
-// 品字段
+// 品字段
 export interface ProductCardFieldProperty {
   // 是否显示
   show: boolean
@@ -61,7 +61,7 @@ export interface ProductCardFieldProperty {
 // 定义组件
 export const component = {
   id: 'ProductCard',
-  name: '品卡片',
+  name: '品卡片',
   icon: 'fluent:text-column-two-left-24-filled',
   property: {
     layoutType: 'oneColBigImg',

+ 22 - 22
src/components/DiyEditor/components/mobile/ProductCard/index.vue

@@ -1,7 +1,8 @@
 <template>
-  <div :class="`box-content min-h-30px w-full flex flex-row flex-wrap`" ref="containerRef">
+  <div ref="containerRef" :class="`box-content min-h-30px w-full flex flex-row flex-wrap`">
     <div
-      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
+      v-for="(spu, index) in spuList"
+      :key="index"
       :style="{
         ...calculateSpace(index),
         ...calculateWidth(),
@@ -10,14 +11,13 @@
         borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
         borderBottomRightRadius: `${property.borderRadiusBottom}px`
       }"
-      v-for="(spu, index) in spuList"
-      :key="index"
+      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
     >
       <!-- 角标 -->
       <div v-if="property.badge.show" class="absolute left-0 top-0 z-1 items-center justify-center">
-        <el-image fit="cover" :src="property.badge.imgUrl" class="h-26px w-38px" />
+        <el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
       </div>
-      <!-- 品封面图 -->
+      <!-- 品封面图 -->
       <div
         :class="[
           'h-140px',
@@ -27,7 +27,7 @@
           }
         ]"
       >
-        <el-image fit="cover" class="h-full w-full" :src="spu.picUrl" />
+        <el-image :src="spu.picUrl" class="h-full w-full" fit="cover" />
       </div>
       <div
         :class="[
@@ -38,7 +38,7 @@
           }
         ]"
       >
-        <!-- 品名称 -->
+        <!-- 品名称 -->
         <div
           v-if="property.fields.name.show"
           :class="[
@@ -52,11 +52,11 @@
         >
           {{ spu.name }}
         </div>
-        <!-- 品简介 -->
+        <!-- 品简介 -->
         <div
           v-if="property.fields.introduction.show"
-          class="truncate text-12px"
           :style="{ color: property.fields.introduction.color }"
+          class="truncate text-12px"
         >
           {{ spu.introduction }}
         </div>
@@ -64,16 +64,16 @@
           <!-- 价格 -->
           <span
             v-if="property.fields.price.show"
-            class="text-16px"
             :style="{ color: property.fields.price.color }"
+            class="text-16px"
           >
             ¥{{ fenToYuan(spu.price as any) }}
           </span>
           <!-- 市场价 -->
           <span
             v-if="property.fields.marketPrice.show && spu.marketPrice"
-            class="ml-4px text-10px line-through"
             :style="{ color: property.fields.marketPrice.color }"
+            class="ml-4px text-10px line-through"
             >¥{{ fenToYuan(spu.marketPrice) }}
           </span>
         </div>
@@ -96,34 +96,34 @@
         <!-- 文字按钮 -->
         <span
           v-if="property.btnBuy.type === 'text'"
-          class="rounded-full p-x-12px p-y-4px text-12px text-white"
           :style="{
             background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`
           }"
+          class="rounded-full p-x-12px p-y-4px text-12px text-white"
         >
           {{ property.btnBuy.text }}
         </span>
         <!-- 图片按钮 -->
         <el-image
           v-else
+          :src="property.btnBuy.imgUrl"
           class="h-28px w-28px rounded-full"
           fit="cover"
-          :src="property.btnBuy.imgUrl"
         />
       </div>
     </div>
   </div>
 </template>
-<script setup lang="ts">
+<script lang="ts" setup>
 import { ProductCardProperty } from './config'
 import * as ProductSpuApi from '@/api/mall/product/spu'
 import { fenToYuan } from '../../../../../utils'
 
-/** 品卡片 */
+/** 品卡片 */
 defineOptions({ name: 'ProductCard' })
 // 定义属性
 const props = defineProps<{ property: ProductCardProperty }>()
-// 品列表
+// 品列表
 const spuList = ref<ProductSpuApi.Spu[]>([])
 watch(
   () => props.property.spuIds,
@@ -137,11 +137,11 @@ watch(
 )
 
 /**
- * 计算品的间距
- * @param index 品索引
+ * 计算品的间距
+ * @param index 品索引
  */
 const calculateSpace = (index: number) => {
-  // 品的列数
+  // 品的列数
   const columns = props.property.layoutType === 'twoCol' ? 2 : 1
   // 第一列没有左边距
   const marginLeft = index % columns === 0 ? '0' : props.property.space + 'px'
@@ -153,7 +153,7 @@ const calculateSpace = (index: number) => {
 
 // 容器
 const containerRef = ref()
-// 计算品的宽度
+// 计算品的宽度
 const calculateWidth = () => {
   let width = '100%'
   // 双列时每列的宽度为:(总宽度 - 间距)/ 2
@@ -164,4 +164,4 @@ const calculateWidth = () => {
 }
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 21 - 21
src/components/DiyEditor/components/mobile/ProductCard/property.vue

@@ -1,10 +1,10 @@
 <template>
   <ComponentContainerProperty v-model="formData.style">
-    <el-form label-width="80px" :model="formData">
-      <el-card header="商品列表" class="property-group" shadow="never">
+    <el-form :model="formData" label-width="80px">
+      <el-card class="property-group" header="产品列表" shadow="never">
         <SpuShowcase v-model="formData.spuIds" />
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="布局" prop="type">
           <el-radio-group v-model="formData.layoutType">
             <el-tooltip class="item" content="单列大图" placement="bottom">
@@ -24,19 +24,19 @@
             </el-tooltip>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="品名称" prop="fields.name.show">
+        <el-form-item label="品名称" prop="fields.name.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.name.color" />
             <el-checkbox v-model="formData.fields.name.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品简介" prop="fields.introduction.show">
+        <el-form-item label="品简介" prop="fields.introduction.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.introduction.color" />
             <el-checkbox v-model="formData.fields.introduction.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品价格" prop="fields.price.show">
+        <el-form-item label="品价格" prop="fields.price.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.price.color" />
             <el-checkbox v-model="formData.fields.price.show" />
@@ -48,30 +48,30 @@
             <el-checkbox v-model="formData.fields.marketPrice.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品销量" prop="fields.salesCount.show">
+        <el-form-item label="品销量" prop="fields.salesCount.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.salesCount.color" />
             <el-checkbox v-model="formData.fields.salesCount.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品库存" prop="fields.stock.show">
+        <el-form-item label="品库存" prop="fields.stock.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.stock.color" />
             <el-checkbox v-model="formData.fields.stock.show" />
           </div>
         </el-form-item>
       </el-card>
-      <el-card header="角标" class="property-group" shadow="never">
+      <el-card class="property-group" header="角标" shadow="never">
         <el-form-item label="角标" prop="badge.show">
           <el-switch v-model="formData.badge.show" />
         </el-form-item>
-        <el-form-item label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
+        <el-form-item v-if="formData.badge.show" label="角标" prop="badge.imgUrl">
           <UploadImg v-model="formData.badge.imgUrl" height="44px" width="72px">
             <template #tip> 建议尺寸:36 * 22 </template>
           </UploadImg>
         </el-form-item>
       </el-card>
-      <el-card header="按钮" class="property-group" shadow="never">
+      <el-card class="property-group" header="按钮" shadow="never">
         <el-form-item label="按钮类型" prop="btnBuy.type">
           <el-radio-group v-model="formData.btnBuy.type">
             <el-radio-button value="text">文字</el-radio-button>
@@ -97,15 +97,15 @@
           </el-form-item>
         </template>
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="上圆角" prop="borderRadiusTop">
           <el-slider
             v-model="formData.borderRadiusTop"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="下圆角" prop="borderRadiusBottom">
@@ -113,9 +113,9 @@
             v-model="formData.borderRadiusBottom"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="间隔" prop="space">
@@ -123,9 +123,9 @@
             v-model="formData.space"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
       </el-card>
@@ -133,12 +133,12 @@
   </ComponentContainerProperty>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { ProductCardProperty } from './config'
 import { useVModel } from '@vueuse/core'
 import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue'
 
-// 品卡片属性面板
+// 品卡片属性面板
 defineOptions({ name: 'ProductCardProperty' })
 
 const props = defineProps<{ modelValue: ProductCardProperty }>()
@@ -146,4 +146,4 @@ const emit = defineEmits(['update:modelValue'])
 const formData = useVModel(props, 'modelValue', emit)
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 7 - 7
src/components/DiyEditor/components/mobile/ProductList/config.ts

@@ -1,14 +1,14 @@
 import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
 
-/** 品栏属性 */
+/** 品栏属性 */
 export interface ProductListProperty {
   // 布局类型:双列 | 三列 | 水平滑动
   layoutType: 'twoCol' | 'threeCol' | 'horizSwiper'
-  // 品字段
+  // 品字段
   fields: {
-    // 品名称
+    // 品名称
     name: ProductListFieldProperty
-    // 品价格
+    // 品价格
     price: ProductListFieldProperty
   }
   // 角标
@@ -24,12 +24,12 @@ export interface ProductListProperty {
   borderRadiusBottom: number
   // 间距
   space: number
-  // 品编号列表
+  // 品编号列表
   spuIds: number[]
   // 组件样式
   style: ComponentStyle
 }
-// 品字段
+// 品字段
 export interface ProductListFieldProperty {
   // 是否显示
   show: boolean
@@ -40,7 +40,7 @@ export interface ProductListFieldProperty {
 // 定义组件
 export const component = {
   id: 'ProductList',
-  name: '品栏',
+  name: '品栏',
   icon: 'fluent:text-column-two-24-filled',
   property: {
     layoutType: 'twoCol',

+ 22 - 22
src/components/DiyEditor/components/mobile/ProductList/index.vue

@@ -1,35 +1,35 @@
 <template>
-  <el-scrollbar class="z-1 min-h-30px" wrap-class="w-full" ref="containerRef">
-    <!-- 品网格 -->
+  <el-scrollbar ref="containerRef" class="z-1 min-h-30px" wrap-class="w-full">
+    <!-- 品网格 -->
     <div
-      class="grid overflow-x-auto"
       :style="{
         gridGap: `${property.space}px`,
         gridTemplateColumns,
         width: scrollbarWidth
       }"
+      class="grid overflow-x-auto"
     >
-      <!-- 品 -->
+      <!-- 品 -->
       <div
-        class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
+        v-for="(spu, index) in spuList"
+        :key="index"
         :style="{
           borderTopLeftRadius: `${property.borderRadiusTop}px`,
           borderTopRightRadius: `${property.borderRadiusTop}px`,
           borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
           borderBottomRightRadius: `${property.borderRadiusBottom}px`
         }"
-        v-for="(spu, index) in spuList"
-        :key="index"
+        class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
       >
         <!-- 角标 -->
         <div
           v-if="property.badge.show"
           class="absolute left-0 top-0 z-1 items-center justify-center"
         >
-          <el-image fit="cover" :src="property.badge.imgUrl" class="h-26px w-38px" />
+          <el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
         </div>
-        <!-- 品封面图 -->
-        <el-image fit="cover" :src="spu.picUrl" :style="{ width: imageSize, height: imageSize }" />
+        <!-- 品封面图 -->
+        <el-image :src="spu.picUrl" :style="{ width: imageSize, height: imageSize }" fit="cover" />
         <div
           :class="[
             'flex flex-col gap-8px p-8px box-border',
@@ -39,20 +39,20 @@
             }
           ]"
         >
-          <!-- 品名称 -->
+          <!-- 品名称 -->
           <div
             v-if="property.fields.name.show"
-            class="truncate text-12px"
             :style="{ color: property.fields.name.color }"
+            class="truncate text-12px"
           >
             {{ spu.name }}
           </div>
           <div>
-            <!-- 品价格 -->
+            <!-- 品价格 -->
             <span
               v-if="property.fields.price.show"
-              class="text-12px"
               :style="{ color: property.fields.price.color }"
+              class="text-12px"
             >
               ¥{{ fenToYuan(spu.price) }}
             </span>
@@ -62,16 +62,16 @@
     </div>
   </el-scrollbar>
 </template>
-<script setup lang="ts">
+<script lang="ts" setup>
 import { ProductListProperty } from './config'
 import * as ProductSpuApi from '@/api/mall/product/spu'
 import { fenToYuan } from '@/utils'
 
-/** 品栏 */
+/** 品栏 */
 defineOptions({ name: 'ProductList' })
 // 定义属性
 const props = defineProps<{ property: ProductListProperty }>()
-// 品列表
+// 品列表
 const spuList = ref<ProductSpuApi.Spu[]>([])
 watch(
   () => props.property.spuIds,
@@ -87,13 +87,13 @@ watch(
 const phoneWidth = ref(375)
 // 容器
 const containerRef = ref()
-// 品的列数
+// 品的列数
 const columns = ref(2)
 // 滚动条宽度
 const scrollbarWidth = ref('100%')
-// 品图大小
+// 品图大小
 const imageSize = ref('0')
-// 品网络列数
+// 品网络列数
 const gridTemplateColumns = ref('')
 // 计算布局参数
 watch(
@@ -104,7 +104,7 @@ watch(
     // 每列的宽度为:(总宽度 - 间距 * (列数 - 1))/ 列数
     const productWidth =
       (phoneWidth.value - props.property.space * (columns.value - 1)) / columns.value
-    // 品图布局:2列时,左右布局 3列时,上下布局
+    // 品图布局:2列时,左右布局 3列时,上下布局
     imageSize.value = columns.value === 2 ? '64px' : `${productWidth}px`
     // 根据布局类型,计算行数、列数
     if (props.property.layoutType === 'horizSwiper') {
@@ -129,4 +129,4 @@ onMounted(() => {
 })
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 17 - 17
src/components/DiyEditor/components/mobile/ProductList/property.vue

@@ -1,10 +1,10 @@
 <template>
   <ComponentContainerProperty v-model="formData.style">
-    <el-form label-width="80px" :model="formData">
-      <el-card header="商品列表" class="property-group" shadow="never">
+    <el-form :model="formData" label-width="80px">
+      <el-card class="property-group" header="产品列表" shadow="never">
         <SpuShowcase v-model="formData.spuIds" />
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="布局" prop="type">
           <el-radio-group v-model="formData.layoutType">
             <el-tooltip class="item" content="双列" placement="bottom">
@@ -24,38 +24,38 @@
             </el-tooltip>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="品名称" prop="fields.name.show">
+        <el-form-item label="品名称" prop="fields.name.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.name.color" />
             <el-checkbox v-model="formData.fields.name.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品价格" prop="fields.price.show">
+        <el-form-item label="品价格" prop="fields.price.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.price.color" />
             <el-checkbox v-model="formData.fields.price.show" />
           </div>
         </el-form-item>
       </el-card>
-      <el-card header="角标" class="property-group" shadow="never">
+      <el-card class="property-group" header="角标" shadow="never">
         <el-form-item label="角标" prop="badge.show">
           <el-switch v-model="formData.badge.show" />
         </el-form-item>
-        <el-form-item label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
+        <el-form-item v-if="formData.badge.show" label="角标" prop="badge.imgUrl">
           <UploadImg v-model="formData.badge.imgUrl" height="44px" width="72px">
             <template #tip> 建议尺寸:36 * 22 </template>
           </UploadImg>
         </el-form-item>
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="上圆角" prop="borderRadiusTop">
           <el-slider
             v-model="formData.borderRadiusTop"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="下圆角" prop="borderRadiusBottom">
@@ -63,9 +63,9 @@
             v-model="formData.borderRadiusBottom"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="间隔" prop="space">
@@ -73,9 +73,9 @@
             v-model="formData.space"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
       </el-card>
@@ -83,12 +83,12 @@
   </ComponentContainerProperty>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { ProductListProperty } from './config'
 import { useVModel } from '@vueuse/core'
 import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue'
 
-// 品栏属性面板
+// 品栏属性面板
 defineOptions({ name: 'ProductListProperty' })
 
 const props = defineProps<{ modelValue: ProductListProperty }>()
@@ -96,4 +96,4 @@ const emit = defineEmits(['update:modelValue'])
 const formData = useVModel(props, 'modelValue', emit)
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 1 - 1
src/components/DiyEditor/components/mobile/PromotionArticle/index.vue

@@ -9,7 +9,7 @@ import * as ArticleApi from '@/api/mall/promotion/article/index'
 defineOptions({ name: 'PromotionArticle' })
 // 定义属性
 const props = defineProps<{ property: PromotionArticleProperty }>()
-// 品列表
+// 品列表
 const article = ref<ArticleApi.ArticleVO>()
 watch(
   () => props.property.id,

+ 7 - 7
src/components/DiyEditor/components/mobile/PromotionCombination/config.ts

@@ -4,19 +4,19 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
 export interface PromotionCombinationProperty {
   // 布局类型:单列 | 三列
   layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
-  // 品字段
+  // 品字段
   fields: {
-    // 品名称
+    // 品名称
     name: PromotionCombinationFieldProperty
-    // 品简介
+    // 品简介
     introduction: PromotionCombinationFieldProperty
-    // 品价格
+    // 品价格
     price: PromotionCombinationFieldProperty
     // 市场价
     marketPrice: PromotionCombinationFieldProperty
-    // 品销量
+    // 品销量
     salesCount: PromotionCombinationFieldProperty
-    // 品库存
+    // 品库存
     stock: PromotionCombinationFieldProperty
   }
   // 角标
@@ -51,7 +51,7 @@ export interface PromotionCombinationProperty {
   style: ComponentStyle
 }
 
-// 品字段
+// 品字段
 export interface PromotionCombinationFieldProperty {
   // 是否显示
   show: boolean

+ 21 - 21
src/components/DiyEditor/components/mobile/PromotionCombination/index.vue

@@ -1,7 +1,8 @@
 <template>
-  <div :class="`box-content min-h-30px w-full flex flex-row flex-wrap`" ref="containerRef">
+  <div ref="containerRef" :class="`box-content min-h-30px w-full flex flex-row flex-wrap`">
     <div
-      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
+      v-for="(spu, index) in spuList"
+      :key="index"
       :style="{
         ...calculateSpace(index),
         ...calculateWidth(),
@@ -10,14 +11,13 @@
         borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
         borderBottomRightRadius: `${property.borderRadiusBottom}px`
       }"
-      v-for="(spu, index) in spuList"
-      :key="index"
+      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
     >
       <!-- 角标 -->
       <div v-if="property.badge.show" class="absolute left-0 top-0 z-1 items-center justify-center">
-        <el-image fit="cover" :src="property.badge.imgUrl" class="h-26px w-38px" />
+        <el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
       </div>
-      <!-- 品封面图 -->
+      <!-- 品封面图 -->
       <div
         :class="[
           'h-140px',
@@ -27,7 +27,7 @@
           }
         ]"
       >
-        <el-image fit="cover" class="h-full w-full" :src="spu.picUrl" />
+        <el-image :src="spu.picUrl" class="h-full w-full" fit="cover" />
       </div>
       <div
         :class="[
@@ -38,7 +38,7 @@
           }
         ]"
       >
-        <!-- 品名称 -->
+        <!-- 品名称 -->
         <div
           v-if="property.fields.name.show"
           :class="[
@@ -52,11 +52,11 @@
         >
           {{ spu.name }}
         </div>
-        <!-- 品简介 -->
+        <!-- 品简介 -->
         <div
           v-if="property.fields.introduction.show"
-          class="truncate text-12px"
           :style="{ color: property.fields.introduction.color }"
+          class="truncate text-12px"
         >
           {{ spu.introduction }}
         </div>
@@ -64,16 +64,16 @@
           <!-- 价格 -->
           <span
             v-if="property.fields.price.show"
-            class="text-16px"
             :style="{ color: property.fields.price.color }"
+            class="text-16px"
           >
             ¥{{ fenToYuan(spu.price || Infinity) }}
           </span>
           <!-- 市场价 -->
           <span
             v-if="property.fields.marketPrice.show && spu.marketPrice"
-            class="ml-4px text-10px line-through"
             :style="{ color: property.fields.marketPrice.color }"
+            class="ml-4px text-10px line-through"
             >¥{{ fenToYuan(spu.marketPrice) }}</span
           >
         </div>
@@ -96,25 +96,25 @@
         <!-- 文字按钮 -->
         <span
           v-if="property.btnBuy.type === 'text'"
-          class="rounded-full p-x-12px p-y-4px text-12px text-white"
           :style="{
             background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`
           }"
+          class="rounded-full p-x-12px p-y-4px text-12px text-white"
         >
           {{ property.btnBuy.text }}
         </span>
         <!-- 图片按钮 -->
         <el-image
           v-else
+          :src="property.btnBuy.imgUrl"
           class="h-28px w-28px rounded-full"
           fit="cover"
-          :src="property.btnBuy.imgUrl"
         />
       </div>
     </div>
   </div>
 </template>
-<script setup lang="ts">
+<script lang="ts" setup>
 import { PromotionCombinationProperty } from './config'
 import * as ProductSpuApi from '@/api/mall/product/spu'
 import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationActivity'
@@ -124,7 +124,7 @@ import { fenToYuan } from '@/utils'
 defineOptions({ name: 'PromotionCombination' })
 // 定义属性
 const props = defineProps<{ property: PromotionCombinationProperty }>()
-// 品列表
+// 品列表
 const spuList = ref<ProductSpuApi.Spu[]>([])
 const spuIdList = ref<number[]>([])
 const combinationActivityList = ref<CombinationActivityApi.CombinationActivityVO[]>([])
@@ -171,11 +171,11 @@ watch(
 )
 
 /**
- * 计算品的间距
- * @param index 品索引
+ * 计算品的间距
+ * @param index 品索引
  */
 const calculateSpace = (index: number) => {
-  // 品的列数
+  // 品的列数
   const columns = props.property.layoutType === 'twoCol' ? 2 : 1
   // 第一列没有左边距
   const marginLeft = index % columns === 0 ? '0' : props.property.space + 'px'
@@ -187,7 +187,7 @@ const calculateSpace = (index: number) => {
 
 // 容器
 const containerRef = ref()
-// 计算品的宽度
+// 计算品的宽度
 const calculateWidth = () => {
   let width = '100%'
   // 双列时每列的宽度为:(总宽度 - 间距)/ 2
@@ -198,4 +198,4 @@ const calculateWidth = () => {
 }
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 20 - 20
src/components/DiyEditor/components/mobile/PromotionCombination/property.vue

@@ -1,10 +1,10 @@
 <template>
   <ComponentContainerProperty v-model="formData.style">
-    <el-form label-width="80px" :model="formData">
-      <el-card header="拼团活动" class="property-group" shadow="never">
+    <el-form :model="formData" label-width="80px">
+      <el-card class="property-group" header="拼团活动" shadow="never">
         <CombinationShowcase v-model="formData.activityIds" />
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="布局" prop="type">
           <el-radio-group v-model="formData.layoutType">
             <el-tooltip class="item" content="单列大图" placement="bottom">
@@ -29,19 +29,19 @@
             </el-tooltip>-->
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="品名称" prop="fields.name.show">
+        <el-form-item label="品名称" prop="fields.name.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.name.color" />
             <el-checkbox v-model="formData.fields.name.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品简介" prop="fields.introduction.show">
+        <el-form-item label="品简介" prop="fields.introduction.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.introduction.color" />
             <el-checkbox v-model="formData.fields.introduction.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品价格" prop="fields.price.show">
+        <el-form-item label="品价格" prop="fields.price.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.price.color" />
             <el-checkbox v-model="formData.fields.price.show" />
@@ -53,30 +53,30 @@
             <el-checkbox v-model="formData.fields.marketPrice.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品销量" prop="fields.salesCount.show">
+        <el-form-item label="品销量" prop="fields.salesCount.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.salesCount.color" />
             <el-checkbox v-model="formData.fields.salesCount.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品库存" prop="fields.stock.show">
+        <el-form-item label="品库存" prop="fields.stock.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.stock.color" />
             <el-checkbox v-model="formData.fields.stock.show" />
           </div>
         </el-form-item>
       </el-card>
-      <el-card header="角标" class="property-group" shadow="never">
+      <el-card class="property-group" header="角标" shadow="never">
         <el-form-item label="角标" prop="badge.show">
           <el-switch v-model="formData.badge.show" />
         </el-form-item>
-        <el-form-item label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
+        <el-form-item v-if="formData.badge.show" label="角标" prop="badge.imgUrl">
           <UploadImg v-model="formData.badge.imgUrl" height="44px" width="72px">
             <template #tip> 建议尺寸:36 * 22</template>
           </UploadImg>
         </el-form-item>
       </el-card>
-      <el-card header="按钮" class="property-group" shadow="never">
+      <el-card class="property-group" header="按钮" shadow="never">
         <el-form-item label="按钮类型" prop="btnBuy.type">
           <el-radio-group v-model="formData.btnBuy.type">
             <el-radio-button value="text">文字</el-radio-button>
@@ -102,15 +102,15 @@
           </el-form-item>
         </template>
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="上圆角" prop="borderRadiusTop">
           <el-slider
             v-model="formData.borderRadiusTop"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="下圆角" prop="borderRadiusBottom">
@@ -118,9 +118,9 @@
             v-model="formData.borderRadiusBottom"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="间隔" prop="space">
@@ -128,9 +128,9 @@
             v-model="formData.space"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
       </el-card>
@@ -138,7 +138,7 @@
   </ComponentContainerProperty>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { PromotionCombinationProperty } from './config'
 import { useVModel } from '@vueuse/core'
 import * as CombinationActivityApi from '@/api/mall/promotion/combination/combinationActivity'
@@ -161,4 +161,4 @@ onMounted(async () => {
 })
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 7 - 7
src/components/DiyEditor/components/mobile/PromotionPoint/config.ts

@@ -4,19 +4,19 @@ import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util'
 export interface PromotionPointProperty {
   // 布局类型:单列 | 三列
   layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
-  // 品字段
+  // 品字段
   fields: {
-    // 品名称
+    // 品名称
     name: PromotionPointFieldProperty
-    // 品简介
+    // 品简介
     introduction: PromotionPointFieldProperty
-    // 品价格
+    // 品价格
     price: PromotionPointFieldProperty
     // 市场价
     marketPrice: PromotionPointFieldProperty
-    // 品销量
+    // 品销量
     salesCount: PromotionPointFieldProperty
-    // 品库存
+    // 品库存
     stock: PromotionPointFieldProperty
   }
   // 角标
@@ -51,7 +51,7 @@ export interface PromotionPointProperty {
   style: ComponentStyle
 }
 
-// 品字段
+// 品字段
 export interface PromotionPointFieldProperty {
   // 是否显示
   show: boolean

+ 8 - 8
src/components/DiyEditor/components/mobile/PromotionPoint/index.vue

@@ -17,7 +17,7 @@
       <div v-if="property.badge.show" class="absolute left-0 top-0 z-1 items-center justify-center">
         <el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
       </div>
-      <!-- 品封面图 -->
+      <!-- 品封面图 -->
       <div
         :class="[
           'h-140px',
@@ -38,7 +38,7 @@
           }
         ]"
       >
-        <!-- 品名称 -->
+        <!-- 品名称 -->
         <div
           v-if="property.fields.name.show"
           :class="[
@@ -52,7 +52,7 @@
         >
           {{ spu.name }}
         </div>
-        <!-- 品简介 -->
+        <!-- 品简介 -->
         <div
           v-if="property.fields.introduction.show"
           :style="{ color: property.fields.introduction.color }"
@@ -126,7 +126,7 @@ import { fenToYuan } from '@/utils'
 defineOptions({ name: 'PromotionPoint' })
 // 定义属性
 const props = defineProps<{ property: PromotionPointProperty }>()
-// 品列表
+// 品列表
 const spuList = ref<SpuExtension0[]>([])
 const spuIdList = ref<number[]>([])
 const pointActivityList = ref<PointActivityVO[]>([])
@@ -172,11 +172,11 @@ watch(
 )
 
 /**
- * 计算品的间距
- * @param index 品索引
+ * 计算品的间距
+ * @param index 品索引
  */
 const calculateSpace = (index: number) => {
-  // 品的列数
+  // 品的列数
   const columns = props.property.layoutType === 'twoCol' ? 2 : 1
   // 第一列没有左边距
   const marginLeft = index % columns === 0 ? '0' : props.property.space + 'px'
@@ -188,7 +188,7 @@ const calculateSpace = (index: number) => {
 
 // 容器
 const containerRef = ref()
-// 计算品的宽度
+// 计算品的宽度
 const calculateWidth = () => {
   let width = '100%'
   // 双列时每列的宽度为:(总宽度 - 间距)/ 2

+ 7 - 7
src/components/DiyEditor/components/mobile/PromotionPoint/property.vue

@@ -4,7 +4,7 @@
       <el-card class="property-group" header="积分商城活动" shadow="never">
         <PointShowcase v-model="formData.activityIds" />
       </el-card>
-      <el-card class="property-group" header="品样式" shadow="never">
+      <el-card class="property-group" header="品样式" shadow="never">
         <el-form-item label="布局" prop="type">
           <el-radio-group v-model="formData.layoutType">
             <el-tooltip class="item" content="单列大图" placement="bottom">
@@ -29,19 +29,19 @@
             </el-tooltip>-->
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="品名称" prop="fields.name.show">
+        <el-form-item label="品名称" prop="fields.name.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.name.color" />
             <el-checkbox v-model="formData.fields.name.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品简介" prop="fields.introduction.show">
+        <el-form-item label="品简介" prop="fields.introduction.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.introduction.color" />
             <el-checkbox v-model="formData.fields.introduction.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品价格" prop="fields.price.show">
+        <el-form-item label="品价格" prop="fields.price.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.price.color" />
             <el-checkbox v-model="formData.fields.price.show" />
@@ -53,13 +53,13 @@
             <el-checkbox v-model="formData.fields.marketPrice.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品销量" prop="fields.salesCount.show">
+        <el-form-item label="品销量" prop="fields.salesCount.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.salesCount.color" />
             <el-checkbox v-model="formData.fields.salesCount.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品库存" prop="fields.stock.show">
+        <el-form-item label="品库存" prop="fields.stock.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.stock.color" />
             <el-checkbox v-model="formData.fields.stock.show" />
@@ -102,7 +102,7 @@
           </el-form-item>
         </template>
       </el-card>
-      <el-card class="property-group" header="品样式" shadow="never">
+      <el-card class="property-group" header="品样式" shadow="never">
         <el-form-item label="上圆角" prop="borderRadiusTop">
           <el-slider
             v-model="formData.borderRadiusTop"

+ 7 - 7
src/components/DiyEditor/components/mobile/PromotionSeckill/config.ts

@@ -4,19 +4,19 @@ import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
 export interface PromotionSeckillProperty {
   // 布局类型:单列 | 三列
   layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
-  // 品字段
+  // 品字段
   fields: {
-    // 品名称
+    // 品名称
     name: PromotionSeckillFieldProperty
-    // 品简介
+    // 品简介
     introduction: PromotionSeckillFieldProperty
-    // 品价格
+    // 品价格
     price: PromotionSeckillFieldProperty
     // 市场价
     marketPrice: PromotionSeckillFieldProperty
-    // 品销量
+    // 品销量
     salesCount: PromotionSeckillFieldProperty
-    // 品库存
+    // 品库存
     stock: PromotionSeckillFieldProperty
   }
   // 角标
@@ -51,7 +51,7 @@ export interface PromotionSeckillProperty {
   style: ComponentStyle
 }
 
-// 品字段
+// 品字段
 export interface PromotionSeckillFieldProperty {
   // 是否显示
   show: boolean

+ 21 - 21
src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue

@@ -1,7 +1,8 @@
 <template>
-  <div :class="`box-content min-h-30px w-full flex flex-row flex-wrap`" ref="containerRef">
+  <div ref="containerRef" :class="`box-content min-h-30px w-full flex flex-row flex-wrap`">
     <div
-      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
+      v-for="(spu, index) in spuList"
+      :key="index"
       :style="{
         ...calculateSpace(index),
         ...calculateWidth(),
@@ -10,14 +11,13 @@
         borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
         borderBottomRightRadius: `${property.borderRadiusBottom}px`
       }"
-      v-for="(spu, index) in spuList"
-      :key="index"
+      class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
     >
       <!-- 角标 -->
       <div v-if="property.badge.show" class="absolute left-0 top-0 z-1 items-center justify-center">
-        <el-image fit="cover" :src="property.badge.imgUrl" class="h-26px w-38px" />
+        <el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
       </div>
-      <!-- 品封面图 -->
+      <!-- 品封面图 -->
       <div
         :class="[
           'h-140px',
@@ -27,7 +27,7 @@
           }
         ]"
       >
-        <el-image fit="cover" class="h-full w-full" :src="spu.picUrl" />
+        <el-image :src="spu.picUrl" class="h-full w-full" fit="cover" />
       </div>
       <div
         :class="[
@@ -38,7 +38,7 @@
           }
         ]"
       >
-        <!-- 品名称 -->
+        <!-- 品名称 -->
         <div
           v-if="property.fields.name.show"
           :class="[
@@ -52,11 +52,11 @@
         >
           {{ spu.name }}
         </div>
-        <!-- 品简介 -->
+        <!-- 品简介 -->
         <div
           v-if="property.fields.introduction.show"
-          class="truncate text-12px"
           :style="{ color: property.fields.introduction.color }"
+          class="truncate text-12px"
         >
           {{ spu.introduction }}
         </div>
@@ -64,16 +64,16 @@
           <!-- 价格 -->
           <span
             v-if="property.fields.price.show"
-            class="text-16px"
             :style="{ color: property.fields.price.color }"
+            class="text-16px"
           >
             ¥{{ fenToYuan(spu.price || Infinity) }}
           </span>
           <!-- 市场价 -->
           <span
             v-if="property.fields.marketPrice.show && spu.marketPrice"
-            class="ml-4px text-10px line-through"
             :style="{ color: property.fields.marketPrice.color }"
+            class="ml-4px text-10px line-through"
             >¥{{ fenToYuan(spu.marketPrice) }}</span
           >
         </div>
@@ -96,25 +96,25 @@
         <!-- 文字按钮 -->
         <span
           v-if="property.btnBuy.type === 'text'"
-          class="rounded-full p-x-12px p-y-4px text-12px text-white"
           :style="{
             background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`
           }"
+          class="rounded-full p-x-12px p-y-4px text-12px text-white"
         >
           {{ property.btnBuy.text }}
         </span>
         <!-- 图片按钮 -->
         <el-image
           v-else
+          :src="property.btnBuy.imgUrl"
           class="h-28px w-28px rounded-full"
           fit="cover"
-          :src="property.btnBuy.imgUrl"
         />
       </div>
     </div>
   </div>
 </template>
-<script setup lang="ts">
+<script lang="ts" setup>
 import { PromotionSeckillProperty } from './config'
 import * as ProductSpuApi from '@/api/mall/product/spu'
 import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity'
@@ -124,7 +124,7 @@ import { fenToYuan } from '@/utils'
 defineOptions({ name: 'PromotionSeckill' })
 // 定义属性
 const props = defineProps<{ property: PromotionSeckillProperty }>()
-// 品列表
+// 品列表
 const spuList = ref<ProductSpuApi.Spu[]>([])
 const spuIdList = ref<number[]>([])
 const seckillActivityList = ref<SeckillActivityApi.SeckillActivityVO[]>([])
@@ -171,11 +171,11 @@ watch(
 )
 
 /**
- * 计算品的间距
- * @param index 品索引
+ * 计算品的间距
+ * @param index 品索引
  */
 const calculateSpace = (index: number) => {
-  // 品的列数
+  // 品的列数
   const columns = props.property.layoutType === 'twoCol' ? 2 : 1
   // 第一列没有左边距
   const marginLeft = index % columns === 0 ? '0' : props.property.space + 'px'
@@ -187,7 +187,7 @@ const calculateSpace = (index: number) => {
 
 // 容器
 const containerRef = ref()
-// 计算品的宽度
+// 计算品的宽度
 const calculateWidth = () => {
   let width = '100%'
   // 双列时每列的宽度为:(总宽度 - 间距)/ 2
@@ -198,4 +198,4 @@ const calculateWidth = () => {
 }
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 20 - 20
src/components/DiyEditor/components/mobile/PromotionSeckill/property.vue

@@ -1,10 +1,10 @@
 <template>
   <ComponentContainerProperty v-model="formData.style">
-    <el-form label-width="80px" :model="formData">
-      <el-card header="秒杀活动" class="property-group" shadow="never">
+    <el-form :model="formData" label-width="80px">
+      <el-card class="property-group" header="秒杀活动" shadow="never">
         <SeckillShowcase v-model="formData.activityIds" />
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="布局" prop="type">
           <el-radio-group v-model="formData.layoutType">
             <el-tooltip class="item" content="单列大图" placement="bottom">
@@ -29,19 +29,19 @@
             </el-tooltip>-->
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="品名称" prop="fields.name.show">
+        <el-form-item label="品名称" prop="fields.name.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.name.color" />
             <el-checkbox v-model="formData.fields.name.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品简介" prop="fields.introduction.show">
+        <el-form-item label="品简介" prop="fields.introduction.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.introduction.color" />
             <el-checkbox v-model="formData.fields.introduction.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品价格" prop="fields.price.show">
+        <el-form-item label="品价格" prop="fields.price.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.price.color" />
             <el-checkbox v-model="formData.fields.price.show" />
@@ -53,30 +53,30 @@
             <el-checkbox v-model="formData.fields.marketPrice.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品销量" prop="fields.salesCount.show">
+        <el-form-item label="品销量" prop="fields.salesCount.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.salesCount.color" />
             <el-checkbox v-model="formData.fields.salesCount.show" />
           </div>
         </el-form-item>
-        <el-form-item label="品库存" prop="fields.stock.show">
+        <el-form-item label="品库存" prop="fields.stock.show">
           <div class="flex gap-8px">
             <ColorInput v-model="formData.fields.stock.color" />
             <el-checkbox v-model="formData.fields.stock.show" />
           </div>
         </el-form-item>
       </el-card>
-      <el-card header="角标" class="property-group" shadow="never">
+      <el-card class="property-group" header="角标" shadow="never">
         <el-form-item label="角标" prop="badge.show">
           <el-switch v-model="formData.badge.show" />
         </el-form-item>
-        <el-form-item label="角标" prop="badge.imgUrl" v-if="formData.badge.show">
+        <el-form-item v-if="formData.badge.show" label="角标" prop="badge.imgUrl">
           <UploadImg v-model="formData.badge.imgUrl" height="44px" width="72px">
             <template #tip> 建议尺寸:36 * 22</template>
           </UploadImg>
         </el-form-item>
       </el-card>
-      <el-card header="按钮" class="property-group" shadow="never">
+      <el-card class="property-group" header="按钮" shadow="never">
         <el-form-item label="按钮类型" prop="btnBuy.type">
           <el-radio-group v-model="formData.btnBuy.type">
             <el-radio-button value="text">文字</el-radio-button>
@@ -102,15 +102,15 @@
           </el-form-item>
         </template>
       </el-card>
-      <el-card header="商品样式" class="property-group" shadow="never">
+      <el-card class="property-group" header="产品样式" shadow="never">
         <el-form-item label="上圆角" prop="borderRadiusTop">
           <el-slider
             v-model="formData.borderRadiusTop"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="下圆角" prop="borderRadiusBottom">
@@ -118,9 +118,9 @@
             v-model="formData.borderRadiusBottom"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
         <el-form-item label="间隔" prop="space">
@@ -128,9 +128,9 @@
             v-model="formData.space"
             :max="100"
             :min="0"
-            show-input
-            input-size="small"
             :show-input-controls="false"
+            input-size="small"
+            show-input
           />
         </el-form-item>
       </el-card>
@@ -138,7 +138,7 @@
   </ComponentContainerProperty>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { PromotionSeckillProperty } from './config'
 import { useVModel } from '@vueuse/core'
 import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity'
@@ -161,4 +161,4 @@ onMounted(async () => {
 })
 </script>
 
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 1 - 1
src/components/DiyEditor/components/mobile/SearchBar/config.ts

@@ -25,7 +25,7 @@ export const component = {
     height: 28,
     showScan: false,
     borderRadius: 0,
-    placeholder: '搜索品',
+    placeholder: '搜索品',
     placeholderPosition: 'left',
     backgroundColor: 'rgb(238, 238, 238)',
     textColor: 'rgb(150, 151, 153)',

+ 8 - 7
src/components/DiyEditor/components/mobile/SearchBar/index.vue

@@ -1,46 +1,47 @@
 <template>
   <div
-    class="search-bar"
     :style="{
       color: property.textColor
     }"
+    class="search-bar"
   >
     <!-- 搜索框 -->
     <div
-      class="inner"
       :style="{
         height: `${property.height}px`,
         background: property.backgroundColor,
         borderRadius: `${property.borderRadius}px`
       }"
+      class="inner"
     >
       <div
-        class="placeholder"
         :style="{
           justifyContent: property.placeholderPosition
         }"
+        class="placeholder"
       >
         <Icon icon="ep:search" />
-        <span>{{ property.placeholder || '搜索品' }}</span>
+        <span>{{ property.placeholder || '搜索品' }}</span>
       </div>
       <div class="right">
         <!-- 搜索热词 -->
         <span v-for="(keyword, index) in property.hotKeywords" :key="index">{{ keyword }}</span>
         <!-- 扫一扫 -->
-        <Icon icon="ant-design:scan-outlined" v-show="property.showScan" />
+        <Icon v-show="property.showScan" icon="ant-design:scan-outlined" />
       </div>
     </div>
   </div>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { SearchProperty } from './config'
+
 /** 搜索框 */
 defineOptions({ name: 'SearchBar' })
 defineProps<{ property: SearchProperty }>()
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .search-bar {
   /* 搜索框 */
   .inner {

+ 1 - 1
src/components/DiyEditor/util.ts

@@ -105,7 +105,7 @@ export const PAGE_LIBS = [
       'HotZone'
     ]
   },
-  { name: '品组件', extended: true, components: ['ProductCard', 'ProductList'] },
+  { name: '品组件', extended: true, components: ['ProductCard', 'ProductList'] },
   {
     name: '用户组件',
     extended: true,

+ 5 - 5
src/router/modules/remaining.ts

@@ -346,7 +346,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
     ]
   },
   {
-    path: '/mall/product', // 品中心
+    path: '/mall/product', // 品中心
     component: Layout,
     name: 'ProductCenter',
     meta: {
@@ -362,7 +362,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
           hidden: true,
           canTo: true,
           icon: 'ep:edit',
-          title: '品添加',
+          title: '品添加',
           activeMenu: '/mall/product/spu'
         }
       },
@@ -375,7 +375,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
           hidden: true,
           canTo: true,
           icon: 'ep:edit',
-          title: '品编辑',
+          title: '品编辑',
           activeMenu: '/mall/product/spu'
         }
       },
@@ -388,7 +388,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
           hidden: true,
           canTo: true,
           icon: 'ep:view',
-          title: '品详情',
+          title: '品详情',
           activeMenu: '/mall/product/spu'
         }
       },
@@ -401,7 +401,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
           hidden: true,
           canTo: true,
           icon: 'ep:view',
-          title: '品属性值',
+          title: '品属性值',
           activeMenu: '/product/property'
         }
       }

+ 4 - 4
src/utils/constants.ts

@@ -199,9 +199,9 @@ export const PayOrderStatusEnum = {
   }
 }
 
-// ========== MALL - 品模块 ==========
+// ========== MALL - 品模块 ==========
 /**
- * 品 SPU 状态
+ * 品 SPU 状态
  */
 export const ProductSpuStatusEnum = {
   RECYCLE: {
@@ -252,7 +252,7 @@ export const CouponTemplateTakeTypeEnum = {
 }
 
 /**
- * 营销的品范围枚举
+ * 营销的品范围枚举
  */
 export const PromotionProductScopeEnum = {
   ALL: {
@@ -261,7 +261,7 @@ export const PromotionProductScopeEnum = {
   },
   SPU: {
     scope: 2,
-    name: '品劵'
+    name: '品劵'
   },
   CATEGORY: {
     scope: 3,

+ 4 - 4
src/utils/dict.ts

@@ -169,8 +169,8 @@ export enum DICT_TYPE {
   MEMBER_POINT_BIZ_TYPE = 'member_point_biz_type', // 积分的业务类型
   MEMBER_EXPERIENCE_BIZ_TYPE = 'member_experience_biz_type', // 会员经验业务类型
 
-  // ========== MALL - 品模块 ==========
-  PRODUCT_SPU_STATUS = 'product_spu_status', //品状态
+  // ========== MALL - 品模块 ==========
+  PRODUCT_SPU_STATUS = 'product_spu_status', //品状态
 
   // ========== MALL - 交易模块 ==========
   EXPRESS_CHARGE_MODE = 'trade_delivery_express_charge_mode', //快递的计费方式
@@ -191,7 +191,7 @@ export enum DICT_TYPE {
 
   // ========== MALL - 营销模块 ==========
   PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型
-  PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的品范围
+  PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的品范围
   PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型
   PROMOTION_COUPON_STATUS = 'promotion_coupon_status', // 优惠劵的状态
   PROMOTION_COUPON_TAKE_TYPE = 'promotion_coupon_take_type', // 优惠劵的领取方式
@@ -208,7 +208,7 @@ export enum DICT_TYPE {
   CRM_CUSTOMER_INDUSTRY = 'crm_customer_industry', // CRM 客户所属行业
   CRM_CUSTOMER_LEVEL = 'crm_customer_level', // CRM 客户级别
   CRM_CUSTOMER_SOURCE = 'crm_customer_source', // CRM 客户来源
-  CRM_PRODUCT_STATUS = 'crm_product_status', // CRM 品状态
+  CRM_PRODUCT_STATUS = 'crm_product_status', // CRM 品状态
   CRM_PERMISSION_LEVEL = 'crm_permission_level', // CRM 数据权限的级别
   CRM_PRODUCT_UNIT = 'crm_product_unit', // CRM 产品单位
   CRM_FOLLOW_UP_TYPE = 'crm_follow_up_type', // CRM 跟进方式

+ 3 - 3
src/views/mall/home/components/OperationDataCard.vue

@@ -38,8 +38,8 @@ const data = reactive({
   orderAfterSaleApply: { name: '退款中订单', value: 4, routerName: 'TradeAfterSale' },
   orderWaitePickUp: { name: '待核销订单', value: 0, routerName: 'TradeOrder' },
   productAlertStock: { name: '库存预警', value: 0, routerName: 'ProductSpu' },
-  productForSale: { name: '上架品', value: 0, routerName: 'ProductSpu' },
-  productInWarehouse: { name: '仓库品', value: 0, routerName: 'ProductSpu' },
+  productForSale: { name: '上架品', value: 0, routerName: 'ProductSpu' },
+  productInWarehouse: { name: '仓库品', value: 0, routerName: 'ProductSpu' },
   withdrawAuditing: { name: '提现待审核', value: 0, routerName: 'TradeBrokerageWithdraw' },
   rechargePrice: {
     name: '账户充值',
@@ -67,7 +67,7 @@ const getOrderData = async () => {
   }
 }
 
-/** 查询品数据 */
+/** 查询品数据 */
 const getProductData = async () => {
   // TODO: @芋艿:这个接口的返回值,是不是用命名字段更好些?
   const productCount = await ProductSpuApi.getTabsCount()

+ 1 - 1
src/views/mall/home/components/ShortcutCard.vue

@@ -33,7 +33,7 @@ const router = useRouter() // 路由
 const menuList = [
   { name: '用户管理', icon: 'ep:user-filled', bgColor: 'bg-red-400', routerName: 'MemberUser' },
   {
-    name: '品管理',
+    name: '品管理',
     icon: 'fluent-mdl2:product',
     bgColor: 'bg-orange-400',
     routerName: 'ProductSpu'

+ 3 - 3
src/views/mall/product/category/components/ProductCategorySelect.vue

@@ -2,12 +2,12 @@
   <el-tree-select
     v-model="selectCategoryId"
     :data="categoryList"
-    :props="defaultProps"
     :multiple="multiple"
+    :props="defaultProps"
     :show-checkbox="multiple"
     class="w-1/1"
     node-key="id"
-    placeholder="请选择品分类"
+    placeholder="请选择品分类"
   />
 </template>
 <script lang="ts" setup>
@@ -16,7 +16,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
 import { oneOfType } from 'vue-types'
 import { propTypes } from '@/utils/propTypes'
 
-/** 品分类选择组件 */
+/** 品分类选择组件 */
 defineOptions({ name: 'ProductCategorySelect' })
 
 const props = defineProps({

+ 3 - 3
src/views/mall/product/category/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <doc-alert title="【商品】商品分类" url="https://doc.iocoder.cn/mall/product-category/" />
+  <doc-alert title="【产品】产品分类" url="https://doc.iocoder.cn/mall/product-category/" />
 
   <!-- 搜索工作栏 -->
   <ContentWrap>
@@ -73,7 +73,7 @@
             @click="handleViewSpu(scope.row.id)"
             v-hasPermi="['product:spu:query']"
           >
-            查看
+            查看
           </el-button>
           <el-button
             link
@@ -151,7 +151,7 @@ const handleDelete = async (id: number) => {
   } catch {}
 }
 
-/** 查看品操作 */
+/** 查看品操作 */
 const router = useRouter() // 路由
 const handleViewSpu = (id: number) => {
   router.push({

+ 3 - 3
src/views/mall/product/comment/CommentForm.vue

@@ -7,10 +7,10 @@
       :rules="formRules"
       label-width="100px"
     >
-      <el-form-item label="品" prop="spuId">
+      <el-form-item label="品" prop="spuId">
         <SpuShowcase v-model="formData.spuId" :limit="1" />
       </el-form-item>
-      <el-form-item v-if="formData.spuId" label="品规格" prop="skuId">
+      <el-form-item v-if="formData.spuId" label="品规格" prop="skuId">
         <div class="h-60px w-60px" @click="handleSelectSku">
           <div v-if="skuData && skuData.picUrl">
             <el-image :src="skuData.picUrl" />
@@ -72,7 +72,7 @@ const formData = ref({
   picUrls: []
 })
 const formRules = reactive({
-  spuId: [{ required: true, message: '品不能为空', trigger: 'blur' }],
+  spuId: [{ required: true, message: '品不能为空', trigger: 'blur' }],
   skuId: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
   userAvatar: [{ required: true, message: '用户头像不能为空', trigger: 'blur' }],
   userNickname: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],

+ 40 - 40
src/views/mall/product/comment/index.vue

@@ -1,72 +1,72 @@
 <template>
-  <doc-alert title="【商品】商品评价" url="https://doc.iocoder.cn/mall/product-comment/" />
+  <doc-alert title="【产品】产品评价" url="https://doc.iocoder.cn/mall/product-comment/" />
 
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <el-form
-      class="-mb-15px"
-      :model="queryParams"
       ref="queryFormRef"
       :inline="true"
+      :model="queryParams"
+      class="-mb-15px"
       label-width="68px"
     >
       <el-form-item label="回复状态" prop="replyStatus">
         <el-select v-model="queryParams.replyStatus" class="!w-240px">
-          <el-option label="已回复" :value="true" />
-          <el-option label="未回复" :value="false" />
+          <el-option :value="true" label="已回复" />
+          <el-option :value="false" label="未回复" />
         </el-select>
       </el-form-item>
-      <el-form-item label="品名称" prop="spuName">
+      <el-form-item label="品名称" prop="spuName">
         <el-input
           v-model="queryParams.spuName"
-          placeholder="请输入商品名称"
-          @keyup.enter="handleQuery"
           class="!w-240px"
+          placeholder="请输入产品名称"
+          @keyup.enter="handleQuery"
         />
       </el-form-item>
       <el-form-item label="用户名称" prop="userNickname">
         <el-input
           v-model="queryParams.userNickname"
+          class="!w-240px"
           placeholder="请输入用户名称"
           @keyup.enter="handleQuery"
-          class="!w-240px"
         />
       </el-form-item>
       <el-form-item label="订单编号" prop="orderId">
         <el-input
           v-model="queryParams.orderId"
+          class="!w-240px"
           placeholder="请输入订单编号"
           @keyup.enter="handleQuery"
-          class="!w-240px"
         />
       </el-form-item>
       <el-form-item label="评论时间" prop="createTime">
         <el-date-picker
           v-model="queryParams.createTime"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
           :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
           class="!w-240px"
+          end-placeholder="结束日期"
+          start-placeholder="开始日期"
+          type="daterange"
+          value-format="YYYY-MM-DD HH:mm:ss"
         />
       </el-form-item>
       <el-form-item>
         <el-button @click="handleQuery">
-          <Icon icon="ep:search" class="mr-5px" />
+          <Icon class="mr-5px" icon="ep:search" />
           搜索
         </el-button>
         <el-button @click="resetQuery">
-          <Icon icon="ep:refresh" class="mr-5px" />
+          <Icon class="mr-5px" icon="ep:refresh" />
           重置
         </el-button>
         <el-button
-          type="primary"
+          v-hasPermi="['product:comment:create']"
           plain
+          type="primary"
           @click="openForm('create')"
-          v-hasPermi="['product:comment:create']"
         >
-          <Icon icon="ep:plus" class="mr-5px" />
+          <Icon class="mr-5px" icon="ep:plus" />
           添加虚拟评论
         </el-button>
       </el-form-item>
@@ -75,15 +75,15 @@
 
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="false">
-      <el-table-column label="评论编号" align="center" prop="id" min-width="80" />
-      <el-table-column label="商品信息" align="center" min-width="400">
+    <el-table v-loading="loading" :data="list" :show-overflow-tooltip="false" :stripe="true">
+      <el-table-column align="center" label="评论编号" min-width="80" prop="id" />
+      <el-table-column align="center" label="产品信息" min-width="400">
         <template #default="scope">
           <div class="row flex items-center gap-x-4px">
             <el-image
               v-if="scope.row.skuPicUrl"
-              :src="scope.row.skuPicUrl"
               :preview-src-list="[scope.row.skuPicUrl]"
+              :src="scope.row.skuPicUrl"
               class="h-40px w-40px shrink-0"
               preview-teleported
             />
@@ -98,19 +98,19 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="用户名称" align="center" prop="userNickname" width="100" />
-      <el-table-column label="商品评分" align="center" prop="descriptionScores" width="90" />
-      <el-table-column label="服务评分" align="center" prop="benefitScores" width="90" />
-      <el-table-column label="评论内容" align="center" prop="content" min-width="210">
+      <el-table-column align="center" label="用户名称" prop="userNickname" width="100" />
+      <el-table-column align="center" label="产品评分" prop="descriptionScores" width="90" />
+      <el-table-column align="center" label="服务评分" prop="benefitScores" width="90" />
+      <el-table-column align="center" label="评论内容" min-width="210" prop="content">
         <template #default="scope">
           <p>{{ scope.row.content }}</p>
           <div class="flex justify-center gap-x-4px">
             <el-image
               v-for="(picUrl, index) in scope.row.picUrls"
               :key="index"
-              :src="picUrl"
-              :preview-src-list="scope.row.picUrls"
               :initial-index="index"
+              :preview-src-list="scope.row.picUrls"
+              :src="picUrl"
               class="h-40px w-40px"
               preview-teleported
             />
@@ -118,37 +118,37 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="回复内容"
         align="center"
-        prop="replyContent"
+        label="回复内容"
         min-width="250"
+        prop="replyContent"
         show-overflow-tooltip
       />
       <el-table-column
-        label="评论时间"
+        :formatter="dateFormatter"
         align="center"
+        label="评论时间"
         prop="createTime"
-        :formatter="dateFormatter"
         width="180"
       />
-      <el-table-column label="是否展示" align="center" width="80px">
+      <el-table-column align="center" label="是否展示" width="80px">
         <template #default="scope">
           <el-switch
             v-model="scope.row.visible"
+            v-hasPermi="['product:comment:update']"
             :active-value="true"
             :inactive-value="false"
-            v-hasPermi="['product:comment:update']"
             @change="handleVisibleChange(scope.row)"
           />
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" min-width="60px" fixed="right">
+      <el-table-column align="center" fixed="right" label="操作" min-width="60px">
         <template #default="scope">
           <el-button
+            v-hasPermi="['product:comment:update']"
             link
             type="primary"
             @click="handleReply(scope.row.id)"
-            v-hasPermi="['product:comment:update']"
           >
             回复
           </el-button>
@@ -157,9 +157,9 @@
     </el-table>
     <!-- 分页 -->
     <Pagination
-      :total="total"
-      v-model:page="queryParams.pageNo"
       v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
       @pagination="getList"
     />
   </ContentWrap>
@@ -170,7 +170,7 @@
   <ReplyForm ref="replyFormRef" @success="getList" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { dateFormatter } from '@/utils/formatTime'
 import * as CommentApi from '@/api/mall/product/comment'
 import CommentForm from './CommentForm.vue'

+ 3 - 3
src/views/mall/product/property/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <doc-alert title="【商品】商品属性" url="https://doc.iocoder.cn/mall/product-property/" />
+  <doc-alert title="【产品】产品属性" url="https://doc.iocoder.cn/mall/product-property/" />
 
   <!-- 搜索工作栏 -->
   <ContentWrap>
@@ -56,7 +56,7 @@
   <ContentWrap>
     <el-table v-loading="loading" :data="list">
       <el-table-column align="center" label="编号" min-width="60" prop="id" />
-      <el-table-column align="center" label="属性名称" prop="name" min-width="150" />
+      <el-table-column align="center" label="属性名称" min-width="150" prop="name" />
       <el-table-column :show-overflow-tooltip="true" align="center" label="备注" prop="remark" />
       <el-table-column
         :formatter="dateFormatter"
@@ -165,7 +165,7 @@ const handleDelete = async (id: number) => {
   } catch {}
 }
 
-/** 跳转品属性列表 */
+/** 跳转品属性列表 */
 const goValueList = (id: number) => {
   push({ name: 'ProductPropertyValue', params: { propertyId: id } })
 }

+ 15 - 15
src/views/mall/product/spu/components/SkuList.vue

@@ -14,7 +14,7 @@
       </template>
     </el-table-column>
     <template v-if="formData!.specType && !isBatch">
-      <!--  根据品属性动态添加 -->
+      <!--  根据品属性动态添加 -->
       <el-table-column
         v-for="(item, index) in tableHeaders"
         :key="index"
@@ -29,7 +29,7 @@
         </template>
       </el-table-column>
     </template>
-    <el-table-column align="center" label="品条码" min-width="168">
+    <el-table-column align="center" label="品条码" min-width="168">
       <template #default="{ row }">
         <el-input v-model="row.barCode" class="w-100%" />
       </template>
@@ -158,7 +158,7 @@
       </template>
     </el-table-column>
     <template v-if="formData!.specType && !isBatch">
-      <!--  根据品属性动态添加 -->
+      <!--  根据品属性动态添加 -->
       <el-table-column
         v-for="(item, index) in tableHeaders"
         :key="index"
@@ -173,7 +173,7 @@
         </template>
       </el-table-column>
     </template>
-    <el-table-column align="center" label="品条码" min-width="100">
+    <el-table-column align="center" label="品条码" min-width="100">
       <template #default="{ row }">
         {{ row.barCode }}
       </template>
@@ -238,7 +238,7 @@
       </template>
     </el-table-column>
     <template v-if="formData!.specType">
-      <!--  根据品属性动态添加 -->
+      <!--  根据品属性动态添加 -->
       <el-table-column
         v-for="(item, index) in tableHeaders"
         :key="index"
@@ -253,7 +253,7 @@
         </template>
       </el-table-column>
     </template>
-    <el-table-column align="center" label="品条码" min-width="100">
+    <el-table-column align="center" label="品条码" min-width="100">
       <template #default="{ row }">
         {{ row.barCode }}
       </template>
@@ -318,20 +318,20 @@ const props = defineProps({
 const formData: Ref<Spu | undefined> = ref<Spu>() // 表单数据
 const skuList = ref<Sku[]>([
   {
-    price: 0, // 品价格
+    price: 0, // 品价格
     marketPrice: 0, // 市场价
     costPrice: 0, // 成本价
-    barCode: '', // 品条码
+    barCode: '', // 品条码
     picUrl: '', // 图片地址
     stock: 0, // 库存
-    weight: 0, // 品重量
-    volume: 0, // 品体积
+    weight: 0, // 品重量
+    volume: 0, // 品体积
     firstBrokeragePrice: 0, // 一级分销的佣金
     secondBrokeragePrice: 0 // 二级分销的佣金
   }
 ]) // 批量添加时的临时数据
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     zIndex: 9999999,
@@ -346,9 +346,9 @@ const batchAdd = () => {
     copyValueToTarget(item, skuList.value[0])
   })
 }
-/** 校验品属性属性值 */
+/** 校验品属性属性值 */
 const validateProperty = () => {
-  // 校验品属性属性值是否为空,有一个为空都不给过
+  // 校验品属性属性值是否为空,有一个为空都不给过
   const warningInfo = '存在属性属性值为空,请先检查完善属性值后重试!!!'
   for (const item of props.propertyList) {
     if (!item.values || isEmpty(item.values)) {
@@ -367,11 +367,11 @@ const deleteSku = (row) => {
 }
 const tableHeaders = ref<{ prop: string; label: string }[]>([]) // 多属性表头
 /**
- * 保存时,每个品规格的表单要校验下。例如说,销售金额最低是 0.01 这种。
+ * 保存时,每个品规格的表单要校验下。例如说,销售金额最低是 0.01 这种。
  */
 const validateSku = () => {
   validateProperty()
-  let warningInfo = '请检查品各行相关属性配置,'
+  let warningInfo = '请检查品各行相关属性配置,'
   let validate = true // 默认通过
   for (const sku of formData.value!.skus!) {
     // 作为活动组件的校验

+ 4 - 4
src/views/mall/product/spu/components/SkuTableSelect.vue

@@ -3,7 +3,7 @@
     <el-table v-loading="loading" :data="list" show-overflow-tooltip>
       <el-table-column label="#" width="55">
         <template #default="{ row }">
-          <el-radio :value="row.id" v-model="selectedSkuId" @change="handleSelected(row)"
+          <el-radio v-model="selectedSkuId" :value="row.id" @change="handleSelected(row)"
             >&nbsp;
           </el-radio>
         </template>
@@ -11,14 +11,14 @@
       <el-table-column label="图片" min-width="80">
         <template #default="{ row }">
           <el-image
+            :preview-src-list="[row.picUrl]"
             :src="row.picUrl"
             class="h-30px w-30px"
-            :preview-src-list="[row.picUrl]"
             preview-teleported
           />
         </template>
       </el-table-column>
-      <el-table-column label="规格" align="center" min-width="80">
+      <el-table-column align="center" label="规格" min-width="80">
         <template #default="{ row }">
           {{ row.properties?.map((p) => p.valueName)?.join(' ') }}
         </template>
@@ -49,7 +49,7 @@ const list = ref<any[]>([]) // 列表的数据
 const loading = ref(false) // 列表的加载中
 const dialogVisible = ref(false) // 弹窗的是否展示
 
-const selectedSkuId = ref() // 选中的品 spuId
+const selectedSkuId = ref() // 选中的品 spuId
 
 /** 选中时触发 */
 const handleSelected = (row: ProductSpuApi.Sku) => {

+ 11 - 11
src/views/mall/product/spu/components/SpuShowcase.vue

@@ -13,13 +13,13 @@
         </div>
       </el-tooltip>
     </div>
-    <el-tooltip content="选择商品" v-if="canAdd">
+    <el-tooltip v-if="canAdd" content="选择产品">
       <div class="select-box" @click="openSpuTableSelect">
         <Icon icon="ep:plus" />
       </div>
     </el-tooltip>
   </div>
-  <!-- 品选择对话框(表格形式) -->
+  <!-- 品选择对话框(表格形式) -->
   <SpuTableSelect ref="spuTableSelectRef" :multiple="limit != 1" @change="handleSpuSelected" />
 </template>
 <script lang="ts" setup>
@@ -29,8 +29,8 @@ import { propTypes } from '@/utils/propTypes'
 import { oneOfType } from 'vue-types'
 import { isArray } from '@/utils/is'
 
-// 商品橱窗,一般用于与商品建立关系时使用
-// 提供功能:展示商品列表、添加商品、移除商
+// 产品橱窗,一般用于与产品建立关系时使用
+// 提供功能:展示产品列表、添加产品、移除产
 defineOptions({ name: 'SpuShowcase' })
 
 const props = defineProps({
@@ -50,7 +50,7 @@ const canAdd = computed(() => {
   return productSpus.value.length < props.limit
 })
 
-// 品列表
+// 品列表
 const productSpus = ref<ProductSpuApi.Spu[]>([])
 
 watch(
@@ -68,7 +68,7 @@ watch(
       productSpus.value = []
       return
     }
-    // 只有商品发生变化之后,才去查询商
+    // 只有产品发生变化之后,才去查询产
     if (productSpus.value.length === 0 || productSpus.value.some((spu) => !ids.includes(spu.id!))) {
       productSpus.value = await ProductSpuApi.getSpuDetailList(ids)
     }
@@ -76,7 +76,7 @@ watch(
   { immediate: true }
 )
 
-/** 品表格选择对话框 */
+/** 品表格选择对话框 */
 const spuTableSelectRef = ref()
 // 打开对话框
 const openSpuTableSelect = () => {
@@ -84,9 +84,9 @@ const openSpuTableSelect = () => {
 }
 
 /**
- * 选择品后触发
+ * 选择品后触发
  *
- * @param spus 选中的品列表
+ * @param spus 选中的品列表
  */
 const handleSpuSelected = (spus: ProductSpuApi.Spu | ProductSpuApi.Spu[]) => {
   productSpus.value = isArray(spus) ? spus : [spus]
@@ -94,9 +94,9 @@ const handleSpuSelected = (spus: ProductSpuApi.Spu | ProductSpuApi.Spu[]) => {
 }
 
 /**
- * 删除
+ * 删除
  *
- * @param index 品索引
+ * @param index 品索引
  */
 const handleRemoveSpu = (index: number) => {
   productSpus.value.splice(index, 1)

+ 24 - 24
src/views/mall/product/spu/components/SpuTableSelect.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" :appendToBody="true" title="选择品" width="70%">
+  <Dialog v-model="dialogVisible" :appendToBody="true" title="选择品" width="70%">
     <ContentWrap>
       <el-form
         ref="queryFormRef"
@@ -8,16 +8,16 @@
         class="-mb-15px"
         label-width="68px"
       >
-        <el-form-item label="品名称" prop="name">
+        <el-form-item label="品名称" prop="name">
           <el-input
             v-model="queryParams.name"
             class="!w-240px"
             clearable
-            placeholder="请输入品名称"
+            placeholder="请输入品名称"
             @keyup.enter="handleQuery"
           />
         </el-form-item>
-        <el-form-item label="品分类" prop="categoryId">
+        <el-form-item label="品分类" prop="categoryId">
           <el-tree-select
             v-model="queryParams.categoryId"
             :data="categoryTreeList"
@@ -25,7 +25,7 @@
             check-strictly
             class="!w-240px"
             node-key="id"
-            placeholder="请选择品分类"
+            placeholder="请选择品分类"
           />
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -52,7 +52,7 @@
       </el-form>
       <el-table v-loading="loading" :data="list" show-overflow-tooltip>
         <!-- 1. 多选模式(不能使用type="selection",Element会忽略Header插槽) -->
-        <el-table-column width="55" v-if="multiple">
+        <el-table-column v-if="multiple" width="55">
           <template #header>
             <el-checkbox
               v-model="isCheckAll"
@@ -68,27 +68,27 @@
           </template>
         </el-table-column>
         <!-- 2. 单选模式 -->
-        <el-table-column label="#" width="55" v-else>
+        <el-table-column v-else label="#" width="55">
           <template #default="{ row }">
-            <el-radio :value="row.id" v-model="selectedSpuId" @change="handleSingleSelected(row)">
+            <el-radio v-model="selectedSpuId" :value="row.id" @change="handleSingleSelected(row)">
               <!-- 空格不能省略,是为了让单选框不显示label,如果不指定label不会有选中的效果 -->
               &nbsp;
             </el-radio>
           </template>
         </el-table-column>
-        <el-table-column key="id" align="center" label="商品编号" prop="id" min-width="60" />
-        <el-table-column label="品图" min-width="80">
+        <el-table-column key="id" align="center" label="产品编号" min-width="60" prop="id" />
+        <el-table-column label="品图" min-width="80">
           <template #default="{ row }">
             <el-image
+              :preview-src-list="[row.picUrl]"
               :src="row.picUrl"
               class="h-30px w-30px"
-              :preview-src-list="[row.picUrl]"
               preview-teleported
             />
           </template>
         </el-table-column>
-        <el-table-column label="品名称" min-width="200" prop="name" />
-        <el-table-column label="品分类" min-width="100" prop="categoryId">
+        <el-table-column label="品名称" min-width="200" prop="name" />
+        <el-table-column label="品分类" min-width="100" prop="categoryId">
           <template #default="{ row }">
             <span>{{ categoryList?.find((c) => c.id === row.categoryId)?.name }}</span>
           </template>
@@ -102,7 +102,7 @@
         @pagination="getList"
       />
     </ContentWrap>
-    <template #footer v-if="multiple">
+    <template v-if="multiple" #footer>
       <el-button type="primary" @click="handleEmitChange">确 定</el-button>
       <el-button @click="dialogVisible = false">取 消</el-button>
     </template>
@@ -120,13 +120,13 @@ import { CHANGE_EVENT } from 'element-plus'
 type Spu = Required<ProductSpuApi.Spu>
 
 /**
- * 品表格选择对话框
+ * 品表格选择对话框
  * 1. 单选模式:
  *    1.1 点击表格左侧的单选框时,结束选择,并关闭对话框
  *    1.2 再次打开时,保持选中状态
  * 2. 多选模式:
- *    2.1 点击表格左侧的多选框时,记录选中的
- *    2.2 切换分页时,保持品的选中的状态
+ *    2.1 点击表格左侧的多选框时,记录选中的
+ *    2.2 切换分页时,保持品的选中的状态
  *    2.3 点击右下角的确定按钮时,结束选择,关闭对话框
  *    2.4 再次打开时,保持选中状态
  */
@@ -149,7 +149,7 @@ const dialogVisible = ref(false)
 const queryParams = ref({
   pageNo: 1,
   pageSize: 10,
-  // 默认获取上架的
+  // 默认获取上架的
   tabType: 0,
   name: '',
   categoryId: null,
@@ -205,7 +205,7 @@ const resetQuery = () => {
   queryParams.value = {
     pageNo: 1,
     pageSize: 10,
-    // 默认获取上架的
+    // 默认获取上架的
     tabType: 0,
     name: '',
     categoryId: null,
@@ -218,12 +218,12 @@ const resetQuery = () => {
 const isCheckAll = ref(false)
 // 全选框是否处于中间状态:不是全部选中 && 任意一个选中
 const isIndeterminate = ref(false)
-// 选中的
+// 选中的
 const checkedSpus = ref<Spu[]>([])
-// 选中状态:key为品ID,value为是否选中
+// 选中状态:key为品ID,value为是否选中
 const checkedStatus = ref<Record<string, boolean>>({})
 
-// 选中的品 spuId
+// 选中的品 spuId
 const selectedSpuId = ref()
 /** 单选中时触发 */
 const handleSingleSelected = (spu: Spu) => {
@@ -257,7 +257,7 @@ const handleCheckAll = (checked: boolean) => {
 /**
  * 选中一行
  * @param checked 是否选中
- * @param spu 
+ * @param spu 
  * @param isCalcCheckAll 是否计算全选
  */
 const handleCheckOne = (checked: boolean, spu: Spu, isCalcCheckAll: boolean) => {
@@ -279,7 +279,7 @@ const handleCheckOne = (checked: boolean, spu: Spu, isCalcCheckAll: boolean) =>
   }
 }
 
-// 查找商品在已选中商品列表中的索引
+// 查找产品在已选中产品列表中的索引
 const findCheckedIndex = (spu: Spu) => checkedSpus.value.findIndex((item) => item.id === spu.id)
 
 // 计算全选框状态

+ 1 - 1
src/views/mall/product/spu/components/index.ts

@@ -24,7 +24,7 @@ interface RuleConfig {
 }
 
 /**
- * 获得商品的规格列表 - 商品相关的公共函数
+ * 获得产品的规格列表 - 产品相关的公共函数
  *
  * @param spu
  * @return PropertyAndValues 规格列表

+ 4 - 4
src/views/mall/product/spu/form/DeliveryForm.vue

@@ -1,6 +1,6 @@
-<!-- 品发布 - 物流设置 -->
+<!-- 品发布 - 物流设置 -->
 <template>
-  <el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" :disabled="isDetail">
+  <el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px">
     <el-form-item label="配送方式" prop="deliveryTypes">
       <el-checkbox-group v-model="formData.deliveryTypes" class="w-80">
         <el-checkbox
@@ -13,11 +13,11 @@
       </el-checkbox-group>
     </el-form-item>
     <el-form-item
+      v-if="formData.deliveryTypes?.includes(DeliveryTypeEnum.EXPRESS.type)"
       label="运费模板"
       prop="deliveryTemplateId"
-      v-if="formData.deliveryTypes?.includes(DeliveryTypeEnum.EXPRESS.type)"
     >
-      <el-select placeholder="请选择运费模板" v-model="formData.deliveryTemplateId" class="w-80">
+      <el-select v-model="formData.deliveryTemplateId" class="w-80" placeholder="请选择运费模板">
         <el-option
           v-for="item in deliveryTemplateList"
           :key="item.id"

+ 5 - 5
src/views/mall/product/spu/form/DescriptionForm.vue

@@ -1,8 +1,8 @@
-<!-- 商品发布 - 商品详情 -->
+<!-- 产品发布 - 产品详情 -->
 <template>
-  <el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" :disabled="isDetail">
+  <el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px">
     <!--富文本编辑器组件-->
-    <el-form-item label="品详情" prop="description">
+    <el-form-item label="品详情" prop="description">
       <Editor v-model:modelValue="formData.description" />
     </el-form-item>
   </el-form>
@@ -28,7 +28,7 @@ const props = defineProps({
 })
 const formRef = ref() // 表单Ref
 const formData = ref<Spu>({
-  description: '' // 品详情
+  description: '' // 品详情
 })
 // 表单规则
 const rules = reactive({
@@ -72,7 +72,7 @@ const validate = async () => {
     // 校验通过更新数据
     Object.assign(props.propFormData, formData.value)
   } catch (e) {
-    message.error('【品详情】不完善,请填写相关信息')
+    message.error('【品详情】不完善,请填写相关信息')
     emit('update:activeName', 'description')
     throw e // 目的截断之后的校验
   }

+ 22 - 22
src/views/mall/product/spu/form/InfoForm.vue

@@ -1,7 +1,7 @@
-<!-- 品发布 - 基础设置 -->
+<!-- 品发布 - 基础设置 -->
 <template>
   <el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px">
-    <el-form-item label="品名称" prop="name">
+    <el-form-item label="品名称" prop="name">
       <el-input
         v-model="formData.name"
         :autosize="{ minRows: 2, maxRows: 2 }"
@@ -9,11 +9,11 @@
         :show-word-limit="true"
         class="w-80!"
         maxlength="64"
-        placeholder="请输入品名称"
+        placeholder="请输入品名称"
         type="textarea"
       />
     </el-form-item>
-    <el-form-item label="品分类" prop="categoryId">
+    <el-form-item label="品分类" prop="categoryId">
       <el-cascader
         v-model="formData.categoryId"
         :options="categoryList"
@@ -21,11 +21,11 @@
         class="w-80"
         clearable
         filterable
-        placeholder="请选择品分类"
+        placeholder="请选择品分类"
       />
     </el-form-item>
-    <el-form-item label="品品牌" prop="brandId">
-      <el-select v-model="formData.brandId" class="w-80" placeholder="请选择品品牌">
+    <el-form-item label="品品牌" prop="brandId">
+      <el-select v-model="formData.brandId" class="w-80" placeholder="请选择品品牌">
         <el-option
           v-for="item in brandList"
           :key="item.id"
@@ -34,10 +34,10 @@
         />
       </el-select>
     </el-form-item>
-    <el-form-item label="品关键字" prop="keyword">
-      <el-input v-model="formData.keyword" class="w-80!" placeholder="请输入品关键字" />
+    <el-form-item label="品关键字" prop="keyword">
+      <el-input v-model="formData.keyword" class="w-80!" placeholder="请输入品关键字" />
     </el-form-item>
-    <el-form-item label="品简介" prop="introduction">
+    <el-form-item label="品简介" prop="introduction">
       <el-input
         v-model="formData.introduction"
         :autosize="{ minRows: 2, maxRows: 2 }"
@@ -45,14 +45,14 @@
         :show-word-limit="true"
         class="w-80!"
         maxlength="128"
-        placeholder="请输入品简介"
+        placeholder="请输入品简介"
         type="textarea"
       />
     </el-form-item>
-    <el-form-item label="品封面图" prop="picUrl">
+    <el-form-item label="品封面图" prop="picUrl">
       <UploadImg v-model="formData.picUrl" :disabled="isDetail" height="80px" />
     </el-form-item>
-    <el-form-item label="品轮播图" prop="sliderPicUrls">
+    <el-form-item label="品轮播图" prop="sliderPicUrls">
       <UploadImgs v-model="formData.sliderPicUrls" :disabled="isDetail" />
     </el-form-item>
   </el-form>
@@ -81,13 +81,13 @@ const message = useMessage() // 消息弹窗
 
 const formRef = ref() // 表单 Ref
 const formData = reactive<Spu>({
-  name: '', // 品名称
-  categoryId: undefined, // 品分类
+  name: '', // 品名称
+  categoryId: undefined, // 品分类
   keyword: '', // 关键字
-  picUrl: '', // 品封面图
-  sliderPicUrls: [], // 品轮播图
-  introduction: '', // 品简介
-  brandId: undefined // 品品牌
+  picUrl: '', // 品封面图
+  sliderPicUrls: [], // 品轮播图
+  introduction: '', // 品简介
+  brandId: undefined // 品品牌
 })
 const rules = reactive({
   name: [required],
@@ -130,13 +130,13 @@ const validate = async () => {
 defineExpose({ validate })
 
 /** 初始化 */
-const brandList = ref<BrandVO[]>([]) // 品品牌列表
-const categoryList = ref<CategoryVO[]>([]) // 品分类树
+const brandList = ref<BrandVO[]>([]) // 品品牌列表
+const categoryList = ref<CategoryVO[]>([]) // 品分类树
 onMounted(async () => {
   // 获得分类树
   const data = await ProductCategoryApi.getCategoryList({})
   categoryList.value = handleTree(data, 'id')
-  // 获取品品牌列表
+  // 获取品品牌列表
   brandList.value = await ProductBrandApi.getSimpleBrandList()
 })
 </script>

+ 7 - 7
src/views/mall/product/spu/form/OtherForm.vue

@@ -1,28 +1,28 @@
-<!-- 品发布 - 其它设置 -->
+<!-- 品发布 - 其它设置 -->
 <template>
-  <el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" :disabled="isDetail">
-    <el-form-item label="品排序" prop="sort">
+  <el-form ref="formRef" :disabled="isDetail" :model="formData" :rules="rules" label-width="120px">
+    <el-form-item label="品排序" prop="sort">
       <el-input-number
         v-model="formData.sort"
         :min="0"
-        placeholder="请输入商品排序"
         class="w-80!"
+        placeholder="请输入产品排序"
       />
     </el-form-item>
     <el-form-item label="赠送积分" prop="giveIntegral">
       <el-input-number
         v-model="formData.giveIntegral"
         :min="0"
-        placeholder="请输入赠送积分"
         class="w-80!"
+        placeholder="请输入赠送积分"
       />
     </el-form-item>
     <el-form-item label="虚拟销量" prop="virtualSalesCount">
       <el-input-number
         v-model="formData.virtualSalesCount"
         :min="0"
-        placeholder="请输入虚拟销量"
         class="w-80!"
+        placeholder="请输入虚拟销量"
       />
     </el-form-item>
   </el-form>
@@ -48,7 +48,7 @@ const props = defineProps({
 const formRef = ref() // 表单Ref
 // 表单数据
 const formData = ref<Spu>({
-  sort: 0, // 品排序
+  sort: 0, // 品排序
   giveIntegral: 0, // 赠送积分
   virtualSalesCount: 0 // 虚拟销量
 })

+ 4 - 4
src/views/mall/product/spu/form/ProductAttributes.vue

@@ -1,4 +1,4 @@
-<!-- 品发布 - 库存价格 - 属性列表 -->
+<!-- 品发布 - 库存价格 - 属性列表 -->
 <template>
   <el-col v-for="(item, index) in attributeList" :key="index">
     <div>
@@ -78,8 +78,8 @@ const setInputRef = (el: any) => {
     inputRef.value.push(el)
   }
 }
-const attributeList = ref<PropertyAndValues[]>([]) // 品属性列表
-const attributeOptions = ref([] as PropertyApi.PropertyValueVO[]) // 品属性名称下拉框
+const attributeList = ref<PropertyAndValues[]>([]) // 品属性列表
+const attributeOptions = ref([] as PropertyApi.PropertyValueVO[]) // 品属性名称下拉框
 const props = defineProps({
   propertyList: {
     type: Array,
@@ -155,7 +155,7 @@ const handleInputConfirm = async (index: number, propertyId: number) => {
   inputValue.value = ''
 }
 
-/** 获取品属性下拉选项 */
+/** 获取品属性下拉选项 */
 const getAttributeOptions = async (propertyId: number) => {
   attributeOptions.value = await PropertyApi.getPropertyValueSimpleList(propertyId)
 }

+ 5 - 5
src/views/mall/product/spu/form/ProductPropertyAddForm.vue

@@ -1,6 +1,6 @@
-<!-- 品发布 - 库存价格 - 添加属性 -->
+<!-- 品发布 - 库存价格 - 添加属性 -->
 <template>
-  <Dialog v-model="dialogVisible" title="添加品属性">
+  <Dialog v-model="dialogVisible" title="添加品属性">
     <el-form
       ref="formRef"
       v-loading="formLoading"
@@ -51,8 +51,8 @@ const formRules = reactive({
   name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
 })
 const formRef = ref() // 表单 Ref
-const attributeList = ref([]) // 品属性列表
-const attributeOptions = ref([] as PropertyApi.PropertyVO[]) // 品属性名称下拉框
+const attributeList = ref([]) // 品属性列表
+const attributeOptions = ref([] as PropertyApi.PropertyVO[]) // 品属性名称下拉框
 const props = defineProps({
   propertyList: {
     type: Array,
@@ -136,7 +136,7 @@ const resetForm = () => {
   formRef.value?.resetFields()
 }
 
-/** 获取品属性下拉选项 */
+/** 获取品属性下拉选项 */
 const getAttributeOptions = async () => {
   formLoading.value = true
   try {

+ 13 - 13
src/views/mall/product/spu/form/SkuForm.vue

@@ -1,4 +1,4 @@
-<!-- 品发布 - 库存价格 -->
+<!-- 品发布 - 库存价格 -->
 <template>
   <el-form
     ref="formRef"
@@ -18,7 +18,7 @@
         <el-radio :value="true" class="radio">单独设置</el-radio>
       </el-radio-group>
     </el-form-item>
-    <el-form-item label="品规格" prop="specType">
+    <el-form-item label="品规格" prop="specType">
       <el-radio-group v-model="formData.specType" class="w-80" @change="onChangeSpec">
         <el-radio :value="false" class="radio">单规格</el-radio>
         <el-radio :value="true">多规格</el-radio>
@@ -33,7 +33,7 @@
         :rule-config="ruleConfig"
       />
     </el-form-item>
-    <el-form-item v-if="formData.specType" label="品属性">
+    <el-form-item v-if="formData.specType" label="品属性">
       <el-button class="mb-10px mr-15px" @click="attributesAddFormRef.open">添加属性</el-button>
       <ProductAttributes
         :is-detail="isDetail"
@@ -57,7 +57,7 @@
     </template>
   </el-form>
 
-  <!-- 品属性添加 Form 表单 -->
+  <!-- 品属性添加 Form 表单 -->
   <ProductPropertyAddForm ref="attributesAddFormRef" :propertyList="propertyList" />
 </template>
 <script lang="ts" setup>
@@ -81,22 +81,22 @@ const ruleConfig: RuleConfig[] = [
   {
     name: 'stock',
     rule: (arg) => arg >= 0,
-    message: '品库存必须大于等于 1 !!!'
+    message: '品库存必须大于等于 1 !!!'
   },
   {
     name: 'price',
     rule: (arg) => arg >= 0.01,
-    message: '品销售价格必须大于等于 0.01 元!!!'
+    message: '品销售价格必须大于等于 0.01 元!!!'
   },
   {
     name: 'marketPrice',
     rule: (arg) => arg >= 0.01,
-    message: '品市场价格必须大于等于 0.01 元!!!'
+    message: '品市场价格必须大于等于 0.01 元!!!'
   },
   {
     name: 'costPrice',
     rule: (arg) => arg >= 0.01,
-    message: '品成本价格必须大于等于 0.00 元!!!'
+    message: '品成本价格必须大于等于 0.00 元!!!'
   }
 ]
 
@@ -109,12 +109,12 @@ const props = defineProps({
   },
   isDetail: propTypes.bool.def(false) // 是否作为详情组件
 })
-const attributesAddFormRef = ref() // 添加品属性表单
+const attributesAddFormRef = ref() // 添加品属性表单
 const formRef = ref() // 表单 Ref
-const propertyList = ref<PropertyAndValues[]>([]) // 品属性列表
-const skuListRef = ref() // 品属性列表 Ref
+const propertyList = ref<PropertyAndValues[]>([]) // 品属性列表
+const skuListRef = ref() // 品属性列表 Ref
 const formData = reactive<Spu>({
-  specType: false, // 品规格
+  specType: false, // 品规格
   subCommissionType: false, // 分销类型
   skus: []
 })
@@ -168,7 +168,7 @@ const changeSubCommissionType = () => {
 
 /** 选择规格 */
 const onChangeSpec = () => {
-  // 重置品属性列表
+  // 重置品属性列表
   propertyList.value = []
   // 重置sku列表
   formData.skus = [

+ 17 - 17
src/views/mall/product/spu/form/index.vue

@@ -25,7 +25,7 @@
           :propFormData="formData"
         />
       </el-tab-pane>
-      <el-tab-pane label="品详情" name="description">
+      <el-tab-pane label="品详情" name="description">
         <DescriptionForm
           ref="descriptionRef"
           v-model:activeName="activeName"
@@ -74,40 +74,40 @@ const { delView } = useTagsViewStore() // 视图操作
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
 const activeName = ref('info') // Tag 激活的窗口
 const isDetail = ref(false) // 是否查看详情
-const infoRef = ref() // 品信息 Ref
-const skuRef = ref() // 品规格 Ref
+const infoRef = ref() // 品信息 Ref
+const skuRef = ref() // 品规格 Ref
 const deliveryRef = ref() // 物流设置 Ref
-const descriptionRef = ref() // 品详情 Ref
+const descriptionRef = ref() // 品详情 Ref
 const otherRef = ref() // 其他设置 Ref
 // SPU 表单数据
 const formData = ref<ProductSpuApi.Spu>({
-  name: '', // 品名称
-  categoryId: undefined, // 品分类
+  name: '', // 品名称
+  categoryId: undefined, // 品分类
   keyword: '', // 关键字
-  picUrl: '', // 品封面图
-  sliderPicUrls: [], // 品轮播图
-  introduction: '', // 品简介
+  picUrl: '', // 品封面图
+  sliderPicUrls: [], // 品轮播图
+  introduction: '', // 品简介
   deliveryTypes: [], // 配送方式数组
   deliveryTemplateId: undefined, // 运费模版
-  brandId: undefined, // 品品牌
-  specType: false, // 品规格
+  brandId: undefined, // 品品牌
+  specType: false, // 品规格
   subCommissionType: false, // 分销类型
   skus: [
     {
-      price: 0, // 品价格
+      price: 0, // 品价格
       marketPrice: 0, // 市场价
       costPrice: 0, // 成本价
-      barCode: '', // 品条码
+      barCode: '', // 品条码
       picUrl: '', // 图片地址
       stock: 0, // 库存
-      weight: 0, // 品重量
-      volume: 0, // 品体积
+      weight: 0, // 品重量
+      volume: 0, // 品体积
       firstBrokeragePrice: 0, // 一级分销的佣金
       secondBrokeragePrice: 0 // 二级分销的佣金
     }
   ],
-  description: '', // 品详情
-  sort: 0, // 品排序
+  description: '', // 品详情
+  sort: 0, // 品排序
   giveIntegral: 0, // 赠送积分
   virtualSalesCount: 0 // 虚拟销量
 })

+ 15 - 15
src/views/mall/product/spu/index.vue

@@ -1,6 +1,6 @@
-<!-- 商品中心 - 商品列表  -->
+<!-- 产品中心 - 产品列表  -->
 <template>
-  <doc-alert title="【商品】商品 SPU 与 SKU" url="https://doc.iocoder.cn/mall/product-spu-sku/" />
+  <doc-alert title="【产品】产品 SPU 与 SKU" url="https://doc.iocoder.cn/mall/product-spu-sku/" />
 
   <!-- 搜索工作栏 -->
   <ContentWrap>
@@ -11,16 +11,16 @@
       class="-mb-15px"
       label-width="68px"
     >
-      <el-form-item label="品名称" prop="name">
+      <el-form-item label="品名称" prop="name">
         <el-input
           v-model="queryParams.name"
           class="!w-240px"
           clearable
-          placeholder="请输入品名称"
+          placeholder="请输入品名称"
           @keyup.enter="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="品分类" prop="categoryId">
+      <el-form-item label="品分类" prop="categoryId">
         <el-cascader
           v-model="queryParams.categoryId"
           :options="categoryList"
@@ -28,7 +28,7 @@
           class="w-1/1"
           clearable
           filterable
-          placeholder="请选择品分类"
+          placeholder="请选择品分类"
         />
       </el-form-item>
       <el-form-item label="创建时间" prop="createTime">
@@ -92,7 +92,7 @@
               <el-col :span="24">
                 <el-row>
                   <el-col :span="8">
-                    <el-form-item label="品分类:">
+                    <el-form-item label="品分类:">
                       <span>{{ formatCategoryName(row.categoryId) }}</span>
                     </el-form-item>
                   </el-col>
@@ -128,18 +128,18 @@
           </el-form>
         </template>
       </el-table-column>
-      <el-table-column label="品编号" min-width="140" prop="id" />
-      <el-table-column label="品信息" min-width="300">
+      <el-table-column label="品编号" min-width="140" prop="id" />
+      <el-table-column label="品信息" min-width="300">
         <template #default="{ row }">
           <div class="flex">
             <el-image
-              fit="cover"
               :src="row.picUrl"
               class="flex-none w-50px h-50px"
+              fit="cover"
               @click="imagePreview(row.picUrl)"
             />
             <div class="ml-4 overflow-hidden">
-              <el-tooltip effect="dark" :content="row.name" placement="top">
+              <el-tooltip :content="row.name" effect="dark" placement="top">
                 <div>
                   {{ row.name }}
                 </div>
@@ -370,7 +370,7 @@ const handleDelete = async (id: number) => {
   } catch {}
 }
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     urlList: [imgUrl]
@@ -399,7 +399,7 @@ const openForm = (id?: number) => {
   push({ name: 'ProductSpuAdd' })
 }
 
-/** 查看品详情 */
+/** 查看品详情 */
 const openDetail = (id: number) => {
   push({ name: 'ProductSpuDetail', params: { id } })
 }
@@ -412,7 +412,7 @@ const handleExport = async () => {
     // 发起导出
     exportLoading.value = true
     const data = await ProductSpuApi.exportSpu(queryParams.value)
-    download.excel(data, '品列表.xls')
+    download.excel(data, '品列表.xls')
   } catch {
   } finally {
     exportLoading.value = false
@@ -436,7 +436,7 @@ onMounted(async () => {
   if (route.query.categoryId) {
     queryParams.value.categoryId = route.query.categoryId
   }
-  // 获得品信息
+  // 获得品信息
   await getTabsCount()
   await getList()
   // 获得分类树

+ 4 - 4
src/views/mall/promotion/article/ArticleForm.vue

@@ -85,11 +85,11 @@
           </el-form-item>
         </el-col>
         <el-col :span="24">
-          <el-form-item label="品关联" prop="spuId">
+          <el-form-item label="品关联" prop="spuId">
             <el-tag v-if="formData.spuId" class="mr-10px">
               {{ spuList.find((item) => item.id === formData.spuId)?.name }}
             </el-tag>
-            <el-button @click="spuSelectRef?.open()">选择品</el-button>
+            <el-button @click="spuSelectRef?.open()">选择品</el-button>
           </el-form-item>
         </el-col>
         <el-col :span="24">
@@ -142,13 +142,13 @@ const formRules = reactive({
   picUrl: [{ required: true, message: '文章封面图片地址不能为空', trigger: 'blur' }],
   sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
   status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
-  spuId: [{ required: true, message: '品关联id不能为空', trigger: 'blur' }],
+  spuId: [{ required: true, message: '品关联id不能为空', trigger: 'blur' }],
   recommendHot: [{ required: true, message: '是否热门(小程序)不能为空', trigger: 'blur' }],
   recommendBanner: [{ required: true, message: '是否轮播图(小程序)不能为空', trigger: 'blur' }],
   content: [{ required: true, message: '文章内容不能为空', trigger: 'blur' }]
 })
 const formRef = ref() // 表单 Ref
-const spuSelectRef = ref() // 品和属性选择 Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
 const selectSpu = (spuId: number) => {
   formData.value.spuId = spuId
 }

+ 1 - 1
src/views/mall/promotion/article/index.vue

@@ -222,7 +222,7 @@ const categoryList = ref<ArticleCategoryApi.ArticleCategoryVO[]>([])
 const spuList = ref<ProductSpuApi.Spu[]>([])
 onMounted(async () => {
   await getList()
-  // 加载分类、品列表
+  // 加载分类、品列表
   categoryList.value =
     (await ArticleCategoryApi.getSimpleArticleCategoryList()) as ArticleCategoryApi.ArticleCategoryVO[]
   spuList.value = (await ProductSpuApi.getSpuSimpleList()) as ProductSpuApi.Spu[]

+ 7 - 7
src/views/mall/promotion/bargain/activity/BargainActivityForm.vue

@@ -9,7 +9,7 @@
       class="mt-10px"
     >
       <template #spuId>
-        <el-button @click="spuSelectRef.open()">选择品</el-button>
+        <el-button @click="spuSelectRef.open()">选择品</el-button>
         <SpuAndSkuList
           ref="spuAndSkuListRef"
           :rule-config="ruleConfig"
@@ -74,9 +74,9 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formRef = ref() // 表单 Ref
 
-// ================= 品选择相关 =================
+// ================= 品选择相关 =================
 
-const spuSelectRef = ref() // 品和属性选择 Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
 const spuAndSkuListRef = ref() // sku 秒杀配置组件Ref
 const spuList = ref<BargainActivityApi.SpuExtension[]>([]) // 选择的 spu
 const spuPropertyList = ref<SpuProperty<BargainActivityApi.SpuExtension>[]>([])
@@ -84,17 +84,17 @@ const ruleConfig: RuleConfig[] = [
   {
     name: 'productConfig.bargainFirstPrice',
     rule: (arg) => arg > 0,
-    message: '品砍价起始价格不能小于 0 !!!'
+    message: '品砍价起始价格不能小于 0 !!!'
   },
   {
     name: 'productConfig.bargainMinPrice',
     rule: (arg) => arg >= 0,
-    message: '品砍价底价不能小于 0 !!!'
+    message: '品砍价底价不能小于 0 !!!'
   },
   {
     name: 'productConfig.stock',
     rule: (arg) => arg >= 1,
-    message: '品活动库存不能小于 1 !!!'
+    message: '品活动库存不能小于 1 !!!'
   }
 ]
 const selectSpu = (spuId: number, skuIds: number[]) => {
@@ -165,7 +165,7 @@ const open = async (type: string, id?: number) => {
       // 用户每次砍价金额分转元, 分转元
       data.randomMinPrice = formatToFraction(data.randomMinPrice)
       data.randomMaxPrice = formatToFraction(data.randomMaxPrice)
-      // 对齐活动品处理结构
+      // 对齐活动品处理结构
       await getSpuDetails(
         data.spuId!,
         [data.skuId],

+ 1 - 1
src/views/mall/promotion/bargain/activity/bargainActivity.data.ts

@@ -133,7 +133,7 @@ const crudSchemas = reactive<CrudSchema[]>([
     }
   },
   {
-    label: '砍价品',
+    label: '砍价品',
     field: 'spuId',
     isSearch: false,
     form: {

+ 46 - 40
src/views/mall/promotion/bargain/activity/index.vue

@@ -4,27 +4,27 @@
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <el-form
-      class="-mb-15px"
-      :model="queryParams"
       ref="queryFormRef"
       :inline="true"
+      :model="queryParams"
+      class="-mb-15px"
       label-width="68px"
     >
       <el-form-item label="活动名称" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入活动名称"
+          class="!w-240px"
           clearable
+          placeholder="请输入活动名称"
           @keyup.enter="handleQuery"
-          class="!w-240px"
         />
       </el-form-item>
       <el-form-item label="活动状态" prop="status">
         <el-select
           v-model="queryParams.status"
-          placeholder="请选择活动状态"
-          clearable
           class="!w-240px"
+          clearable
+          placeholder="请选择活动状态"
         >
           <el-option
             v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@@ -35,15 +35,22 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
-        <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+        <el-button @click="handleQuery">
+          <Icon class="mr-5px" icon="ep:search" />
+          搜索
+        </el-button>
+        <el-button @click="resetQuery">
+          <Icon class="mr-5px" icon="ep:refresh" />
+          重置
+        </el-button>
         <el-button
-          type="primary"
+          v-hasPermi="['promotion:bargain-activity:create']"
           plain
+          type="primary"
           @click="openForm('create')"
-          v-hasPermi="['promotion:bargain-activity:create']"
         >
-          <Icon icon="ep:plus" class="mr-5px" /> 新增
+          <Icon class="mr-5px" icon="ep:plus" />
+          新增
         </el-button>
       </el-form-item>
     </el-form>
@@ -51,80 +58,80 @@
 
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-      <el-table-column label="活动编号" prop="id" min-width="80" />
-      <el-table-column label="活动名称" prop="name" min-width="140" />
+    <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
+      <el-table-column label="活动编号" min-width="80" prop="id" />
+      <el-table-column label="活动名称" min-width="140" prop="name" />
       <el-table-column label="活动时间" min-width="210">
         <template #default="scope">
           {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }}
           ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
         </template>
       </el-table-column>
-      <el-table-column label="商品图片" prop="spuName" min-width="80">
+      <el-table-column label="产品图片" min-width="80" prop="spuName">
         <template #default="scope">
           <el-image
+            :preview-src-list="[scope.row.picUrl]"
             :src="scope.row.picUrl"
             class="h-40px w-40px"
-            :preview-src-list="[scope.row.picUrl]"
             preview-teleported
           />
         </template>
       </el-table-column>
-      <el-table-column label="商品标题" prop="spuName" min-width="300" />
+      <el-table-column label="产品标题" min-width="300" prop="spuName" />
       <el-table-column
+        :formatter="fenToYuanFormat"
         label="起始价格"
-        prop="bargainFirstPrice"
         min-width="100"
-        :formatter="fenToYuanFormat"
+        prop="bargainFirstPrice"
       />
       <el-table-column
+        :formatter="fenToYuanFormat"
         label="砍价底价"
-        prop="bargainMinPrice"
         min-width="100"
-        :formatter="fenToYuanFormat"
+        prop="bargainMinPrice"
       />
-      <el-table-column label="总砍价人数" prop="recordUserCount" min-width="100" />
-      <el-table-column label="成功砍价人数" prop="recordSuccessUserCount" min-width="110" />
-      <el-table-column label="助力人数" prop="helpUserCount" min-width="100" />
-      <el-table-column label="活动状态" align="center" prop="status" min-width="100">
+      <el-table-column label="总砍价人数" min-width="100" prop="recordUserCount" />
+      <el-table-column label="成功砍价人数" min-width="110" prop="recordSuccessUserCount" />
+      <el-table-column label="助力人数" min-width="100" prop="helpUserCount" />
+      <el-table-column align="center" label="活动状态" min-width="100" prop="status">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="库存" align="center" prop="stock" min-width="80" />
-      <el-table-column label="总库存" align="center" prop="totalStock" min-width="80" />
+      <el-table-column align="center" label="库存" min-width="80" prop="stock" />
+      <el-table-column align="center" label="总库存" min-width="80" prop="totalStock" />
       <el-table-column
-        label="创建时间"
+        :formatter="dateFormatter"
         align="center"
+        label="创建时间"
         prop="createTime"
-        :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="操作" align="center" width="150px" fixed="right">
+      <el-table-column align="center" fixed="right" label="操作" width="150px">
         <template #default="scope">
           <el-button
+            v-hasPermi="['promotion:bargain-activity:update']"
             link
             type="primary"
             @click="openForm('update', scope.row.id)"
-            v-hasPermi="['promotion:bargain-activity:update']"
           >
             编辑
           </el-button>
           <el-button
+            v-if="scope.row.status === 0"
+            v-hasPermi="['promotion:bargain-activity:close']"
             link
             type="danger"
             @click="handleClose(scope.row.id)"
-            v-if="scope.row.status === 0"
-            v-hasPermi="['promotion:bargain-activity:close']"
           >
             关闭
           </el-button>
           <el-button
+            v-else
+            v-hasPermi="['promotion:bargain-activity:delete']"
             link
             type="danger"
             @click="handleDelete(scope.row.id)"
-            v-else
-            v-hasPermi="['promotion:bargain-activity:delete']"
           >
             删除
           </el-button>
@@ -133,9 +140,9 @@
     </el-table>
     <!-- 分页 -->
     <Pagination
-      :total="total"
-      v-model:page="queryParams.pageNo"
       v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
       @pagination="getList"
     />
   </ContentWrap>
@@ -144,12 +151,11 @@
   <BargainActivityForm ref="formRef" @success="getList" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
-import { dateFormatter } from '@/utils/formatTime'
+import { dateFormatter, formatDate } from '@/utils/formatTime'
 import * as BargainActivityApi from '@/api/mall/promotion/bargain/bargainActivity'
 import BargainActivityForm from './BargainActivityForm.vue'
-import { formatDate } from '@/utils/formatTime'
 import { fenToYuanFormat } from '@/utils/formatter'
 
 defineOptions({ name: 'PromotionBargainActivity' })

+ 5 - 5
src/views/mall/promotion/combination/activity/CombinationActivityForm.vue

@@ -9,7 +9,7 @@
       class="mt-10px"
     >
       <template #spuId>
-        <el-button @click="spuSelectRef.open()">选择品</el-button>
+        <el-button @click="spuSelectRef.open()">选择品</el-button>
         <SpuAndSkuList
           ref="spuAndSkuListRef"
           :rule-config="ruleConfig"
@@ -58,9 +58,9 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formRef = ref() // 表单 Ref
 
-// ================= 品选择相关 =================
+// ================= 品选择相关 =================
 
-const spuSelectRef = ref() // 品和属性选择 Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
 const spuAndSkuListRef = ref() // sku 秒杀配置组件Ref
 const spuList = ref<CombinationActivityApi.SpuExtension[]>([]) // 选择的 spu
 const spuPropertyList = ref<SpuProperty<CombinationActivityApi.SpuExtension>[]>([])
@@ -68,7 +68,7 @@ const ruleConfig: RuleConfig[] = [
   {
     name: 'productConfig.combinationPrice',
     rule: (arg) => arg >= 0.01,
-    message: '品拼团价格不能小于0.01 !!!'
+    message: '品拼团价格不能小于0.01 !!!'
   }
 ]
 const selectSpu = (spuId: number, skuIds: number[]) => {
@@ -162,7 +162,7 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    // 获得拼团品配置
+    // 获得拼团品配置
     const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
     products.forEach((item: CombinationActivityApi.CombinationProductVO) => {
       item.combinationPrice = convertToInteger(item.combinationPrice)

+ 1 - 1
src/views/mall/promotion/combination/activity/combinationActivity.data.ts

@@ -127,7 +127,7 @@ const crudSchemas = reactive<CrudSchema[]>([
     }
   },
   {
-    label: '拼团品',
+    label: '拼团品',
     field: 'spuId',
     isSearch: false,
     form: {

+ 2 - 2
src/views/mall/promotion/combination/activity/index.vue

@@ -67,7 +67,7 @@
           ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
         </template>
       </el-table-column>
-      <el-table-column label="品图片" min-width="80" prop="spuName">
+      <el-table-column label="品图片" min-width="80" prop="spuName">
         <template #default="scope">
           <el-image
             :preview-src-list="[scope.row.picUrl]"
@@ -77,7 +77,7 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="品标题" min-width="300" prop="spuName" />
+      <el-table-column label="品标题" min-width="300" prop="spuName" />
       <el-table-column
         :formatter="fenToYuanFormat"
         label="原价"

+ 22 - 22
src/views/mall/promotion/combination/components/CombinationTableSelect.vue

@@ -12,18 +12,18 @@
         <el-form-item label="活动名称" prop="name">
           <el-input
             v-model="queryParams.name"
-            placeholder="请输入活动名称"
+            class="!w-240px"
             clearable
+            placeholder="请输入活动名称"
             @keyup.enter="handleQuery"
-            class="!w-240px"
           />
         </el-form-item>
         <el-form-item label="活动状态" prop="status">
           <el-select
             v-model="queryParams.status"
-            placeholder="请选择活动状态"
-            clearable
             class="!w-240px"
+            clearable
+            placeholder="请选择活动状态"
           >
             <el-option
               v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@@ -46,7 +46,7 @@
       </el-form>
       <el-table v-loading="loading" :data="list" show-overflow-tooltip>
         <!-- 1. 多选模式(不能使用type="selection",Element会忽略Header插槽) -->
-        <el-table-column width="55" v-if="multiple">
+        <el-table-column v-if="multiple" width="55">
           <template #header>
             <el-checkbox
               v-model="isCheckAll"
@@ -62,11 +62,11 @@
           </template>
         </el-table-column>
         <!-- 2. 单选模式 -->
-        <el-table-column label="#" width="55" v-else>
+        <el-table-column v-else label="#" width="55">
           <template #default="{ row }">
             <el-radio
-              :value="row.id"
               v-model="selectedActivityId"
+              :value="row.id"
               @change="handleSingleSelected(row)"
             >
               <!-- 空格不能省略,是为了让单选框不显示label,如果不指定label不会有选中的效果 -->
@@ -74,49 +74,49 @@
             </el-radio>
           </template>
         </el-table-column>
-        <el-table-column label="活动编号" prop="id" min-width="80" />
-        <el-table-column label="活动名称" prop="name" min-width="140" />
+        <el-table-column label="活动编号" min-width="80" prop="id" />
+        <el-table-column label="活动名称" min-width="140" prop="name" />
         <el-table-column label="活动时间" min-width="210">
           <template #default="scope">
             {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }}
             ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
           </template>
         </el-table-column>
-        <el-table-column label="商品图片" prop="spuName" min-width="80">
+        <el-table-column label="产品图片" min-width="80" prop="spuName">
           <template #default="scope">
             <el-image
+              :preview-src-list="[scope.row.picUrl]"
               :src="scope.row.picUrl"
               class="h-40px w-40px"
-              :preview-src-list="[scope.row.picUrl]"
               preview-teleported
             />
           </template>
         </el-table-column>
-        <el-table-column label="商品标题" prop="spuName" min-width="300" />
+        <el-table-column label="产品标题" min-width="300" prop="spuName" />
         <el-table-column
+          :formatter="fenToYuanFormat"
           label="原价"
-          prop="marketPrice"
           min-width="100"
-          :formatter="fenToYuanFormat"
+          prop="marketPrice"
         />
-        <el-table-column label="拼团价" prop="seckillPrice" min-width="100">
+        <el-table-column label="拼团价" min-width="100" prop="seckillPrice">
           <template #default="scope">
             {{ formatCombinationPrice(scope.row.products) }}
           </template>
         </el-table-column>
-        <el-table-column label="开团组数" prop="groupCount" min-width="100" />
-        <el-table-column label="成团组数" prop="groupSuccessCount" min-width="100" />
-        <el-table-column label="购买次数" prop="recordCount" min-width="100" />
-        <el-table-column label="活动状态" align="center" prop="status" min-width="100">
+        <el-table-column label="开团组数" min-width="100" prop="groupCount" />
+        <el-table-column label="成团组数" min-width="100" prop="groupSuccessCount" />
+        <el-table-column label="购买次数" min-width="100" prop="recordCount" />
+        <el-table-column align="center" label="活动状态" min-width="100" prop="status">
           <template #default="scope">
             <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
           </template>
         </el-table-column>
         <el-table-column
-          label="创建时间"
+          :formatter="dateFormatter"
           align="center"
+          label="创建时间"
           prop="createTime"
-          :formatter="dateFormatter"
           width="180px"
         />
       </el-table>
@@ -128,7 +128,7 @@
         @pagination="getList"
       />
     </ContentWrap>
-    <template #footer v-if="multiple">
+    <template v-if="multiple" #footer>
       <el-button type="primary" @click="handleEmitChange">确 定</el-button>
       <el-button @click="dialogVisible = false">取 消</el-button>
     </template>

+ 10 - 10
src/views/mall/promotion/combination/record/index.vue

@@ -116,14 +116,14 @@
   <!-- 分页列表数据展示 -->
   <ContentWrap>
     <el-table v-loading="loading" :data="pageList">
-      <el-table-column align="center" label="编号" prop="id" min-width="50" />
-      <el-table-column align="center" label="头像" prop="avatar" min-width="80">
+      <el-table-column align="center" label="编号" min-width="50" prop="id" />
+      <el-table-column align="center" label="头像" min-width="80" prop="avatar">
         <template #default="scope">
           <el-avatar :src="scope.row.avatar" />
         </template>
       </el-table-column>
-      <el-table-column align="center" label="昵称" prop="nickname" min-width="100" />
-      <el-table-column align="center" label="开团团长" prop="headId" min-width="100">
+      <el-table-column align="center" label="昵称" min-width="100" prop="nickname" />
+      <el-table-column align="center" label="开团团长" min-width="100" prop="headId">
         <template #default="{ row }: { row: CombinationRecordApi.CombinationRecordVO }">
           {{
             row.headId ? pageList.find((item) => item.id === row.headId)?.nickname : row.nickname
@@ -139,10 +139,10 @@
       />
       <el-table-column
         align="center"
-        label="拼团商品"
+        label="拼团产品"
+        min-width="300"
         prop="type"
         show-overflow-tooltip
-        min-width="300"
       >
         <template #defaul="{ row }">
           <el-image
@@ -153,8 +153,8 @@
           <span class="align-middle">{{ row.spuName }}</span>
         </template>
       </el-table-column>
-      <el-table-column align="center" label="几人团" prop="userSize" min-width="100" />
-      <el-table-column align="center" label="参与人数" prop="userCount" min-width="100" />
+      <el-table-column align="center" label="几人团" min-width="100" prop="userSize" />
+      <el-table-column align="center" label="参与人数" min-width="100" prop="userCount" />
       <el-table-column
         :formatter="dateFormatter"
         align="center"
@@ -169,7 +169,7 @@
         prop="endTime"
         width="180"
       />
-      <el-table-column align="center" label="拼团状态" prop="status" min-width="150">
+      <el-table-column align="center" label="拼团状态" min-width="150" prop="status">
         <template #default="scope">
           <dict-tag
             :type="DICT_TYPE.PROMOTION_COMBINATION_RECORD_STATUS"
@@ -261,7 +261,7 @@ const resetQuery = () => {
   handleQuery()
 }
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     urlList: [imgUrl]

+ 7 - 7
src/views/mall/promotion/components/SpuAndSkuList.vue

@@ -15,14 +15,14 @@
         </SkuList>
       </template>
     </el-table-column>
-    <el-table-column key="id" align="center" label="品编号" prop="id" />
-    <el-table-column label="品图" min-width="80">
+    <el-table-column key="id" align="center" label="品编号" prop="id" />
+    <el-table-column label="品图" min-width="80">
       <template #default="{ row }">
         <el-image :src="row.picUrl" class="h-30px w-30px" @click="imagePreview(row.picUrl)" />
       </template>
     </el-table-column>
-    <el-table-column :show-overflow-tooltip="true" label="品名称" min-width="300" prop="name" />
-    <el-table-column align="center" label="品售价" min-width="90" prop="price">
+    <el-table-column :show-overflow-tooltip="true" label="品名称" min-width="300" prop="name" />
+    <el-table-column align="center" label="品售价" min-width="90" prop="price">
       <template #default="{ row }">
         {{ formatToFraction(row.price) }}
       </template>
@@ -60,7 +60,7 @@ const props = defineProps<{
 }>()
 
 const spuData = ref<Spu[]>([]) // spu 详情数据列表
-const skuListRef = ref() // 品属性列表Ref
+const skuListRef = ref() // 品属性列表Ref
 const spuPropertyList = ref<SpuProperty<T>[]>([]) // spuId 对应的 sku 的属性列表
 const expandRowKeys = ref<string[]>([]) // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
 
@@ -82,7 +82,7 @@ const getSkuConfigs = (extendedAttribute: string) => {
 // 暴露出给表单提交时使用
 defineExpose({ getSkuConfigs })
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     zIndex: 99999999,
@@ -97,7 +97,7 @@ const emits = defineEmits<{
 
 /** 多选时可以删除 SPU **/
 const deleteSpu = async (spuId: number) => {
-  await message.confirm('是否删除品编号为' + spuId + '的数据?')
+  await message.confirm('是否删除品编号为' + spuId + '的数据?')
   const index = spuData.value.findIndex((item) => item.id == spuId)
   spuData.value.splice(index, 1)
   emits('delete', spuId)

+ 22 - 22
src/views/mall/promotion/components/SpuSelect.vue

@@ -7,7 +7,7 @@
             v-model="queryParams.name"
             class="!w-240px"
             clearable
-            placeholder="请输入品名称"
+            placeholder="请输入品名称"
             @keyup.enter="handleQuery"
           />
         </el-col>
@@ -19,7 +19,7 @@
             check-strictly
             class="w-1/1"
             node-key="id"
-            placeholder="请选择品分类"
+            placeholder="请选择品分类"
           />
         </el-col>
         <el-col :span="6">
@@ -67,19 +67,19 @@
           </template>
         </el-table-column>
         <el-table-column type="selection" width="55" />
-        <el-table-column key="id" align="center" label="品编号" prop="id" />
-        <el-table-column label="品图" min-width="80">
+        <el-table-column key="id" align="center" label="品编号" prop="id" />
+        <el-table-column label="品图" min-width="80">
           <template #default="{ row }">
             <el-image :src="row.picUrl" class="h-30px w-30px" @click="imagePreview(row.picUrl)" />
           </template>
         </el-table-column>
         <el-table-column
           :show-overflow-tooltip="true"
-          label="品名称"
+          label="品名称"
           min-width="300"
           prop="name"
         />
-        <el-table-column align="center" label="品售价" min-width="90" prop="price">
+        <el-table-column align="center" label="品售价" min-width="90" prop="price">
           <template #default="{ row }">
             {{ formatToFraction(row.price) }}
           </template>
@@ -126,7 +126,7 @@ defineOptions({ name: 'PromotionSpuSelect' })
 
 const props = defineProps({
   // 默认不需要(不需要的情况下只返回 spu,需要的情况下返回 选中的 spu 和 sku 列表)
-  // 其它活动需要选择商品和商品属性导入此组件即可,需添加组件属性 :isSelectSku='true'
+  // 其它活动需要选择产品和产品属性导入此组件即可,需添加组件属性 :isSelectSku='true'
   isSelectSku: propTypes.bool.def(false), // 是否需要选择 sku 属性
   radio: propTypes.bool.def(false) // 是否单选 sku
 })
@@ -140,25 +140,25 @@ const dialogTitle = ref('') // 弹窗的标题
 const queryParams = ref({
   pageNo: 1,
   pageSize: 10,
-  tabType: 0, // 默认获取上架的
+  tabType: 0, // 默认获取上架的
   name: '',
   categoryId: null,
   createTime: []
 }) // 查询参数
-const propertyList = ref<PropertyAndValues[]>([]) // 品属性列表
+const propertyList = ref<PropertyAndValues[]>([]) // 品属性列表
 const spuListRef = ref<InstanceType<typeof ElTable>>()
-const skuListRef = ref<InstanceType<typeof SkuList>>() // 品属性选择 Ref
-const spuData = ref<ProductSpuApi.Spu>() // 品详情
+const skuListRef = ref<InstanceType<typeof SkuList>>() // 品属性选择 Ref
+const spuData = ref<ProductSpuApi.Spu>() // 品详情
 const isExpand = ref(false) // 控制 SKU 列表显示
 const expandRowKeys = ref<number[]>() // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
 
-//============ 品选择相关 ============
-const selectedSpuId = ref<number>(0) // 选中的品 spuId
-const selectedSkuIds = ref<number[]>([]) // 选中的品 skuIds
+//============ 品选择相关 ============
+const selectedSpuId = ref<number>(0) // 选中的品 spuId
+const selectedSkuIds = ref<number[]>([]) // 选中的品 skuIds
 const selectSku = (val: ProductSpuApi.Sku[]) => {
   const skuTable = skuListRef.value?.getSkuTableRef()
   if (selectedSpuId.value === 0) {
-    message.warning('请先选择品再选择相应的规格!!!')
+    message.warning('请先选择品再选择相应的规格!!!')
     skuTable?.clearSelection()
     return
   }
@@ -203,13 +203,13 @@ const selectSpu = (val: ProductSpuApi.Spu[]) => {
   expandChange(val[0], val)
 }
 
-// 计算品属性
+// 计算品属性
 const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi.Spu[]) => {
   // 判断需要展开的 spuId === 选择的 spuId。如果选择了 A 就展开 A 的 skuList。如果选择了 A 手动展开 B 则阻断
   // 目的防止误选 sku
   if (selectedSpuId.value !== 0) {
     if (row.id !== selectedSpuId.value) {
-      message.warning('你已选择品请先取消')
+      message.warning('你已选择品请先取消')
       expandRowKeys.value = [selectedSpuId.value]
       return
     }
@@ -250,11 +250,11 @@ const emits = defineEmits<{
  */
 const confirm = () => {
   if (selectedSpuId.value === 0) {
-    message.warning('没有选择任何品')
+    message.warning('没有选择任何品')
     return
   }
   if (props.isSelectSku && selectedSkuIds.value.length === 0) {
-    message.warning('没有选择任何品属性')
+    message.warning('没有选择任何品属性')
     return
   }
   // 返回各自 id 列表
@@ -269,7 +269,7 @@ const confirm = () => {
 
 /** 打开弹窗 */
 const open = () => {
-  dialogTitle.value = '品选择'
+  dialogTitle.value = '品选择'
   dialogVisible.value = true
 }
 defineExpose({ open }) // 提供 open 方法,用于打开弹窗
@@ -296,7 +296,7 @@ const resetQuery = () => {
   queryParams.value = {
     pageNo: 1,
     pageSize: 10,
-    tabType: 0, // 默认获取上架的
+    tabType: 0, // 默认获取上架的
     name: '',
     categoryId: null,
     createTime: []
@@ -304,7 +304,7 @@ const resetQuery = () => {
   getList()
 }
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     zIndex: 99999999,

+ 1 - 1
src/views/mall/promotion/components/index.ts

@@ -9,6 +9,6 @@ type SpuProperty<T> = {
 }
 
 /**
- * 提供商品活动商品选择通用组件
+ * 提供产品活动产品选择通用组件
  */
 export { SpuSelect, SpuAndSkuList, SpuProperty }

+ 9 - 9
src/views/mall/promotion/coupon/template/CouponTemplateForm.vue

@@ -35,7 +35,7 @@
       </el-form-item>
       <el-form-item
         v-if="formData.productScope === PromotionProductScopeEnum.SPU.scope"
-        label="品"
+        label="品"
         prop="productSpuIds"
       >
         <SpuShowcase v-model="formData.productSpuIds" />
@@ -231,7 +231,7 @@ const formData = ref({
   fixedEndTerm: undefined,
   productScope: PromotionProductScopeEnum.ALL.scope,
   description: undefined,
-  productScopeValues: [], // 商品范围:值为 品类编号列表 或 商品编号列表 ,用于提交
+  productScopeValues: [], // 产品范围:值为 品类编号列表 或 产品编号列表 ,用于提交
   productCategoryIds: [], // 仅用于表单,不提交
   productSpuIds: [] // 仅用于表单,不提交
 })
@@ -249,8 +249,8 @@ const formRules = reactive({
   validTimes: [{ required: true, message: '固定日期不能为空', trigger: 'change' }],
   fixedStartTerm: [{ required: true, message: '开始领取天数不能为空', trigger: 'blur' }],
   fixedEndTerm: [{ required: true, message: '开始领取天数不能为空', trigger: 'blur' }],
-  productScope: [{ required: true, message: '品范围不能为空', trigger: 'blur' }],
-  productSpuIds: [{ required: true, message: '品不能为空', trigger: 'blur' }],
+  productScope: [{ required: true, message: '品范围不能为空', trigger: 'blur' }],
+  productSpuIds: [{ required: true, message: '品不能为空', trigger: 'blur' }],
   productCategoryIds: [{ required: true, message: '分类不能为空', trigger: 'blur' }]
 })
 const formRef = ref() // 表单 Ref
@@ -275,7 +275,7 @@ const open = async (type: string, id?: number) => {
         usePrice: formatToFraction(data.usePrice),
         validTimes: [data.validStartTime, data.validEndTime]
       }
-      // 获得品范围
+      // 获得品范围
       await getProductScope()
     } finally {
       formLoading.value = false
@@ -315,7 +315,7 @@ const submitForm = async () => {
       takeLimitCount: formData.value.takeType === 1 ? formData.value.takeLimitCount : -1
     } as unknown as CouponTemplateApi.CouponTemplateVO
 
-    // 设置品范围
+    // 设置品范围
     setProductScopeValues(data)
 
     if (formType.value === 'create') {
@@ -361,11 +361,11 @@ const resetForm = () => {
   formRef.value?.resetFields()
 }
 
-/** 获得品范围 */
+/** 获得品范围 */
 const getProductScope = async () => {
   switch (formData.value.productScope) {
     case PromotionProductScopeEnum.SPU.scope:
-      // 设置品编号
+      // 设置品编号
       formData.value.productSpuIds = formData.value.productScopeValues
       break
     case PromotionProductScopeEnum.CATEGORY.scope:
@@ -384,7 +384,7 @@ const getProductScope = async () => {
   }
 }
 
-/** 设置品范围 */
+/** 设置品范围 */
 function setProductScopeValues(data: CouponTemplateApi.CouponTemplateVO) {
   switch (formData.value.productScope) {
     case PromotionProductScopeEnum.SPU.scope:

+ 5 - 5
src/views/mall/promotion/discountActivity/DiscountActivityForm.vue

@@ -9,7 +9,7 @@
     >
       <!-- 先选择 -->
       <template #spuId>
-        <el-button @click="spuSelectRef.open()">选择品</el-button>
+        <el-button @click="spuSelectRef.open()">选择品</el-button>
         <SpuAndSkuList
           ref="spuAndSkuListRef"
           :deletable="true"
@@ -74,15 +74,15 @@ const dialogTitle = ref('') // 弹窗的标题
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formRef = ref() // 表单 Ref
-// ================= 品选择相关 =================
+// ================= 品选择相关 =================
 
-const spuSelectRef = ref() // 品和属性选择 Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
 const spuAndSkuListRef = ref() // sku 限时折扣  配置组件Ref
 const ruleConfig: RuleConfig[] = [
   {
     name: 'productConfig.discountPrice',
     rule: (arg) => arg > 0,
-    message: '品优惠金额不能为 0 !!!'
+    message: '品优惠金额不能为 0 !!!'
   }
 ]
 const spuList = ref<DiscountActivityApi.SpuExtension[]>([]) // 选择的 spu
@@ -186,7 +186,7 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    // 获取折扣品配置
+    // 获取折扣品配置
     const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
     products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
       item.discountPercent = convertToInteger(item.discountPercent)

+ 1 - 1
src/views/mall/promotion/discountActivity/discountActivity.data.ts

@@ -71,7 +71,7 @@ const crudSchemas = reactive<CrudSchema[]>([
     }
   },
   {
-    label: '活动品',
+    label: '活动品',
     field: 'spuId',
     isTable: true,
     isSearch: false,

+ 49 - 44
src/views/mall/promotion/discountActivity/index.vue

@@ -4,27 +4,27 @@
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <el-form
-      class="-mb-15px"
-      :model="queryParams"
       ref="queryFormRef"
       :inline="true"
+      :model="queryParams"
+      class="-mb-15px"
       label-width="68px"
     >
       <el-form-item label="活动名称" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入活动名称"
+          class="!w-240px"
           clearable
+          placeholder="请输入活动名称"
           @keyup.enter="handleQuery"
-          class="!w-240px"
         />
       </el-form-item>
       <el-form-item label="活动状态" prop="status">
         <el-select
           v-model="queryParams.status"
-          placeholder="请选择活动状态"
-          clearable
           class="!w-240px"
+          clearable
+          placeholder="请选择活动状态"
         >
           <el-option
             v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@@ -37,87 +37,94 @@
       <el-form-item label="活动时间" prop="activeTime">
         <el-date-picker
           v-model="queryParams.activeTime"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
           :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
           class="!w-240px"
+          end-placeholder="结束日期"
+          start-placeholder="开始日期"
+          type="daterange"
+          value-format="YYYY-MM-DD HH:mm:ss"
         />
       </el-form-item>
       <el-form-item>
-        <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
-        <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+        <el-button @click="handleQuery">
+          <Icon class="mr-5px" icon="ep:search" />
+          搜索
+        </el-button>
+        <el-button @click="resetQuery">
+          <Icon class="mr-5px" icon="ep:refresh" />
+          重置
+        </el-button>
         <el-button
-          type="primary"
+          v-hasPermi="['promotion:discount-activity:create']"
           plain
+          type="primary"
           @click="openForm('create')"
-          v-hasPermi="['promotion:discount-activity:create']"
         >
-          <Icon icon="ep:plus" class="mr-5px" /> 新增活动
+          <Icon class="mr-5px" icon="ep:plus" />
+          新增活动
         </el-button>
       </el-form-item>
     </el-form>
   </ContentWrap>
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-      <el-table-column label="活动编号" prop="id" min-width="80" />
-      <el-table-column label="活动名称" prop="name" min-width="140" />
+    <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
+      <el-table-column label="活动编号" min-width="80" prop="id" />
+      <el-table-column label="活动名称" min-width="140" prop="name" />
       <el-table-column label="活动时间" min-width="210">
         <template #default="scope">
           {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }}
           ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
         </template>
       </el-table-column>
-<!--      <el-table-column label="商品图片" prop="spuName" min-width="80">-->
-<!--        <template #default="scope">-->
-<!--          <el-image-->
-<!--            :src="scope.row.picUrl"-->
-<!--            class="h-40px w-40px"-->
-<!--            :preview-src-list="[scope.row.picUrl]"-->
-<!--            preview-teleported-->
-<!--          />-->
-<!--        </template>-->
-<!--      </el-table-column>-->
-<!--      <el-table-column label="商品标题" prop="spuName" min-width="300" />-->
-      <el-table-column label="活动状态" align="center" prop="status" min-width="100">
+      <!--      <el-table-column label="产品图片" prop="spuName" min-width="80">-->
+      <!--        <template #default="scope">-->
+      <!--          <el-image-->
+      <!--            :src="scope.row.picUrl"-->
+      <!--            class="h-40px w-40px"-->
+      <!--            :preview-src-list="[scope.row.picUrl]"-->
+      <!--            preview-teleported-->
+      <!--          />-->
+      <!--        </template>-->
+      <!--      </el-table-column>-->
+      <!--      <el-table-column label="产品标题" prop="spuName" min-width="300" />-->
+      <el-table-column align="center" label="活动状态" min-width="100" prop="status">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
       <el-table-column
-        label="创建时间"
+        :formatter="dateFormatter"
         align="center"
+        label="创建时间"
         prop="createTime"
-        :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="操作" align="center" width="150px" fixed="right">
+      <el-table-column align="center" fixed="right" label="操作" width="150px">
         <template #default="scope">
           <el-button
+            v-hasPermi="['promotion:discount-activity:update']"
             link
             type="primary"
             @click="openForm('update', scope.row.id)"
-            v-hasPermi="['promotion:discount-activity:update']"
           >
             编辑
           </el-button>
           <el-button
+            v-if="scope.row.status === 0"
+            v-hasPermi="['promotion:discount-activity:close']"
             link
             type="danger"
             @click="handleClose(scope.row.id)"
-            v-if="scope.row.status === 0"
-            v-hasPermi="['promotion:discount-activity:close']"
           >
             关闭
           </el-button>
           <el-button
+            v-else
+            v-hasPermi="['promotion:discount-activity:delete']"
             link
             type="danger"
             @click="handleDelete(scope.row.id)"
-            v-else
-            v-hasPermi="['promotion:discount-activity:delete']"
           >
             删除
           </el-button>
@@ -126,9 +133,9 @@
     </el-table>
     <!-- 分页 -->
     <Pagination
-      :total="total"
-      v-model:page="queryParams.pageNo"
       v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
       @pagination="getList"
     />
   </ContentWrap>
@@ -136,13 +143,11 @@
   <DiscountActivityForm ref="formRef" @success="getList" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
-import { dateFormatter } from '@/utils/formatTime'
+import { dateFormatter, formatDate } from '@/utils/formatTime'
 import * as DiscountActivity from '@/api/mall/promotion/discount/discountActivity'
 import DiscountActivityForm from './DiscountActivityForm.vue'
-import { formatDate } from '@/utils/formatTime'
-import { fenToYuanFormat } from '@/utils/formatter'
 import { fenToYuan } from '@/utils'
 
 defineOptions({ name: 'DiscountActivity' })

+ 1 - 1
src/views/mall/promotion/kefu/components/KeFuConversationList.vue

@@ -122,7 +122,7 @@ const getConversationDisplayText = computed(
       case KeFuMessageContentTypeEnum.IMAGE:
         return '[图片消息]'
       case KeFuMessageContentTypeEnum.PRODUCT:
-        return '[品消息]'
+        return '[品消息]'
       case KeFuMessageContentTypeEnum.ORDER:
         return '[订单消息]'
       case KeFuMessageContentTypeEnum.VOICE:

+ 1 - 1
src/views/mall/promotion/kefu/components/KeFuMessageList.vue

@@ -68,7 +68,7 @@
                     preview-teleported
                   />
                 </MessageItem>
-                <!-- 品消息 -->
+                <!-- 品消息 -->
                 <MessageItem :message="item">
                   <ProductItem
                     v-if="KeFuMessageContentTypeEnum.PRODUCT === item.contentType"

+ 1 - 1
src/views/mall/promotion/kefu/components/message/OrderItem.vue

@@ -25,7 +25,7 @@
       <div class="pay-box flex justify-end pr-5px">
         <div class="flex items-center">
           <div class="discounts-title pay-color"
-            >共 {{ getMessageContent?.productCount }} 件品,总金额:
+            >共 {{ getMessageContent?.productCount }} 件品,总金额:
           </div>
           <div class="discounts-money pay-color">
             ¥{{ fenToYuan(getMessageContent?.payPrice) }}

+ 3 - 3
src/views/mall/promotion/kefu/components/message/ProductItem.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="product-warp" style="cursor: pointer" @click.stop="openDetail(spuId)">
-    <!-- 左侧品图片-->
+    <!-- 左侧品图片-->
     <div class="product-warp-left mr-24px">
       <el-image
         :initial-index="0"
@@ -12,7 +12,7 @@
         @click.stop
       />
     </div>
-    <!-- 右侧品信息 -->
+    <!-- 右侧品信息 -->
     <div class="product-warp-right">
       <div class="description">{{ title }}</div>
       <div class="my-5px">
@@ -60,7 +60,7 @@ defineProps({
   }
 })
 
-/** 查看品详情 */
+/** 查看品详情 */
 const openDetail = (spuId: number) => {
   push({ name: 'ProductSpuDetail', params: { id: spuId } })
 }

+ 1 - 1
src/views/mall/promotion/kefu/components/tools/constants.ts

@@ -6,7 +6,7 @@ export const KeFuMessageContentTypeEnum = {
   VIDEO: 4, // 视频消息
   SYSTEM: 5, // 系统消息
   // ========== 商城特殊消息 ==========
-  PRODUCT: 10, //  品消息
+  PRODUCT: 10, //  品消息
   ORDER: 11 //  订单消息"
 }
 

+ 8 - 8
src/views/mall/promotion/point/activity/PointActivityForm.vue

@@ -9,7 +9,7 @@
     >
       <!-- 先选择 -->
       <template #spuId>
-        <el-button v-if="!isFormUpdate" @click="spuSelectRef.open()">选择品</el-button>
+        <el-button v-if="!isFormUpdate" @click="spuSelectRef.open()">选择品</el-button>
         <SpuAndSkuList
           ref="spuAndSkuListRef"
           :rule-config="ruleConfig"
@@ -84,25 +84,25 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formRef = ref() // 表单 Ref
 const isFormUpdate = ref(false) // 是否更新表单
 
-// ================= 品选择相关 =================
+// ================= 品选择相关 =================
 
-const spuSelectRef = ref() // 品和属性选择 Ref
-const spuAndSkuListRef = ref() // sku 积分商城品配置组件Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
+const spuAndSkuListRef = ref() // sku 积分商城品配置组件Ref
 const ruleConfig: RuleConfig[] = [
   {
     name: 'productConfig.stock',
     rule: (arg) => arg >= 1,
-    message: '品可兑换库存必须大于等于 1 !!!'
+    message: '品可兑换库存必须大于等于 1 !!!'
   },
   {
     name: 'productConfig.point',
     rule: (arg) => arg >= 1,
-    message: '品所需兑换积分必须大于等于 1 !!!'
+    message: '品所需兑换积分必须大于等于 1 !!!'
   },
   {
     name: 'productConfig.count',
     rule: (arg) => arg >= 1,
-    message: '品可兑换次数必须大于等于 1 !!!'
+    message: '品可兑换次数必须大于等于 1 !!!'
   }
 ]
 const spuList = ref<SpuExtension[]>([]) // 选择的 spu
@@ -193,7 +193,7 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    // 获取秒杀品配置
+    // 获取秒杀品配置
     const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
     products.forEach((item: PointProductVO) => {
       item.price = convertToInteger(item.price)

+ 3 - 3
src/views/mall/promotion/point/activity/index.vue

@@ -51,7 +51,7 @@
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
       <el-table-column label="活动编号" min-width="80" prop="id" />
-      <el-table-column label="品图片" min-width="80" prop="spuName">
+      <el-table-column label="品图片" min-width="80" prop="spuName">
         <template #default="scope">
           <el-image
             :preview-src-list="[scope.row.picUrl]"
@@ -61,7 +61,7 @@
           />
         </template>
       </el-table-column>
-      <el-table-column label="品标题" min-width="300" prop="spuName" />
+      <el-table-column label="品标题" min-width="300" prop="spuName" />
       <el-table-column
         :formatter="fenToYuanFormat"
         label="原价"
@@ -154,7 +154,7 @@ const queryParams = reactive({
   status: null
 })
 const queryFormRef = ref() // 搜索的表单
-const getRedeemedQuantity = computed(() => (row: any) => (row.totalStock || 0) - (row.stock || 0)) // 获得品已兑换数量
+const getRedeemedQuantity = computed(() => (row: any) => (row.totalStock || 0) - (row.stock || 0)) // 获得品已兑换数量
 
 /** 查询列表 */
 const getList = async () => {

+ 1 - 1
src/views/mall/promotion/point/activity/pointActivity.data.ts

@@ -20,7 +20,7 @@ const crudSchemas = reactive<CrudSchema[]>([
     }
   },
   {
-    label: '积分商城活动品',
+    label: '积分商城活动品',
     field: 'spuId',
     isTable: true,
     isSearch: false,

+ 3 - 3
src/views/mall/promotion/point/components/PointTableSelect.vue

@@ -66,7 +66,7 @@
           </template>
         </el-table-column>
         <el-table-column label="活动编号" min-width="80" prop="id" />
-        <el-table-column label="品图片" min-width="80" prop="spuName">
+        <el-table-column label="品图片" min-width="80" prop="spuName">
           <template #default="scope">
             <el-image
               :preview-src-list="[scope.row.picUrl]"
@@ -76,7 +76,7 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="品标题" min-width="300" prop="spuName" />
+        <el-table-column label="品标题" min-width="300" prop="spuName" />
         <el-table-column
           :formatter="fenToYuanFormat"
           label="原价"
@@ -160,7 +160,7 @@ const queryParams = ref({
   name: null,
   status: undefined
 })
-const getRedeemedQuantity = computed(() => (row: any) => (row.totalStock || 0) - (row.stock || 0)) // 获得品已兑换数量
+const getRedeemedQuantity = computed(() => (row: any) => (row.totalStock || 0) - (row.stock || 0)) // 获得品已兑换数量
 /** 打开弹窗 */
 const open = (pointList?: PointActivityVO[]) => {
   // 重置

+ 8 - 8
src/views/mall/promotion/rewardActivity/RewardForm.vue

@@ -96,9 +96,9 @@ const formRules = reactive({
   name: [{ required: true, message: '活动名称不能为空', trigger: 'blur' }],
   startAndEndTime: [{ required: true, message: '活动时间不能为空', trigger: 'blur' }],
   conditionType: [{ required: true, message: '条件类型不能为空', trigger: 'change' }],
-  productScope: [{ required: true, message: '品范围不能为空', trigger: 'blur' }],
-  productSpuIds: [{ required: true, message: '品不能为空', trigger: 'blur' }],
-  productCategoryIds: [{ required: true, message: '品分类不能为空', trigger: 'blur' }]
+  productScope: [{ required: true, message: '品范围不能为空', trigger: 'blur' }],
+  productSpuIds: [{ required: true, message: '品不能为空', trigger: 'blur' }],
+  productCategoryIds: [{ required: true, message: '品分类不能为空', trigger: 'blur' }]
 })
 const formRef = ref() // 表单 Ref
 const rewardRuleRef = ref<InstanceType<typeof RewardRule>>() // 活动规则 Ref
@@ -124,7 +124,7 @@ const open = async (type: string, id?: number) => {
         }
       })
       formData.value = data
-      // 获得品范围
+      // 获得品范围
       await getProductScope()
     } finally {
       formLoading.value = false
@@ -158,7 +158,7 @@ const submitForm = async () => {
         item.limit = yuanToFen(item.limit || 0)
       }
     })
-    // 设置品范围
+    // 设置品范围
     setProductScopeValues(data)
     if (formType.value === 'create') {
       await RewardActivityApi.createRewardActivity(data)
@@ -184,11 +184,11 @@ const resetForm = () => {
   } as RewardActivityApi.RewardActivityVO
 }
 
-/** 获得品范围 */
+/** 获得品范围 */
 const getProductScope = async () => {
   switch (formData.value.productScope) {
     case PromotionProductScopeEnum.SPU.scope:
-      // 设置品编号
+      // 设置品编号
       formData.value.productSpuIds = formData.value.productScopeValues
       break
     case PromotionProductScopeEnum.CATEGORY.scope:
@@ -206,7 +206,7 @@ const getProductScope = async () => {
   }
 }
 
-/** 设置品范围 */
+/** 设置品范围 */
 function setProductScopeValues(data: any) {
   switch (formData.value.productScope) {
     case PromotionProductScopeEnum.SPU.scope:

+ 6 - 6
src/views/mall/promotion/seckill/activity/SeckillActivityForm.vue

@@ -9,7 +9,7 @@
     >
       <!-- 先选择 -->
       <template #spuId>
-        <el-button @click="spuSelectRef.open()">选择品</el-button>
+        <el-button @click="spuSelectRef.open()">选择品</el-button>
         <SpuAndSkuList
           ref="spuAndSkuListRef"
           :rule-config="ruleConfig"
@@ -64,20 +64,20 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formRef = ref() // 表单 Ref
 
-// ================= 品选择相关 =================
+// ================= 品选择相关 =================
 
-const spuSelectRef = ref() // 品和属性选择 Ref
+const spuSelectRef = ref() // 品和属性选择 Ref
 const spuAndSkuListRef = ref() // sku 秒杀配置组件Ref
 const ruleConfig: RuleConfig[] = [
   {
     name: 'productConfig.stock',
     rule: (arg) => arg >= 1,
-    message: '品秒杀库存必须大于等于 1 !!!'
+    message: '品秒杀库存必须大于等于 1 !!!'
   },
   {
     name: 'productConfig.seckillPrice',
     rule: (arg) => arg >= 0.01,
-    message: '品秒杀价格必须大于等于 0.01 !!!'
+    message: '品秒杀价格必须大于等于 0.01 !!!'
   }
 ]
 const spuList = ref<SeckillActivityApi.SpuExtension[]>([]) // 选择的 spu
@@ -163,7 +163,7 @@ const submitForm = async () => {
   // 提交请求
   formLoading.value = true
   try {
-    // 获取秒杀品配置
+    // 获取秒杀品配置
     const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
     products.forEach((item: SeckillProductVO) => {
       item.seckillPrice = convertToInteger(item.seckillPrice)

+ 44 - 38
src/views/mall/promotion/seckill/activity/index.vue

@@ -4,27 +4,27 @@
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <el-form
-      class="-mb-15px"
-      :model="queryParams"
       ref="queryFormRef"
       :inline="true"
+      :model="queryParams"
+      class="-mb-15px"
       label-width="68px"
     >
       <el-form-item label="活动名称" prop="name">
         <el-input
           v-model="queryParams.name"
-          placeholder="请输入活动名称"
+          class="!w-240px"
           clearable
+          placeholder="请输入活动名称"
           @keyup.enter="handleQuery"
-          class="!w-240px"
         />
       </el-form-item>
       <el-form-item label="活动状态" prop="status">
         <el-select
           v-model="queryParams.status"
-          placeholder="请选择活动状态"
-          clearable
           class="!w-240px"
+          clearable
+          placeholder="请选择活动状态"
         >
           <el-option
             v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@@ -35,15 +35,22 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
-        <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+        <el-button @click="handleQuery">
+          <Icon class="mr-5px" icon="ep:search" />
+          搜索
+        </el-button>
+        <el-button @click="resetQuery">
+          <Icon class="mr-5px" icon="ep:refresh" />
+          重置
+        </el-button>
         <el-button
-          type="primary"
+          v-hasPermi="['promotion:seckill-activity:create']"
           plain
+          type="primary"
           @click="openForm('create')"
-          v-hasPermi="['promotion:seckill-activity:create']"
         >
-          <Icon icon="ep:plus" class="mr-5px" /> 新增
+          <Icon class="mr-5px" icon="ep:plus" />
+          新增
         </el-button>
       </el-form-item>
     </el-form>
@@ -51,14 +58,14 @@
 
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-      <el-table-column label="活动编号" prop="id" min-width="80" />
-      <el-table-column label="活动名称" prop="name" min-width="140" />
+    <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true">
+      <el-table-column label="活动编号" min-width="80" prop="id" />
+      <el-table-column label="活动名称" min-width="140" prop="name" />
       <el-table-column
+        :show-overflow-tooltip="false"
         label="秒杀时段"
         prop="configIds"
         width="220px"
-        :show-overflow-tooltip="false"
       >
         <template #default="scope">
           <el-tag v-for="(configId, index) in scope.row.configIds" :key="index" class="mr-5px">
@@ -72,68 +79,68 @@
           ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
         </template>
       </el-table-column>
-      <el-table-column label="商品图片" prop="spuName" min-width="80">
+      <el-table-column label="产品图片" min-width="80" prop="spuName">
         <template #default="scope">
           <el-image
+            :preview-src-list="[scope.row.picUrl]"
             :src="scope.row.picUrl"
             class="h-40px w-40px"
-            :preview-src-list="[scope.row.picUrl]"
             preview-teleported
           />
         </template>
       </el-table-column>
-      <el-table-column label="商品标题" prop="spuName" min-width="300" />
+      <el-table-column label="产品标题" min-width="300" prop="spuName" />
       <el-table-column
+        :formatter="fenToYuanFormat"
         label="原价"
-        prop="marketPrice"
         min-width="100"
-        :formatter="fenToYuanFormat"
+        prop="marketPrice"
       />
-      <el-table-column label="原价" prop="marketPrice" min-width="100" />
-      <el-table-column label="秒杀价" prop="seckillPrice" min-width="100">
+      <el-table-column label="原价" min-width="100" prop="marketPrice" />
+      <el-table-column label="秒杀价" min-width="100" prop="seckillPrice">
         <template #default="scope">
           {{ formatSeckillPrice(scope.row.products) }}
         </template>
       </el-table-column>
-      <el-table-column label="活动状态" align="center" prop="status" min-width="100">
+      <el-table-column align="center" label="活动状态" min-width="100" prop="status">
         <template #default="scope">
           <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="库存" align="center" prop="stock" min-width="80" />
-      <el-table-column label="总库存" align="center" prop="totalStock" min-width="80" />
+      <el-table-column align="center" label="库存" min-width="80" prop="stock" />
+      <el-table-column align="center" label="总库存" min-width="80" prop="totalStock" />
       <el-table-column
-        label="创建时间"
+        :formatter="dateFormatter"
         align="center"
+        label="创建时间"
         prop="createTime"
-        :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="操作" align="center" width="150px" fixed="right">
+      <el-table-column align="center" fixed="right" label="操作" width="150px">
         <template #default="scope">
           <el-button
+            v-hasPermi="['promotion:seckill-activity:update']"
             link
             type="primary"
             @click="openForm('update', scope.row.id)"
-            v-hasPermi="['promotion:seckill-activity:update']"
           >
             编辑
           </el-button>
           <el-button
+            v-if="scope.row.status === 0"
+            v-hasPermi="['promotion:seckill-activity:close']"
             link
             type="danger"
             @click="handleClose(scope.row.id)"
-            v-if="scope.row.status === 0"
-            v-hasPermi="['promotion:seckill-activity:close']"
           >
             关闭
           </el-button>
           <el-button
+            v-else
+            v-hasPermi="['promotion:seckill-activity:delete']"
             link
             type="danger"
             @click="handleDelete(scope.row.id)"
-            v-else
-            v-hasPermi="['promotion:seckill-activity:delete']"
           >
             删除
           </el-button>
@@ -142,9 +149,9 @@
     </el-table>
     <!-- 分页 -->
     <Pagination
-      :total="total"
-      v-model:page="queryParams.pageNo"
       v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
       @pagination="getList"
     />
   </ContentWrap>
@@ -153,13 +160,12 @@
   <SeckillActivityForm ref="formRef" @success="getList" />
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
-import { dateFormatter } from '@/utils/formatTime'
+import { dateFormatter, formatDate } from '@/utils/formatTime'
 import * as SeckillActivityApi from '@/api/mall/promotion/seckill/seckillActivity'
 import { SeckillConfigApi } from '@/api/mall/promotion/seckill/seckillConfig'
 import SeckillActivityForm from './SeckillActivityForm.vue'
-import { formatDate } from '@/utils/formatTime'
 import { fenToYuanFormat } from '@/utils/formatter'
 import { fenToYuan } from '@/utils'
 

+ 1 - 1
src/views/mall/promotion/seckill/activity/seckillActivity.data.ts

@@ -128,7 +128,7 @@ const crudSchemas = reactive<CrudSchema[]>([
     }
   },
   {
-    label: '秒杀活动品',
+    label: '秒杀活动品',
     field: 'spuId',
     isTable: true,
     isSearch: false,

+ 22 - 22
src/views/mall/promotion/seckill/components/SeckillTableSelect.vue

@@ -12,18 +12,18 @@
         <el-form-item label="活动名称" prop="name">
           <el-input
             v-model="queryParams.name"
-            placeholder="请输入活动名称"
+            class="!w-240px"
             clearable
+            placeholder="请输入活动名称"
             @keyup.enter="handleQuery"
-            class="!w-240px"
           />
         </el-form-item>
         <el-form-item label="活动状态" prop="status">
           <el-select
             v-model="queryParams.status"
-            placeholder="请选择活动状态"
-            clearable
             class="!w-240px"
+            clearable
+            placeholder="请选择活动状态"
           >
             <el-option
               v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@@ -46,7 +46,7 @@
       </el-form>
       <el-table v-loading="loading" :data="list" show-overflow-tooltip>
         <!-- 1. 多选模式(不能使用type="selection",Element会忽略Header插槽) -->
-        <el-table-column width="55" v-if="multiple">
+        <el-table-column v-if="multiple" width="55">
           <template #header>
             <el-checkbox
               v-model="isCheckAll"
@@ -62,11 +62,11 @@
           </template>
         </el-table-column>
         <!-- 2. 单选模式 -->
-        <el-table-column label="#" width="55" v-else>
+        <el-table-column v-else label="#" width="55">
           <template #default="{ row }">
             <el-radio
-              :value="row.id"
               v-model="selectedActivityId"
+              :value="row.id"
               @change="handleSingleSelected(row)"
             >
               <!-- 空格不能省略,是为了让单选框不显示label,如果不指定label不会有选中的效果 -->
@@ -74,49 +74,49 @@
             </el-radio>
           </template>
         </el-table-column>
-        <el-table-column label="活动编号" prop="id" min-width="80" />
-        <el-table-column label="活动名称" prop="name" min-width="140" />
+        <el-table-column label="活动编号" min-width="80" prop="id" />
+        <el-table-column label="活动名称" min-width="140" prop="name" />
         <el-table-column label="活动时间" min-width="210">
           <template #default="scope">
             {{ formatDate(scope.row.startTime, 'YYYY-MM-DD') }}
             ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
           </template>
         </el-table-column>
-        <el-table-column label="商品图片" prop="spuName" min-width="80">
+        <el-table-column label="产品图片" min-width="80" prop="spuName">
           <template #default="scope">
             <el-image
+              :preview-src-list="[scope.row.picUrl]"
               :src="scope.row.picUrl"
               class="h-40px w-40px"
-              :preview-src-list="[scope.row.picUrl]"
               preview-teleported
             />
           </template>
         </el-table-column>
-        <el-table-column label="商品标题" prop="spuName" min-width="300" />
+        <el-table-column label="产品标题" min-width="300" prop="spuName" />
         <el-table-column
+          :formatter="fenToYuanFormat"
           label="原价"
-          prop="marketPrice"
           min-width="100"
-          :formatter="fenToYuanFormat"
+          prop="marketPrice"
         />
-        <el-table-column label="拼团价" prop="seckillPrice" min-width="100">
+        <el-table-column label="拼团价" min-width="100" prop="seckillPrice">
           <template #default="scope">
             {{ formatSeckillPrice(scope.row.products) }}
           </template>
         </el-table-column>
-        <el-table-column label="开团组数" prop="groupCount" min-width="100" />
-        <el-table-column label="成团组数" prop="groupSuccessCount" min-width="100" />
-        <el-table-column label="购买次数" prop="recordCount" min-width="100" />
-        <el-table-column label="活动状态" align="center" prop="status" min-width="100">
+        <el-table-column label="开团组数" min-width="100" prop="groupCount" />
+        <el-table-column label="成团组数" min-width="100" prop="groupSuccessCount" />
+        <el-table-column label="购买次数" min-width="100" prop="recordCount" />
+        <el-table-column align="center" label="活动状态" min-width="100" prop="status">
           <template #default="scope">
             <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
           </template>
         </el-table-column>
         <el-table-column
-          label="创建时间"
+          :formatter="dateFormatter"
           align="center"
+          label="创建时间"
           prop="createTime"
-          :formatter="dateFormatter"
           width="180px"
         />
       </el-table>
@@ -128,7 +128,7 @@
         @pagination="getList"
       />
     </ContentWrap>
-    <template #footer v-if="multiple">
+    <template v-if="multiple" #footer>
       <el-button type="primary" @click="handleEmitChange">确 定</el-button>
       <el-button @click="dialogVisible = false">取 消</el-button>
     </template>

+ 1 - 1
src/views/mall/statistics/member/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
+  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
 
   <div class="flex flex-col">
     <el-row :gutter="16" class="summary">

+ 19 - 19
src/views/mall/statistics/product/components/ProductRank.vue

@@ -3,51 +3,51 @@
     <template #header>
       <!-- 标题 -->
       <div class="flex flex-row items-center justify-between">
-        <CardTitle title="品排行" />
+        <CardTitle title="品排行" />
         <!-- 查询条件 -->
         <ShortcutDateRangePicker ref="shortcutDateRangePicker" @change="handleDateRangeChange" />
       </div>
     </template>
     <!-- 排行列表 -->
     <el-table v-loading="loading" :data="list" @sort-change="handleSortChange">
-      <el-table-column label="商品 ID" prop="spuId" min-width="70" />
-      <el-table-column label="商品图片" align="center" prop="picUrl" width="80">
+      <el-table-column label="产品 ID" min-width="70" prop="spuId" />
+      <el-table-column align="center" label="产品图片" prop="picUrl" width="80">
         <template #default="{ row }">
           <el-image
-            :src="row.picUrl"
             :preview-src-list="[row.picUrl]"
+            :src="row.picUrl"
             class="h-30px w-30px"
             preview-teleported
           />
         </template>
       </el-table-column>
-      <el-table-column label="商品名称" prop="name" min-width="200" :show-overflow-tooltip="true" />
-      <el-table-column label="浏览量" prop="browseCount" min-width="90" sortable="custom" />
-      <el-table-column label="访客数" prop="browseUserCount" min-width="90" sortable="custom" />
-      <el-table-column label="加购件数" prop="cartCount" min-width="105" sortable="custom" />
-      <el-table-column label="下单件数" prop="orderCount" min-width="105" sortable="custom" />
-      <el-table-column label="支付件数" prop="orderPayCount" min-width="105" sortable="custom" />
+      <el-table-column :show-overflow-tooltip="true" label="产品名称" min-width="200" prop="name" />
+      <el-table-column label="浏览量" min-width="90" prop="browseCount" sortable="custom" />
+      <el-table-column label="访客数" min-width="90" prop="browseUserCount" sortable="custom" />
+      <el-table-column label="加购件数" min-width="105" prop="cartCount" sortable="custom" />
+      <el-table-column label="下单件数" min-width="105" prop="orderCount" sortable="custom" />
+      <el-table-column label="支付件数" min-width="105" prop="orderPayCount" sortable="custom" />
       <el-table-column
+        :formatter="fenToYuanFormat"
         label="支付金额"
-        prop="orderPayPrice"
         min-width="105"
+        prop="orderPayPrice"
         sortable="custom"
-        :formatter="fenToYuanFormat"
       />
-      <el-table-column label="收藏数" prop="favoriteCount" min-width="90" sortable="custom" />
+      <el-table-column label="收藏数" min-width="90" prop="favoriteCount" sortable="custom" />
       <el-table-column
+        :formatter="formatConvertRate"
         label="访客-支付转化率(%)"
-        prop="browseConvertPercent"
         min-width="180"
+        prop="browseConvertPercent"
         sortable="custom"
-        :formatter="formatConvertRate"
       />
     </el-table>
     <!-- 分页 -->
     <Pagination
-      :total="total"
-      v-model:page="queryParams.pageNo"
       v-model:limit="queryParams.pageSize"
+      v-model:page="queryParams.pageNo"
+      :total="total"
       @pagination="getSpuList"
     />
   </el-card>
@@ -58,7 +58,7 @@ import { CardTitle } from '@/components/Card'
 import { buildSortingField } from '@/utils'
 import { fenToYuanFormat } from '@/utils/formatter'
 
-/** 品排行 */
+/** 品排行 */
 defineOptions({ name: 'ProductRank' })
 
 // 格式化:访客-支付转化率
@@ -88,7 +88,7 @@ const loading = ref(false) // 列表的加载中
 const total = ref(0) // 列表的总页数
 const list = ref<ProductStatisticsVO[]>([]) // 列表的数据
 
-/** 查询品列表 */
+/** 查询品列表 */
 const getSpuList = async () => {
   loading.value = true
   try {

+ 63 - 62
src/views/mall/statistics/product/components/ProductSummary.vue

@@ -3,128 +3,129 @@
     <template #header>
       <!-- 标题 -->
       <div class="flex flex-row items-center justify-between">
-        <CardTitle title="品概况" />
+        <CardTitle title="品概况" />
         <!-- 查询条件 -->
         <ShortcutDateRangePicker ref="shortcutDateRangePicker" @change="getProductTrendData">
           <el-button
+            v-hasPermi="['statistics:product:export']"
+            :loading="exportLoading"
             class="ml-4"
             @click="handleExport"
-            :loading="exportLoading"
-            v-hasPermi="['statistics:product:export']"
           >
-            <Icon icon="ep:download" class="mr-1" />导出
+            <Icon class="mr-1" icon="ep:download" />
+            导出
           </el-button>
         </ShortcutDateRangePicker>
       </div>
     </template>
     <!-- 统计值 -->
     <el-row :gutter="16">
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="商品浏览量"
-          tooltip="在选定条件下,所有商品详情页被访问的次数,一个人在统计时间内访问多次记为多次"
-          icon="ep:view"
-          icon-color="bg-blue-100"
-          icon-bg-color="text-blue-500"
-          prefix=""
           :decimals="0"
-          :value="trendSummary?.value?.browseCount || 0"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.browseCount,
               trendSummary?.reference?.browseCount
             )
           "
+          :value="trendSummary?.value?.browseCount || 0"
+          icon="ep:view"
+          icon-bg-color="text-blue-500"
+          icon-color="bg-blue-100"
+          prefix=""
+          title="产品浏览量"
+          tooltip="在选定条件下,所有产品详情页被访问的次数,一个人在统计时间内访问多次记为多次"
         />
       </el-col>
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="商品访客数"
-          tooltip="在选定条件下,访问任何商品详情页的人数,一个人在统计时间范围内访问多次只记为一个"
-          icon="ep:user-filled"
-          icon-color="bg-purple-100"
-          icon-bg-color="text-purple-500"
-          prefix=""
           :decimals="0"
-          :value="trendSummary?.value?.browseUserCount || 0"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.browseUserCount,
               trendSummary?.reference?.browseUserCount
             )
           "
+          :value="trendSummary?.value?.browseUserCount || 0"
+          icon="ep:user-filled"
+          icon-bg-color="text-purple-500"
+          icon-color="bg-purple-100"
+          prefix=""
+          title="产品访客数"
+          tooltip="在选定条件下,访问任何产品详情页的人数,一个人在统计时间范围内访问多次只记为一个"
         />
       </el-col>
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="支付件数"
-          tooltip="在选定条件下,成功付款订单的商品件数之和"
-          icon="fa-solid:money-check-alt"
-          icon-color="bg-yellow-100"
-          icon-bg-color="text-yellow-500"
-          prefix=""
           :decimals="0"
-          :value="trendSummary?.value?.orderPayCount || 0"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.orderPayCount,
               trendSummary?.reference?.orderPayCount
             )
           "
+          :value="trendSummary?.value?.orderPayCount || 0"
+          icon="fa-solid:money-check-alt"
+          icon-bg-color="text-yellow-500"
+          icon-color="bg-yellow-100"
+          prefix=""
+          title="支付件数"
+          tooltip="在选定条件下,成功付款订单的产品件数之和"
         />
       </el-col>
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="支付金额"
-          tooltip="在选定条件下,成功付款订单的商品金额之和"
-          icon="ep:warning-filled"
-          icon-color="bg-green-100"
-          icon-bg-color="text-green-500"
-          prefix="¥"
           :decimals="2"
-          :value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.orderPayPrice,
               trendSummary?.reference?.orderPayPrice
             )
           "
+          :value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)"
+          icon="ep:warning-filled"
+          icon-bg-color="text-green-500"
+          icon-color="bg-green-100"
+          prefix="¥"
+          title="支付金额"
+          tooltip="在选定条件下,成功付款订单的产品金额之和"
         />
       </el-col>
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="退款件数"
-          tooltip="在选定条件下,成功退款的商品件数之和"
-          icon="fa-solid:wallet"
-          icon-color="bg-cyan-100"
-          icon-bg-color="text-cyan-500"
-          prefix=""
           :decimals="0"
-          :value="trendSummary?.value?.afterSaleCount || 0"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.afterSaleCount,
               trendSummary?.reference?.afterSaleCount
             )
           "
+          :value="trendSummary?.value?.afterSaleCount || 0"
+          icon="fa-solid:wallet"
+          icon-bg-color="text-cyan-500"
+          icon-color="bg-cyan-100"
+          prefix=""
+          title="退款件数"
+          tooltip="在选定条件下,成功退款的产品件数之和"
         />
       </el-col>
-      <el-col :xl="4" :md="8" :sm="24">
+      <el-col :md="8" :sm="24" :xl="4">
         <SummaryCard
-          title="退款金额"
-          tooltip="在选定条件下,成功退款的商品金额之和"
-          icon="fa-solid:award"
-          icon-color="bg-yellow-100"
-          icon-bg-color="text-yellow-500"
-          prefix="¥"
           :decimals="2"
-          :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)"
           :percent="
             calculateRelativeRate(
               trendSummary?.value?.afterSaleRefundPrice,
               trendSummary?.reference?.afterSaleRefundPrice
             )
           "
+          :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)"
+          icon="fa-solid:award"
+          icon-bg-color="text-yellow-500"
+          icon-color="bg-yellow-100"
+          prefix="¥"
+          title="退款金额"
+          tooltip="在选定条件下,成功退款的产品金额之和"
         />
       </el-col>
     </el-row>
@@ -145,14 +146,14 @@ import { CardTitle } from '@/components/Card'
 import * as DateUtil from '@/utils/formatTime'
 import dayjs from 'dayjs'
 
-/** 品概况 */
+/** 品概况 */
 defineOptions({ name: 'ProductSummary' })
 
 const message = useMessage() // 消息弹窗
 
-const trendLoading = ref(true) // 品状态加载中
+const trendLoading = ref(true) // 品状态加载中
 const exportLoading = ref(false) // 导出的加载中
-const trendSummary = ref<DataComparisonRespVO<ProductStatisticsVO>>() // 品状况统计数据
+const trendSummary = ref<DataComparisonRespVO<ProductStatisticsVO>>() // 品状况统计数据
 const shortcutDateRangePicker = ref()
 
 /** 折线图配置 */
@@ -172,8 +173,8 @@ const lineChartOptions = reactive<EChartsOption>({
     top: 50
   },
   series: [
-    { name: '品浏览量', type: 'line', smooth: true, itemStyle: { color: '#B37FEB' } },
-    { name: '品访客数', type: 'line', smooth: true, itemStyle: { color: '#FFAB2B' } },
+    { name: '品浏览量', type: 'line', smooth: true, itemStyle: { color: '#B37FEB' } },
+    { name: '品访客数', type: 'line', smooth: true, itemStyle: { color: '#FFAB2B' } },
     { name: '支付金额', type: 'bar', smooth: true, yAxisIndex: 1, itemStyle: { color: '#1890FF' } },
     { name: '退款金额', type: 'bar', smooth: true, yAxisIndex: 1, itemStyle: { color: '#00C050' } }
   ],
@@ -186,7 +187,7 @@ const lineChartOptions = reactive<EChartsOption>({
       brush: {
         type: ['lineX', 'clear'] // 区域缩放按钮、还原按钮
       },
-      saveAsImage: { show: true, name: '品状况' } // 保存为图片
+      saveAsImage: { show: true, name: '品状况' } // 保存为图片
     }
   },
   tooltip: {
@@ -249,7 +250,7 @@ const lineChartOptions = reactive<EChartsOption>({
   ]
 }) as EChartsOption
 
-/** 处理品状况查询 */
+/** 处理品状况查询 */
 const getProductTrendData = async () => {
   trendLoading.value = true
   // 1. 处理时间: 开始与截止在同一天的, 折线图出不来, 需要延长一天
@@ -263,13 +264,13 @@ const getProductTrendData = async () => {
   trendLoading.value = false
 }
 
-/** 查询品状况数据统计 */
+/** 查询品状况数据统计 */
 const getProductTrendSummary = async () => {
   const times = shortcutDateRangePicker.value.times
   trendSummary.value = await ProductStatisticsApi.getProductStatisticsAnalyse({ times })
 }
 
-/** 查询品状况数据列表 */
+/** 查询品状况数据列表 */
 const getProductStatisticsList = async () => {
   // 查询数据
   const times = shortcutDateRangePicker.value.times
@@ -294,7 +295,7 @@ const handleExport = async () => {
     exportLoading.value = true
     const times = shortcutDateRangePicker.value.times
     const data = await ProductStatisticsApi.exportProductStatisticsExcel({ times })
-    download.excel(data, '品状况.xls')
+    download.excel(data, '品状况.xls')
   } catch {
   } finally {
     exportLoading.value = false

+ 4 - 4
src/views/mall/statistics/product/index.vue

@@ -1,16 +1,16 @@
 <template>
-  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
+  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
 
-  <!-- 品概览 -->
+  <!-- 品概览 -->
   <ProductSummary />
-  <!-- 品排行 -->
+  <!-- 品排行 -->
   <ProductRank class="mt-16px" />
 </template>
 <script lang="ts" setup>
 import ProductSummary from './components/ProductSummary.vue'
 import ProductRank from './components/ProductRank.vue'
 
-/** 品统计 */
+/** 品统计 */
 defineOptions({ name: 'ProductStatistics' })
 </script>
 <style lang="scss" scoped></style>

+ 70 - 69
src/views/mall/statistics/trade/index.vue

@@ -1,59 +1,59 @@
 <template>
-  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
+  <doc-alert title="【统计】会员、品、交易统计" url="https://doc.iocoder.cn/mall/statistics/" />
 
   <div class="flex flex-col">
     <el-row :gutter="16" class="summary">
       <el-col :sm="6" :xs="12">
         <TradeStatisticValue
-          tooltip="昨日订单数量"
-          title="昨日订单数量"
-          :value="summary?.value?.yesterdayOrderCount || 0"
           :percent="
             calculateRelativeRate(
               summary?.value?.yesterdayOrderCount,
               summary?.reference?.yesterdayOrderCount
             )
           "
+          :value="summary?.value?.yesterdayOrderCount || 0"
+          title="昨日订单数量"
+          tooltip="昨日订单数量"
         />
       </el-col>
       <el-col :sm="6" :xs="12">
         <TradeStatisticValue
-          tooltip="本月订单数量"
-          title="本月订单数量"
-          :value="summary?.value?.monthOrderCount || 0"
           :percent="
             calculateRelativeRate(
               summary?.value?.monthOrderCount,
               summary?.reference?.monthOrderCount
             )
           "
+          :value="summary?.value?.monthOrderCount || 0"
+          title="本月订单数量"
+          tooltip="本月订单数量"
         />
       </el-col>
       <el-col :sm="6" :xs="12">
         <TradeStatisticValue
-          tooltip="昨日支付金额"
-          title="昨日支付金额"
-          prefix="¥"
           :decimals="2"
-          :value="fenToYuan(summary?.value?.yesterdayPayPrice || 0)"
           :percent="
             calculateRelativeRate(
               summary?.value?.yesterdayPayPrice,
               summary?.reference?.yesterdayPayPrice
             )
           "
+          :value="fenToYuan(summary?.value?.yesterdayPayPrice || 0)"
+          prefix="¥"
+          title="昨日支付金额"
+          tooltip="昨日支付金额"
         />
       </el-col>
       <el-col :sm="6" :xs="12">
         <TradeStatisticValue
-          tooltip="本月支付金额"
-          title="本月支付金额"
-          prefix="¥"
           ::decimals="2"
-          :value="fenToYuan(summary?.value?.monthPayPrice || 0)"
           :percent="
             calculateRelativeRate(summary?.value?.monthPayPrice, summary?.reference?.monthPayPrice)
           "
+          :value="fenToYuan(summary?.value?.monthPayPrice || 0)"
+          prefix="¥"
+          title="本月支付金额"
+          tooltip="本月支付金额"
         />
       </el-col>
     </el-row>
@@ -65,12 +65,13 @@
           <!-- 查询条件 -->
           <ShortcutDateRangePicker ref="shortcutDateRangePicker" @change="getTradeTrendData">
             <el-button
+              v-hasPermi="['statistics:trade:export']"
+              :loading="exportLoading"
               class="ml-4"
               @click="handleExport"
-              :loading="exportLoading"
-              v-hasPermi="['statistics:trade:export']"
             >
-              <Icon icon="ep:download" class="mr-1" />导出
+              <Icon class="mr-1" icon="ep:download" />
+              导出
             </el-button>
           </ShortcutDateRangePicker>
         </div>
@@ -79,128 +80,128 @@
       <el-row :gutter="16">
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="营业额"
-            tooltip="商品支付金额、充值金额"
-            icon="fa-solid:yen-sign"
-            icon-color="bg-blue-100"
-            icon-bg-color="text-blue-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.turnoverPrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.turnoverPrice,
                 trendSummary?.reference?.turnoverPrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.turnoverPrice || 0)"
+            icon="fa-solid:yen-sign"
+            icon-bg-color="text-blue-500"
+            icon-color="bg-blue-100"
+            prefix="¥"
+            title="营业额"
+            tooltip="产品支付金额、充值金额"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="商品支付金额"
-            tooltip="用户购买商品的实际支付金额,包括微信支付、余额支付、支付宝支付、线下支付金额(拼团商品在成团之后计入,线下支付订单在后台确认支付后计入)"
-            icon="fa-solid:shopping-cart"
-            icon-color="bg-purple-100"
-            icon-bg-color="text-purple-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.orderPayPrice,
                 trendSummary?.reference?.orderPayPrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.orderPayPrice || 0)"
+            icon="fa-solid:shopping-cart"
+            icon-bg-color="text-purple-500"
+            icon-color="bg-purple-100"
+            prefix="¥"
+            title="产品支付金额"
+            tooltip="用户购买产品的实际支付金额,包括微信支付、余额支付、支付宝支付、线下支付金额(拼团产品在成团之后计入,线下支付订单在后台确认支付后计入)"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="充值金额"
-            tooltip="用户成功充值的金额"
-            icon="fa-solid:money-check-alt"
-            icon-color="bg-yellow-100"
-            icon-bg-color="text-yellow-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.rechargePrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.rechargePrice,
                 trendSummary?.reference?.rechargePrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.rechargePrice || 0)"
+            icon="fa-solid:money-check-alt"
+            icon-bg-color="text-yellow-500"
+            icon-color="bg-yellow-100"
+            prefix="¥"
+            title="充值金额"
+            tooltip="用户成功充值的金额"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="支出金额"
-            tooltip="余额支付金额、支付佣金金额、商品退款金额"
-            icon="ep:warning-filled"
-            icon-color="bg-green-100"
-            icon-bg-color="text-green-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.expensePrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.expensePrice,
                 trendSummary?.reference?.expensePrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.expensePrice || 0)"
+            icon="ep:warning-filled"
+            icon-bg-color="text-green-500"
+            icon-color="bg-green-100"
+            prefix="¥"
+            title="支出金额"
+            tooltip="余额支付金额、支付佣金金额、产品退款金额"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="余额支付金额"
-            tooltip="用户下单时使用余额实际支付的金额"
-            icon="fa-solid:wallet"
-            icon-color="bg-cyan-100"
-            icon-bg-color="text-cyan-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.walletPayPrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.walletPayPrice,
                 trendSummary?.reference?.walletPayPrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.walletPayPrice || 0)"
+            icon="fa-solid:wallet"
+            icon-bg-color="text-cyan-500"
+            icon-color="bg-cyan-100"
+            prefix="¥"
+            title="余额支付金额"
+            tooltip="用户下单时使用余额实际支付的金额"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="支付佣金金额"
-            tooltip="后台给推广员支付的推广佣金,以实际支付为准"
-            icon="fa-solid:award"
-            icon-color="bg-yellow-100"
-            icon-bg-color="text-yellow-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.brokerageSettlementPrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.brokerageSettlementPrice,
                 trendSummary?.reference?.brokerageSettlementPrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.brokerageSettlementPrice || 0)"
+            icon="fa-solid:award"
+            icon-bg-color="text-yellow-500"
+            icon-color="bg-yellow-100"
+            prefix="¥"
+            title="支付佣金金额"
+            tooltip="后台给推广员支付的推广佣金,以实际支付为准"
           />
         </el-col>
         <el-col :md="6" :sm="12" :xs="24">
           <SummaryCard
-            title="商品退款金额"
-            tooltip="用户成功退款的商品金额"
-            icon="fa-solid:times-circle"
-            icon-color="bg-blue-100"
-            icon-bg-color="text-blue-500"
-            prefix="¥"
             :decimals="2"
-            :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)"
             :percent="
               calculateRelativeRate(
                 trendSummary?.value?.afterSaleRefundPrice,
                 trendSummary?.reference?.afterSaleRefundPrice
               )
             "
+            :value="fenToYuan(trendSummary?.value?.afterSaleRefundPrice || 0)"
+            icon="fa-solid:times-circle"
+            icon-bg-color="text-blue-500"
+            icon-color="bg-blue-100"
+            prefix="¥"
+            title="产品退款金额"
+            tooltip="用户成功退款的产品金额"
           />
         </el-col>
       </el-row>
@@ -213,11 +214,11 @@
 </template>
 <script lang="ts" setup>
 import * as TradeStatisticsApi from '@/api/mall/statistics/trade'
+import { TradeSummaryRespVO, TradeTrendSummaryRespVO } from '@/api/mall/statistics/trade'
 import TradeStatisticValue from './components/TradeStatisticValue.vue'
 import SummaryCard from '@/components/SummaryCard/index.vue'
 import { EChartsOption } from 'echarts'
 import { DataComparisonRespVO } from '@/api/mall/statistics/common'
-import { TradeSummaryRespVO, TradeTrendSummaryRespVO } from '@/api/mall/statistics/trade'
 import { calculateRelativeRate, fenToYuan } from '@/utils'
 import download from '@/utils/download'
 import { CardTitle } from '@/components/Card'
@@ -253,7 +254,7 @@ const lineChartOptions = reactive<EChartsOption>({
   },
   series: [
     { name: '营业额', type: 'line', smooth: true },
-    { name: '品支付金额', type: 'line', smooth: true },
+    { name: '品支付金额', type: 'line', smooth: true },
     { name: '充值金额', type: 'line', smooth: true },
     { name: '支出金额', type: 'line', smooth: true }
   ],

+ 4 - 4
src/views/mall/trade/afterSale/detail/index.vue

@@ -85,13 +85,13 @@
       </el-descriptions-item>
     </el-descriptions>
 
-    <!-- 品信息 -->
-    <el-descriptions title="品信息">
+    <!-- 品信息 -->
+    <el-descriptions title="品信息">
       <el-descriptions-item labelClassName="no-colon">
         <el-row :gutter="20">
           <el-col :span="15">
             <el-table v-if="formData.orderItem" :data="[formData.orderItem]" border>
-              <el-table-column label="品" prop="spuName" width="auto">
+              <el-table-column label="品" prop="spuName" width="auto">
                 <template #default="{ row }">
                   {{ row.spuName }}
                   <el-tag
@@ -103,7 +103,7 @@
                   </el-tag>
                 </template>
               </el-table-column>
-              <el-table-column label="品原价" prop="price" width="150">
+              <el-table-column label="品原价" prop="price" width="150">
                 <template #default="{ row }">{{ fenToYuan(row.price) }} 元</template>
               </el-table-column>
               <el-table-column label="数量" prop="count" width="100" />

+ 4 - 4
src/views/mall/trade/afterSale/index.vue

@@ -4,12 +4,12 @@
   <!-- 搜索 -->
   <ContentWrap>
     <el-form ref="queryFormRef" :inline="true" :model="queryParams" label-width="68px">
-      <el-form-item label="品名称" prop="spuName">
+      <el-form-item label="品名称" prop="spuName">
         <el-input
           v-model="queryParams.spuName"
           class="!w-280px"
           clearable
-          placeholder="请输入品 SPU 名称"
+          placeholder="请输入品 SPU 名称"
           @keyup.enter="handleQuery"
         />
       </el-form-item>
@@ -120,7 +120,7 @@
           </el-button>
         </template>
       </el-table-column>
-      <el-table-column label="品信息" min-width="600" prop="spuName">
+      <el-table-column label="品信息" min-width="600" prop="spuName">
         <template #default="{ row }">
           <div class="flex items-center">
             <el-image
@@ -253,7 +253,7 @@ const openOrderDetail = (id: number) => {
   push({ name: 'TradeOrderDetail', params: { id } })
 }
 
-/** 品图预览 */
+/** 品图预览 */
 const imagePreview = (imgUrl: string) => {
   createImageViewer({
     urlList: [imgUrl]

+ 1 - 1
src/views/mall/trade/config/index.vue

@@ -64,7 +64,7 @@
               placeholder="请输入满额包邮"
             />
             <el-text class="w-full" size="small" type="info">
-              商城品满多少金额即可包邮,单位:元
+              商城品满多少金额即可包邮,单位:元
             </el-text>
           </el-form-item>
           <el-form-item label="启用门店自提" prop="deliveryPickUpEnabled">

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor