2
This commit is contained in:
67
apps/web-antd/src/views/agent/agent-links/data.ts
Normal file
67
apps/web-antd/src/views/agent/agent-links/data.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
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,
|
||||
},
|
||||
{
|
||||
field: 'product_id',
|
||||
title: '产品ID',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'product_name',
|
||||
title: '产品名称',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
field: 'set_price',
|
||||
title: '设定价格',
|
||||
width: 120,
|
||||
formatter: ({ cellValue }) => `¥${cellValue.toFixed(2)}`,
|
||||
},
|
||||
{
|
||||
field: 'actual_base_price',
|
||||
title: '实际底价',
|
||||
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 [
|
||||
{
|
||||
component: 'InputNumber',
|
||||
fieldName: 'product_id',
|
||||
label: '产品ID',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'product_name',
|
||||
label: '产品名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'link_identifier',
|
||||
label: '推广码',
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user