salary-management-front/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js

44 lines
1.5 KiB
JavaScript
Raw Normal View History

2022-08-16 10:10:59 +08:00
import React from "react";
import { WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
2022-08-16 10:10:59 +08:00
import { inject, observer } from "mobx-react";
import "./index.less";
2022-04-02 17:34:40 +08:00
2022-08-16 10:10:59 +08:00
@inject("archivesStore")
2022-04-02 17:34:40 +08:00
@observer
export default class BaseForm extends React.Component {
2022-08-16 10:10:59 +08:00
componentWillMount() {
const { archivesStore: { getBaseForm } } = this.props;
getBaseForm(this.props.employeeId);
}
2022-08-16 10:10:59 +08:00
render() {
const { archivesStore: { baseFormData }, record } = this.props;
const { username, department, position, telephone, hiredate, dimissionDate } = baseFormData;
const { paymentOrganizationName } = record;
const baseItems = [
{ com: Input("姓名", username) },
{ com: Input("部门", department) },
{ com: Input("岗位", position) },
{ com: Input("手机号", telephone) },
{ com: Input("入职日期", hiredate) },
2023-07-24 11:15:41 +08:00
// { com: Input("合同到期日期", dimissionDate) }
];
const taxagentItems = [
2023-02-23 15:59:28 +08:00
{ com: Input("个税扣缴义务人", paymentOrganizationName) }
];
2022-08-16 10:10:59 +08:00
return (
<div className="socialFormWrapper">
2023-02-23 15:59:28 +08:00
<WeaSearchGroup title="基本信息" items={baseItems} col={1} showGroup/>
<WeaSearchGroup title="个税扣缴义务人" items={taxagentItems} col={1} showGroup/>
2022-08-16 10:10:59 +08:00
</div>
);
}
}
2023-02-23 15:59:28 +08:00
const Input = (label, value) => {
return (
2023-02-23 15:59:28 +08:00
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaInput value={value} viewAttr={1}/>
</WeaFormItem>
);
};