diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js index b170375b..1fb7e225 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/accumulationFundForm.js @@ -1,178 +1,188 @@ -import React from 'react' -import { inject, observer } from 'mobx-react'; -import { Row, Col, Select } from 'antd' -import { WeaDatePicker, WeaInput, WeaCheckbox } from 'ecCom' -import GroupCard from '../../../components/groupCard' -import "./index.less" +import React from "react"; +import { inject, observer } from "mobx-react"; +import { Col, Row, Select } from "antd"; +import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom"; +import GroupCard from "../../../components/groupCard"; +import cs from "classnames"; +import "./index.less"; -@inject('archivesStore') +@inject("archivesStore") @observer export default class AccumulationFundForm extends React.Component { - - componentWillMount() { - const { archivesStore: { getBaseForm, getPaymentForm }} = this.props; - getBaseForm(this.props.employeeId, "ACCUMULATION_FUND"); - getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId) - } - // 表单变化 - handleFormChange(params) { - const { archivesStore: { accumulationFundForm, setAccumulationFundForm, getPaymentForm }} = this.props; - const { data } = accumulationFundForm - let request = {...data, ...params} - request.fundName = request.fundSchemeId - let form = {...accumulationFundForm} - form.data = request - setAccumulationFundForm(form) - } + componentWillMount() { + const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; + getBaseForm(this.props.employeeId, "ACCUMULATION_FUND"); + getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", this.props.record.fundSchemeId); + } - // 获取基数表单 - handleFetchPaymentForm(fundName) { - const { archivesStore: { getPaymentForm }} = this.props; - getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName) - } + // 表单变化 + handleFormChange(params) { + const { archivesStore: { accumulationFundForm, setAccumulationFundForm, getPaymentForm } } = this.props; + const { data } = accumulationFundForm; + let request = { ...data, ...params }; + request.fundName = request.fundSchemeId; + let form = { ...accumulationFundForm }; + form.data = request; + setAccumulationFundForm(form); + } + + // 获取基数表单 + handleFetchPaymentForm(fundName) { + const { archivesStore: { getPaymentForm } } = this.props; + getPaymentForm(this.props.employeeId, "ACCUMULATION_FUND", fundName); + } - //基数变化 - handlePaymentChange(params) { - const { archivesStore: { accumulationFundPaymentForm, setAccumulationFundPaymentForm }} = this.props; - const { data } = accumulationFundPaymentForm - let request = {...data, ...params} - let form = {...accumulationFundPaymentForm} - form.data = request - setAccumulationFundPaymentForm(form) - } + //基数变化 + handlePaymentChange(params) { + 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() - } - }) + 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(); } - return ( -
-
- {this.handleFormChange({nonPayment: value})}} /> -
- - - 公积金起始缴纳月: - - this.handleFormChange({fundStartTime: value})} - /> - - - 公积金最后缴纳月: - - this.handleFormChange({fundEndTime: value})} - /> - - - - - 公积金方案名称: - - - - - - - 公积金账号: - - this.handleFormChange({fundAccount: value})} /> - - - 补充公积金账号: - - this.handleFormChange({supplementFundAccount: value})} /> - - - - 公积金缴纳组织: - - - - 公积金个人实际承担方: - - - - - - - { - paymentItems && paymentItems.map(group => ( -
- { - group.items && group.items.length > 0 && - - { - group.items && group.items.map(item => ( - - - {item.label}: - - { - this.handlePaymentChange({[item.domkey[0]]: value}) - }} - /> - - - - - )) - } - - - } -
- - - )) - } -
- ) + }); } -} \ No newline at end of file + return ( +
+
+ { + this.handleFormChange({ nonPayment: value }); + }}/> +
+ + + 公积金起始缴纳月: + + this.handleFormChange({ fundStartTime: value })} + /> + + + 公积金最后缴纳月: + + this.handleFormChange({ fundEndTime: value })} + /> + + + + + 公积金方案名称: + + + + + 公积金账号: + + this.handleFormChange({ fundAccount: value })}/> + + + + + 补充公积金账号: + + this.handleFormChange({ supplementFundAccount: value })}/> + + 公积金个人实际承担方: + + + + + {/**/} + {/*公积金缴纳组织:*/} + {/**/} + {/* */} + {/**/} + {/**/} + + { + 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 }); + }} + /> + + + + + )) + } + + + } +
+ + + )) + } +
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js index 0b7f41cc..317fb2b4 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js @@ -12,31 +12,31 @@ export default class BaseForm extends React.Component { const {archivesStore: {getBaseForm}} = this.props; getBaseForm(this.props.employeeId) } - + render() { const { archivesStore: {baseFormData}} = this.props; return (
- 姓名: - {baseFormData.username} - 部门: - {baseFormData.department} - 岗位: - {baseFormData.position} + 姓名: + {baseFormData.username} + 部门: + {baseFormData.department} + 岗位: + {baseFormData.position} - + - 入职日期: - {baseFormData.hiredate} - 手机号: - {baseFormData.telephone} - 离职时间: + 入职日期: + {baseFormData.hiredate} + 手机号: + {baseFormData.telephone} + 离职时间: {baseFormData.dimissionDate}
) } -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index 30d8a6d4..87c842ed 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -1,13 +1,21 @@ .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; - } -} \ No newline at end of file + .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; + } + + .borderR-none { + border-right: none; + } + + .borderB-none { + border-bottom: none; + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index d10e6ad4..7514c06e 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -1,167 +1,173 @@ -import React from 'react' -import { inject, observer } from 'mobx-react'; -import { Row, Col, Select } from 'antd' -import { WeaDatePicker, WeaInput, WeaCheckbox } from "ecCom"; -import GroupCard from '../../../components/groupCard' -import "./index.less" -const { Option } = Select +import React from "react"; +import { inject, observer } from "mobx-react"; +import { Col, Row, Select } from "antd"; +import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom"; +import GroupCard from "../../../components/groupCard"; +import "./index.less"; -@inject('archivesStore') +const { Option } = Select; + +@inject("archivesStore") @observer export default class OtherForm extends React.Component { - constructor(props) { - super(props) - this.state = { - inited: false + constructor(props) { + super(props); + this.state = { + inited: false + }; + } + + componentWillMount() { + const { archivesStore: { getBaseForm, getPaymentForm } } = this.props; + getBaseForm(this.props.employeeId, "OTHER"); + getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId); + } + + // 获取基数表单 + handleFetchPaymentForm(value) { + const { archivesStore: { getPaymentForm } } = this.props; + getPaymentForm(this.props.employeeId, "OTHER", value); + } + + // 表单变化 + handleFormChange(params) { + const { archivesStore: { otherForm, setOtherForm } } = this.props; + const { data } = otherForm; + let request = { ...data, ...params }; + let form = { ...otherForm }; + form.data = request; + setOtherForm(form); + } + + //基数变化 + handlePaymentChange(params) { + 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 }; + 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(); } - } - - componentWillMount() { - const { archivesStore: { getBaseForm, getPaymentForm}} = this.props; - getBaseForm(this.props.employeeId, "OTHER"); - getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId) + }); } - // 获取基数表单 - handleFetchPaymentForm(value) { - const { archivesStore: { getPaymentForm }} = this.props; - getPaymentForm(this.props.employeeId, "OTHER", value) - } - // 表单变化 - handleFormChange(params) { - const { archivesStore: { otherForm, setOtherForm }} = this.props; - const { data } = otherForm - let request = {...data, ...params} - let form = {...otherForm} - form.data = request - setOtherForm(form) - } - - //基数变化 - handlePaymentChange(params) { - 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} - 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() + return ( +
+
+ { + this.handleFormChange({ nonPayment: value }); + }}/> +
+ + + 其他福利起始缴纳月: + + this.handleFormChange({ otherStartTime: value })} + /> + + 其他福利最后缴纳月: + + this.handleFormChange({ otherEndTime: value })} + /> + + + + 其他福利方案名称: + + { - this.handleFormChange({otherName: value}) - this.handleFetchPaymentForm(value); - }}> - { - items && items[0].items &&items[0].items[0] && items[0].items[0].options.map(item => ( - - )) - } - - - - - 社保缴纳组织: - - - - - 社保个人实际承担方: - - - - - { - paymentItems && paymentItems.map(group => ( -
- { - group.items && group.items.length > 0 && - - { - group.items && group.items.map(item => ( - - - {item.label}: - - { - this.handlePaymentChange({[item.domkey[0]]: value}) - }} - /> - - - - - )) - } - - - } -
- - )) + + + 社保个人实际承担方: + + + + + {/**/} + {/*社保缴纳组织:*/} + {/**/} + {/* */} + {/* */} + {/**/} + {/**/} + { + paymentItems && paymentItems.map(group => ( +
+ { + group.items && group.items.length > 0 && + + { + group.items && group.items.map(item => ( + + + {item.label}: + + { + this.handlePaymentChange({ [item.domkey[0]]: value }); + }} + /> + + + + + )) + } + + + } +
+ + )) + } +
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 8c53bbc8..da274a79 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -1,172 +1,183 @@ -import React from 'react' -import GroupCard from '../../../components/groupCard' -import { Row, Col, Select } from 'antd'; -import { WeaDatePicker, WeaInput, WeaCheckbox } from 'ecCom'; -import { inject, observer } from 'mobx-react'; -import "./index.less" -import ItemMangeFormModal from '../../dataAcquisition/attendance/itemMangeFormModal'; +import React from "react"; +import GroupCard from "../../../components/groupCard"; +import { Col, Row, Select } from "antd"; +import { WeaCheckbox, WeaDatePicker, WeaInput } from "ecCom"; +import { inject, observer } from "mobx-react"; +import cs from "classnames"; +import "./index.less"; -const { Option } = Select +const { Option } = Select; -@inject('archivesStore') +@inject("archivesStore") @observer export default class SocialSecurityForm extends React.Component { - componentWillMount() { - const { archivesStore } = this.props; - const { getBaseForm, getPaymentForm } = archivesStore - getBaseForm(this.props.employeeId, "SOCIAL_SECURITY") - getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId) - } + componentWillMount() { + const { archivesStore } = this.props; + const { getBaseForm, getPaymentForm } = archivesStore; + getBaseForm(this.props.employeeId, "SOCIAL_SECURITY"); + getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId); + } - // 表单变化 - handleFormChange(params) { - const { archivesStore: { socialSecurityForm, setSocialSecurityForm }} = this.props; - const { data } = socialSecurityForm - let request = {...data, ...params} - let form = {...socialSecurityForm} - form.data = request - setSocialSecurityForm(form) - } + // 表单变化 + handleFormChange(params) { + const { archivesStore: { socialSecurityForm, setSocialSecurityForm } } = this.props; + const { data } = socialSecurityForm; + let request = { ...data, ...params }; + let form = { ...socialSecurityForm }; + form.data = request; + setSocialSecurityForm(form); + } - // 获取基数表单 - handleFetchPaymentForm(value) { - console.log("SOCIAL_SECURITY:", value); - const { archivesStore: { getPaymentForm }} = this.props; - getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value) - } + // 获取基数表单 + handleFetchPaymentForm(value) { + const { archivesStore: { getPaymentForm } } = this.props; + getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", value); + } - //基数变化 - handlePaymentChange(params) { - const { archivesStore: { socialSecurityPaymentForm, setSocialSecurityPaymentForm }} = this.props; - const { data } = socialSecurityPaymentForm - let request = {...data, ...params} - let form = {...socialSecurityPaymentForm} - form.data = request - setSocialSecurityPaymentForm(form) - } + //基数变化 + handlePaymentChange(params) { + 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 } = socialSecurityForm - let baseData = socialSecurityForm.data - let paymentData = socialSecurityPaymentForm.data - let paymentItems = socialSecurityPaymentForm.items - // Integer数据转为string - let data = {...baseData} - if(data) { - Object.keys(data).map(key => { - if(data[key]) { - data[key] = data[key].toString() - } - }) + render() { + const { archivesStore: { socialSecurityForm, socialSecurityPaymentForm } } = this.props; + const { items } = socialSecurityForm; + let baseData = socialSecurityForm.data; + let paymentData = socialSecurityPaymentForm.data; + let paymentItems = socialSecurityPaymentForm.items; + // Integer数据转为string + let data = { ...baseData }; + if (data) { + Object.keys(data).map(key => { + if (data[key]) { + data[key] = data[key].toString(); } - - return ( -
-
- {this.handleFormChange({nonPayment: value})}} /> -
- - - 社保起始缴纳月: - - this.handleFormChange({socialStartTime: value})} - /> - - 社保最后缴纳月: - - this.handleFormChange({socialEndTime: value})} - /> - - - - 社保方案名称: - - - - 社保账号: - - {this.handleFormChange({schemeAccount: value})}}/> - - - - 社保缴纳组织: - - - - - 社保个人实际承担方: - - - - - - - { - paymentItems && paymentItems.map(group => ( -
- { - group.items && group.items.length > 0 && - - { - group.items && group.items.map(item => ( - - - {item.label}: - - { - this.handlePaymentChange({[item.domkey[0]]: value}) - }} - /> - - - - - )) - } - - - } -
- - )) - } -
- ) + }); } -} \ No newline at end of file + + return ( +
+
+ { + this.handleFormChange({ nonPayment: value }); + }}/> +
+ + + 社保起始缴纳月: + + this.handleFormChange({ socialStartTime: value })} + /> + + 社保最后缴纳月: + + this.handleFormChange({ socialEndTime: value })} + /> + + + + 社保方案名称: + + + + 社保账号: + + { + this.handleFormChange({ schemeAccount: value }); + }}/> + + + + 缴纳组织: + + + + + 社保个人实际承担方: + + + + + + + { + 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 }); + }} + /> + + + + + )) + } + + + } +
+ + )) + } +
+ ); + } +}