diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
index dd3e3a88..8b29b6ef 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
@@ -1,36 +1,32 @@
.socialFormWrapper {
- .formItem {
- height: 40px;
- line-height: 40px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- padding-left: 10px;
- padding-right: 10px;
- border: 1px solid #e2e2e2;
- margin-bottom: 0 !important;
- .ant-select-selection{
- height: 30px;
- border-radius: 0;
+ .wea-search-group {
+ padding: 0 16px;
+
+ .wea-form-cell-wrapper {
+ border: 1px solid #e5e5e5;
+ border-bottom: none;
+ border-right: none;
+ margin: 0 16px;
+
+ .wea-form-cell {
+ padding: 4px 16px;
+ border-bottom: 1px solid #e5e5e5;
+ border-right: 1px solid #e5e5e5;
+ }
}
}
- .borderR-none {
- border-right: none;
- }
-
- .borderB-none {
- border-bottom: none;
- }
}
-.mySalaryBenefitsWrapper{
- .tdEllipsis{
+
+.mySalaryBenefitsWrapper {
+ .tdEllipsis {
display: inline-block;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+
.optWrapper {
display: flex;
align-items: center;
@@ -40,6 +36,7 @@
}
}
}
+
//提示语
.helpWrapper {
display: flex;
@@ -50,30 +47,32 @@
}
}
-.slideOuterWrapper{
- .wea-slide-modal-title{
+.slideOuterWrapper {
+ .wea-slide-modal-title {
height: initial;
line-height: initial;
text-align: left;
}
- .rodal-close{
+
+ .rodal-close {
z-index: 99;
- top: 10px!important;
+ top: 10px !important;
}
}
-@media (min-width: 1260px){
- .slideOuterWrapper{
- .reqTopWrapper .wea-new-top-req-title>div:first-child>div{
- max-width: 100%!important;
+@media (min-width: 1260px) {
+ .slideOuterWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: 100% !important;
}
}
}
+
@media screen and (min-width: 1060px) and (max-width: 1260px) {
- .slideOuterWrapper{
- .reqTopWrapper .wea-new-top-req-title>div:first-child>div{
- max-width: calc(100% - 96px)!important;
+ .slideOuterWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: calc(100% - 96px) !important;
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 7f86be27..bc0c538f 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -1,9 +1,6 @@
import React from "react";
-import GroupCard from "../../../components/groupCard";
-import { Col, Row } from "antd";
-import { WeaCheckbox, WeaDatePicker, WeaInput, WeaInputNumber, WeaSelect } from "ecCom";
+import { WeaCheckbox, WeaSearchGroup } from "ecCom";
import { inject, observer } from "mobx-react";
-import cs from "classnames";
import "./index.less";
@inject("archivesStore")
@@ -18,7 +15,9 @@ export default class SocialSecurityForm extends React.Component {
}
// 表单变化
- handleFormChange(params) {
+ handleFormChange = (params) => {
+ console.log("params", params);
+ return;
const { archivesStore: { socialSecurityForm, setSocialSecurityForm }, onChangeRecordSchemeId } = this.props;
const { data } = socialSecurityForm;
let request = { ...data, ...params };
@@ -27,7 +26,7 @@ export default class SocialSecurityForm extends React.Component {
setSocialSecurityForm(form);
Object.keys(params).length > 1 &&
onChangeRecordSchemeId(params.socialSchemeId);
- }
+ };
// 获取基数表单
handleFetchPaymentForm(value) {
@@ -53,137 +52,131 @@ export default class SocialSecurityForm extends React.Component {
let paymentItems = socialSecurityPaymentForm.items;
// Integer数据转为string
let data = { ...baseData };
- if (data) {
+ if (!_.isNil(data)) {
Object.keys(data).map(key => {
- if (data[key]) {
+ if (!_.isNil(data[key])) {
data[key] = data[key].toString();
}
});
}
+ const { nonPayment } = data;
+ console.log(baseData, data);
return (
-
- {
- this.handleFormChange({ nonPayment: value });
- }}
- />
-
-
-
- 社保起始缴纳月:
-
- {
- this.handleFormChange({ socialStartTime: value });
- }}
- />
-
- 社保方案名称:
-
- {
- this.handleFormChange({ socialName: showName, socialSchemeId: value });
- this.handleFetchPaymentForm(value);
- }}
- />
-
-
-
- 社保最后缴纳月:
-
- this.handleFormChange({ socialEndTime: value })}
- />
-
- 社保账号:
-
- {
- this.handleFormChange({ schemeAccount: value });
- }}/>
-
-
-
- {/*个税扣缴义务人:*/}
- {/**/}
- {/* */}
- {/**/}
- 社保个人实际承担方:
-
- {
- this.handleFormChange({ underTake: value });
- }}
- />
-
-
-
-
- {
- data.socialSchemeId && paymentItems && paymentItems.map(group => (
-
- {
- group.items && group.items.length > 0 &&
-
- {
- group.items && group.items.map((item, idx) => (
-
-
- {item.label}:
-
- {
- this.handlePaymentChange({ [item.domkey[0]]: value ? String(value) : '0' });
- }}
- />
-
-
-
- ))
- }
-
-
- }
-
- ))
- }
+
}
+ items={[]} col={2} showGroup needTigger={false}/>
+ {/**/}
+ {/* {*/}
+ {/* this.handleFormChange({ nonPayment: value });*/}
+ {/* }}*/}
+ {/* />*/}
+ {/*
*/}
+ {/**/}
+ {/* */}
+ {/* 社保起始缴纳月:*/}
+ {/* */}
+ {/* {*/}
+ {/* this.handleFormChange({ socialStartTime: value });*/}
+ {/* }}*/}
+ {/* />*/}
+ {/* */}
+ {/* 社保方案名称:*/}
+ {/* */}
+ {/* {*/}
+ {/* this.handleFormChange({ socialName: showName, socialSchemeId: value });*/}
+ {/* this.handleFetchPaymentForm(value);*/}
+ {/* }}*/}
+ {/* />*/}
+ {/* */}
+ {/*
*/}
+ {/* */}
+ {/* 社保最后缴纳月:*/}
+ {/* */}
+ {/* this.handleFormChange({ socialEndTime: value })}*/}
+ {/* />*/}
+ {/* */}
+ {/* 社保账号:*/}
+ {/* */}
+ {/* {*/}
+ {/* this.handleFormChange({ schemeAccount: value });*/}
+ {/* }}/>*/}
+ {/* */}
+ {/*
*/}
+ {/* */}
+ {/* 社保个人实际承担方:*/}
+ {/* */}
+ {/* {*/}
+ {/* this.handleFormChange({ underTake: value });*/}
+ {/* }}*/}
+ {/* />*/}
+ {/* */}
+ {/*
*/}
+ {/**/}
+ {/*{*/}
+ {/* data.socialSchemeId && paymentItems && paymentItems.map(group => (*/}
+ {/* */}
+ {/* {*/}
+ {/* group.items && group.items.length > 0 && */}
+ {/* */}
+ {/* {*/}
+ {/* group.items && group.items.map((item, idx) => (*/}
+ {/* */}
+ {/* */}
+ {/* {item.label}:*/}
+ {/* */}
+ {/* {*/}
+ {/* this.handlePaymentChange({ [item.domkey[0]]: value ? String(value) : '0' });*/}
+ {/* }}*/}
+ {/* />*/}
+ {/* */}
+ {/*
*/}
+ {/* */}
+ {/* ))*/}
+ {/* }*/}
+ {/*
*/}
+ {/* */}
+ {/* }*/}
+ {/*
*/}
+ {/* ))*/}
+ {/*}*/}
);
}
}
+const SocialTitle = (props) => {
+ const { value, onChange } = props;
+ return
;
+};
From 7c4e2f5588f80ab22aa847a48737cb04388fbc09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 14 Feb 2023 14:32:02 +0800
Subject: [PATCH 04/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/index.less | 4 +
.../archives/socialSecurityForm.js | 84 +++++++++++++++----
2 files changed, 74 insertions(+), 14 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
index 8b29b6ef..348327f9 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
@@ -12,6 +12,10 @@
padding: 4px 16px;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
+
+ .wea-form-item {
+ padding: 0;
+ }
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index bc0c538f..d1f69780 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -1,6 +1,7 @@
import React from "react";
-import { WeaCheckbox, WeaSearchGroup } from "ecCom";
+import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
import { inject, observer } from "mobx-react";
+import { toJS } from "mobx";
import "./index.less";
@inject("archivesStore")
@@ -46,27 +47,58 @@ export default class SocialSecurityForm extends React.Component {
render() {
const { archivesStore: { socialSecurityForm, socialSecurityPaymentForm } } = this.props;
- const { items } = socialSecurityForm;
+ const { items, data: socialData } = socialSecurityForm;
let baseData = socialSecurityForm.data;
let paymentData = socialSecurityPaymentForm.data;
let paymentItems = socialSecurityPaymentForm.items;
// Integer数据转为string
- let data = { ...baseData };
- if (!_.isNil(data)) {
- Object.keys(data).map(key => {
- if (!_.isNil(data[key])) {
- data[key] = data[key].toString();
- }
- });
- }
- const { nonPayment } = data;
- console.log(baseData, data);
+ // let socialData = { ...baseData };
+ // if (!_.isNil(socialData)) {
+ // Object.keys(socialData).map(key => {
+ // if (!_.isNil(socialData[key])) {
+ // socialData[key] = socialData[key].toString();
+ // }
+ // });
+ // }
+ const { nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "" } = socialData || {};
+ const socialItems = !_.isNil(toJS(items)) ? [
+ ..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
+ item => ({
+ com: SocialSelect({
+ label: item.label,
+ value: !_.isNil(socialData[item["domkey"][0]]) ? socialData[item["domkey"][0]].toString() : "",
+ options: item.options,
+ onChange: this.handleFormChange
+ })
+ })),
+ {
+ com: SocialDatePicker({
+ label: "社保起始缴纳月",
+ value: socialStartTime,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialEditInput({
+ label: "社保账号",
+ value: schemeAccount,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialDatePicker({
+ label: "社保最后缴纳月",
+ value: socialEndTime,
+ onChange: this.handleFormChange
+ })
+ }
+ ] : [];
return (
}
- items={[]} col={2} showGroup needTigger={false}/>
+ customComponent={}
+ items={socialItems} col={2} showGroup needTigger={false}/>
{/**/}
{/*
{
const { value, onChange } = props;
return ;
};
+const SocialSelect = (props) => {
+ const { value, onChange, options, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ return
+
+ ;
+};
+const SocialEditInput = (props) => {
+ const { value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ return (
+
+
+
+ );
+};
+const SocialDatePicker = (props) => {
+ const { value, onChange, label, format = "YYYY-MM", viewAttr = 2, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ return (
+
+
+
+ );
+};
+
+
From e3f4cebe575108ab20fccceef7628df8d44f6809 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 14 Feb 2023 14:59:55 +0800
Subject: [PATCH 05/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/socialSecurityForm.js | 35 ++++++++++++++++---
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index d1f69780..d67c1566 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -1,5 +1,5 @@
import React from "react";
-import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
+import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect } from "ecCom";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import "./index.less";
@@ -48,9 +48,8 @@ export default class SocialSecurityForm extends React.Component {
render() {
const { archivesStore: { socialSecurityForm, socialSecurityPaymentForm } } = this.props;
const { items, data: socialData } = socialSecurityForm;
- let baseData = socialSecurityForm.data;
- let paymentData = socialSecurityPaymentForm.data;
- let paymentItems = socialSecurityPaymentForm.items;
+ const paymentData = socialSecurityPaymentForm.data;
+ const paymentItems = socialSecurityPaymentForm.items;
// Integer数据转为string
// let socialData = { ...baseData };
// if (!_.isNil(socialData)) {
@@ -60,7 +59,10 @@ export default class SocialSecurityForm extends React.Component {
// }
// });
// }
- const { nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "" } = socialData || {};
+ const {
+ nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "",
+ socialName = ""
+ } = socialData || {};
const socialItems = !_.isNil(toJS(items)) ? [
..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
item => ({
@@ -99,6 +101,21 @@ export default class SocialSecurityForm extends React.Component {
title="社保基础信息"
customComponent={}
items={socialItems} col={2} showGroup needTigger={false}/>
+ {
+ !_.isEmpty(socialName) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ const { title, items } = item;
+ return ({
+ com: SocialInputNumber({
+ label: child.label,
+ value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
+ onChange: this.handleFormChange
+ })
+ }))}
+ title={title} col={2} showGroup
+ />;
+ })
+ }
{/**/}
{/*
{
);
};
+const SocialInputNumber = (props) => {
+ const { value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ return (
+
+
+
+ );
+};
const SocialDatePicker = (props) => {
const { value, onChange, label, format = "YYYY-MM", viewAttr = 2, labelColSpan = 12, wrapperColSpan = 12 } = props;
return (
From 661cc02ed43233f2f57f961f1887c4bbbd9ad5bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Tue, 14 Feb 2023 17:32:37 +0800
Subject: [PATCH 06/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/socialSecurityForm.js | 58 ++++++++++++-------
1 file changed, 36 insertions(+), 22 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index d67c1566..461f542c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -15,25 +15,23 @@ export default class SocialSecurityForm extends React.Component {
getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", siSchemeId, this.props.record.paymentOrganization);
}
- // 表单变化
- handleFormChange = (params) => {
- console.log("params", params);
- return;
+ handleFormChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { socialSecurityForm, setSocialSecurityForm }, onChangeRecordSchemeId } = this.props;
const { data } = socialSecurityForm;
let request = { ...data, ...params };
let form = { ...socialSecurityForm };
form.data = request;
setSocialSecurityForm(form);
- Object.keys(params).length > 1 &&
- onChangeRecordSchemeId(params.socialSchemeId);
+ key === "socialName" && this.handleFetchPaymentForm(value);
+ key === "socialName" && onChangeRecordSchemeId(value);
};
- // 获取基数表单
- handleFetchPaymentForm(value) {
- const { archivesStore: { getPaymentForm } } = this.props;
- getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value, this.props.record.paymentOrganization);
- }
+ handleFetchPaymentForm = (value) => {
+ const { archivesStore: { getPaymentForm }, employeeId, record } = this.props;
+ const { paymentOrganization } = record;
+ getPaymentForm(employeeId, "SOCIAL_SECURITY", value, paymentOrganization);
+ };
//基数变化
handlePaymentChange(params) {
@@ -67,6 +65,7 @@ export default class SocialSecurityForm extends React.Component {
..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
item => ({
com: SocialSelect({
+ key: item["domkey"][0],
label: item.label,
value: !_.isNil(socialData[item["domkey"][0]]) ? socialData[item["domkey"][0]].toString() : "",
options: item.options,
@@ -75,6 +74,7 @@ export default class SocialSecurityForm extends React.Component {
})),
{
com: SocialDatePicker({
+ key: "socialStartTime",
label: "社保起始缴纳月",
value: socialStartTime,
onChange: this.handleFormChange
@@ -82,6 +82,7 @@ export default class SocialSecurityForm extends React.Component {
},
{
com: SocialEditInput({
+ key: "schemeAccount",
label: "社保账号",
value: schemeAccount,
onChange: this.handleFormChange
@@ -89,6 +90,7 @@ export default class SocialSecurityForm extends React.Component {
},
{
com: SocialDatePicker({
+ key: "socialEndTime",
label: "社保最后缴纳月",
value: socialEndTime,
onChange: this.handleFormChange
@@ -99,7 +101,8 @@ export default class SocialSecurityForm extends React.Component {
}
+ customComponent={}
items={socialItems} col={2} showGroup needTigger={false}/>
{
!_.isEmpty(socialName) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
@@ -107,6 +110,7 @@ export default class SocialSecurityForm extends React.Component {
return ({
com: SocialInputNumber({
+ key: child["domkey"][0],
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
onChange: this.handleFormChange
@@ -226,36 +230,46 @@ export default class SocialSecurityForm extends React.Component {
}
}
const SocialTitle = (props) => {
- const { value, onChange } = props;
- return ;
+ const { value, onChange, key } = props;
+ return onChange({ key, value: val })}/>;
};
const SocialSelect = (props) => {
- const { value, onChange, options, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const { key, value, onChange, options, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return
-
+ onChange({ key, value: val })}/>
;
};
const SocialEditInput = (props) => {
- const { value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const { key, value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return (
-
+ onChange({ key, value: val })}/>
);
};
const SocialInputNumber = (props) => {
- const { value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const { key, value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return (
-
+ onChange({ key, value: val })} min={0} precision={2}/>
);
};
const SocialDatePicker = (props) => {
- const { value, onChange, label, format = "YYYY-MM", viewAttr = 2, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const {
+ key,
+ value,
+ onChange,
+ label,
+ format = "YYYY-MM",
+ viewAttr = 2,
+ labelColSpan = 12,
+ wrapperColSpan = 12
+ } = props;
return (
-
+ onChange({ key, value: val })}/>
);
};
From f2030e971fe901c4cb36568febfe7f3b5a475235 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, 15 Feb 2023 09:46:59 +0800
Subject: [PATCH 07/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../socialSecurityBenefits/archives/index.js | 7 +-
.../archives/index.less | 5 +
.../archives/socialSecurityForm.js | 138 +++---------------
3 files changed, 27 insertions(+), 123 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index b8f6c267..68876f0d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -214,6 +214,7 @@ export default class Archives extends React.Component {
const { archivesStore: { save, socialSecurityForm, accumulationFundForm, otherForm } } = this.props;
if (selectedTab == 1) {
const { data } = socialSecurityForm;
+ console.log(socialSecurityForm);
if (data.socialSchemeId && !data.socialStartTime) {
Modal.warning({
title: "信息确认",
@@ -221,9 +222,9 @@ export default class Archives extends React.Component {
});
return;
}
- save("SOCIAL_SECURITY").then(() => {
- this.query();
- });
+ // save("SOCIAL_SECURITY").then(() => {
+ // this.query();
+ // });
} else if (selectedTab == 2) {
const { data } = accumulationFundForm;
if (data.fundSchemeId && !data.fundStartTime) {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
index 348327f9..67111a4e 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less
@@ -20,6 +20,11 @@
}
}
+ .welfareBaseWrapper {
+ .title {
+ margin-right: 10px;
+ }
+ }
}
.mySalaryBenefitsWrapper {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 461f542c..2c27a311 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -33,30 +33,21 @@ export default class SocialSecurityForm extends React.Component {
getPaymentForm(employeeId, "SOCIAL_SECURITY", value, paymentOrganization);
};
- //基数变化
- handlePaymentChange(params) {
+ handlePaymentChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
const { data } = socialSecurityPaymentForm;
let request = { ...data, ...params };
let form = { ...socialSecurityPaymentForm };
form.data = request;
setSocialSecurityPaymentForm(form);
- }
+ };
render() {
const { archivesStore: { socialSecurityForm, socialSecurityPaymentForm } } = this.props;
const { items, data: socialData } = socialSecurityForm;
const paymentData = socialSecurityPaymentForm.data;
const paymentItems = socialSecurityPaymentForm.items;
- // Integer数据转为string
- // let socialData = { ...baseData };
- // if (!_.isNil(socialData)) {
- // Object.keys(socialData).map(key => {
- // if (!_.isNil(socialData[key])) {
- // socialData[key] = socialData[key].toString();
- // }
- // });
- // }
const {
nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "",
socialName = ""
@@ -101,7 +92,7 @@ export default class SocialSecurityForm extends React.Component {
}
items={socialItems} col={2} showGroup needTigger={false}/>
{
@@ -113,124 +104,31 @@ export default class SocialSecurityForm extends React.Component {
key: child["domkey"][0],
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
- onChange: this.handleFormChange
+ onChange: this.handlePaymentChange
})
}))}
+ customComponent={}
title={title} col={2} showGroup
/>;
})
}
- {/**/}
- {/* {*/}
- {/* this.handleFormChange({ nonPayment: value });*/}
- {/* }}*/}
- {/* />*/}
- {/*
*/}
- {/**/}
- {/* */}
- {/* 社保起始缴纳月:*/}
- {/* */}
- {/* {*/}
- {/* this.handleFormChange({ socialStartTime: value });*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/* 社保方案名称:*/}
- {/* */}
- {/* {*/}
- {/* this.handleFormChange({ socialName: showName, socialSchemeId: value });*/}
- {/* this.handleFetchPaymentForm(value);*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/* */}
- {/* 社保最后缴纳月:*/}
- {/* */}
- {/* this.handleFormChange({ socialEndTime: value })}*/}
- {/* />*/}
- {/* */}
- {/* 社保账号:*/}
- {/* */}
- {/* {*/}
- {/* this.handleFormChange({ schemeAccount: value });*/}
- {/* }}/>*/}
- {/* */}
- {/*
*/}
- {/* */}
- {/* 社保个人实际承担方:*/}
- {/* */}
- {/* {*/}
- {/* this.handleFormChange({ underTake: value });*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/**/}
- {/*{*/}
- {/* data.socialSchemeId && paymentItems && paymentItems.map(group => (*/}
- {/* */}
- {/* {*/}
- {/* group.items && group.items.length > 0 && */}
- {/* */}
- {/* {*/}
- {/* group.items && group.items.map((item, idx) => (*/}
- {/* */}
- {/* */}
- {/* {item.label}:*/}
- {/* */}
- {/* {*/}
- {/* this.handlePaymentChange({ [item.domkey[0]]: value ? String(value) : '0' });*/}
- {/* }}*/}
- {/* />*/}
- {/* */}
- {/*
*/}
- {/* */}
- {/* ))*/}
- {/* }*/}
- {/*
*/}
- {/* */}
- {/* }*/}
- {/*
*/}
- {/* ))*/}
- {/*}*/}
);
}
}
-const SocialTitle = (props) => {
+const ConsistentWelfare = (props) => {
const { value, onChange, key } = props;
+ return
+ 各项福利基数一致:
+ onChange({ key, value: val })}
+ precision={2}
+ />
+
;
+};
+const SocialTitle = (props) => {
+ const { value, onChange, keyname: key } = props;
return onChange({ key, value: val })}/>;
};
const SocialSelect = (props) => {
From 03a432266bd037361be5719f27e4db579bef3e69 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, 15 Feb 2023 10:13:34 +0800
Subject: [PATCH 08/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../socialSecurityBenefits/archives/index.js | 16 +++++++++-------
pc4mobx/hrmSalary/stores/archives.js | 2 +-
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index 68876f0d..717a4db0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -214,20 +214,21 @@ export default class Archives extends React.Component {
const { archivesStore: { save, socialSecurityForm, accumulationFundForm, otherForm } } = this.props;
if (selectedTab == 1) {
const { data } = socialSecurityForm;
- console.log(socialSecurityForm);
- if (data.socialSchemeId && !data.socialStartTime) {
+ const { socialName, socialStartTime } = data;
+ if (socialName && !socialStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
- // save("SOCIAL_SECURITY").then(() => {
- // this.query();
- // });
+ save("SOCIAL_SECURITY").then(() => {
+ this.query();
+ });
} else if (selectedTab == 2) {
const { data } = accumulationFundForm;
- if (data.fundSchemeId && !data.fundStartTime) {
+ const { fundSchemeId, fundStartTime } = data;
+ if (fundSchemeId && !fundStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
@@ -239,7 +240,8 @@ export default class Archives extends React.Component {
});
} else if (selectedTab == 3) {
const { data } = otherForm;
- if (data.otherSchemeId && !data.otherStartTime) {
+ const { otherSchemeId, otherStartTime } = data;
+ if (otherSchemeId && !otherStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index b2df90d8..e7d6de24 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -207,7 +207,7 @@ export class ArchivesStore {
let paymentForm = "";
if (welfareType == "SOCIAL_SECURITY") {
baseForm = JSON.stringify(this.socialSecurityForm.data);
- paymentForm = this.socialSecurityForm.data.socialSchemeId ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
+ paymentForm = this.socialSecurityForm.data.socialName ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
} else if (welfareType == "ACCUMULATION_FUND") {
baseForm = JSON.stringify(this.accumulationFundForm.data);
paymentForm = this.accumulationFundForm.data.fundSchemeId ? JSON.stringify(this.accumulationFundPaymentForm.data) : "";
From 4e29ad25a2998ec1c9958b32c964ced731ed0c41 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, 15 Feb 2023 11:37:13 +0800
Subject: [PATCH 09/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/accumulationFundForm.js | 240 +++++++-----------
.../socialSecurityBenefits/archives/index.js | 4 +-
.../archives/otherForm.js | 197 +++++---------
.../archives/socialSecurityForm.js | 21 +-
pc4mobx/hrmSalary/stores/archives.js | 8 +-
5 files changed, 179 insertions(+), 291 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index ff516018..edffd51d 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -1,9 +1,15 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import { Col, Row } from "antd";
-import { WeaCheckbox, WeaDatePicker, WeaInput, WeaInputNumber, WeaSelect } from "ecCom";
-import GroupCard from "../../../components/groupCard";
-import cs from "classnames";
+import { toJS } from "mobx";
+import { WeaSearchGroup } from "ecCom";
+import {
+ ConsistentWelfare,
+ SocialDatePicker,
+ SocialEditInput,
+ SocialInputNumber,
+ SocialSelect,
+ SocialTitle
+} from "./socialSecurityForm";
import "./index.less";
@inject("archivesStore")
@@ -16,172 +22,110 @@ export default class AccumulationFundForm extends React.Component {
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId, this.props.record.paymentOrganization);
}
- // 表单变化
- handleFormChange(params) {
+ handleFormChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { accumulationFundForm, setAccumulationFundForm }, onChangeRecordFundSchemeId } = this.props;
const { data } = accumulationFundForm;
let request = { ...data, ...params };
- request.fundName = request.fundSchemeId;
let form = { ...accumulationFundForm };
form.data = request;
setAccumulationFundForm(form);
- Object.keys(params).length>1 &&
- onChangeRecordFundSchemeId(params.fundSchemeId)
- }
+ key === "fundSchemeId" && this.handleFetchPaymentForm(value);
+ key === "fundSchemeId" && onChangeRecordFundSchemeId(value);
+ };
// 获取基数表单
- handleFetchPaymentForm(fundName) {
+ handleFetchPaymentForm = (fundName) => {
const { archivesStore: { getPaymentForm } } = this.props;
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization);
- }
-
-
- //基数变化
- handlePaymentChange(params) {
+ };
+ handlePaymentChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
const { data } = accumulationFundPaymentForm;
let request = { ...data, ...params };
let form = { ...accumulationFundPaymentForm };
form.data = request;
setAccumulationFundPaymentForm(form);
- }
+ };
render() {
const { archivesStore: { accumulationFundForm, accumulationFundPaymentForm } } = this.props;
- const { items } = accumulationFundForm;
- let baseData = accumulationFundForm.data;
- let paymentData = accumulationFundPaymentForm.data;
- let paymentItems = accumulationFundPaymentForm.items;
- let data = { ...baseData };
- // Integer数据转为string
- if (data) {
- Object.keys(data).map(key => {
- if (data[key]) {
- data[key] = data[key].toString();
- }
- });
- }
+ const { items, data: foundData } = accumulationFundForm;
+ const paymentData = accumulationFundPaymentForm.data;
+ const paymentItems = accumulationFundPaymentForm.items;
+ const {
+ nonPayment = "", fundAccount = "", supplementFundAccount = "", fundStartTime = "", fundEndTime = "",
+ fundSchemeId = ""
+ } = foundData || {};
+ const foundItems = !_.isNil(toJS(items)) ? [
+ ..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
+ item => ({
+ com: SocialSelect({
+ key: item["domkey"][0],
+ label: item.label,
+ value: !_.isNil(foundData[item["domkey"][0]]) ? foundData[item["domkey"][0]].toString() : "",
+ options: item.options,
+ onChange: this.handleFormChange
+ })
+ })),
+ {
+ com: SocialDatePicker({
+ key: "fundStartTime",
+ label: "公积金起始缴纳月",
+ viewAttr: fundSchemeId ? 3 : 2,
+ value: fundStartTime,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialEditInput({
+ key: "fundAccount",
+ label: "公积金账号",
+ value: fundAccount,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialDatePicker({
+ key: "fundEndTime",
+ label: "公积金最后缴纳月",
+ value: fundEndTime,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialEditInput({
+ key: "supplementFundAccount",
+ label: "补充公积金账号",
+ value: supplementFundAccount,
+ onChange: this.handleFormChange
+ })
+ }
+ ] : [];
return (
-
- {
- this.handleFormChange({ nonPayment: value });
- }}/>
-
-
-
- 公积金起始缴纳月:
-
- this.handleFormChange({ fundStartTime: value })}
- />
-
-
- 公积金方案名称:
-
- {
- this.handleFormChange({ fundSchemeId: value, fundName: showname });
- this.handleFetchPaymentForm(value);
- }}
- />
-
-
-
- 公积金最后缴纳月:
-
- this.handleFormChange({ fundEndTime: value })}
- />
-
- 公积金账号:
-
- this.handleFormChange({ fundAccount: value })}/>
-
-
-
- 补充公积金账号:
-
- this.handleFormChange({ supplementFundAccount: value })}/>
-
- 公积金个人实际承担方:
-
- {
- this.handleFormChange({ underTake: value });
- }}
- />
-
-
- {/**/}
- {/*公积金缴纳组织:*/}
- {/**/}
- {/* */}
- {/**/}
- {/*
*/}
-
+
}
+ items={foundItems} col={2} showGroup needTigger={false}/>
{
- data.fundSchemeId && paymentItems && paymentItems.map(group => (
-
- {
- group.items && group.items.length > 0 &&
-
- {
- group.items && group.items.map((item, idx) => (
-
-
- {item.label}:
-
- {
- this.handlePaymentChange({ [item.domkey[0]]: value ? String(value) : '0' });
- }}
- />
-
-
-
- ))
- }
-
-
- }
-
-
-
- ))
+ !_.isEmpty(fundSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ const { title, items } = item;
+ return ({
+ com: SocialInputNumber({
+ key: child["domkey"][0],
+ label: child.label,
+ value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
+ onChange: this.handlePaymentChange
+ })
+ }))}
+ customComponent={}
+ title={title} col={2} showGroup
+ />;
+ })
}
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index 717a4db0..4b9c73c6 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -214,8 +214,8 @@ export default class Archives extends React.Component {
const { archivesStore: { save, socialSecurityForm, accumulationFundForm, otherForm } } = this.props;
if (selectedTab == 1) {
const { data } = socialSecurityForm;
- const { socialName, socialStartTime } = data;
- if (socialName && !socialStartTime) {
+ const { socialSchemeId, socialStartTime } = data;
+ if (socialSchemeId && !socialStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index 388c92b4..2247df1c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -1,9 +1,14 @@
import React from "react";
import { inject, observer } from "mobx-react";
-import {toJS} from 'mobx';
-import { Col, Row } from "antd";
-import { WeaCheckbox, WeaDatePicker, WeaInputNumber, WeaSelect } from "ecCom";
-import GroupCard from "../../../components/groupCard";
+import { WeaSearchGroup } from "ecCom";
+import { toJS } from "mobx";
+import {
+ ConsistentWelfare,
+ SocialDatePicker,
+ SocialInputNumber,
+ SocialSelect,
+ SocialTitle
+} from "./socialSecurityForm";
import "./index.less";
@inject("archivesStore")
@@ -23,151 +28,89 @@ export default class OtherForm extends React.Component {
}
// 获取基数表单
- handleFetchPaymentForm(value) {
+ handleFetchPaymentForm = (value) => {
const { archivesStore: { getPaymentForm } } = this.props;
getPaymentForm(this.props.employeeId, "OTHER", value, this.props.record.paymentOrganization);
- }
-
- // 表单变化
- handleFormChange(params) {
+ };
+ handleFormChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { otherForm, setOtherForm }, onChangeRecordOtherSchemeId } = this.props;
const { data } = otherForm;
let request = { ...data, ...params };
let form = { ...otherForm };
form.data = request;
setOtherForm(form);
- Object.keys(params).length>1 &&
- onChangeRecordOtherSchemeId(params.otherSchemeId)
- }
-
- //基数变化
- handlePaymentChange(params) {
+ key === "otherSchemeId" && this.handleFetchPaymentForm(value);
+ key === "otherSchemeId" && onChangeRecordOtherSchemeId(value);
+ };
+ handlePaymentChange = ({ key, value }) => {
+ const params = { [key]: value };
const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
const { data } = otherPaymentForm;
let request = { ...data, ...params };
let form = { ...otherPaymentForm };
form.data = request;
setOtherPaymentForm(form);
- }
+ };
render() {
const { archivesStore: { otherForm, otherPaymentForm } } = this.props;
- const { items } = otherForm;
- let baseData = otherForm.data;
- let data = { ...baseData };
+ const { items, data: otherData } = otherForm;
let paymentData = otherPaymentForm.data;
let paymentItems = otherPaymentForm.items;
- // Integer数据转为string
- if (data) {
- Object.keys(data).map(key => {
- if (data[key]) {
- data[key] = data[key].toString();
- }
- });
- }
+ const { nonPayment = "", otherStartTime = "", otherEndTime = "", otherSchemeId = "" } = otherData || {};
+ const otherItems = !_.isNil(toJS(items)) ? [
+ ..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
+ item => ({
+ com: SocialSelect({
+ key: item["domkey"][0],
+ label: item.label,
+ value: !_.isNil(otherData[item["domkey"][0]]) ? otherData[item["domkey"][0]].toString() : "",
+ options: item.options,
+ onChange: this.handleFormChange
+ })
+ })),
+ {
+ com: SocialDatePicker({
+ key: "otherStartTime",
+ label: "其他福利起始缴纳月",
+ viewAttr: otherSchemeId ? 3 : 2,
+ value: otherStartTime,
+ onChange: this.handleFormChange
+ })
+ },
+ {
+ com: SocialDatePicker({
+ key: "otherEndTime",
+ label: "其他福利最后缴纳月",
+ value: otherEndTime,
+ onChange: this.handleFormChange
+ })
+ }
+ ] : [];
return (
-
- {
- this.handleFormChange({ nonPayment: value });
- }}/>
-
-
-
- 其他福利起始缴纳月:
-
- this.handleFormChange({ otherStartTime: value })}
- />
-
- 其他福利方案名称:
-
- {
- this.handleFormChange({ otherName: showname, otherSchemeId: value });
- this.handleFetchPaymentForm(value);
- }}/>
-
-
-
- 其他福利最后缴纳月:
-
- this.handleFormChange({ otherEndTime: value })}
- />
-
- 其他福利个人实际承担方:
-
- {
- this.handleFormChange({ underTake: value });
- }}
- />
-
-
- {/**/}
- {/*社保缴纳组织:*/}
- {/**/}
- {/* */}
- {/* */}
- {/**/}
- {/*
*/}
-
-
+
}
+ items={otherItems} col={2} showGroup needTigger={false}/>
{
- data.otherSchemeId && paymentItems && paymentItems.map(group => (
-
- {
- group.items && group.items.length > 0 &&
-
- {
- group.items && group.items.map(item => (
-
-
- {item.label}:
-
- {
- this.handlePaymentChange({ [item.domkey[0]]: value ? String(value) : '0' });
- }}
- />
-
-
-
- ))
- }
-
-
- }
-
-
- ))
+ !_.isEmpty(otherSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ const { title, items } = item;
+ return ({
+ com: SocialInputNumber({
+ key: child["domkey"][0],
+ label: child.label,
+ value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
+ onChange: this.handlePaymentChange
+ })
+ }))}
+ customComponent={}
+ title={title} col={2} showGroup
+ />;
+ })
}
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 2c27a311..5b2a47cc 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -23,8 +23,8 @@ export default class SocialSecurityForm extends React.Component {
let form = { ...socialSecurityForm };
form.data = request;
setSocialSecurityForm(form);
- key === "socialName" && this.handleFetchPaymentForm(value);
- key === "socialName" && onChangeRecordSchemeId(value);
+ key === "socialSchemeId" && this.handleFetchPaymentForm(value);
+ key === "socialSchemeId" && onChangeRecordSchemeId(value);
};
handleFetchPaymentForm = (value) => {
@@ -50,7 +50,7 @@ export default class SocialSecurityForm extends React.Component {
const paymentItems = socialSecurityPaymentForm.items;
const {
nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "",
- socialName = ""
+ socialSchemeId = ""
} = socialData || {};
const socialItems = !_.isNil(toJS(items)) ? [
..._.map(_.filter(toJS(items)[0].items, it => it.domkey[0] !== "paymentOrganization"),
@@ -67,6 +67,7 @@ export default class SocialSecurityForm extends React.Component {
com: SocialDatePicker({
key: "socialStartTime",
label: "社保起始缴纳月",
+ viewAttr: socialSchemeId ? 3 : 2,
value: socialStartTime,
onChange: this.handleFormChange
})
@@ -96,7 +97,7 @@ export default class SocialSecurityForm extends React.Component {
onChange={this.handleFormChange}/>}
items={socialItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(socialName) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ !_.isEmpty(socialSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
@@ -116,7 +117,7 @@ export default class SocialSecurityForm extends React.Component {
);
}
}
-const ConsistentWelfare = (props) => {
+export const ConsistentWelfare = (props) => {
const { value, onChange, key } = props;
return
各项福利基数一致:
@@ -127,17 +128,17 @@ const ConsistentWelfare = (props) => {
/>
;
};
-const SocialTitle = (props) => {
+export const SocialTitle = (props) => {
const { value, onChange, keyname: key } = props;
return onChange({ key, value: val })}/>;
};
-const SocialSelect = (props) => {
+export const SocialSelect = (props) => {
const { key, value, onChange, options, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return
onChange({ key, value: val })}/>
;
};
-const SocialEditInput = (props) => {
+export const SocialEditInput = (props) => {
const { key, value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return (
@@ -145,7 +146,7 @@ const SocialEditInput = (props) => {
);
};
-const SocialInputNumber = (props) => {
+export const SocialInputNumber = (props) => {
const { key, value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
return (
@@ -153,7 +154,7 @@ const SocialInputNumber = (props) => {
);
};
-const SocialDatePicker = (props) => {
+export const SocialDatePicker = (props) => {
const {
key,
value,
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index e7d6de24..02548e9b 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -205,13 +205,13 @@ export class ArchivesStore {
save = (welfareType) => {
let baseForm = "";
let paymentForm = "";
- if (welfareType == "SOCIAL_SECURITY") {
+ if (welfareType === "SOCIAL_SECURITY") {
baseForm = JSON.stringify(this.socialSecurityForm.data);
- paymentForm = this.socialSecurityForm.data.socialName ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
- } else if (welfareType == "ACCUMULATION_FUND") {
+ paymentForm = this.socialSecurityForm.data.socialSchemeId ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
+ } else if (welfareType === "ACCUMULATION_FUND") {
baseForm = JSON.stringify(this.accumulationFundForm.data);
paymentForm = this.accumulationFundForm.data.fundSchemeId ? JSON.stringify(this.accumulationFundPaymentForm.data) : "";
- } else if (welfareType == "OTHER") {
+ } else if (welfareType === "OTHER") {
baseForm = JSON.stringify(this.otherForm.data);
paymentForm = this.otherForm.data.otherSchemeId ? JSON.stringify(this.otherPaymentForm.data) : "";
}
From c795325da4015442b8525b41cf385992ac50c20b 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, 15 Feb 2023 14:37:40 +0800
Subject: [PATCH 10/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../socialSecurityBenefits/archives/accumulationFundForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/otherForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/socialSecurityForm.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index edffd51d..2125faa4 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -111,7 +111,7 @@ export default class AccumulationFundForm extends React.Component {
onChange={this.handleFormChange}/>}
items={foundItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(fundSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ !_.isEmpty(fundSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index 2247df1c..7afae69b 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -96,7 +96,7 @@ export default class OtherForm extends React.Component {
onChange={this.handleFormChange}/>}
items={otherItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(otherSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ !_.isEmpty(otherSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 5b2a47cc..90fc4d87 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -97,7 +97,7 @@ export default class SocialSecurityForm extends React.Component {
onChange={this.handleFormChange}/>}
items={socialItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(socialSchemeId) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ !_.isEmpty(socialSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
From c789fd09d36b50fb0ecb06ab36a468f17d0aef9e 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, 15 Feb 2023 15:02:14 +0800
Subject: [PATCH 11/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../socialSecurityBenefits/archives/accumulationFundForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/otherForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/socialSecurityForm.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index 2125faa4..3dab92d0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -111,7 +111,7 @@ export default class AccumulationFundForm extends React.Component {
onChange={this.handleFormChange}/>}
items={foundItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(fundSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ fundSchemeId && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index 7afae69b..63156790 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -96,7 +96,7 @@ export default class OtherForm extends React.Component {
onChange={this.handleFormChange}/>}
items={otherItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(otherSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ otherSchemeId && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 90fc4d87..fdb899b6 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -97,7 +97,7 @@ export default class SocialSecurityForm extends React.Component {
onChange={this.handleFormChange}/>}
items={socialItems} col={2} showGroup needTigger={false}/>
{
- !_.isEmpty(socialSchemeId.toString()) && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
+ socialSchemeId && !_.isEmpty(toJS(paymentItems)) && _.map(toJS(paymentItems), item => {
const { title, items } = item;
return ({
From 4ee0165885e8923fa36384693f50b8322b370325 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, 15 Feb 2023 17:20:38 +0800
Subject: [PATCH 12/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../socialSecurityBenefits/archives/accumulationFundForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/otherForm.js | 2 +-
.../pages/socialSecurityBenefits/archives/socialSecurityForm.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index 3dab92d0..a70f164c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -40,7 +40,7 @@ export default class AccumulationFundForm extends React.Component {
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization);
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value };
+ const params = { [key]: value.toString() };
const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
const { data } = accumulationFundPaymentForm;
let request = { ...data, ...params };
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index 63156790..d53870d0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -44,7 +44,7 @@ export default class OtherForm extends React.Component {
key === "otherSchemeId" && onChangeRecordOtherSchemeId(value);
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value };
+ const params = { [key]: value.toString() };
const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
const { data } = otherPaymentForm;
let request = { ...data, ...params };
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index fdb899b6..74bb20aa 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -34,7 +34,7 @@ export default class SocialSecurityForm extends React.Component {
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value };
+ const params = { [key]: value.toString() };
const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
const { data } = socialSecurityPaymentForm;
let request = { ...data, ...params };
From 3cbc12373a2f78fd187b1759c58444ba72e9c8ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 16 Feb 2023 16:20:45 +0800
Subject: [PATCH 13/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/accumulationFundForm.js | 6 +-
.../archives/otherForm.js | 6 +-
.../archives/socialSecurityForm.js | 77 ++++++++++++++++---
pc4mobx/hrmSalary/stores/archives.js | 34 ++++++--
4 files changed, 104 insertions(+), 19 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index a70f164c..0551453c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -40,7 +40,7 @@ export default class AccumulationFundForm extends React.Component {
getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization);
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value.toString() };
+ const params = { [key]: !_.isNil(value) ? value.toString() : "" };
const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
const { data } = accumulationFundPaymentForm;
let request = { ...data, ...params };
@@ -119,7 +119,9 @@ export default class AccumulationFundForm extends React.Component {
key: child["domkey"][0],
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
- onChange: this.handlePaymentChange
+ onChange: this.handlePaymentChange,
+ min: child.min,
+ max: child.max
})
}))}
customComponent={}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index d53870d0..4e4a3119 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -44,7 +44,7 @@ export default class OtherForm extends React.Component {
key === "otherSchemeId" && onChangeRecordOtherSchemeId(value);
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value.toString() };
+ const params = { [key]: !_.isNil(value) ? value.toString() : "" };
const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
const { data } = otherPaymentForm;
let request = { ...data, ...params };
@@ -104,7 +104,9 @@ export default class OtherForm extends React.Component {
key: child["domkey"][0],
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
- onChange: this.handlePaymentChange
+ onChange: this.handlePaymentChange,
+ min: child.min,
+ max: child.max
})
}))}
customComponent={}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 74bb20aa..2fdd8f4a 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -1,5 +1,6 @@
import React from "react";
import { WeaCheckbox, WeaDatePicker, WeaFormItem, WeaInput, WeaInputNumber, WeaSearchGroup, WeaSelect } from "ecCom";
+import { message } from "antd";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import "./index.less";
@@ -7,6 +8,13 @@ import "./index.less";
@inject("archivesStore")
@observer
export default class SocialSecurityForm extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ Welfare: ""
+ };
+ }
+
componentWillMount() {
const { archivesStore } = this.props;
const { getBaseForm, getPaymentForm } = archivesStore;
@@ -17,12 +25,23 @@ export default class SocialSecurityForm extends React.Component {
handleFormChange = ({ key, value }) => {
const params = { [key]: value };
- const { archivesStore: { socialSecurityForm, setSocialSecurityForm }, onChangeRecordSchemeId } = this.props;
+ const {
+ archivesStore: {
+ socialSecurityForm,
+ setSocialSecurityForm,
+ socialSecurityPaymentForm,
+ setSocialSecurityPaymentForm
+ },
+ onChangeRecordSchemeId
+ } = this.props;
const { data } = socialSecurityForm;
let request = { ...data, ...params };
let form = { ...socialSecurityForm };
form.data = request;
setSocialSecurityForm(form);
+ console.log(toJS(socialSecurityPaymentForm));
+ key === "socialSchemeId" && setSocialSecurityPaymentForm({ ...toJS(socialSecurityPaymentForm) });
+ key === "socialSchemeId" && this.setState({ Welfare: "" });
key === "socialSchemeId" && this.handleFetchPaymentForm(value);
key === "socialSchemeId" && onChangeRecordSchemeId(value);
};
@@ -34,7 +53,7 @@ export default class SocialSecurityForm extends React.Component {
};
handlePaymentChange = ({ key, value }) => {
- const params = { [key]: value.toString() };
+ const params = { [key]: !_.isNil(value) ? value.toString() : "" };
const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
const { data } = socialSecurityPaymentForm;
let request = { ...data, ...params };
@@ -42,11 +61,39 @@ export default class SocialSecurityForm extends React.Component {
form.data = request;
setSocialSecurityPaymentForm(form);
};
+ handleChangeWelfare = (val) => {
+ const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm } } = this.props;
+ let paymentData = toJS(socialSecurityPaymentForm.data);
+ const [paymentFormItems] = toJS(socialSecurityPaymentForm.items);
+ const { items } = paymentFormItems;
+ if (val) {
+ _.forEach(items, (it) => {
+ const { min, max, domkey } = it;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) {
+ message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。");
+ paymentData = {
+ ...paymentData,
+ [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ } else {
+ paymentData = { ...paymentData, [domkey[0]]: val };
+ }
+ });
+ } else {
+ _.forEach(items, (it) => {
+ const { domkey } = it;
+ paymentData = { ...paymentData, [domkey[0]]: "" };
+ });
+ }
+ setSocialSecurityPaymentForm({ ...socialSecurityPaymentForm, data: { ...paymentData } });
+ };
render() {
+ const { Welfare } = this.state;
const { archivesStore: { socialSecurityForm, socialSecurityPaymentForm } } = this.props;
const { items, data: socialData } = socialSecurityForm;
- const paymentData = socialSecurityPaymentForm.data;
+ const paymentData = toJS(socialSecurityPaymentForm.data);
const paymentItems = socialSecurityPaymentForm.items;
const {
nonPayment = "", schemeAccount = "", socialStartTime = "", socialEndTime = "",
@@ -105,10 +152,13 @@ export default class SocialSecurityForm extends React.Component {
key: child["domkey"][0],
label: child.label,
value: !_.isNil(paymentData[child["domkey"][0]]) ? paymentData[child["domkey"][0]].toString() : "",
- onChange: this.handlePaymentChange
+ onChange: this.handlePaymentChange,
+ min: child.min,
+ max: child.max
})
}))}
- customComponent={}
+ customComponent={ this.setState({ Welfare })}
+ onBlurChange={this.handleChangeWelfare}/>}
title={title} col={2} showGroup
/>;
})
@@ -118,12 +168,14 @@ export default class SocialSecurityForm extends React.Component {
}
}
export const ConsistentWelfare = (props) => {
- const { value, onChange, key } = props;
+ const { onChange, onBlurChange, value } = props;
return
各项福利基数一致:
onChange({ key, value: val })}
+ style={{ width: 100 }}
+ onBlur={onBlurChange}
+ value={value}
+ onChange={onChange}
precision={2}
/>
;
@@ -147,10 +199,15 @@ export const SocialEditInput = (props) => {
);
};
export const SocialInputNumber = (props) => {
- const { key, value, onChange, label, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const { key, value, onChange, label, min, max, labelColSpan = 12, wrapperColSpan = 12 } = props;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
return (
- onChange({ key, value: val })} min={0} precision={2}/>
+ onChange({ key, value: val })} precision={2}
+ min={minNum > 0 ? minNum : -999999999999999}
+ max={maxNum > 0 ? maxNum : 999999999999999}
+ />
);
};
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 02548e9b..db21b4e2 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -1,4 +1,4 @@
-import { action, observable } from "mobx";
+import { action, observable, toJS } from "mobx";
import { message } from "antd";
import { WeaForm, WeaTableNew } from "comsMobx";
import { removePropertyCondition } from "../util/response";
@@ -176,7 +176,7 @@ export class ArchivesStore {
_.map(baseList.items, item => {
obj = {
...obj,
- [item["domkey"][0]]: "0"
+ [item["domkey"][0]]: ""
};
});
}
@@ -207,13 +207,37 @@ export class ArchivesStore {
let paymentForm = "";
if (welfareType === "SOCIAL_SECURITY") {
baseForm = JSON.stringify(this.socialSecurityForm.data);
- paymentForm = this.socialSecurityForm.data.socialSchemeId ? JSON.stringify(this.socialSecurityPaymentForm.data) : "";
+ if (this.socialSecurityForm.data.socialSchemeId) {
+ const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
+ const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
+ const payload = socialSecurityPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: socialSecurityPaymentData[domkey[0]] ? socialSecurityPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
} else if (welfareType === "ACCUMULATION_FUND") {
baseForm = JSON.stringify(this.accumulationFundForm.data);
- paymentForm = this.accumulationFundForm.data.fundSchemeId ? JSON.stringify(this.accumulationFundPaymentForm.data) : "";
+ if (this.accumulationFundForm.data.fundSchemeId) {
+ const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
+ const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
+ const payload = accumulationFundPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: accumulationFundPaymentData[domkey[0]] ? accumulationFundPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
} else if (welfareType === "OTHER") {
baseForm = JSON.stringify(this.otherForm.data);
- paymentForm = this.otherForm.data.otherSchemeId ? JSON.stringify(this.otherPaymentForm.data) : "";
+ if (this.otherForm.data.fundSchemeId) {
+ const otherPaymentData = toJS(this.otherPaymentForm).data;
+ const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
+ const payload = otherPaymentItems.reduce((pre, cur) => {
+ const { domkey } = cur;
+ return Object.assign(pre, { [domkey[0]]: otherPaymentData[domkey[0]] ? otherPaymentData[domkey[0]].toString() : "0" });
+ }, {});
+ paymentForm = JSON.stringify(payload);
+ }
}
return new Promise((resolve, reject) => {
API.save({ welfareType, baseForm, paymentForm }).then(res => {
From 68ce529eff96ceb641ddc1192ff9c9acd981ba00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com>
Date: Thu, 16 Feb 2023 17:20:45 +0800
Subject: [PATCH 14/14] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9?=
=?UTF-8?q?=E6=A1=A3=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=87=8D=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../archives/accumulationFundForm.js | 41 ++++++++++++++-
.../archives/otherForm.js | 38 ++++++++++++--
.../archives/socialSecurityForm.js | 11 +---
pc4mobx/hrmSalary/stores/archives.js | 52 +++++++++++++++++--
4 files changed, 123 insertions(+), 19 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
index 0551453c..57fbfa87 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js
@@ -1,5 +1,6 @@
import React from "react";
import { inject, observer } from "mobx-react";
+import { message } from "antd";
import { toJS } from "mobx";
import { WeaSearchGroup } from "ecCom";
import {
@@ -15,6 +16,12 @@ import "./index.less";
@inject("archivesStore")
@observer
export default class AccumulationFundForm extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ Welfare: ""
+ };
+ }
componentWillMount() {
const { archivesStore: { getBaseForm, getPaymentForm } } = this.props;
@@ -30,6 +37,7 @@ export default class AccumulationFundForm extends React.Component {
let form = { ...accumulationFundForm };
form.data = request;
setAccumulationFundForm(form);
+ key === "fundSchemeId" && this.setState({ Welfare: "" });
key === "fundSchemeId" && this.handleFetchPaymentForm(value);
key === "fundSchemeId" && onChangeRecordFundSchemeId(value);
};
@@ -37,7 +45,7 @@ export default class AccumulationFundForm extends React.Component {
// 获取基数表单
handleFetchPaymentForm = (fundName) => {
const { archivesStore: { getPaymentForm } } = this.props;
- getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization);
+ getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName, this.props.record.paymentOrganization, true);
};
handlePaymentChange = ({ key, value }) => {
const params = { [key]: !_.isNil(value) ? value.toString() : "" };
@@ -48,8 +56,36 @@ export default class AccumulationFundForm extends React.Component {
form.data = request;
setAccumulationFundPaymentForm(form);
};
+ handleChangeWelfare = (val) => {
+ const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm } } = this.props;
+ let paymentData = toJS(accumulationFundPaymentForm.data);
+ const [paymentFormItems] = toJS(accumulationFundPaymentForm.items);
+ const { items } = paymentFormItems;
+ if (val) {
+ _.forEach(items, (it) => {
+ const { min, max, domkey } = it;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) {
+ message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。");
+ paymentData = {
+ ...paymentData,
+ [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ } else {
+ paymentData = { ...paymentData, [domkey[0]]: val };
+ }
+ });
+ } else {
+ _.forEach(items, (it) => {
+ const { domkey } = it;
+ paymentData = { ...paymentData, [domkey[0]]: "" };
+ });
+ }
+ setAccumulationFundPaymentForm({ ...accumulationFundPaymentForm, data: { ...paymentData } });
+ };
render() {
+ const { Welfare } = this.state;
const { archivesStore: { accumulationFundForm, accumulationFundPaymentForm } } = this.props;
const { items, data: foundData } = accumulationFundForm;
const paymentData = accumulationFundPaymentForm.data;
@@ -124,7 +160,8 @@ export default class AccumulationFundForm extends React.Component {
max: child.max
})
}))}
- customComponent={}
+ customComponent={ this.setState({ Welfare })}
+ onBlurChange={this.handleChangeWelfare}/>}
title={title} col={2} showGroup
/>;
})
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
index 4e4a3119..7944b3f7 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js
@@ -1,5 +1,6 @@
import React from "react";
import { inject, observer } from "mobx-react";
+import { message } from "antd";
import { WeaSearchGroup } from "ecCom";
import { toJS } from "mobx";
import {
@@ -17,7 +18,7 @@ export default class OtherForm extends React.Component {
constructor(props) {
super(props);
this.state = {
- inited: false
+ Welfare: ""
};
}
@@ -30,7 +31,7 @@ export default class OtherForm extends React.Component {
// 获取基数表单
handleFetchPaymentForm = (value) => {
const { archivesStore: { getPaymentForm } } = this.props;
- getPaymentForm(this.props.employeeId, "OTHER", value, this.props.record.paymentOrganization);
+ getPaymentForm(this.props.employeeId, "OTHER", value, this.props.record.paymentOrganization, true);
};
handleFormChange = ({ key, value }) => {
const params = { [key]: value };
@@ -40,6 +41,7 @@ export default class OtherForm extends React.Component {
let form = { ...otherForm };
form.data = request;
setOtherForm(form);
+ key === "otherSchemeId" && this.setState({ Welfare: "" });
key === "otherSchemeId" && this.handleFetchPaymentForm(value);
key === "otherSchemeId" && onChangeRecordOtherSchemeId(value);
};
@@ -53,7 +55,36 @@ export default class OtherForm extends React.Component {
setOtherPaymentForm(form);
};
+ handleChangeWelfare = (val) => {
+ const { archivesStore: { otherPaymentForm, setOtherPaymentForm } } = this.props;
+ let paymentData = toJS(otherPaymentForm.data);
+ const [paymentFormItems] = toJS(otherPaymentForm.items);
+ const { items } = paymentFormItems;
+ if (val) {
+ _.forEach(items, (it) => {
+ const { min, max, domkey } = it;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ if ((val < minNum || val > maxNum) && !_.isNil(min) && !_.isNil(max) && (!!maxNum || !!minNum)) {
+ message.warning("超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。");
+ paymentData = {
+ ...paymentData,
+ [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val
+ };
+ } else {
+ paymentData = { ...paymentData, [domkey[0]]: val };
+ }
+ });
+ } else {
+ _.forEach(items, (it) => {
+ const { domkey } = it;
+ paymentData = { ...paymentData, [domkey[0]]: "" };
+ });
+ }
+ setOtherPaymentForm({ ...otherPaymentForm, data: { ...paymentData } });
+ };
+
render() {
+ const { Welfare } = this.state;
const { archivesStore: { otherForm, otherPaymentForm } } = this.props;
const { items, data: otherData } = otherForm;
let paymentData = otherPaymentForm.data;
@@ -109,7 +140,8 @@ export default class OtherForm extends React.Component {
max: child.max
})
}))}
- customComponent={}
+ customComponent={ this.setState({ Welfare })}
+ onBlurChange={this.handleChangeWelfare}/>}
title={title} col={2} showGroup
/>;
})
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
index 2fdd8f4a..a378f168 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js
@@ -26,12 +26,7 @@ export default class SocialSecurityForm extends React.Component {
handleFormChange = ({ key, value }) => {
const params = { [key]: value };
const {
- archivesStore: {
- socialSecurityForm,
- setSocialSecurityForm,
- socialSecurityPaymentForm,
- setSocialSecurityPaymentForm
- },
+ archivesStore: { socialSecurityForm, setSocialSecurityForm },
onChangeRecordSchemeId
} = this.props;
const { data } = socialSecurityForm;
@@ -39,8 +34,6 @@ export default class SocialSecurityForm extends React.Component {
let form = { ...socialSecurityForm };
form.data = request;
setSocialSecurityForm(form);
- console.log(toJS(socialSecurityPaymentForm));
- key === "socialSchemeId" && setSocialSecurityPaymentForm({ ...toJS(socialSecurityPaymentForm) });
key === "socialSchemeId" && this.setState({ Welfare: "" });
key === "socialSchemeId" && this.handleFetchPaymentForm(value);
key === "socialSchemeId" && onChangeRecordSchemeId(value);
@@ -49,7 +42,7 @@ export default class SocialSecurityForm extends React.Component {
handleFetchPaymentForm = (value) => {
const { archivesStore: { getPaymentForm }, employeeId, record } = this.props;
const { paymentOrganization } = record;
- getPaymentForm(employeeId, "SOCIAL_SECURITY", value, paymentOrganization);
+ getPaymentForm(employeeId, "SOCIAL_SECURITY", value, paymentOrganization, true);
};
handlePaymentChange = ({ key, value }) => {
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index db21b4e2..7ba4e492 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -166,7 +166,7 @@ export class ArchivesStore {
// 查询档案缴纳基数表单
@action
- getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "") => {
+ getPaymentForm = (employeeId, welfareTypeEnum, schemeId, paymentOrganization = "", isChange = false) => {
API.getPaymentForm({ employeeId, welfareTypeEnum, schemeId, paymentOrganization }).then(res => {
if (res.status) {
let obj = {};
@@ -180,21 +180,63 @@ export class ArchivesStore {
};
});
}
- if (welfareTypeEnum == "SOCIAL_SECURITY") {
+ if (welfareTypeEnum === "SOCIAL_SECURITY") {
this.socialSecurityPaymentForm = res.data.data ? {
...res.data,
data: { ...obj, ...res.data.data }
} : { ...res.data, data: obj };
- } else if (welfareTypeEnum == "ACCUMULATION_FUND") {
+ if (isChange) {
+ const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
+ const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
+ const tmpV = socialSecurityPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = socialSecurityPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setSocialSecurityPaymentForm({
+ ...toJS(this.socialSecurityPaymentForm),
+ data: { ...socialSecurityPaymentData, ...tmpV }
+ });
+ }
+ } else if (welfareTypeEnum === "ACCUMULATION_FUND") {
this.accumulationFundPaymentForm = res.data.data ? {
...res.data,
data: { ...obj, ...res.data.data }
} : { ...res.data, data: obj };
- } else if (welfareTypeEnum == "OTHER") {
+ if (isChange) {
+ const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
+ const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
+ const tmpV = accumulationFundPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = accumulationFundPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setAccumulationFundPaymentForm({
+ ...toJS(this.accumulationFundPaymentForm),
+ data: { ...accumulationFundPaymentData, ...tmpV }
+ });
+ }
+ } else if (welfareTypeEnum === "OTHER") {
this.otherPaymentForm = res.data.data ? { ...res.data, data: { ...obj, ...res.data.data } } : {
...res.data,
data: obj
};
+ if (isChange) {
+ const otherPaymentData = toJS(this.otherPaymentForm).data;
+ const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
+ const tmpV = otherPaymentItems.reduce((pre, cur) => {
+ const { domkey, max, min } = cur;
+ const minNum = !_.isNil(min) ? Number(min) : 0, maxNum = !_.isNil(max) ? Number(max) : 0;
+ const val = otherPaymentData[domkey[0]];
+ return Object.assign(pre, { [domkey[0]]: (val < minNum && !!minNum) ? minNum : (val > maxNum && !!maxNum) ? maxNum : val });
+ }, {});
+ this.setOtherPaymentForm({
+ ...toJS(this.otherPaymentForm),
+ data: { ...otherPaymentData, ...tmpV }
+ });
+ }
}
}
});
@@ -229,7 +271,7 @@ export class ArchivesStore {
}
} else if (welfareType === "OTHER") {
baseForm = JSON.stringify(this.otherForm.data);
- if (this.otherForm.data.fundSchemeId) {
+ if (this.otherForm.data.otherSchemeId) {
const otherPaymentData = toJS(this.otherPaymentForm).data;
const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
const payload = otherPaymentItems.reduce((pre, cur) => {