feat(shop): 实时修复今日数据及优化商城设置与商品列表展示
- 修复 dashboard 今日数据统计,改为实时计算订单、销售额、用户数与优惠券使用量 - 统计数据写入 cmsStatistics 表,新增 couponUsedCount 状态与 getter - dashboard 页面移除原有按日期查询逻辑,优惠券使用数改为响应式读取 - 商城设置 Logo 上传改为直接调用 OSS 接口上传,移除图片库选择组件 - 新增商品列表中市场价和会员价列,数据为空时显示 "-" - 同步更新商品列表导出功能,包含新增的价格列与列宽配置 - 商品列表商品图片添加 OSS 压缩访问支持 - 调整商品分类搜索框与关键词输入框宽度以优化布局
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<template v-if="column.key === 'name'">
|
||||
<a-space class="flex items-center cursor-pointer">
|
||||
<a-image
|
||||
:src="record.image"
|
||||
:src="getCompressedImageUrl(record.image)"
|
||||
v-if="record.image"
|
||||
:preview="false"
|
||||
:width="50"
|
||||
@@ -132,6 +132,7 @@
|
||||
} from '@/api/shop/shopGoods';
|
||||
import type { ShopGoods, ShopGoodsParam } from '@/api/shop/shopGoods/model';
|
||||
import { getPageTitle } from '@/utils/common';
|
||||
import { getCompressedImageUrl } from '@/utils/image';
|
||||
import { ShopGoodsCategory } from '@/api/shop/shopGoodsCategory/model';
|
||||
import { listShopGoodsCategory } from '@/api/shop/shopGoodsCategory';
|
||||
import { utils, writeFile } from 'xlsx';
|
||||
@@ -199,13 +200,30 @@
|
||||
key: 'code',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '市场价',
|
||||
dataIndex: 'salePrice',
|
||||
key: 'salePrice',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => (text ? `¥${text}` : '-')
|
||||
},
|
||||
{
|
||||
title: '价格',
|
||||
dataIndex: 'price',
|
||||
key: 'price',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => `¥${text}`
|
||||
},
|
||||
{
|
||||
title: '会员价',
|
||||
dataIndex: 'dealerPrice',
|
||||
key: 'dealerPrice',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => (text ? `¥${text}` : '-')
|
||||
},
|
||||
{
|
||||
title: '销量',
|
||||
dataIndex: 'sales',
|
||||
@@ -347,6 +365,8 @@
|
||||
'商品ID',
|
||||
'商品名称',
|
||||
'价格',
|
||||
'市场价',
|
||||
'会员价',
|
||||
'销量',
|
||||
'库存',
|
||||
'状态',
|
||||
@@ -368,6 +388,8 @@
|
||||
`${goods.goodsId || ''}`,
|
||||
`${goods.name || ''}`,
|
||||
`¥${goods.price || 0}`,
|
||||
`${goods.salePrice ? `¥${goods.salePrice}` : ''}`,
|
||||
`${goods.dealerPrice ? `¥${goods.dealerPrice}` : ''}`,
|
||||
`${goods.sales || 0}`,
|
||||
`${goods.stock || 0}`,
|
||||
statusMap[goods.status || 0] || '',
|
||||
@@ -388,6 +410,8 @@
|
||||
{ wch: 10 },
|
||||
{ wch: 30 },
|
||||
{ wch: 12 },
|
||||
{ wch: 12 },
|
||||
{ wch: 12 },
|
||||
{ wch: 10 },
|
||||
{ wch: 10 },
|
||||
{ wch: 12 },
|
||||
|
||||
Reference in New Issue
Block a user