产品-社保福利档案的社保公积金和其他基数设置的bug修复

This commit is contained in:
黎永顺 2023-05-31 15:32:24 +08:00
parent 10864d9a92
commit 92499ee72c
5 changed files with 56 additions and 7 deletions

View File

@ -237,7 +237,7 @@ class Index extends Component {
});
};
queryList = (url) => {
const { loading, pageInfo, searchItemsValue } = this.state;
const { loading, pageInfo, searchItemsValue, selectedKey } = this.state;
const { payrollFilesStore: { tableStore, queryList }, taxAgentStore: { showOperateBtn } } = this.props;
const payload = { ...pageInfo };
this.setState({
@ -255,7 +255,8 @@ class Index extends Component {
total,
current,
pageSize
}
},
tabCount: { ...this.state.tabCount, [tabCountKey[selectedKey]]: total }
});
}
});
@ -843,3 +844,11 @@ const HelpfulDiv = () => {
<span>3.调整个税扣缴义务人档案中已存在的人员批量调整个税扣缴义务人包括返聘人员的情况</span>
</div>;
};
export const tabCountKey = {
suspend: "SUSPEND",
stop: "STOP",
fixed: "FIXED",
pending: "PENDING"
};

View File

@ -56,6 +56,18 @@ export default class AccumulationFundForm extends React.Component {
form.data = request;
setAccumulationFundPaymentForm(form);
};
handleBlurChange = ({ key, value, minNum, maxNum }) => {
const params = {
[key]: _.isNil(value) ? "" : (Number(value) > maxNum && maxNum !== 0) ? maxNum :
(Number(value) < minNum && minNum !== 0) ? minNum : value.toString()
};
const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
const { data } = accumulationFundPaymentForm;
let request = { ...data, ...params };
let form = { ...accumulationFundPaymentForm };
form.data = request;
setAccumulationFundPaymentForm(form);
};
handleChangeWelfare = (val) => {
const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
let paymentData = toJS(accumulationFundPaymentForm.data);
@ -162,6 +174,7 @@ export default class AccumulationFundForm extends React.Component {
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
onChange: this.handlePaymentChange,
onBlurChange: this.handleBlurChange,
min: child.min,
max: child.max
})

View File

@ -54,6 +54,18 @@ export default class OtherForm extends React.Component {
form.data = request;
setOtherPaymentForm(form);
};
handleBlurChange = ({ key, value, minNum, maxNum }) => {
const params = {
[key]: _.isNil(value) ? "" : (Number(value) > maxNum && maxNum !== 0) ? maxNum :
(Number(value) < minNum && minNum !== 0) ? minNum : value.toString()
};
const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
const { data } = otherPaymentForm;
let request = { ...data, ...params };
let form = { ...otherPaymentForm };
form.data = request;
setOtherPaymentForm(form);
};
handleChangeWelfare = (val) => {
const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
@ -142,6 +154,7 @@ export default class OtherForm extends React.Component {
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
onChange: this.handlePaymentChange,
onBlurChange: this.handleBlurChange,
min: child.min,
max: child.max
})

View File

@ -54,6 +54,18 @@ export default class SocialSecurityForm extends React.Component {
form.data = request;
setSocialSecurityPaymentForm(form);
};
handleBlurChange = ({ key, value, minNum, maxNum }) => {
const params = {
[key]: _.isNil(value) ? "" : (Number(value) > maxNum && maxNum !== 0) ? maxNum :
(Number(value) < minNum && minNum !== 0) ? minNum : value.toString()
};
const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
const { data } = socialSecurityPaymentForm;
let request = { ...data, ...params };
let form = { ...socialSecurityPaymentForm };
form.data = request;
setSocialSecurityPaymentForm(form);
};
handleChangeWelfare = (val) => {
const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
let paymentData = toJS(socialSecurityPaymentForm.data);
@ -139,7 +151,7 @@ export default class SocialSecurityForm extends React.Component {
<div className="socialFormWrapper">
<WeaSearchGroup
title="社保基础信息"
customComponent={<SocialTitle keyname="nonPayment" value={!_.isNil(nonPayment) ? nonPayment.toString() : "0" }
customComponent={<SocialTitle keyname="nonPayment" value={!_.isNil(nonPayment) ? nonPayment.toString() : "0"}
onChange={this.handleFormChange}/>}
items={socialItems} col={2} showGroup needTigger={false}/>
{
@ -152,6 +164,7 @@ export default class SocialSecurityForm extends React.Component {
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
onChange: this.handlePaymentChange,
onBlurChange: this.handleBlurChange,
min: child.min,
max: child.max
})
@ -198,14 +211,15 @@ export const SocialEditInput = (props) => {
);
};
export const SocialInputNumber = (props) => {
const { key, value, onChange, label, min, max, labelColSpan = 12, wrapperColSpan = 12 } = props;
const { key, value, onChange, onBlurChange, label, min, max, labelColSpan = 12, wrapperColSpan = 12 } = props;
const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
return (
<WeaFormItem label={label} labelCol={{ span: labelColSpan }} wrapperCol={{ span: wrapperColSpan }}>
<WeaInputNumber
value={value} onChange={(val) => onChange({ key, value: val })} precision={2}
min={minNum > 0 ? minNum : -999999999999999}
max={maxNum > 0 ? maxNum : 999999999999999}
onBlur={(val) => onBlurChange({ key, value: val, minNum, maxNum })}
// min={minNum > 0 ? minNum : -999999999999999}
// max={maxNum > 0 ? maxNum : 999999999999999}
/>
</WeaFormItem>
);

View File

@ -188,7 +188,7 @@ export default class SlideTaxagentUser extends React.Component {
{ title: "从范围中排除", viewcondition: "0" }
]}
keyParam="viewcondition" selectedKey={includeType}
searchType={["base", "advanced"]} advanceHeight={200}
searchType={["base"]} advanceHeight={200}
showSearchAd={showSearchAd} searchsAd={this.getSearchs()}
setShowSearchAd={showSearchAd => {
this.setState({ showSearchAd });