f
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled

This commit is contained in:
2026-01-10 18:11:29 +08:00
commit 69f3c4ce45
1443 changed files with 125558 additions and 0 deletions

View File

@@ -0,0 +1,117 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { getOrderProcessStatusName } from '#/utils/agent';
export function useOrderColumns(): VxeTableGridOptions['columns'] {
return [
{
field: 'id',
title: 'ID',
width: 80,
},
{
field: 'agent_id',
title: '代理ID',
width: 100,
},
{
field: 'order_id',
title: '订单ID',
width: 100,
},
{
field: 'product_id',
title: '产品ID',
width: 100,
},
{
field: 'product_name',
title: '产品名称',
width: 150,
},
{
field: 'order_amount',
title: '订单金额',
width: 120,
formatter: ({ cellValue }: { cellValue: number }) =>
`¥${cellValue.toFixed(2)}`,
},
{
field: 'set_price',
title: '设定价格',
width: 120,
formatter: ({ cellValue }: { cellValue: number }) =>
`¥${cellValue.toFixed(2)}`,
},
{
field: 'actual_base_price',
title: '实际底价',
width: 120,
formatter: ({ cellValue }: { cellValue: number }) =>
`¥${cellValue.toFixed(2)}`,
},
{
field: 'price_cost',
title: '提价成本',
width: 120,
formatter: ({ cellValue }: { cellValue: number }) =>
`¥${cellValue.toFixed(2)}`,
},
{
field: 'agent_profit',
title: '代理收益',
width: 120,
formatter: ({ cellValue }: { cellValue: number }) =>
`¥${cellValue.toFixed(2)}`,
},
{
field: 'process_status',
title: '处理状态',
width: 100,
cellRender: {
name: 'CellTag',
options: [
{ value: 0, color: 'warning', label: '待处理' },
{ value: 1, color: 'success', label: '处理成功' },
{ value: 2, color: 'error', label: '处理失败' },
],
},
},
{
field: 'create_time',
title: '创建时间',
width: 160,
sortable: true,
},
] as const;
}
export function useOrderFormSchema(): VbenFormSchema[] {
return [
{
component: 'InputNumber',
fieldName: 'agent_id',
label: '代理ID',
},
{
component: 'InputNumber',
fieldName: 'order_id',
label: '订单ID',
},
{
component: 'Select',
fieldName: 'process_status',
label: '处理状态',
componentProps: {
allowClear: true,
options: [
{ label: '待处理', value: 0 },
{ label: '处理成功', value: 1 },
{ label: '处理失败', value: 2 },
],
},
},
];
}