// 【重要】必须使用 const Component 作为组件变量名
// 运维管理 - 车辆业务 - 替换车管理（2026年3月3日版本）

const Component = function () {
	var useState = React.useState;
	var useCallback = React.useCallback;
	var useMemo = React.useMemo;

	var antd = window.antd;
	var Breadcrumb = antd.Breadcrumb;
	var Card = antd.Card;
	var DatePicker = antd.DatePicker;
	var Select = antd.Select;
	var Button = antd.Button;
	var Table = antd.Table;
	var Tabs = antd.Tabs;
	var Modal = antd.Modal;
	var Input = antd.Input;
	var message = antd.message;
	var Tag = antd.Tag;
	var Empty = antd.Empty;
	var App = antd.App;
	var Badge = antd.Badge;
	var Popover = antd.Popover;

	var RangePicker = DatePicker.RangePicker;

	// 筛选展开（默认一行 3 列）
	var _filterExpanded = useState(false);
	var _replaceDateRange = useState(null);
	var _replaceType = useState(undefined);
	var _projectName = useState(undefined);
	var _approvalStatus = useState(['全部']);
	var _originalPlate = useState(undefined);
	var _replacePlate = useState(undefined);
	var _replaceReason = useState(undefined);
	var _creator = useState(undefined);
	var _createTimeRange = useState(null);

	var _appliedFilter = useState({
		replaceDateRange: null,
		replaceType: undefined,
		projectName: undefined,
		approvalStatus: ['全部'],
		originalPlate: undefined,
		replacePlate: undefined,
		replaceReason: undefined,
		creator: undefined,
		createTimeRange: null
	});

	var _activeTab = useState('ongoing');
	var _selectedRowKeys = useState([]);
	var _withdrawModalVisible = useState(false);
	var _withdrawModalRecord = useState(null);
	var _toPermanentModalVisible = useState(false);
	var _toPermanentModalRecord = useState(null);
	var _deleteModalVisible = useState(false);
	var _deleteModalRecord = useState(null);
	var _deletedIds = useState([]);
	var _requirementModalVisible = useState(false);

	function ensureReplaceDateTime(dateStr, fallbackTime) {
		if (!dateStr) return '';
		if (dateStr.length > 10) return dateStr;
		return dateStr + ' ' + (fallbackTime || '09:00:00');
	}

	function enrichListRow(row, timeSuffix) {
		var next = Object.assign({}, row);
		next.replaceDate = ensureReplaceDateTime(row.replaceDate, timeSuffix);
		if (!row.currentApprover) {
			if (row.approvalStatus === '审批中') next.currentApprover = '姚守涛';
			else if (row.approvalStatus === '待审批') next.currentApprover = '业务部主管';
			else if (row.approvalStatus === '审批驳回') next.currentApprover = '尚建华';
			else next.currentApprover = '—';
		}
		return next;
	}

	var replaceTypeOptions = [
		{ value: '永久替换', label: '永久替换' },
		{ value: '临时替换', label: '临时替换' }
	];
	var projectNameOptions = [
		{ value: 'p1', label: '嘉兴氢能示范项目' },
		{ value: 'p2', label: '上海物流租赁项目' },
		{ value: 'p3', label: '杭州城配租赁项目' }
	];
	var approvalStatusOptions = [
		{ value: '全部', label: '全部' },
		{ value: '待审批', label: '待审批' },
		{ value: '审批中', label: '审批中' },
		{ value: '审批驳回', label: '审批驳回' },
		{ value: '未提交', label: '未提交' },
		{ value: '撤回', label: '撤回' }
	];
	var plateOptions = [
		{ value: '浙A12345', label: '浙A12345' },
		{ value: '浙A67890', label: '浙A67890' },
		{ value: '浙B11111', label: '浙B11111' },
		{ value: '浙B22222', label: '浙B22222' },
		{ value: '浙C33333', label: '浙C33333' }
	];
	var replaceReasonOptions = [
		{ value: '全部', label: '全部' },
		{ value: '客户原因', label: '客户原因' },
		{ value: '车辆原因', label: '车辆原因' }
	];
	var creatorOptions = [
		{ value: '张三', label: '张三' },
		{ value: '李四', label: '李四' },
		{ value: '王五', label: '王五' },
		{ value: '赵六', label: '赵六' }
	];

	// 进行中：未结束、暂存，审批状态为 待审批、审批中、审批驳回、未提交、撤回
	var ongoingListRaw = [
		{ id: 'o1', replaceDate: '2025-03-05', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '待审批', currentApprover: '业务部主管', originalPlate: '浙A12345', originalBrand: '东风', originalModel: 'DFH1180', replacePlate: '浙A67890', replaceBrand: '福田', replaceModel: 'BJ1180', replaceReason: '车辆原因', replaceReasonDesc: '原车维修', creator: '张三', createTime: '2025-03-01 10:00:00' },
		{ id: 'o2', replaceDate: '2025-03-06', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '审批中', currentApprover: '姚守涛', originalPlate: '浙B11111', originalBrand: '江淮', originalModel: 'HFC1180', replacePlate: '浙B22222', replaceBrand: '重汽', replaceModel: 'ZZ1180', replaceReason: '客户原因', replaceReasonDesc: '客户要求换型', creator: '李四', createTime: '2025-03-01 14:30:00' },
		{ id: 'o3', replaceDate: '2025-03-07', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '审批驳回', currentApprover: '尚建华', originalPlate: '浙C33333', originalBrand: '东风', originalModel: 'DFH1190', replacePlate: '浙C44444', replaceBrand: '福田', replaceModel: 'BJ1190', replaceReason: '车辆原因', replaceReasonDesc: '事故替换', creator: '王五', createTime: '2025-03-02 09:15:00' },
		{ id: 'o4', replaceDate: '2025-03-08', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '未提交', currentApprover: '—', originalPlate: '浙A55555', originalBrand: '重汽', originalModel: 'ZZ1160', replacePlate: '浙A66666', replaceBrand: '江淮', replaceModel: 'HFC1190', replaceReason: '车辆原因', replaceReasonDesc: '保养替换', creator: '赵六', createTime: '2025-03-02 16:00:00' },
		{ id: 'o5', replaceDate: '2025-03-09', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '撤回', currentApprover: '—', originalPlate: '浙F77777', originalBrand: '福田', originalModel: 'BJ1180', replacePlate: '浙F88888', replaceBrand: '东风', replaceModel: 'DFH1180', replaceReason: '客户原因', replaceReasonDesc: '年检替换', creator: '张三', createTime: '2025-03-03 11:20:00' },
		{ id: 'o6', replaceDate: '2025-03-10', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '待审批', originalPlate: '浙A11201', originalBrand: '江淮', originalModel: 'HFC1160', replacePlate: '浙A11202', replaceBrand: '东风', replaceModel: 'DFH1160', replaceReason: '车辆原因', replaceReasonDesc: '发动机故障', creator: '李四', createTime: '2025-03-04 08:45' },
		{ id: 'o7', replaceDate: '2025-03-11', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批中', originalPlate: '浙B22301', originalBrand: '重汽', originalModel: 'ZZ1160', replacePlate: '浙B22302', replaceBrand: '福田', replaceModel: 'BJ1160', replaceReason: '客户原因', replaceReasonDesc: '临时增运力', creator: '王五', createTime: '2025-03-04 13:00' },
		{ id: 'o8', replaceDate: '2025-03-12', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '审批驳回', originalPlate: '浙C33401', originalBrand: '东风', originalModel: 'DFH1190', replacePlate: '浙C33402', replaceBrand: '江淮', replaceModel: 'HFC1190', replaceReason: '车辆原因', replaceReasonDesc: '底盘大修', creator: '赵六', createTime: '2025-03-05 10:20' },
		{ id: 'o9', replaceDate: '2025-03-13', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '未提交', originalPlate: '浙D44501', originalBrand: '福田', originalModel: 'BJ1180', replacePlate: '浙D44502', replaceBrand: '重汽', replaceModel: 'ZZ1180', replaceReason: '客户原因', replaceReasonDesc: '线路调整', creator: '张三', createTime: '2025-03-05 15:30' },
		{ id: 'o10', replaceDate: '2025-03-14', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '撤回', originalPlate: '浙E55601', originalBrand: '江淮', originalModel: 'HFC1180', replacePlate: '浙E55602', replaceBrand: '东风', replaceModel: 'DFH1180', replaceReason: '车辆原因', replaceReasonDesc: '轮胎更换', creator: '李四', createTime: '2025-03-06 09:00' },
		{ id: 'o11', replaceDate: '2025-03-15', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '待审批', originalPlate: '浙F66701', originalBrand: '重汽', originalModel: 'ZZ1190', replacePlate: '浙F66702', replaceBrand: '福田', replaceModel: 'BJ1190', replaceReason: '车辆原因', replaceReasonDesc: '电瓶更换', creator: '王五', createTime: '2025-03-06 14:15' },
		{ id: 'o12', replaceDate: '2025-03-16', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '审批中', originalPlate: '浙A77801', originalBrand: '东风', originalModel: 'DFH1160', replacePlate: '浙A77802', replaceBrand: '江淮', replaceModel: 'HFC1160', replaceReason: '客户原因', replaceReasonDesc: '合同到期换车', creator: '赵六', createTime: '2025-03-07 11:00' },
		{ id: 'o13', replaceDate: '2025-03-17', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批驳回', originalPlate: '浙B88901', originalBrand: '福田', originalModel: 'BJ1160', replacePlate: '浙B88902', replaceBrand: '重汽', replaceModel: 'ZZ1160', replaceReason: '车辆原因', replaceReasonDesc: '制动系统检修', creator: '张三', createTime: '2025-03-07 16:45' },
		{ id: 'o14', replaceDate: '2025-03-18', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '未提交', originalPlate: '浙C99001', originalBrand: '江淮', originalModel: 'HFC1190', replacePlate: '浙C99002', replaceBrand: '东风', replaceModel: 'DFH1190', replaceReason: '客户原因', replaceReasonDesc: '运量增加', creator: '李四', createTime: '2025-03-08 08:30' },
		{ id: 'o15', replaceDate: '2025-03-19', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '撤回', originalPlate: '浙D10101', originalBrand: '重汽', originalModel: 'ZZ1180', replacePlate: '浙D10102', replaceBrand: '福田', replaceModel: 'BJ1180', replaceReason: '车辆原因', replaceReasonDesc: '空调维修', creator: '王五', createTime: '2025-03-08 12:00' },
		{ id: 'o16', replaceDate: '2025-03-20', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '待审批', originalPlate: '浙E20201', originalBrand: '东风', originalModel: 'DFH1180', replacePlate: '浙E20202', replaceBrand: '江淮', replaceModel: 'HFC1180', replaceReason: '车辆原因', replaceReasonDesc: '变速箱故障', creator: '赵六', createTime: '2025-03-09 10:20' },
		{ id: 'o17', replaceDate: '2025-03-21', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '审批中', originalPlate: '浙F30301', originalBrand: '福田', originalModel: 'BJ1190', replacePlate: '浙F30302', replaceBrand: '重汽', replaceModel: 'ZZ1190', replaceReason: '客户原因', replaceReasonDesc: '区域调配', creator: '张三', createTime: '2025-03-09 15:00' },
		{ id: 'o18', replaceDate: '2025-03-22', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '审批驳回', originalPlate: '浙A40401', originalBrand: '江淮', originalModel: 'HFC1160', replacePlate: '浙A40402', replaceBrand: '东风', replaceModel: 'DFH1160', replaceReason: '车辆原因', replaceReasonDesc: '车身锈蚀', creator: '李四', createTime: '2025-03-10 09:45' },
		{ id: 'o19', replaceDate: '2025-03-23', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '未提交', originalPlate: '浙B50501', originalBrand: '重汽', originalModel: 'ZZ1160', replacePlate: '浙B50502', replaceBrand: '福田', replaceModel: 'BJ1160', replaceReason: '客户原因', replaceReasonDesc: '试运行换车', creator: '王五', createTime: '2025-03-10 14:30' },
		{ id: 'o20', replaceDate: '2025-03-24', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '撤回', currentApprover: '—', originalPlate: '浙C60601', originalBrand: '东风', originalModel: 'DFH1190', replacePlate: '浙C60602', replaceBrand: '江淮', replaceModel: 'HFC1190', replaceReason: '车辆原因', replaceReasonDesc: '排放升级', creator: '赵六', createTime: '2025-03-11 11:15:00' }
	];
	function pad2(n) { return n < 10 ? '0' + n : String(n); }
	var ongoingList = ongoingListRaw.map(function (r, i) {
		return enrichListRow(r, pad2(8 + (i % 12)) + ':' + pad2((i * 7) % 60) + ':00');
	});

	// 历史记录：审批完成，审批状态均为审批完成
	var historyListRaw = [
		{ id: 'h1', replaceDate: '2025-02-15', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', currentApprover: '—', originalPlate: '浙A10001', originalBrand: '东风', originalModel: 'DFH1180', replacePlate: '浙A10002', replaceBrand: '福田', replaceModel: 'BJ1180', replaceReason: '车辆原因', replaceReasonDesc: '原车报废', creator: '张三', createTime: '2025-02-10 09:00:00' },
		{ id: 'h2', replaceDate: '2025-02-14', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B20001', originalBrand: '江淮', originalModel: 'HFC1180', replacePlate: '浙B20002', replaceBrand: '重汽', replaceModel: 'ZZ1180', replaceReason: '客户原因', replaceReasonDesc: '客户临时需求', creator: '李四', createTime: '2025-02-09 14:00' },
		{ id: 'h3', replaceDate: '2025-02-13', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C30001', originalBrand: '重汽', originalModel: 'ZZ1160', replacePlate: '浙C30002', replaceBrand: '东风', replaceModel: 'DFH1160', replaceReason: '车辆原因', replaceReasonDesc: '使用年限到期', creator: '王五', createTime: '2025-02-08 10:30' },
		{ id: 'h4', replaceDate: '2025-02-12', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A40001', originalBrand: '福田', originalModel: 'BJ1180', replacePlate: '浙A40002', replaceBrand: '江淮', replaceModel: 'HFC1180', replaceReason: '客户原因', replaceReasonDesc: '旺季加车', creator: '赵六', createTime: '2025-02-07 15:20' },
		{ id: 'h5', replaceDate: '2025-02-11', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B50001', originalBrand: '东风', originalModel: 'DFH1190', replacePlate: '浙B50002', replaceBrand: '重汽', replaceModel: 'ZZ1190', replaceReason: '车辆原因', replaceReasonDesc: '事故车置换', creator: '张三', createTime: '2025-02-06 08:45' },
		{ id: 'h6', replaceDate: '2025-02-10', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C60001', originalBrand: '江淮', originalModel: 'HFC1160', replacePlate: '浙C60002', replaceBrand: '福田', replaceModel: 'BJ1160', replaceReason: '客户原因', replaceReasonDesc: '临时项目', creator: '李四', createTime: '2025-02-05 11:00' },
		{ id: 'h7', replaceDate: '2025-02-09', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A70001', originalBrand: '重汽', originalModel: 'ZZ1180', replacePlate: '浙A70002', replaceBrand: '东风', replaceModel: 'DFH1180', replaceReason: '车辆原因', replaceReasonDesc: '维修成本过高', creator: '王五', createTime: '2025-02-04 14:15' },
		{ id: 'h8', replaceDate: '2025-02-08', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B80001', originalBrand: '福田', originalModel: 'BJ1190', replacePlate: '浙B80002', replaceBrand: '江淮', replaceModel: 'HFC1190', replaceReason: '客户原因', replaceReasonDesc: '车型升级', creator: '赵六', createTime: '2025-02-03 09:30' },
		{ id: 'h9', replaceDate: '2025-02-07', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C90001', originalBrand: '东风', originalModel: 'DFH1160', replacePlate: '浙C90002', replaceBrand: '重汽', replaceModel: 'ZZ1160', replaceReason: '车辆原因', replaceReasonDesc: '年检未过', creator: '张三', createTime: '2025-02-02 16:00' },
		{ id: 'h10', replaceDate: '2025-02-06', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A01001', originalBrand: '江淮', originalModel: 'HFC1180', replacePlate: '浙A01002', replaceBrand: '福田', replaceModel: 'BJ1180', replaceReason: '客户原因', replaceReasonDesc: '运力不足', creator: '李四', createTime: '2025-02-01 10:45' },
		{ id: 'h11', replaceDate: '2025-02-05', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B02001', originalBrand: '重汽', originalModel: 'ZZ1190', replacePlate: '浙B02002', replaceBrand: '东风', replaceModel: 'DFH1190', replaceReason: '车辆原因', replaceReasonDesc: '尾气不达标', creator: '王五', createTime: '2025-01-31 13:20' },
		{ id: 'h12', replaceDate: '2025-02-04', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C03001', originalBrand: '福田', originalModel: 'BJ1160', replacePlate: '浙C03002', replaceBrand: '江淮', replaceModel: 'HFC1160', replaceReason: '客户原因', replaceReasonDesc: '线路拓展', creator: '赵六', createTime: '2025-01-30 08:00' },
		{ id: 'h13', replaceDate: '2025-02-03', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A04001', originalBrand: '东风', originalModel: 'DFH1180', replacePlate: '浙A04002', replaceBrand: '重汽', replaceModel: 'ZZ1180', replaceReason: '车辆原因', replaceReasonDesc: '核心部件损坏', creator: '张三', createTime: '2025-01-29 11:30' },
		{ id: 'h14', replaceDate: '2025-02-02', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B05001', originalBrand: '江淮', originalModel: 'HFC1190', replacePlate: '浙B05002', replaceBrand: '福田', replaceModel: 'BJ1190', replaceReason: '客户原因', replaceReasonDesc: '季节性需求', creator: '李四', createTime: '2025-01-28 15:45' },
		{ id: 'h15', replaceDate: '2025-02-01', replaceType: '永久替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C06001', originalBrand: '重汽', originalModel: 'ZZ1160', replacePlate: '浙C06002', replaceBrand: '东风', replaceModel: 'DFH1160', replaceReason: '车辆原因', replaceReasonDesc: '保险拒保', creator: '王五', createTime: '2025-01-27 09:15' },
		{ id: 'h16', replaceDate: '2025-01-31', replaceType: '临时替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A07001', originalBrand: '福田', originalModel: 'BJ1180', replacePlate: '浙A07002', replaceBrand: '江淮', replaceModel: 'HFC1180', replaceReason: '客户原因', replaceReasonDesc: '合作试运行', creator: '赵六', createTime: '2025-01-26 12:00' },
		{ id: 'h17', replaceDate: '2025-01-30', replaceType: '永久替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', originalPlate: '浙B08001', originalBrand: '东风', originalModel: 'DFH1190', replacePlate: '浙B08002', replaceBrand: '重汽', replaceModel: 'ZZ1190', replaceReason: '车辆原因', replaceReasonDesc: '油耗过高', creator: '张三', createTime: '2025-01-25 14:30' },
		{ id: 'h18', replaceDate: '2025-01-29', replaceType: '临时替换', projectName: '杭州城配租赁项目', approvalStatus: '审批完成', originalPlate: '浙C09001', originalBrand: '江淮', originalModel: 'HFC1160', replacePlate: '浙C09002', replaceBrand: '福田', replaceModel: 'BJ1160', replaceReason: '客户原因', replaceReasonDesc: '活动保障', creator: '李四', createTime: '2025-01-24 10:20' },
		{ id: 'h19', replaceDate: '2025-01-28', replaceType: '永久替换', projectName: '嘉兴氢能示范项目', approvalStatus: '审批完成', originalPlate: '浙A10003', originalBrand: '重汽', originalModel: 'ZZ1180', replacePlate: '浙A10004', replaceBrand: '东风', replaceModel: 'DFH1180', replaceReason: '车辆原因', replaceReasonDesc: '配件停产', creator: '王五', createTime: '2025-01-23 16:45' },
		{ id: 'h20', replaceDate: '2025-01-27', replaceType: '临时替换', projectName: '上海物流租赁项目', approvalStatus: '审批完成', currentApprover: '—', originalPlate: '浙B11001', originalBrand: '福田', originalModel: 'BJ1190', replacePlate: '浙B11002', replaceBrand: '江淮', replaceModel: 'HFC1190', replaceReason: '客户原因', replaceReasonDesc: '新业务启动', creator: '赵六', createTime: '2025-01-22 08:30:00' }
	];
	var historyList = historyListRaw.map(function (r, i) {
		return enrichListRow(r, pad2(10 + (i % 10)) + ':' + pad2((i * 5) % 60) + ':00');
	});

	var deletedIds = _deletedIds[0];
	var appliedFilter = _appliedFilter[0];

	var filteredOngoing = useMemo(function () {
		var list = ongoingList.filter(function (r) {
			if (deletedIds.indexOf(r.id) !== -1) return false;
			if (appliedFilter.replaceDateRange && appliedFilter.replaceDateRange.length === 2) {
				var start = appliedFilter.replaceDateRange[0] && appliedFilter.replaceDateRange[0].format ? appliedFilter.replaceDateRange[0].format('YYYY-MM-DD') : '';
				var end = appliedFilter.replaceDateRange[1] && appliedFilter.replaceDateRange[1].format ? appliedFilter.replaceDateRange[1].format('YYYY-MM-DD') : '';
				var rd = (r.replaceDate || '').slice(0, 10);
				if (start && rd < start) return false;
				if (end && rd > end) return false;
			}
			if (appliedFilter.replaceType && r.replaceType !== appliedFilter.replaceType) return false;
			if (appliedFilter.projectName && r.projectName !== appliedFilter.projectName) return false;
			var approval = appliedFilter.approvalStatus;
			if (approval && approval.length > 0 && approval.indexOf('全部') === -1 && approval.indexOf(r.approvalStatus) === -1) return false;
			if (appliedFilter.originalPlate && (r.originalPlate || '').indexOf(appliedFilter.originalPlate) === -1) return false;
			if (appliedFilter.replacePlate && (r.replacePlate || '').indexOf(appliedFilter.replacePlate) === -1) return false;
			if (appliedFilter.replaceReason && appliedFilter.replaceReason !== '全部' && r.replaceReason !== appliedFilter.replaceReason) return false;
			if (appliedFilter.creator && r.creator !== appliedFilter.creator) return false;
			if (appliedFilter.createTimeRange && appliedFilter.createTimeRange.length === 2) {
				var cs = appliedFilter.createTimeRange[0] && appliedFilter.createTimeRange[0].format ? appliedFilter.createTimeRange[0].format('YYYY-MM-DD') : '';
				var ce = appliedFilter.createTimeRange[1] && appliedFilter.createTimeRange[1].format ? appliedFilter.createTimeRange[1].format('YYYY-MM-DD') : '';
				var ct = (r.createTime || '').slice(0, 10);
				if (cs && ct < cs) return false;
				if (ce && ct > ce) return false;
			}
			return true;
		});
		return list;
	}, [appliedFilter, deletedIds]);

	var filteredHistory = useMemo(function () {
		var list = historyList.filter(function (r) {
			if (deletedIds.indexOf(r.id) !== -1) return false;
			if (appliedFilter.replaceDateRange && appliedFilter.replaceDateRange.length === 2) {
				var start = appliedFilter.replaceDateRange[0] && appliedFilter.replaceDateRange[0].format ? appliedFilter.replaceDateRange[0].format('YYYY-MM-DD') : '';
				var end = appliedFilter.replaceDateRange[1] && appliedFilter.replaceDateRange[1].format ? appliedFilter.replaceDateRange[1].format('YYYY-MM-DD') : '';
				var rd = (r.replaceDate || '').slice(0, 10);
				if (start && rd < start) return false;
				if (end && rd > end) return false;
			}
			if (appliedFilter.replaceType && r.replaceType !== appliedFilter.replaceType) return false;
			if (appliedFilter.projectName && r.projectName !== appliedFilter.projectName) return false;
			if (appliedFilter.originalPlate && (r.originalPlate || '').indexOf(appliedFilter.originalPlate) === -1) return false;
			if (appliedFilter.replacePlate && (r.replacePlate || '').indexOf(appliedFilter.replacePlate) === -1) return false;
			if (appliedFilter.replaceReason && appliedFilter.replaceReason !== '全部' && r.replaceReason !== appliedFilter.replaceReason) return false;
			if (appliedFilter.creator && r.creator !== appliedFilter.creator) return false;
			if (appliedFilter.createTimeRange && appliedFilter.createTimeRange.length === 2) {
				var cs = appliedFilter.createTimeRange[0] && appliedFilter.createTimeRange[0].format ? appliedFilter.createTimeRange[0].format('YYYY-MM-DD') : '';
				var ce = appliedFilter.createTimeRange[1] && appliedFilter.createTimeRange[1].format ? appliedFilter.createTimeRange[1].format('YYYY-MM-DD') : '';
				var ct = (r.createTime || '').slice(0, 10);
				if (cs && ct < cs) return false;
				if (ce && ct > ce) return false;
			}
			return true;
		});
		return list;
	}, [appliedFilter, deletedIds]);

	var handleQuery = useCallback(function () {
		_appliedFilter[1]({
			replaceDateRange: _replaceDateRange[0],
			replaceType: _replaceType[0],
			projectName: _projectName[0],
			approvalStatus: _approvalStatus[0] ? _approvalStatus[0].slice() : ['全部'],
			originalPlate: _originalPlate[0],
			replacePlate: _replacePlate[0],
			replaceReason: _replaceReason[0],
			creator: _creator[0],
			createTimeRange: _createTimeRange[0]
		});
	}, []);

	var handleReset = useCallback(function () {
		_replaceDateRange[1](null);
		_replaceType[1](undefined);
		_projectName[1](undefined);
		_approvalStatus[1](['全部']);
		_originalPlate[1](undefined);
		_replacePlate[1](undefined);
		_replaceReason[1](undefined);
		_creator[1](undefined);
		_createTimeRange[1](null);
		_appliedFilter[1]({
			replaceDateRange: null,
			replaceType: undefined,
			projectName: undefined,
			approvalStatus: ['全部'],
			originalPlate: undefined,
			replacePlate: undefined,
			replaceReason: undefined,
			creator: undefined,
			createTimeRange: null
		});
	}, []);

	var handleApprovalStatusChange = useCallback(function (v) {
		if (!v || v.length === 0) { _approvalStatus[1](['全部']); return; }
		if (v.indexOf('全部') !== -1 && v.length > 1) {
			var prev = _approvalStatus[0] || [];
			var hadAllOnly = prev.length === 1 && prev.indexOf('全部') !== -1;
			_approvalStatus[1](hadAllOnly ? v.filter(function (x) { return x !== '全部'; }) : ['全部']);
			return;
		}
		_approvalStatus[1](v);
	}, []);

	var filterLabelStyle = { marginBottom: 6, fontSize: 13, fontWeight: 500, color: '#475569', lineHeight: 1.4 };
	var filterItemStyle = { marginBottom: 0 };
	var filterControlStyle = { width: '100%' };

	var pageStyles =
		'.vr-list-page{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}' +
		'.vr-list-page .vr-page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;flex-wrap:wrap}' +
		'.vr-list-page .vr-filter-card,.vr-list-page .vr-list-card{border-radius:16px;border:none;box-shadow:0 4px 24px -6px rgba(15,23,42,0.08),0 0 0 1px rgba(15,23,42,0.05);margin-bottom:16px}' +
		'.vr-list-page .vr-filter-card>.ant-card-head,.vr-list-page .vr-list-card>.ant-card-head{border-bottom:1px solid #f1f5f9;min-height:auto;padding:14px 20px}' +
		'.vr-list-page .vr-filter-card>.ant-card-head .ant-card-head-title,.vr-list-page .vr-list-card>.ant-card-head .ant-card-head-title{font-size:15px;font-weight:600;color:#0f172a;padding:0}' +
		'.vr-list-page .vr-filter-card>.ant-card-body{padding:16px 20px 20px}' +
		'.vr-list-page .vr-list-card>.ant-card-body{padding:12px 16px 16px}' +
		'.vr-list-page .vr-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 20px;align-items:start}' +
		'@media(max-width:900px){.vr-list-page .vr-filter-grid{grid-template-columns:1fr}}' +
		'.vr-list-page .vr-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;padding-top:16px;border-top:1px solid #f1f5f9}' +
		'.vr-list-page .vr-swap-arrow{color:#94a3b8;font-size:12px;margin:0 4px}' +
		'.vr-list-page .vr-reason-text{display:block;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}' +
		'.vr-list-page .vr-list-table .ant-table-thead>tr>th{background:#f8fafc!important;color:#475569;font-weight:600;font-size:13px}' +
		'.vr-list-page .vr-list-table .ant-table-tbody>tr:hover>td{background:#f0f9ff!important}' +
		'.vr-list-page .vr-list-table .ant-table-thead th,.vr-list-page .vr-list-table .ant-table-tbody td{white-space:nowrap}' +
		'.vr-list-page .vr-list-table .ant-table-tbody>tr.ant-table-row-selected>td{background:#eff6ff!important}' +
		'.vr-list-page .vr-tabs .ant-tabs-nav{margin-bottom:0}' +
		'.vr-list-page .vr-empty{padding:48px 16px}' +
		'.vr-approval-flow-popover .ant-popover-inner{padding:14px 16px;border-radius:8px}' +
		'.vr-approval-flow{width:300px;max-width:min(340px,92vw)}' +
		'.vr-approval-flow__item{display:flex;gap:12px;position:relative;padding-bottom:22px}' +
		'.vr-approval-flow__item:last-child{padding-bottom:0}' +
		'.vr-approval-flow__item:not(:last-child) .vr-approval-flow__line{position:absolute;left:15px;top:34px;bottom:0;width:2px;background:#e5e7eb}' +
		'.vr-approval-flow__avatar-wrap{position:relative;flex-shrink:0;z-index:1}' +
		'.vr-approval-flow__avatar{width:32px;height:32px;border-radius:50%;background:#1677ff;color:#fff;font-size:12px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;line-height:1}' +
		'.vr-approval-flow__body{flex:1;min-width:0;padding-top:2px}' +
		'.vr-approval-flow__head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}' +
		'.vr-approval-flow__role{font-size:14px;font-weight:600;color:rgba(0,0,0,0.88);line-height:1.4}' +
		'.vr-approval-flow__meta{font-size:12px;color:rgba(0,0,0,0.45);line-height:1.5}' +
		'.vr-list-page .vr-approval-status-trigger{display:inline-flex;cursor:pointer;border-radius:4px;transition:opacity .15s ease}' +
		'.vr-list-page .vr-approval-status-trigger:hover{opacity:.88}';

	function formatFlowTime(timeStr) {
		if (!timeStr) return '—';
		var s = String(timeStr).trim();
		if (s.length >= 19) return s.slice(0, 19);
		if (/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}$/.test(s)) return s + ':00';
		return s;
	}

	function offsetFlowTime(timeStr, minutes) {
		if (!timeStr) return '—';
		var s = String(timeStr).trim().replace(/-/g, '/');
		var d = new Date(s);
		if (isNaN(d.getTime())) return formatFlowTime(timeStr);
		d.setMinutes(d.getMinutes() + (minutes || 0));
		function p2(n) { return n < 10 ? '0' + n : '' + n; }
		return d.getFullYear() + '-' + p2(d.getMonth() + 1) + '-' + p2(d.getDate()) + ' ' + p2(d.getHours()) + ':' + p2(d.getMinutes()) + ':' + p2(d.getSeconds());
	}

	function getApproverRoleTitle(approverName) {
		if (approverName === '姚守涛') return '业务部主管';
		if (approverName === '尚建华') return '事业部主管';
		if (approverName === '业务部主管') return '业务部主管';
		return '运维主管';
	}

	function getApprovalFlowSteps(record) {
		var creator = record.creator || '张三';
		var createTime = formatFlowTime(record.createTime);
		var approver = record.currentApprover || '姚守涛';
		var approverPerson = approver === '业务部主管' ? '姚守涛' : approver;
		var roleTitle = getApproverRoleTitle(approver);
		var avatarFromName = function (name) {
			var n = String(name || '').trim();
			if (!n || n === '—') return '用户';
			return n.length >= 2 ? n.slice(-2) : n;
		};
		var steps = [
			{
				role: roleTitle,
				actionLabel: '审批中',
				tagColor: 'processing',
				person: approverPerson,
				time: '待处理',
				avatarText: avatarFromName(approverPerson)
			},
			{
				role: '发起审批',
				actionLabel: '通过',
				tagColor: 'success',
				person: creator,
				time: createTime,
				avatarText: avatarFromName(creator)
			}
		];
		if (roleTitle === '运维主管') {
			steps.splice(1, 0, {
				role: '业务部主管',
				actionLabel: '通过',
				tagColor: 'success',
				person: '尚建华',
				time: offsetFlowTime(record.createTime, 1),
				avatarText: '建华'
			});
		}
		return steps;
	}

	function renderApprovalFlowContent(record) {
		var steps = getApprovalFlowSteps(record);
		return React.createElement('div', { className: 'vr-approval-flow' },
			steps.map(function (step, idx) {
				return React.createElement('div', { key: idx, className: 'vr-approval-flow__item' },
					React.createElement('div', { className: 'vr-approval-flow__avatar-wrap' },
						React.createElement('span', { className: 'vr-approval-flow__avatar', title: step.person }, step.avatarText),
						idx < steps.length - 1 ? React.createElement('span', { className: 'vr-approval-flow__line' }) : null
					),
					React.createElement('div', { className: 'vr-approval-flow__body' },
						React.createElement('div', { className: 'vr-approval-flow__head' },
							React.createElement('span', { className: 'vr-approval-flow__role' }, step.role),
							React.createElement(Tag, { color: step.tagColor, style: { margin: 0, fontSize: 12, lineHeight: '20px' } }, step.actionLabel)
						),
						React.createElement('div', { className: 'vr-approval-flow__meta' },
							step.person + '　' + step.time
						)
					)
				);
			})
		);
	}

	function renderApprovalStatusCell(status, record) {
		var tag = renderApprovalTag(status);
		if (status !== '审批中' || !record) return tag;
		return React.createElement(Popover, {
			content: renderApprovalFlowContent(record),
			trigger: 'hover',
			placement: 'rightTop',
			overlayClassName: 'vr-approval-flow-popover',
			mouseEnterDelay: 0.15,
			mouseLeaveDelay: 0.12,
			destroyTooltipOnHide: true
		}, React.createElement('span', { className: 'vr-approval-status-trigger' }, tag));
	}

	function renderApprovalTag(status) {
		var color = 'default';
		if (status === '待审批') color = 'processing';
		else if (status === '审批中') color = 'blue';
		else if (status === '审批驳回') color = 'error';
		else if (status === '未提交') color = 'default';
		else if (status === '撤回') color = 'warning';
		else if (status === '审批完成') color = 'success';
		return React.createElement(Tag, { color: color, style: { margin: 0, fontWeight: 500 } }, status || '—');
	}

	function renderReplaceTypeTag(type) {
		var color = type === '永久替换' ? 'geekblue' : type === '临时替换' ? 'gold' : 'default';
		return React.createElement(Tag, { color: color, style: { margin: 0 } }, type || '—');
	}

	function getOperationButtons(record, isHistory) {
		if (isHistory) {
			var viewBtn = React.createElement(Button, { key: 'view', type: 'link', size: 'small', onClick: function () { message.info('查看（跳转替换车管理-查看）'); } }, '查看');
			var toPermanentBtn = record.replaceType === '临时替换' ? React.createElement(Button, { key: 'toPermanent', type: 'link', size: 'small', onClick: function () { _toPermanentModalRecord[1](record); _toPermanentModalVisible[1](true); } }, '转永久替换') : null;
			return React.createElement('div', { style: { display: 'flex', gap: 4, flexWrap: 'wrap' } }, viewBtn, toPermanentBtn);
		}
		var status = record.approvalStatus;
		var items = [];
		if (['待审批', '审批中', '审批驳回', '未提交', '撤回'].indexOf(status) !== -1) {
			items.push(React.createElement(Button, { key: 'view', type: 'link', size: 'small', onClick: function () { message.info('查看（跳转替换车管理-查看）'); } }, '查看'));
		}
		if (['未提交', '审批驳回', '撤回'].indexOf(status) !== -1) {
			items.push(React.createElement(Button, { key: 'edit', type: 'link', size: 'small', onClick: function () { message.info('编辑（跳转替换车管理-编辑）'); } }, '编辑'));
		}
		if (['撤回', '审批驳回'].indexOf(status) !== -1) {
			items.push(React.createElement(Button, {
				key: 'delete',
				type: 'link',
				size: 'small',
				danger: true,
				onClick: function () {
					_deleteModalRecord[1](record);
					_deleteModalVisible[1](true);
				}
			}, '删除'));
		}
		if (status === '审批中') {
			items.push(React.createElement(Button, { key: 'withdraw', type: 'link', size: 'small', danger: true, onClick: function () { _withdrawModalRecord[1](record); _withdrawModalVisible[1](true); } }, '撤回'));
		}
		return React.createElement('div', { style: { display: 'flex', gap: 4, flexWrap: 'wrap' } }, items);
	}

	var tableColumns = [
		{ title: '替换日期', dataIndex: 'replaceDate', key: 'replaceDate', width: 168, fixed: 'left' },
		{
			title: '审批状态',
			dataIndex: 'approvalStatus',
			key: 'approvalStatus',
			width: 108,
			render: function (v, record) { return renderApprovalStatusCell(v, record); }
		},
		{
			title: '当前审批人',
			dataIndex: 'currentApprover',
			key: 'currentApprover',
			width: 110,
			render: function (v) {
				return React.createElement('span', { style: { color: v && v !== '—' ? '#334155' : '#94a3b8' } }, v || '—');
			}
		},
		{ title: '被替换车（旧车）', dataIndex: 'originalPlate', key: 'originalPlate', width: 130 },
		{ title: '品牌', dataIndex: 'originalBrand', key: 'originalBrand', width: 88 },
		{ title: '型号', dataIndex: 'originalModel', key: 'originalModel', width: 100 },
		{ title: '新车', dataIndex: 'replacePlate', key: 'replacePlate', width: 110 },
		{ title: '品牌', dataIndex: 'replaceBrand', key: 'replaceBrandNew', width: 88 },
		{ title: '型号', dataIndex: 'replaceModel', key: 'replaceModelNew', width: 100 },
		{
			title: '替换类型',
			dataIndex: 'replaceType',
			key: 'replaceType',
			width: 108,
			render: function (v) { return renderReplaceTypeTag(v); }
		},
		{ title: '替换原因', dataIndex: 'replaceReason', key: 'replaceReason', width: 100 },
		{
			title: '替换原因说明',
			dataIndex: 'replaceReasonDesc',
			key: 'replaceReasonDesc',
			width: 140,
			ellipsis: true,
			render: function (v) {
				return React.createElement('span', { className: 'vr-reason-text', title: v || '' }, v || '—');
			}
		},
		{ title: '创建人', dataIndex: 'creator', key: 'creator', width: 90 },
		{ title: '创建时间', dataIndex: 'createTime', key: 'createTime', width: 168 },
		{ title: '操作', key: 'action', width: 200, fixed: 'right', render: function (_, record) { return getOperationButtons(record, _activeTab[0] === 'history'); } }
	];

	var filterItems = [
		React.createElement('div', { key: 'replaceDate', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '替换日期'),
			React.createElement(RangePicker, { style: filterControlStyle, placeholder: ['请选择开始时间', '请选择结束时间'], value: _replaceDateRange[0], onChange: function (v) { _replaceDateRange[1](v); } })),
		React.createElement('div', { key: 'replaceType', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '替换类型'),
			React.createElement(Select, { placeholder: '请选择', style: filterControlStyle, value: _replaceType[0], onChange: function (v) { _replaceType[1](v); }, allowClear: true, options: replaceTypeOptions })),
		React.createElement('div', { key: 'projectName', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '项目名称'),
			React.createElement(Select, { placeholder: '请输入或选择项目名称', style: filterControlStyle, value: _projectName[0], onChange: function (v) { _projectName[1](v); }, allowClear: true, showSearch: true, options: projectNameOptions, filterOption: function (input, opt) { return (opt.label || '').toString().toLowerCase().indexOf((input || '').toLowerCase()) !== -1; } })),
		React.createElement('div', { key: 'approvalStatus', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '审批状态'),
			React.createElement(Select, { mode: 'multiple', placeholder: '请选择', style: filterControlStyle, value: _approvalStatus[0], onChange: handleApprovalStatusChange, options: approvalStatusOptions })),
		React.createElement('div', { key: 'originalPlate', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '被替换车（旧车）'),
			React.createElement(Select, { placeholder: '请输入或选择车牌号', style: filterControlStyle, value: _originalPlate[0], onChange: function (v) { _originalPlate[1](v); }, allowClear: true, showSearch: true, options: plateOptions, filterOption: function (input, opt) { return (opt.label || '').toString().toLowerCase().indexOf((input || '').toLowerCase()) !== -1; } })),
		React.createElement('div', { key: 'replacePlate', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '新车'),
			React.createElement(Select, { placeholder: '请输入或选择车牌号', style: filterControlStyle, value: _replacePlate[0], onChange: function (v) { _replacePlate[1](v); }, allowClear: true, showSearch: true, options: plateOptions, filterOption: function (input, opt) { return (opt.label || '').toString().toLowerCase().indexOf((input || '').toLowerCase()) !== -1; } })),
		React.createElement('div', { key: 'replaceReason', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '替换原因'),
			React.createElement(Select, { placeholder: '请选择', style: filterControlStyle, value: _replaceReason[0], onChange: function (v) { _replaceReason[1](v); }, allowClear: true, options: replaceReasonOptions })),
		React.createElement('div', { key: 'creator', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '创建人'),
			React.createElement(Select, { placeholder: '请选择创建人', style: filterControlStyle, value: _creator[0], onChange: function (v) { _creator[1](v); }, allowClear: true, options: creatorOptions })),
		React.createElement('div', { key: 'createTime', style: filterItemStyle },
			React.createElement('div', { style: filterLabelStyle }, '创建时间'),
			React.createElement(RangePicker, { style: filterControlStyle, placeholder: ['请选择开始时间', '请选择结束时间'], value: _createTimeRange[0], onChange: function (v) { _createTimeRange[1](v); } }))
	];

	var filterCount = _filterExpanded[0] ? 9 : 3;
	var filterNodes = [];
	for (var i = 0; i < filterCount && i < filterItems.length; i++) {
		filterNodes.push(filterItems[i]);
	}

	var _page = useState(1);
	var _pageSize = useState(10);
	var page = _page[0];
	var setPage = _page[1];
	var pageSize = _pageSize[0];
	var setPageSize = _pageSize[1];
	var currentList = _activeTab[0] === 'ongoing' ? filteredOngoing : filteredHistory;
	var displayList = useMemo(function () {
		var start = (page - 1) * pageSize;
		return currentList.slice(start, start + pageSize);
	}, [currentList, page, pageSize]);

	var listStats = useMemo(function () {
		return {
			ongoing: filteredOngoing.length,
			history: filteredHistory.length,
			selected: (_selectedRowKeys[0] || []).length
		};
	}, [filteredOngoing.length, filteredHistory.length, _selectedRowKeys[0]]);

	var rowSelection = {
		selectedRowKeys: _selectedRowKeys[0],
		onChange: function (keys) { _selectedRowKeys[1](keys); },
		fixed: true
	};

	var tablePagination = {
		current: page,
		pageSize: pageSize,
		total: currentList.length,
		showSizeChanger: true,
		showQuickJumper: true,
		showTotal: function (t) { return '共 ' + t + ' 条'; },
		onChange: function (p, ps) { setPage(p); if (ps) setPageSize(ps); }
	};

	function renderTableBody() {
		if (displayList.length === 0) {
			return React.createElement(Empty, {
				className: 'vr-empty',
				image: Empty.PRESENTED_IMAGE_SIMPLE,
				description: '暂无符合条件的替换车记录，请调整筛选条件后重试'
			});
		}
		return React.createElement(Table, {
			rowKey: 'id',
			rowSelection: rowSelection,
			columns: tableColumns,
			dataSource: displayList,
			size: 'small',
			scroll: { x: 1900 },
			pagination: tablePagination
		});
	}

	var requirementContent = `替换车管理（2026年3月3日版本）
一个「数字化资产ONEOS运管平台」中的「运维管理」「车辆业务」「替换车管理」模块

1.面包屑：
1.1.运维管理-车辆业务-替换车管理

筛选与列表分为2个卡片；

2.筛选：
支持通过替换日期、替换类型、项目名称、审批状态、被替换车车牌号、替换车车牌号、替换原因、创建人、创建时间进行筛选，右侧为重置、查询、展开/收起（筛选条件以3列显示，默认显示一行，点击展开/收起对筛选栏卡片进行展开/收起所有筛选条件），点击查询后，筛选条件与列表内容联动。点击重置会回到默认筛选条件并在列表展示结果：

2.1.替换日期：日期选择器，支持单输入框内双日历选择开始-结束时间，默认提示文本为：请选择开始时间、请选择结束时间；
2.2.替换类型：选择器，分为永久替换、临时替换两种方式；
2.3.项目名称：选择器，支持输入框中输入关键内容进行搜索，下拉匹配相应项；
2.4.审批状态：选择器，分为全部、待审批、审批中、审批驳回、未提交、撤回；
2.5.被替换车（旧车）：选择器，支持输入框中输入关键内容进行搜索，下拉匹配相应项；
2.6.新车：选择器，支持输入框中输入关键内容进行搜索，下拉匹配相应项；
2.7.替换原因：选择器，分为全部、客户原因、车辆原因；
2.8.创建人：选择器，下拉选择所有创建人；
2.9.创建时间：日期选择器，支持单输入框内双日历选择开始-结束时间，默认提示文本为：请选择开始时间、请选择结束时间；

3.列表：列表右上角为新增、导出，首列为多选，支持多选后导出对应条目；
列表展示所有替换车记录，分为进行中、历史记录两个tab，字段依次为：替换日期、审批状态、当前审批人、被替换车（旧车）、品牌、型号、新车、品牌、型号、替换类型、替换原因、替换原因说明、创建人、创建时间、操作；

3.1.进行中：显示替换车申请流程未结束、暂存的记录；
    3.1.1.替换日期：显示格式为：YYYY-MM-DD HH:MM:SS；
    3.1.2.审批状态：分为待审批、审批中、审批驳回、未提交、撤回；
    3.1.3.当前审批人：显示当前待审批节点审批人，未提交/撤回等为「—」；
    3.1.4.被替换车（旧车）、品牌、型号、新车、品牌、型号：展示申请表单车辆信息；
    3.1.5.替换类型：临时替换、永久替换；
    3.1.6.替换原因、替换原因说明、创建人、创建时间（YYYY-MM-DD HH:MM:SS）；
    3.1.7.操作：查看、编辑、撤回、删除（逻辑删除）；
           3.1.7.1.查看：审批状态为待审批/审批中/审批驳回/未提交/撤回时显示；
           3.1.7.2.编辑：审批状态为未提交/审批驳回/撤回时显示；
           3.1.7.3.撤回：审批状态为审批中时显示，二次确认；
           3.1.7.4.删除：审批状态为撤回/审批驳回时显示，逻辑删除，二次确认；

3.2.历史记录：显示替换车申请流程已结束的记录；
    3.2.1.替换日期：显示格式为：YYYY-MM-DD，显示替换车申请表单中设置的替换日期；
    3.2.2.替换类型：分为：临时替换、永久替换两种，根据替换车申请表单中设置的替换类型显示；
    3.2.3.项目名称：显示替换车申请表单中设置的项目名称；
    3.2.4.审批状态：历史记录中所有审批状态为审批完成；
    3.2.5.被替换车车牌号：显示替换车申请表单中被替换车车牌号；
    3.2.6.被替换车品牌：显示替换车申请表单中被替换车品牌；
    3.2.7.被替换车型号：显示替换车申请表单中被替换车型号；
    3.2.8.替换车车牌号：显示替换车申请表单中替换车车牌号；
    3.2.9.替换车品牌：显示替换车申请表单中替换车品牌；
    3.2.10.替换车型号：显示替换车申请表单中替换车型号；
    3.2.11.替换原因：显示替换车申请表单中替换原因；
    3.2.12.替换原因说明：显示替换车申请表单中替换原因说明；
    3.2.13.创建人：显示替换车申请表单中创建人；
    3.2.14.创建时间：显示替换车申请表单中创建时间，显示格式为：YYYY-MM-DD HH:MM；
    3.2.15.操作：查看、转永久替换；
           3.2.15.1.查看：点击跳转替换车管理-查看页面；
           3.2.15.2.转永久替换：点击转永久替换，进行二次确认，提示语：是否确认转永久替换，点击提交直接转为永久替换；

列表右下方为分页符。`;

	var activeTab = _activeTab[0];
	var selectedCount = (_selectedRowKeys[0] || []).length;

	return React.createElement(App, null,
		React.createElement('div', { className: 'vr-list-page', style: { minHeight: '100vh', padding: '20px 24px 32px', background: 'linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%)' } },
			React.createElement('style', null, pageStyles),
			React.createElement('div', { className: 'vr-page-header' },
				React.createElement(Breadcrumb, {
					items: [
						{ title: '运维管理' },
						{ title: '车辆业务' },
						{ title: '替换车管理' }
					]
				}),
				React.createElement(Button, { type: 'link', style: { padding: 0, color: '#2563eb', fontWeight: 500 }, onClick: function () { _requirementModalVisible[1](true); } }, '查看需求说明')
			),
			React.createElement(Card, { className: 'vr-filter-card', title: '筛选条件' },
				React.createElement('div', { className: 'vr-filter-grid' }, filterNodes),
				React.createElement('div', { className: 'vr-filter-actions' },
					React.createElement(Button, { onClick: handleReset }, '重置'),
					React.createElement(Button, { type: 'primary', onClick: handleQuery }, '查询'),
					React.createElement(Button, { type: 'link', size: 'small', onClick: function () { _filterExpanded[1](!_filterExpanded[0]); } }, _filterExpanded[0] ? '收起' : '展开')
				)
			),
			React.createElement(Card, { className: 'vr-list-card', title: '替换车列表' },
				React.createElement('div', { className: 'vr-list-table' },
					React.createElement(Tabs, {
						className: 'vr-tabs',
						activeKey: activeTab,
						onChange: function (k) { _activeTab[1](k); _selectedRowKeys[1]([]); setPage(1); },
						tabBarExtraContent: React.createElement('div', { style: { display: 'flex', gap: 8, alignItems: 'center', flexWrap: 'wrap' } },
							React.createElement(Button, { type: 'primary', onClick: function () { message.info('新增替换车申请（原型）'); } }, '新增'),
							selectedCount > 0
								? React.createElement(Badge, { count: selectedCount, size: 'small', offset: [-4, 4] },
									React.createElement(Button, { onClick: function () { message.info('导出选中 ' + selectedCount + ' 条（原型）'); } }, '导出')
								)
								: React.createElement(Button, { onClick: function () { message.info('请先勾选需要导出的记录'); } }, '导出')
						),
						destroyInactiveTabPane: true,
						items: [
							{ key: 'ongoing', label: '进行中 (' + listStats.ongoing + ')', children: activeTab === 'ongoing' ? renderTableBody() : null },
							{ key: 'history', label: '历史记录 (' + listStats.history + ')', children: activeTab === 'history' ? renderTableBody() : null }
						]
					})
				)
			),
			React.createElement(Modal, {
				title: '是否确认撤回该替换车申请',
				open: _withdrawModalVisible[0],
				onCancel: function () { _withdrawModalVisible[1](false); _withdrawModalRecord[1](null); },
				onOk: function () { message.success('已撤回（原型）'); _withdrawModalVisible[1](false); _withdrawModalRecord[1](null); },
				okText: '确定',
				cancelText: '取消'
			}),
			React.createElement(Modal, {
				title: '是否确认转永久替换',
				open: _toPermanentModalVisible[0],
				onCancel: function () { _toPermanentModalVisible[1](false); _toPermanentModalRecord[1](null); },
				onOk: function () { message.success('已转为永久替换（原型）'); _toPermanentModalVisible[1](false); _toPermanentModalRecord[1](null); },
				okText: '提交',
				cancelText: '取消'
			}),
			React.createElement(Modal, {
				title: '是否确认逻辑删除该替换车申请？',
				open: _deleteModalVisible[0],
				onCancel: function () { _deleteModalVisible[1](false); _deleteModalRecord[1](null); },
				onOk: function () {
					var rec = _deleteModalRecord[0];
					if (rec && rec.id) {
						_deletedIds[1](function (prev) {
							if (prev.indexOf(rec.id) !== -1) return prev;
							return prev.concat(rec.id);
						});
						_selectedRowKeys[1](function (prev) { return prev.filter(function (k) { return k !== rec.id; }); });
					}
					message.success('已逻辑删除（原型）');
					_deleteModalVisible[1](false);
					_deleteModalRecord[1](null);
				},
				okText: '确定',
				cancelText: '取消',
				okButtonProps: { danger: true }
			}),
			React.createElement(Modal, {
				title: '需求说明',
				open: _requirementModalVisible[0],
				onCancel: function () { _requirementModalVisible[1](false); },
				width: 720,
				footer: React.createElement(Button, { onClick: function () { _requirementModalVisible[1](false); } }, '关闭'),
				bodyStyle: { maxHeight: '70vh', overflow: 'auto' }
			}, React.createElement('div', { style: { padding: '8px 0' } },
				React.createElement('div', { style: { whiteSpace: 'pre-wrap', fontSize: 13, lineHeight: 1.6, color: '#334155' } }, requirementContent))
			)
		)
	);
};
