社保福利档案日期控件修改

This commit is contained in:
黎永顺 2023-02-28 09:26:54 +08:00
parent 8a859da6fe
commit ee712a5056
3 changed files with 23 additions and 2 deletions

View File

@ -111,6 +111,9 @@ export default class AccumulationFundForm extends React.Component {
label: "公积金起始缴纳月",
viewAttr: fundSchemeId ? 3 : 2,
value: fundStartTime,
disabledDate: (current) => {
return current && fundEndTime && current.getTime() > new Date(fundEndTime).getTime();
},
onChange: this.handleFormChange
})
},
@ -127,6 +130,9 @@ export default class AccumulationFundForm extends React.Component {
key: "fundEndTime",
label: "公积金最后缴纳月",
value: fundEndTime,
disabledDate: (current) => {
return current && fundStartTime && current.getTime() < new Date(fundStartTime).getTime();
},
onChange: this.handleFormChange
})
},

View File

@ -107,6 +107,9 @@ export default class OtherForm extends React.Component {
label: "其他福利起始缴纳月",
viewAttr: otherSchemeId ? 3 : 2,
value: otherStartTime,
disabledDate: (current) => {
return current && otherEndTime && current.getTime() > new Date(otherEndTime).getTime();
},
onChange: this.handleFormChange
})
},
@ -115,6 +118,9 @@ export default class OtherForm extends React.Component {
key: "otherEndTime",
label: "其他福利最后缴纳月",
value: otherEndTime,
disabledDate: (current) => {
return current && otherStartTime && current.getTime() < new Date(otherStartTime).getTime();
},
onChange: this.handleFormChange
})
}

View File

@ -109,6 +109,9 @@ export default class SocialSecurityForm extends React.Component {
label: "社保起始缴纳月",
viewAttr: socialSchemeId ? 3 : 2,
value: socialStartTime,
disabledDate: (current) => {
return current && socialEndTime && current.getTime() > new Date(socialEndTime).getTime();
},
onChange: this.handleFormChange
})
},
@ -125,6 +128,9 @@ export default class SocialSecurityForm extends React.Component {
key: "socialEndTime",
label: "社保最后缴纳月",
value: socialEndTime,
disabledDate: (current) => {
return current && socialStartTime && current.getTime() < new Date(socialStartTime).getTime();
},
onChange: this.handleFormChange
})
}
@ -213,12 +219,15 @@ export const SocialDatePicker = (props) => {
format = "YYYY-MM",
viewAttr = 2,
labelColSpan = 12,
wrapperColSpan = 12
wrapperColSpan = 12,
disabledDate = false
} = props;
return (
<WeaFormItem label={label} labelCol={{ span: labelColSpan }} wrapperCol={{ span: wrapperColSpan }}>
<WeaDatePicker value={value} viewAttr={viewAttr} format={format}
onChange={(val) => onChange({ key, value: val })}/>
onChange={(val) => onChange({ key, value: val })}
disabledDate={disabledDate}
/>
</WeaFormItem>
);
};