From c2f4c4372cf16457ade8bd030f01adf5da0af612 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, 24 Nov 2023 11:43:03 +0800
Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?=
=?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welfareEditArchiveSlide/index.js | 16 +------
.../components/welfareTableList/index.js | 2 +-
.../welfareArchive/config.js | 48 +++++++++++++++++--
3 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 0ca2fa72..2507a7c8 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -44,17 +44,6 @@ class Index extends Component {
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
- const conditions = _.reduce(welfareConditions, (pre, cur) => {
- if (cur.title === "social") {
- return [...pre, cur, ...socialBase.items];
- } else if (cur.title === "fund") {
- return [...pre, cur, ...fundBase.items];
- } else if (cur.title === "others") {
- return [...pre, cur, ...otherBase.items];
- }
- return [...pre, cur];
- }, []);
- console.log(conditions, props);
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;
@@ -64,7 +53,7 @@ class Index extends Component {
};
this.setState({
formData,
- conditions: _.map(conditions, o => {
+ conditions: _.map(welfareConditions, o => {
if (o.title === "basic") {
return {
...o, title: getLabel(542699, "员工基本信息"),
@@ -129,7 +118,6 @@ class Index extends Component {
handleFormChange = (val) => {
const changeKey = _.keys(val)[0], changeVal = val[changeKey].value;
const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props;
- console.log(val, changeKey);
setHasBeenModify(true);
if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") {
onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, {
@@ -174,7 +162,7 @@ class Index extends Component {
top={0} width={800} height={100} measureT={"%"} measureX={"px"} measureY={"%"}
direction={"right"} title={this.renderTitle()} onClose={this.handleClose}
content={
- {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData)}
+ {getWelfareSearchsForm(welfareProfileForm, conditions, this.handleFormChange, formData, this.props)}
}
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 928e3add..963e0e01 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -239,7 +239,7 @@ class Index extends Component {
if (status) {
this.setState({
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
- }, () => this.archiveSlideRef.updateForm());
+ });
}
});
};
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index eb4469e3..a5cb8917 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -1,5 +1,13 @@
import React from "react";
-import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
+import {
+ WeaCheckbox,
+ WeaFormItem,
+ WeaHelpfulTip,
+ WeaInputNumber,
+ WeaLocaleProvider,
+ WeaSearchGroup,
+ WeaTools
+} from "ecCom";
import { WeaSwitch } from "comsMobx";
import { Button } from "antd";
import AdvanceInputBtn from "./components/advanceInputBtn";
@@ -648,11 +656,12 @@ export const welfareConditions = [
]
}
];
-export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload) => {
+export const getWelfareSearchsForm = (form, condition, onChange = () => void (0), payload, extraFormField) => {
const CustomComponent = ({ type }) => {
const value = payload[type].nonPayment ? payload[type].nonPayment.toString() : "";
return ;
};
+ const { socialBase, fundBase, otherBase } = extraFormField;
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
@@ -679,5 +688,38 @@ export const getWelfareSearchsForm = (form, condition, onChange = () => void (0)
className={c.col === 3 ? "basic-welfare-info-wrapper" : (c.col === 2 || c.items.length > 1) ? "twoColumns-welfare-info-wrapper" : ""}
/>);
});
- return group;
+ return _.reduce(group, (pre, cur) => {
+ if (cur.props.title === getLabel(543194, "社保基础信息") && _.every(socialBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ } else if (cur.props.title === getLabel(543197, "公积金基础信息") && _.every(fundBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ } else if (cur.props.title === getLabel(543198, "其他福利基础信息") && _.every(otherBase.items, o => o.items.length > 0)) {
+ return [...pre, cur, ];
+ }
+ return [...pre, cur];
+ }, []);
+};
+
+const BenefitBaseComponent = (props) => {
+ const { dataSource, value } = props;
+ return
+ {
+ _.map(dataSource, item => {
+ const { title, items } = item;
+ return ({
+ com:
+ 0 ? minNum : -999999999999999}
+ // max={maxNum > 0 ? maxNum : 999999999999999}
+ />
+
+ }))}
+ customComponent={123
}
+ title={title} col={2} showGroup className="twoColumns-welfare-info-wrapper"
+ />;
+ })
+ }
+ ;
};