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] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=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 (