生产管理系统前端 开发中心配置系统 所有页面

This commit is contained in:
2025-10-21 18:04:39 +08:00
parent 4a5d278d89
commit 9afc680833
185 changed files with 13677 additions and 4487 deletions

View File

@@ -0,0 +1,57 @@
'use client';
import React from 'react';
import { Card } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Enterprise, AuditStatus } from '../types';
interface AuditStatusAlertProps {
enterprise: Enterprise;
}
export function AuditStatusAlert({ enterprise }: AuditStatusAlertProps) {
const getAuditStatusBadge = (status: AuditStatus) => {
switch (status) {
case 'pending':
return <Badge className="bg-yellow-100 text-yellow-700"></Badge>;
case 'approved':
return <Badge className="bg-green-100 text-green-700"></Badge>;
case 'rejected':
return <Badge className="bg-red-100 text-red-700"></Badge>;
default:
return <Badge>{status}</Badge>;
}
};
return (
<Card className={`p-4 ${
enterprise.auditStatus === 'pending' ? 'bg-yellow-50 border-yellow-200' :
enterprise.auditStatus === 'rejected' ? 'bg-red-50 border-red-200' :
'bg-green-50 border-green-200'
}`}>
<div className="flex items-center justify-between">
<div>
<div className="flex items-center gap-2">
<span></span>
{getAuditStatusBadge(enterprise.auditStatus)}
</div>
{enterprise.auditStatus === 'rejected' && enterprise.auditReason && (
<p className="text-sm text-red-700 mt-2">
{enterprise.auditReason}
</p>
)}
{enterprise.auditStatus === 'pending' && (
<p className="text-sm text-yellow-700 mt-2">
</p>
)}
</div>
{enterprise.auditTime && (
<div className="text-sm text-muted-foreground">
{new Date(enterprise.auditTime).toLocaleString('zh-CN')}
</div>
)}
</div>
</Card>
);
}