diff --git a/apps/admin/src/pages/Bills/index.tsx b/apps/admin/src/pages/Bills/index.tsx
index b373bf8..1a7bea5 100644
--- a/apps/admin/src/pages/Bills/index.tsx
+++ b/apps/admin/src/pages/Bills/index.tsx
@@ -196,26 +196,30 @@ const BillsPage: React.FC = () => {
};
const columns = [
- { title: '学生', render: (_: any, r: any) => r.student?.name || '-' },
- { title: '账单周期', render: (_: any, r: any) => `${r.periodStart} ~ ${r.periodEnd}` },
+ { title: '学生', width: 120, render: (_: any, r: any) => r.student?.name || '-' },
+ { title: '账单周期', width: 200, render: (_: any, r: any) => `${r.periodStart} ~ ${r.periodEnd}` },
{
title: '分摊费用',
dataIndex: 'sharedAmount',
+ width: 120,
render: (v: number) => `¥${Number(v).toFixed(2)}`,
},
{
title: '个人费用',
dataIndex: 'personalAmount',
+ width: 120,
render: (v: number) => `¥${Number(v).toFixed(2)}`,
},
{
title: '总计',
dataIndex: 'totalAmount',
+ width: 100,
render: (v: number) => ¥{Number(v).toFixed(2)},
},
{
title: '可用押金',
dataIndex: 'availableDeposit',
+ width: 120,
render: (v: number) =>
v > 0 ? (
¥{Number(v).toFixed(2)}
@@ -226,6 +230,7 @@ const BillsPage: React.FC = () => {
{
title: '抵扣后应付',
dataIndex: 'amountAfterDeposit',
+ width: 130,
render: (v: number, r: any) => {
const has = Number(r.availableDeposit || 0) > 0;
if (!has) return -;
@@ -241,11 +246,13 @@ const BillsPage: React.FC = () => {
{
title: '状态',
dataIndex: 'status',
+ width: 90,
render: (s: string) => {statusMap[s]?.text},
},
{
title: '生成时间',
dataIndex: 'generatedAt',
+ width: 160,
render: (v: string) => dayjs(v).format('YYYY-MM-DD HH:mm'),
},
{
diff --git a/apps/admin/src/pages/Classes/index.tsx b/apps/admin/src/pages/Classes/index.tsx
index 9e5e1b2..b6d9a0e 100644
--- a/apps/admin/src/pages/Classes/index.tsx
+++ b/apps/admin/src/pages/Classes/index.tsx
@@ -152,7 +152,7 @@ const ClassesPage: React.FC = () => {
const columns: ColumnsType = [
{
- title: '班级名称', dataIndex: 'name',
+ title: '班级名称', dataIndex: 'name', width: 120,
sorter: (a, b) => a.name.localeCompare(b.name),
},
{ title: '编码', dataIndex: 'code', width: 140 },
diff --git a/apps/admin/src/pages/ClassroomRentals/index.tsx b/apps/admin/src/pages/ClassroomRentals/index.tsx
index 2cdc49e..9897079 100644
--- a/apps/admin/src/pages/ClassroomRentals/index.tsx
+++ b/apps/admin/src/pages/ClassroomRentals/index.tsx
@@ -164,7 +164,7 @@ const ClassroomRentalsPage: React.FC = () => {
const columns = [
{
- title: '教室',
+ title: '教室', width: 120,
dataIndex: 'classroom',
render: (c: any) =>
c ? (
@@ -177,7 +177,7 @@ const ClassroomRentalsPage: React.FC = () => {
),
},
{
- title: '租赁方',
+ title: '租赁方', width: 100,
dataIndex: 'tenant',
render: (t: any) =>
t ? (
@@ -188,19 +188,19 @@ const ClassroomRentalsPage: React.FC = () => {
'-'
),
},
- { title: '开始日期', dataIndex: 'startDate' },
- { title: '结束日期', dataIndex: 'endDate' },
+ { title: '开始日期', dataIndex: 'startDate', width: 110 },
+ { title: '结束日期', dataIndex: 'endDate', width: 110 },
{
- title: '时长',
+ title: '时长', width: 80,
render: (_: any, r: any) => {
const d = dayjs(r.endDate).diff(dayjs(r.startDate), 'day') + 1;
return `${d}天`;
},
},
- { title: '日租金', dataIndex: 'dailyRate', render: (v: any) => (v ? `¥${v}` : '-') },
- { title: '总额', dataIndex: 'totalAmount', render: (v: any) => (v ? `¥${v}` : '-') },
+ { title: '日租金', dataIndex: 'dailyRate', width: 100, render: (v: any) => (v ? `¥${v}` : '-') },
+ { title: '总额', dataIndex: 'totalAmount', width: 100, render: (v: any) => (v ? `¥${v}` : '-') },
{
- title: '合同',
+ title: '合同', width: 120,
dataIndex: 'contractPath',
render: (v: string, r: any) =>
v ? (
diff --git a/apps/admin/src/pages/Classrooms/index.tsx b/apps/admin/src/pages/Classrooms/index.tsx
index c783aac..1347554 100644
--- a/apps/admin/src/pages/Classrooms/index.tsx
+++ b/apps/admin/src/pages/Classrooms/index.tsx
@@ -136,22 +136,22 @@ const ClassroomsPage: React.FC = () => {
const columns = [
{
- title: '教室名',
+ title: '教室名', width: 120,
dataIndex: 'name',
sorter: (a: any, b: any) => a.name.localeCompare(b.name),
},
- { title: '楼栋', dataIndex: 'building' },
- { title: '楼层', dataIndex: 'floor' },
+ { title: '楼栋', dataIndex: 'building', width: 80 },
+ { title: '楼层', dataIndex: 'floor', width: 80 },
{
- title: '类型',
+ title: '类型', width: 90,
dataIndex: 'roomType',
render: (v: string) => {v || '-'},
},
- { title: '容量', dataIndex: 'capacity' },
- { title: '课程类型', dataIndex: 'courseType', render: (v: string) => v || '-' },
- { title: '负责人', dataIndex: 'supervisor', render: (v: string) => v || '-' },
+ { title: '容量', dataIndex: 'capacity', width: 80 },
+ { title: '课程类型', dataIndex: 'courseType', width: 100, render: (v: string) => v || '-' },
+ { title: '负责人', dataIndex: 'supervisor', width: 100, render: (v: string) => v || '-' },
{
- title: '状态',
+ title: '状态', width: 100,
dataIndex: 'status',
render: (s: string, record: { currentUsage?: CurrentUsage | null }) => {
const effectiveStatus = record.currentUsage ? 'in_use' : s;
diff --git a/apps/admin/src/pages/Departments/index.tsx b/apps/admin/src/pages/Departments/index.tsx
index 2f29fda..66a2307 100644
--- a/apps/admin/src/pages/Departments/index.tsx
+++ b/apps/admin/src/pages/Departments/index.tsx
@@ -205,8 +205,8 @@ const DepartmentsPage: React.FC = () => {
const memberColumns = [
{ title: 'ID', dataIndex: 'userId', key: 'userId', width: 60 },
- { title: '用户名', dataIndex: ['user', 'username'], key: 'username' },
- { title: '姓名', dataIndex: ['user', 'name'], key: 'name' },
+ { title: '用户名', dataIndex: ['user', 'username'], key: 'username', width: 120 },
+ { title: '姓名', dataIndex: ['user', 'name'], key: 'name', width: 120 },
{
title: '默认部门',
dataIndex: 'isDefault',
diff --git a/apps/admin/src/pages/Deposits/index.tsx b/apps/admin/src/pages/Deposits/index.tsx
index 18f4f88..dee289e 100644
--- a/apps/admin/src/pages/Deposits/index.tsx
+++ b/apps/admin/src/pages/Deposits/index.tsx
@@ -217,9 +217,9 @@ const DepositsPage: React.FC = () => {
};
const columns = [
- { title: '学生', render: (_: any, r: any) => r.student?.name || '-' },
- { title: '押金金额', dataIndex: 'amount', render: (v: number) => `¥${Number(v).toFixed(2)}` },
- { title: '缴纳日期', dataIndex: 'paidDate' },
+ { title: '学生', width: 120, render: (_: any, r: any) => r.student?.name || '-' },
+ { title: '押金金额', dataIndex: 'amount', width: 110, render: (v: number) => `¥${Number(v).toFixed(2)}` },
+ { title: '缴纳日期', dataIndex: 'paidDate', width: 110 },
{
title: '状态',
dataIndex: 'status',
@@ -241,9 +241,9 @@ const DepositsPage: React.FC = () => {
dataIndex: 'deductionAmount',
render: (v: any) => (v > 0 ? `¥${Number(v).toFixed(2)}` : '-'),
},
- { title: '扣除原因', dataIndex: 'deductionReason', render: (v: any) => v || '-' },
- { title: '退还日期', dataIndex: 'refundDate', render: (v: any) => v || '-' },
- { title: '备注', dataIndex: 'notes', render: (v: any) => v || '-' },
+ { title: '扣除原因', dataIndex: 'deductionReason', width: 120, render: (v: any) => v || '-' },
+ { title: '退还日期', dataIndex: 'refundDate', width: 110, render: (v: any) => v || '-' },
+ { title: '备注', dataIndex: 'notes', width: 120, render: (v: any) => v || '-' },
{
title: '操作',
width: 240,
@@ -307,21 +307,21 @@ const DepositsPage: React.FC = () => {
];
const pendingColumns = [
- { title: '学生', render: (_: any, r: any) => r.student?.name || '-' },
- { title: '押金金额', dataIndex: 'amount', render: (v: number) => `¥${Number(v).toFixed(2)}` },
- { title: '缴纳日期', dataIndex: 'paidDate' },
+ { title: '学生', width: 120, render: (_: any, r: any) => r.student?.name || '-' },
+ { title: '押金金额', dataIndex: 'amount', width: 110, render: (v: number) => `¥${Number(v).toFixed(2)}` },
+ { title: '缴纳日期', dataIndex: 'paidDate', width: 110 },
{
- title: '审批状态',
+ title: '审批状态', width: 120,
dataIndex: 'refundStatus',
render: (s: string) => {refundStatusMap[s]?.text || s},
},
{
- title: '申请时间',
+ title: '申请时间', width: 160,
dataIndex: 'refundRequestedAt',
render: (v: any) => (v ? dayjs(v).format('YYYY-MM-DD HH:mm') : '-'),
},
{
- title: '操作',
+ title: '操作', width: 200,
render: (_: unknown, record: PendingRefund) => (
{
};
const roomColumns = [
- { title: '宿舍', render: (_: any, r: any) => r.room?.roomNumber || '-' },
+ { title: '宿舍', width: 120, render: (_: any, r: any) => r.room?.roomNumber || '-' },
{
- title: '费用类型',
+ title: '费用类型', width: 100,
dataIndex: 'expenseType',
render: (v: string) => {typeMap[v] || v},
},
- { title: '金额', dataIndex: 'amount', render: (v: number) => `¥${Number(v).toFixed(2)}` },
- { title: '账单周期', render: (_: any, r: any) => `${r.periodStart} ~ ${r.periodEnd}` },
- { title: '说明', dataIndex: 'description' },
+ { title: '金额', dataIndex: 'amount', width: 100, render: (v: number) => `¥${Number(v).toFixed(2)}` },
+ { title: '账单周期', width: 200, render: (_: any, r: any) => `${r.periodStart} ~ ${r.periodEnd}` },
+ { title: '说明', dataIndex: 'description', width: 150 },
{
- title: '录入时间',
+ title: '录入时间', width: 160,
dataIndex: 'createdAt',
render: (v: string) => dayjs(v).format('YYYY-MM-DD HH:mm'),
},
@@ -259,15 +259,15 @@ const ExpensesPage: React.FC = () => {
];
const personalColumns = [
- { title: '学生', render: (_: any, r: any) => r.student?.name || '-' },
+ { title: '学生', width: 120, render: (_: any, r: any) => r.student?.name || '-' },
{
- title: '费用类型',
+ title: '费用类型', width: 100,
dataIndex: 'expenseType',
render: (v: string) => {typeMap[v] || v},
},
{ title: '金额', dataIndex: 'amount', render: (v: number) => `¥${Number(v).toFixed(2)}` },
- { title: '日期', dataIndex: 'expenseDate' },
- { title: '说明', dataIndex: 'description' },
+ { title: '日期', dataIndex: 'expenseDate', width: 110 },
+ { title: '说明', dataIndex: 'description', width: 150 },
{
title: '操作',
width: 120,
diff --git a/apps/admin/src/pages/Occupancies/index.tsx b/apps/admin/src/pages/Occupancies/index.tsx
index 03e17c7..7e49ce4 100644
--- a/apps/admin/src/pages/Occupancies/index.tsx
+++ b/apps/admin/src/pages/Occupancies/index.tsx
@@ -174,13 +174,14 @@ const OccupanciesPage: React.FC = () => {
};
const columns = [
- { title: '学生', render: (_: any, r: any) => r.student?.name || '-' },
- { title: '宿舍', render: (_: any, r: any) => r.room?.roomNumber || '-' },
- { title: '入住日期', dataIndex: 'checkInDate' },
- { title: '计费起始', dataIndex: 'billingStartDate' },
+ { title: '学生', width: 120, render: (_: any, r: any) => r.student?.name || '-' },
+ { title: '宿舍', width: 120, render: (_: any, r: any) => r.room?.roomNumber || '-' },
+ { title: '入住日期', dataIndex: 'checkInDate', width: 110 },
+ { title: '计费起始', dataIndex: 'billingStartDate', width: 110 },
{
title: '退宿日期',
dataIndex: 'checkOutDate',
+ width: 110,
render: (v: any) => v || 在住,
},
{ title: '计费截止', dataIndex: 'billingEndDate', render: (v: any) => v || '-' },
diff --git a/apps/admin/src/pages/OperationLogs/index.tsx b/apps/admin/src/pages/OperationLogs/index.tsx
index 3da2a36..753765b 100644
--- a/apps/admin/src/pages/OperationLogs/index.tsx
+++ b/apps/admin/src/pages/OperationLogs/index.tsx
@@ -75,7 +75,7 @@ const OperationLogsPage: React.FC = () => {
},
},
{
- title: '详情',
+ title: '详情', width: 200,
dataIndex: 'detail',
ellipsis: true,
render: (v: string) =>
diff --git a/apps/admin/src/pages/Rooms/index.tsx b/apps/admin/src/pages/Rooms/index.tsx
index ee29241..935ea7c 100644
--- a/apps/admin/src/pages/Rooms/index.tsx
+++ b/apps/admin/src/pages/Rooms/index.tsx
@@ -186,11 +186,12 @@ const RoomsPage: React.FC = () => {
{
title: '房间号',
dataIndex: 'roomNumber',
+ width: 100,
sorter: (a: any, b: any) => a.roomNumber.localeCompare(b.roomNumber),
},
- { title: '楼栋', dataIndex: 'building' },
- { title: '楼层', dataIndex: 'floor' },
- { title: '类型', dataIndex: 'roomType', render: (v: any) => v || '-' },
+ { title: '楼栋', dataIndex: 'building', width: 80 },
+ { title: '楼层', dataIndex: 'floor', width: 80 },
+ { title: '类型', dataIndex: 'roomType', width: 90, render: (v: any) => v || '-' },
{
title: '租赁类型',
dataIndex: 'rentalCategory',
@@ -207,9 +208,10 @@ const RoomsPage: React.FC = () => {
width: 100,
render: (v: number) => (v ? `¥${v}` : '-'),
},
- { title: '额定人数', dataIndex: 'capacity' },
+ { title: '额定人数', dataIndex: 'capacity', width: 80 },
{
title: '当前入住',
+ width: 80,
render: (_: any, r: any) =>
r.status === 'archived' ? (
-
@@ -231,6 +233,7 @@ const RoomsPage: React.FC = () => {
{
title: '状态',
dataIndex: 'status',
+ width: 80,
render: (s: string) => {statusMap[s]?.text || s},
},
{
diff --git a/apps/admin/src/pages/Students/index.tsx b/apps/admin/src/pages/Students/index.tsx
index 75e5874..f02db8f 100644
--- a/apps/admin/src/pages/Students/index.tsx
+++ b/apps/admin/src/pages/Students/index.tsx
@@ -249,7 +249,6 @@ const StudentsPage: React.FC = () => {
title: '电话',
dataIndex: 'phone',
width: 140,
- ellipsis: true,
render: (v: string, record: any) => {
if (!v) return '-';
return (
@@ -266,14 +265,12 @@ const StudentsPage: React.FC = () => {
title: '学号',
dataIndex: 'studentNumber',
width: 120,
- ellipsis: true,
render: (v: string) => v || '-',
},
{
title: '身份证',
dataIndex: 'idNumber',
width: 180,
- ellipsis: true,
render: (v: string, record: any) => {
if (!v) return '-';
return (
@@ -287,18 +284,20 @@ const StudentsPage: React.FC = () => {
},
},
{ title: '民族', dataIndex: 'ethnicity', width: 90 },
- { title: '紧急联系人', dataIndex: 'emergencyContact', ellipsis: true },
- { title: '紧急联系人电话', dataIndex: 'emergencyPhone', ellipsis: true },
+ { title: '紧急联系人', dataIndex: 'emergencyContact', width: 100 },
+ { title: '紧急联系人电话', dataIndex: 'emergencyPhone', width: 130 },
{
title: '所属机构',
dataIndex: 'tenant',
+ width: 100,
render: (tenant: { name?: string } | null) =>
tenant?.name ? {tenant.name} : '-',
},
- { title: '负责人', dataIndex: 'supervisor', ellipsis: true },
+ { title: '负责人', dataIndex: 'supervisor', width: 100 },
{
title: '状态',
dataIndex: 'status',
+ width: 80,
render: (s: string) => {statusMap[s]?.text || s},
},
{
diff --git a/apps/admin/src/pages/Tenants/index.tsx b/apps/admin/src/pages/Tenants/index.tsx
index 84e2f43..e93f46a 100644
--- a/apps/admin/src/pages/Tenants/index.tsx
+++ b/apps/admin/src/pages/Tenants/index.tsx
@@ -84,7 +84,7 @@ const TenantsPage: React.FC = () => {
const columns = [
{
- title: '租赁方名称',
+ title: '租赁方名称', width: 120,
dataIndex: 'name',
render: (v: string, r: any) => (
@@ -97,10 +97,10 @@ const TenantsPage: React.FC = () => {
),
},
- { title: '联系人', dataIndex: 'contact', render: (v: string) => v || '-' },
- { title: '电话', dataIndex: 'phone', render: (v: string) => v || '-' },
+ { title: '联系人', dataIndex: 'contact', width: 100, render: (v: string) => v || '-' },
+ { title: '电话', dataIndex: 'phone', width: 120, render: (v: string) => v || '-' },
{
- title: '颜色',
+ title: '颜色', width: 80,
dataIndex: 'color',
render: (v: string) =>
v ? (
diff --git a/apps/admin/src/pages/Users/index.tsx b/apps/admin/src/pages/Users/index.tsx
index 191bb98..a42c1ec 100644
--- a/apps/admin/src/pages/Users/index.tsx
+++ b/apps/admin/src/pages/Users/index.tsx
@@ -248,7 +248,7 @@ const UsersPage: React.FC = () => {
dataSource={data}
rowKey="id"
loading={loading}
- scroll={{ x: 1000 }}
+ scroll={{ x: 1250 }}
pagination={false}
/>