From 1deceeb3e8955c884537ced9f0b4f2e3f95a2191 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Wed, 20 Mar 2024 16:36:56 +0800
Subject: [PATCH 1/2] =?UTF-8?q?feature/2.12.1.2403.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BF=9D=E5=AD=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 03a89212..304724fb 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -180,7 +180,7 @@ class Index extends Component {
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
};
};
- save = async () => {
+ save = async (changeData = false) => {
const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
@@ -198,13 +198,24 @@ class Index extends Component {
}, {
status: otherStatus,
errormsg: otherErrorMsg = "!"
- }] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
+ }] = await Promise.all([
+ API.save({ ...socailPayload, changeData }),
+ API.save({ ...fundPayload, changeData }),
+ API.save({ ...otherPayload, changeData })]);
this.setState({ loading: false });
if (socialStatus && fundStatus && otherStatus) {
message.success(getLabel(30700, "操作成功!"));
this.props.onClose(true);
} else {
- message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content:
+
{socialErrorMsg + fundErrorMsg + otherErrorMsg}
+
{getLabel(111, "是否自动将方案的上下限调整为设置值?")}
+
,
+ onOk: () => this.save(true),
+ onCancel: () => this.props.onClose()
+ });
}
};
updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
@@ -278,7 +289,7 @@ class Index extends Component {
{
runStatuses !== "4,5" && showOperateBtn &&
-
+
}
;
From 8f8f6c5ed1b8751827d7de81ba4cddfdbbf23266 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Fri, 17 May 2024 10:51:56 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feature/2.12.1.2403.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BF=9D=E5=AD=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 53 ++++++++++++-------
.../welfareArchive/config.js | 4 +-
2 files changed, 35 insertions(+), 22 deletions(-)
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}
/>