feat: 新增商城模块,新增会员中心的会员详情的订单管理,售后管理,收藏记录,优惠券,推广用户的展示

This commit is contained in:
吃货
2025-07-06 08:49:22 +08:00
parent 280e79c55f
commit 4cc5d8bf92
115 changed files with 14819 additions and 206 deletions

View File

@@ -0,0 +1,140 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'spuName',
label: '商品名称',
component: 'Input',
},
{
fieldName: 'no',
label: '退款编号',
component: 'Input',
},
{
fieldName: 'orderNo',
label: '订单编号',
component: 'Input',
},
{
fieldName: 'status',
label: '售后状态',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.TRADE_AFTER_SALE_STATUS, 'number'),
},
},
{
fieldName: 'status',
label: '售后方式',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.TRADE_AFTER_SALE_WAY, 'number'),
},
},
{
fieldName: 'type',
label: '售后类型',
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.TRADE_AFTER_SALE_TYPE, 'number'),
},
},
{
fieldName: 'createTime',
label: '创建时间',
component: 'RangePicker',
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
},
},
];
}
/** 表格列配置 */
export function useGridColumns(): VxeGridPropTypes.Columns {
return [
{
field: 'no',
title: '退款编号',
fixed: 'left',
},
{
field: 'orderNo',
title: '订单编号',
fixed: 'left',
slots: { default: 'orderNo' },
},
{
field: 'spuName',
title: '商品名称',
align: 'left',
minWidth: 200,
},
{
field: 'picUrl',
title: '商品图片',
cellRender: {
name: 'CellImage',
},
},
{
field: 'properties',
title: '商品属性',
minWidth: 200,
formatter: ({ cellValue }) => {
return cellValue && cellValue.length > 0
? cellValue
.map((item: any) => `${item.propertyName} : ${item.valueName}`)
.join('\n')
: '-';
},
},
{
field: 'refundPrice',
title: '订单金额',
formatter: 'formatAmount2',
},
{
field: 'user.nickname',
title: '买家',
},
{
field: 'createTime',
title: '申请时间',
formatter: 'formatDateTime',
},
{
field: 'content',
title: '售后状态',
cellRender: {
name: 'CellDictTag',
props: {
dictType: DICT_TYPE.TRADE_AFTER_SALE_STATUS,
},
},
},
{
field: 'way',
title: '售后方式',
cellRender: {
name: 'CellDictTag',
props: {
dictType: DICT_TYPE.TRADE_AFTER_SALE_WAY,
},
},
},
{
title: '操作',
width: 80,
fixed: 'right',
slots: { default: 'actions' },
},
];
}