2025-11-27 19:08:41 +08:00
|
|
|
import type { VbenFormSchema } from '#/adapter/form';
|
|
|
|
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
|
|
|
|
|
|
|
|
|
// 推广链接列表列配置
|
|
|
|
|
export function useLinkColumns(): VxeTableGridOptions['columns'] {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
field: 'agent_id',
|
|
|
|
|
title: '代理ID',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
2026-02-08 17:01:33 +08:00
|
|
|
{
|
|
|
|
|
field: 'product_id',
|
|
|
|
|
title: '产品ID',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
2025-11-27 19:08:41 +08:00
|
|
|
{
|
|
|
|
|
field: 'product_name',
|
|
|
|
|
title: '产品名称',
|
|
|
|
|
width: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-02-08 17:01:33 +08:00
|
|
|
field: 'set_price',
|
|
|
|
|
title: '设定价格',
|
|
|
|
|
width: 120,
|
|
|
|
|
formatter: ({ cellValue }) => `¥${cellValue.toFixed(2)}`,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'actual_base_price',
|
|
|
|
|
title: '实际底价',
|
2025-11-27 19:08:41 +08:00
|
|
|
width: 120,
|
|
|
|
|
formatter: ({ cellValue }) => `¥${cellValue.toFixed(2)}`,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'link_identifier',
|
|
|
|
|
title: '推广码',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'create_time',
|
|
|
|
|
title: '创建时间',
|
|
|
|
|
width: 160,
|
|
|
|
|
sortable: true,
|
|
|
|
|
sortType: 'string' as const,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 推广链接搜索表单配置
|
|
|
|
|
export function useLinkFormSchema(): VbenFormSchema[] {
|
|
|
|
|
return [
|
2026-02-08 17:01:33 +08:00
|
|
|
{
|
|
|
|
|
component: 'InputNumber',
|
|
|
|
|
fieldName: 'product_id',
|
|
|
|
|
label: '产品ID',
|
|
|
|
|
},
|
2025-11-27 19:08:41 +08:00
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'product_name',
|
|
|
|
|
label: '产品名称',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Input',
|
|
|
|
|
fieldName: 'link_identifier',
|
|
|
|
|
label: '推广码',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|