hotfix-2.9.10.2312.02

This commit is contained in:
黎永顺 2024-01-19 17:30:41 +08:00
parent 8d09f81115
commit a4da6674c5
2 changed files with 18 additions and 11 deletions

View File

@ -9,6 +9,7 @@ import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import * as API from "../../../../../apis/welfareArchive";
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
import { sysinfo } from "../../../../../apis/ruleconfig";
import { getWelfareSearchsForm, welfareConditions } from "../../config";
import { getConditionDomkeys, toDecimal_n } from "../../../../../util";
import { Button, message, Modal } from "antd";
@ -38,34 +39,34 @@ class Index extends Component {
}
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
const [taxAgentListData, sysInfoData] = await Promise.all([getTaxAgentSelectList(), sysinfo()]);
const {
archivesStore: { welfareProfileForm }, socialBase, fundBase, otherBase, runStatuses,
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData,
showOperateBtn
} = props;
let socialComData = {}, fundComData = {}, otherComData = {};
if (!_.isNil(socialBase.comItems) && !_.isNil(socialBase.comData)) {
if (!_.isNil(socialBase.comItems)) {
_.forEach(getConditionDomkeys(socialBase.comItems), o => {
socialComData = {
...socialComData,
[`${o}_com`]: socialBase.comData[o]
[`${o}_com`]: !_.isNil(socialBase.comData) ? socialBase.comData[o] : _.find(socialBase.comItems[0].items, k => getKey(k) === o).min
};
});
}
if (!_.isNil(fundBase.comItems) && !_.isNil(fundBase.comData)) {
if (!_.isNil(fundBase.comItems)) {
_.forEach(getConditionDomkeys(fundBase.comItems), o => {
fundComData = {
...fundComData,
[`${o}_com`]: fundBase.comData[o]
[`${o}_com`]: !_.isNil(fundBase.comData) ? fundBase.comData[o] : _.find(fundBase.comItems[0].items, k => getKey(k) === o).min
};
});
}
if (!_.isNil(otherBase.comItems) && !_.isNil(otherBase.comData)) {
if (!_.isNil(otherBase.comItems)) {
_.forEach(getConditionDomkeys(otherBase.comItems), o => {
otherComData = {
...otherComData,
[`${o}_com`]: otherBase.comData[o]
[`${o}_com`]: !_.isNil(otherBase.comData) ? otherBase.comData[o] : _.find(otherBase.comItems[0].items, k => getKey(k) === o).min
};
});
}
@ -76,7 +77,8 @@ class Index extends Component {
const formData = {
...result, ...socialBaseData, ...fundBaseData, ...othersBaseData,
...socialBase.data, ...fundBase.data, ...otherBase.data,
...socialComData, ...fundComData, ...otherComData
...socialComData, ...fundComData, ...otherComData,
welBaseAutoAdjust: sysInfoData.data.welBaseAutoAdjust === "1"
};
this.setState({
formData,
@ -95,7 +97,7 @@ class Index extends Component {
items: _.map(o.items, g => {
return {
...g, label: getLabel(g.lanId, g.label),
options: _.map(taxAgentList, j => ({ key: j.id, showname: j.content }))
options: _.map(taxAgentListData.data, j => ({ key: j.id, showname: j.content }))
};
})
};
@ -111,6 +113,11 @@ class Index extends Component {
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : g.viewAttr,
options: _.find(props[`${o.title}Items`], j => j.domkey[0] === key).options
};
} else if (getKey(g).indexOf("StartTime") !== -1) {
return {
...g, label: getLabel(g.lanId, g.label),
viewAttr: (formData[o["typename"]][`${o.title}Name`] && showOperateBtn) ? 3 : g.viewAttr
};
}
return {
...g, label: getLabel(g.lanId, g.label),

View File

@ -791,8 +791,8 @@ const BenefitBaseComponent = (props) => {
com: <WeaFormItem label={child.label} labelCol={{ span: 10 }} wrapperCol={{ span: 14 }}>
<WeaInputNumber
value={value[getKey(child)] || (child.min !== "0.000" ? child.min : 0)} precision={2}
min={child.min !== "0.000" ? child.min : -999999999999999}
max={child.max !== "0.000" ? child.max : 999999999999999}
min={(child.min !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.min) : -999999999999999}
max={(child.max !== "0.000" && value.welBaseAutoAdjust) ? parseFloat(child.max) : 999999999999999}
onChange={v => onChange(getKey(child), v)}
viewAttr={(runStatuses === "4,5" || !showOperateBtn) ? 1 : 2}
/>