diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js index 304724fb..e2342e93 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js @@ -6,7 +6,7 @@ */ import React, { Component } from "react"; import { inject, observer } from "mobx-react"; -import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom"; +import { WeaDialog, WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom"; import * as API from "../../../../../apis/welfareArchive"; import { getTaxAgentSelectList } from "../../../../../apis/taxAgent"; import { sysinfo } from "../../../../../apis/ruleconfig"; @@ -23,7 +23,7 @@ class Index extends Component { constructor(props) { super(props); this.state = { - loading: false, conditions: [], formData: {} + loading: false, conditions: [], formData: {}, errorDialog: { visible: false, errorMsg: "" } }; } @@ -207,14 +207,8 @@ class Index extends Component { message.success(getLabel(30700, "操作成功!")); this.props.onClose(true); } else { - Modal.confirm({ - title: getLabel(131329, "信息确认"), - content:
-
{socialErrorMsg + fundErrorMsg + otherErrorMsg}
-
{getLabel(111, "是否自动将方案的上下限调整为设置值?")}
-
, - onOk: () => this.save(true), - onCancel: () => this.props.onClose() + !changeData && this.setState({ + errorDialog: { visible: true, errorMsg: socialErrorMsg + fundErrorMsg + otherErrorMsg } }); } }; @@ -257,18 +251,19 @@ class Index extends Component { }; handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } }); handleSameChange = (baseItems, value) => { + if (!value) return; let newFormDatas = {}, hasCompromise = false; baseItems.forEach((formLabel) => { - const { min, max } = formLabel; + // const { min, max } = formLabel; newFormDatas[getKey(formLabel)] = toDecimal_n(value, 2) || ""; - if (min !== "0.000" && value !== "" && Number(value) < Number(min)) { - hasCompromise = true; - newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2); - } - if (max !== "0.000" && value !== "" && Number(value) > Number(max)) { - hasCompromise = true; - newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2); - } + // if (min !== "0.000" && value !== "" && Number(value) < Number(min)) { + // hasCompromise = true; + // newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2); + // } + // if (max !== "0.000" && value !== "" && Number(value) > Number(max)) { + // hasCompromise = true; + // newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2); + // } }); if (hasCompromise) { message.warning(getLabel("111", "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。")); @@ -311,7 +306,7 @@ class Index extends Component { render() { const { archivesStore: { welfareProfileForm }, showOperateBtn } = this.props; - const { conditions, formData } = this.state; + const { conditions, formData, errorDialog } = this.state; return ( { + this.setState({ errorDialog: { ...errorDialog, visible: false } }, () => { + const promise = this.save(true); + message.success(getLabel(30700, "操作成功!")); + this.props.onClose(true); + }); + }}>{getLabel(111, "确认")} + ]} + onCancel={() => this.setState({ errorDialog: { ...errorDialog, visible: false } })} + bottomLeft={getLabel(111, "点击【确认】自动将不满足条件的基数值设置为对应的上限或下限值")} + > +
+
") }}/> +
+
} /> ); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js index 2c0a760d..78fb3505 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js @@ -815,8 +815,8 @@ const BenefitBaseComponent = (props) => { com: onChange(getKey(child), v)} viewAttr={(runStatuses === "4,5" || !showOperateBtn) ? 1 : 2} />