维护年审任务管理国际化
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user