维护年审任务管理国际化

This commit is contained in:
linxd
2025-07-03 10:59:39 +08:00
parent cf8e9d0820
commit 739b021334
20 changed files with 679 additions and 236 deletions

View File

@ -87,15 +87,6 @@ const BasicInfoStepComponent = (props: BasicInfoStepProps) => {
});
};
// 年度选项生成
const yearOptions = useCallback(() => {
const currentYear = new Date().getFullYear();
return Array.from({ length: 11 }, (_, i) => currentYear - 5 + i).map((year) => (
<Option key={year} value={year.toString()}>
{year}
</Option>
));
}, []);
// 判断是否显示品类选择器
const shouldShowCategorySelector = useCallback(() => {
@ -130,11 +121,17 @@ const BasicInfoStepComponent = (props: BasicInfoStepProps) => {
<Form.Item
label={intl.formatMessage({ id: 'supplierTaskManage.form.evaluateYear' })}
name="evaluateYear"
getValueProps={(value) => ({
value: value ? moment(value) : undefined,
})}
normalize={(value) => value && value.format('YYYY')}
rules={[{ required: true, message: intl.formatMessage({ id: 'supplierTaskManage.placeholder.selectYear' }) }]}
>
<Select placeholder={intl.formatMessage({ id: 'supplierTaskManage.placeholder.selectYear' })} style={{ width: '100%' }}>
{yearOptions()}
</Select>
<DatePicker
style={{ width: '100%' }}
placeholder={intl.formatMessage({ id: 'supplierTaskManage.placeholder.selectYear' })}
picker="year"
/>
</Form.Item>
</Col>
</Row>