feat: 租户

This commit is contained in:
dap
2024-10-05 23:23:21 +08:00
parent 936fa01b08
commit 74d56ddd82
2 changed files with 223 additions and 36 deletions

View File

@@ -2,7 +2,7 @@ import { getPopupContainer } from '@vben/utils';
import dayjs from 'dayjs';
import { type FormSchemaGetter, z } from '#/adapter';
import { type FormSchemaGetter, type VxeGridProps, z } from '#/adapter';
export const querySchema: FormSchemaGetter = () => [
{
@@ -27,6 +27,48 @@ export const querySchema: FormSchemaGetter = () => [
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '租户编号',
field: 'tenantId',
},
{
title: '租户名称',
field: 'companyName',
},
{
title: '联系人',
field: 'contactUserName',
},
{
title: '联系电话',
field: 'contactPhone',
},
{
title: '到期时间',
field: 'expireTime',
formatter: ({ cellValue }) => {
if (!cellValue) {
return '无期限';
}
return cellValue;
},
},
{
title: '租户状态',
field: 'status',
slots: { default: 'status' },
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
const defaultExpireTime = dayjs()
.add(365, 'days')
.startOf('day')