-
-
-
-
- updateFormData('name', e.target.value)}
- className="pl-10"
- />
-
-
-
-
-
-
-
- updateFormData('code', e.target.value.toUpperCase())}
- className="pl-10"
- />
-
-
编码创建后不可修改,请谨慎填写
-
-
-
-
-
-
- updateFormData('type', e.target.value)}
- className="pl-10"
- />
-
-
-
-
-
- 温馨提示:
-
-
- - • 企业创建后默认为启用状态,审核状态为"未提交"
- - • 联系人、电话、地址等详细信息由企业登录后自行填写
- - • 企业编码创建后不可修改,请确保准确无误
-
-
+ {/* Loading State */}
+ {state.loading && (
+
+ )}
-
-
-
-
-
-
+ {/* Data Table */}
+ {!state.loading && !state.error && (
+ <>
+
+
+
+
+ handleSort('tenant_code')}
+ >
+ 企业编码
+ {state.sortBy === 'tenant_code' && (
+ {state.sortOrder === 'asc' ? '↑' : '↓'}
+ )}
+
+ handleSort('company_name')}
+ >
+ 企业名称
+ {state.sortBy === 'company_name' && (
+ {state.sortOrder === 'asc' ? '↑' : '↓'}
+ )}
+
+ 企业类型
+ 登记人
+ 联系电话
+ handleSort('created_at')}
+ >
+ 创建时间
+ {state.sortBy === 'created_at' && (
+ {state.sortOrder === 'asc' ? '↑' : '↓'}
+ )}
+
+ 审核状态
+ 状态
+ 操作
+
+
+
+ {state.enterprises.map((enterprise) => (
+
+ {enterprise.code}
+
+
+
+ {enterprise.name}
+
+
+
+ {enterprise.type}
+
+ {enterprise.registrant || '-'}
+ {enterprise.contactPhone || '-'}
+ {enterprise.createdAt}
+ {getAuditStatusBadge(enterprise.auditStatus)}
+ {getStatusBadge(enterprise.status)}
+
+
+
+ {enterprise.status === 'active' ? (
+
+ ) : (
+
+ )}
+
+
+
+ ))}
+
+
+
+
+ {state.enterprises.length === 0 && (
+
+ )}
+
+ {/* Pagination */}
+ {state.pagination.totalPages > 1 && (
+
+
+ 显示第 {state.pagination.page} 页,共 {state.pagination.totalPages} 页
+ 总计 {state.pagination.total} 条记录
+
+
+
+
+ {state.pagination.page} / {state.pagination.totalPages}
+
+
+
+
+ )}
+ >
+ )}
+
{/* View Enterprise Details Dialog */}
-
{state.selectedEnterprise.contactPhone || state.selectedEnterprise.phone || '-'}
+
{state.selectedEnterprise.contactPhone || '-'}