社保福利档案页面编辑报错解决

This commit is contained in:
黎永顺 2022-11-17 16:30:06 +08:00
parent 9632a5190e
commit cc4d9df1e1
6 changed files with 55 additions and 19 deletions

View File

@ -204,8 +204,8 @@ export default class SalaryDetail extends React.Component {
<div className="tableWrapper">
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/atdTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
src="http://localhost:7607/#/atdTable"
// src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
id="atdTable"
/>
</div>

View File

@ -74,6 +74,7 @@ export default class AccumulationFundForm extends React.Component {
<Col span={6} className="formItem borderR-none borderB-none">公积金起始缴纳月</Col>
<Col span={6} className="formItem borderR-none borderB-none">
<WeaDatePicker
viewAttr={(accumulationFundForm.data && accumulationFundForm.data.fundSchemeId) ? 3 : 2}
format="yyyy-MM"
value={data && data.fundStartTime}
onChange={value => this.handleFormChange({ fundStartTime: value })}

View File

@ -120,7 +120,7 @@ export default class Archives extends React.Component {
item.column,
title: item.text,
render: (text) => {
return <span className='tdEllipsis' title={text}>{text}</span>
return <span className="tdEllipsis" title={text}>{text}</span>;
}
};
});
@ -211,16 +211,40 @@ export default class Archives extends React.Component {
// 保存
handleEditSlideSave = () => {
const { selectedTab } = this.state;
const { archivesStore: { save } } = this.props;
const { archivesStore: { save, socialSecurityForm, accumulationFundForm, otherForm } } = this.props;
if (selectedTab == 1) {
const { data } = socialSecurityForm;
if (data.socialSchemeId && !data.socialStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
save("SOCIAL_SECURITY").then(() => {
this.query();
});
} else if (selectedTab == 2) {
const { data } = accumulationFundForm;
if (data.fundSchemeId && !data.fundStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
save("ACCUMULATION_FUND").then(() => {
this.query();
});
} else if (selectedTab == 3) {
const { data } = otherForm;
if (data.otherSchemeId && !data.otherStartTime) {
Modal.warning({
title: "信息确认",
content: "必要信息不完整,红色*为必填项!"
});
return;
}
save("OTHER").then(() => {
this.query();
});
@ -760,14 +784,26 @@ export default class Archives extends React.Component {
}
{
selectedTab == 1 &&
<SocialSecurityForm employeeId={this.state.employeeId} record={this.record} onChangeRecordSchemeId={(siSchemeId)=> this.record= {...this.record,siSchemeId}}/>
<SocialSecurityForm employeeId={this.state.employeeId} record={this.record}
onChangeRecordSchemeId={(siSchemeId) => this.record = {
...this.record,
siSchemeId
}}/>
}
{
selectedTab == 2 &&
<AccumulationFundForm employeeId={this.state.employeeId} record={this.record} onChangeRecordFundSchemeId={(fundSchemeId)=> this.record= {...this.record,fundSchemeId}}/>
<AccumulationFundForm employeeId={this.state.employeeId} record={this.record}
onChangeRecordFundSchemeId={(fundSchemeId) => this.record = {
...this.record,
fundSchemeId
}}/>
}
{
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record} onChangeRecordOtherSchemeId={(otherSchemeId)=> this.record= {...this.record,otherSchemeId}}/>
selectedTab == 3 && <OtherForm employeeId={this.state.employeeId} record={this.record}
onChangeRecordOtherSchemeId={(otherSchemeId) => this.record = {
...this.record,
otherSchemeId
}}/>
}
</div>}
onClose={() => this.setState({ editSlideVisible: false }, () => {

View File

@ -1,12 +1,11 @@
import React from "react";
import { inject, observer } from "mobx-react";
import { Col, Row, Select } from "antd";
import {toJS} from 'mobx';
import { Col, Row } from "antd";
import { WeaCheckbox, WeaDatePicker, WeaInputNumber, WeaSelect } from "ecCom";
import GroupCard from "../../../components/groupCard";
import "./index.less";
const { Option } = Select;
@inject("archivesStore")
@observer
export default class OtherForm extends React.Component {
@ -66,8 +65,6 @@ export default class OtherForm extends React.Component {
}
});
}
return (
<div className="socialFormWrapper">
<div style={{ overflow: "hidden" }}>
@ -81,6 +78,7 @@ export default class OtherForm extends React.Component {
<Col span={6} className="formItem borderR-none borderB-none">其他福利起始缴纳月</Col>
<Col span={6} className="formItem borderR-none borderB-none">
<WeaDatePicker
viewAttr={(otherForm.data && otherForm.data.otherSchemeId) ? 3 : 2}
format="yyyy-MM"
value={data && data.otherStartTime}
onChange={value => this.handleFormChange({ otherStartTime: value })}

View File

@ -1,13 +1,11 @@
import React from "react";
import GroupCard from "../../../components/groupCard";
import { Col, Row, Select } from "antd";
import { Col, Row } from "antd";
import { WeaCheckbox, WeaDatePicker, WeaInput, WeaInputNumber, WeaSelect } from "ecCom";
import { inject, observer } from "mobx-react";
import cs from "classnames";
import "./index.less";
const { Option } = Select;
@inject("archivesStore")
@observer
export default class SocialSecurityForm extends React.Component {
@ -26,8 +24,8 @@ export default class SocialSecurityForm extends React.Component {
let form = { ...socialSecurityForm };
form.data = request;
setSocialSecurityForm(form);
Object.keys(params).length>1 &&
onChangeRecordSchemeId(params.socialSchemeId)
Object.keys(params).length > 1 &&
onChangeRecordSchemeId(params.socialSchemeId);
}
// 获取基数表单
@ -79,9 +77,12 @@ export default class SocialSecurityForm extends React.Component {
<Col span={6} className="formItem borderR-none borderB-none">社保起始缴纳月</Col>
<Col span={6} className="formItem borderR-none borderB-none">
<WeaDatePicker
viewAttr={(socialSecurityForm.data && socialSecurityForm.data.socialSchemeId) ? 3 : 2}
format="YYYY-MM"
value={data && data.socialStartTime}
onChange={value => this.handleFormChange({ socialStartTime: value })}
onChange={value => {
this.handleFormChange({ socialStartTime: value });
}}
/>
</Col>
<Col span={6} className="formItem borderR-none borderB-none">社保方案名称</Col>

View File

@ -176,7 +176,7 @@ export class ArchivesStore {
_.map(baseList.items, item => {
obj = {
...obj,
[item["domkey"][0]]: ""
[item["domkey"][0]]: "0"
};
});
}