2026-05-26 05:15:10 +00:00
|
|
|
// 状态映射配置
|
|
|
|
|
export const statusMap: Record<string, { label: string; color: string; bgColor: string; borderColor: string }> = {
|
|
|
|
|
pending: { label: '待确定', color: 'text-amber-700', bgColor: 'bg-amber-50', borderColor: 'border-amber-200' },
|
|
|
|
|
producing: { label: '生产中', color: 'text-blue-700', bgColor: 'bg-blue-50', borderColor: 'border-blue-200' },
|
2026-05-27 03:17:46 +00:00
|
|
|
completed: { label: '已完成', color: 'text-emerald-700', bgColor: 'bg-emerald-50', borderColor: 'border-emerald-200' },
|
|
|
|
|
rejected: { label: '已拒绝', color: 'text-gray-700', bgColor: 'bg-gray-100', borderColor: 'border-gray-300' }
|
2026-05-26 05:15:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 简化的状态映射(用于纺织厂)
|
|
|
|
|
export const simpleStatusMap: Record<string, { label: string; color: string }> = {
|
|
|
|
|
pending: { label: '待确定', color: 'bg-yellow-100 text-yellow-700' },
|
|
|
|
|
producing: { label: '生产中', color: 'bg-blue-100 text-blue-700' },
|
2026-05-27 03:17:46 +00:00
|
|
|
completed: { label: '已完成', color: 'bg-green-100 text-green-700' },
|
|
|
|
|
rejected: { label: '已拒绝', color: 'bg-gray-100 text-gray-600' }
|
2026-05-26 05:15:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 步骤类型配置
|
|
|
|
|
export const stepTypeConfig: Record<string, { name: string; icon: string }> = {
|
|
|
|
|
confirm: { name: '确认计划', icon: 'Check' },
|
|
|
|
|
yarn_purchase: { name: '采纱', icon: 'Clock' },
|
|
|
|
|
dyeing: { name: '染纱', icon: 'Clock' },
|
|
|
|
|
machine_start: { name: '上机', icon: 'Clock' },
|
|
|
|
|
fabric_warehouse: { name: '坯布生产', icon: 'Package' }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 步骤名称映射
|
|
|
|
|
export const stepNames: Record<string, string> = {
|
|
|
|
|
confirm: '确认计划',
|
|
|
|
|
yarn_purchase: '采纱',
|
|
|
|
|
dyeing: '染纱',
|
|
|
|
|
machine_start: '上机',
|
|
|
|
|
fabric_warehouse: '坯布生产'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 步骤顺序
|
|
|
|
|
export const stepOrder = ['confirm', 'yarn_purchase', 'dyeing', 'machine_start', 'fabric_warehouse'];
|
|
|
|
|
|
|
|
|
|
// 动画配置
|
|
|
|
|
export const animationConfig = {
|
2026-05-28 05:54:23 +00:00
|
|
|
// 标准过渡 - 用于展开/收起,使用更平滑的缓动函数避免抖动
|
2026-05-26 05:15:10 +00:00
|
|
|
transition: {
|
2026-05-28 05:54:23 +00:00
|
|
|
duration: 0.25,
|
|
|
|
|
ease: [0.4, 0, 0.2, 1] // 使用 ease-out 缓动,更平滑
|
2026-05-26 05:15:10 +00:00
|
|
|
},
|
|
|
|
|
// 快速过渡
|
|
|
|
|
fastTransition: {
|
|
|
|
|
duration: 0.2,
|
2026-05-28 05:54:23 +00:00
|
|
|
ease: [0.4, 0, 0.2, 1]
|
2026-05-26 05:15:10 +00:00
|
|
|
},
|
|
|
|
|
// 慢速过渡
|
|
|
|
|
slowTransition: {
|
2026-05-28 05:54:23 +00:00
|
|
|
duration: 0.4,
|
|
|
|
|
ease: [0.4, 0, 0.2, 1]
|
2026-05-26 05:15:10 +00:00
|
|
|
},
|
2026-05-28 05:54:23 +00:00
|
|
|
// 弹簧动画 - 用于交互反馈,降低弹性避免抖动
|
2026-05-26 05:15:10 +00:00
|
|
|
spring: {
|
|
|
|
|
type: 'spring',
|
2026-05-28 05:54:23 +00:00
|
|
|
stiffness: 200,
|
|
|
|
|
damping: 25,
|
|
|
|
|
mass: 0.8
|
2026-05-26 05:15:10 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 分页配置
|
|
|
|
|
export const paginationConfig = {
|
|
|
|
|
defaultPageSize: 20,
|
|
|
|
|
maxInventoryRecords: 100,
|
|
|
|
|
maxPriceHistory: 50
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 进度阈值
|
|
|
|
|
export const progressThresholds = {
|
|
|
|
|
complete: 97 // 计划完成阈值
|
|
|
|
|
};
|