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 (