| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- import React from 'react'
- import { Col, Row } from 'antd'
- import EditableForm from '@/components/EditableForm'
- import ChangeSupervisor from '@/pages/Staff/Employee/components/ChangeSupervisor'
- const EmployeeForm = props => {
- const { staff } = props
- const changeCopInputData = {
- staffName: staff.supervisorName,
- staffId: staff.id,
- clientId: staff.id
- }
- const columns = [
- {
- dataIndex: 'jobNumber',
- label: '工号',
- span: 12
- },
- {
- dataIndex: 'username',
- label: '姓名',
- span: 12
- },
- {
- dataIndex: 'departmentId',
- label: '办事处/部门',
- span: 12,
- editCellType: 'treeSelect'
- },
- {
- dataIndex: 'supervisorName',
- label: '部门上司',
- editCellType: 'custom',
- customCell: <ChangeSupervisor dataSource={changeCopInputData} />,
- span: 24
- },
- {
- dataIndex: 'majorName',
- label: '岗位',
- span: 24
- },
- {
- dataIndex: 'hiredate',
- label: '入职时间',
- span: 12
- },
- {
- dataIndex: 'telephone',
- label: '手机',
- span: 12
- },
- {
- dataIndex: 'qq',
- label: 'QQ',
- span: 12
- },
- {
- dataIndex: 'wecat',
- label: '微信',
- span: 12
- },
- {
- dataIndex: 'phone',
- label: '电话',
- span: 12
- },
- {
- dataIndex: 'email',
- label: '邮箱',
- span: 12
- },
- {
- dataIndex: 'gender',
- label: '性别',
- editCellType: 'select',
- span: 12
- },
- {
- dataIndex: 'birthday',
- label: '出生日期',
- span: 12
- },
- {
- dataIndex: 'nation',
- label: '民族',
- span: 12
- },
- {
- dataIndex: 'marriage',
- label: '婚姻状况',
- editCellType: 'select',
- span: 12
- },
- {
- dataIndex: 'IDcards',
- label: '身份证',
- span: 12
- },
- {
- dataIndex: 'IDcardsValidity',
- label: '身份证有效期',
- span: 12
- },
- {
- dataIndex: 'IDcardsImgA',
- label: '身份证扫描件',
- span: 12
- },
- {
- dataIndex: 'nativePlace',
- label: '籍贯',
- span: 12
- },
- {
- dataIndex: 'householdRegistrationType',
- label: '户口类型',
- span: 12
- },
- {
- dataIndex: 'registeredResidence',
- label: '户口所在地',
- span: 24,
- editCellType: 'textarea'
- },
- {
- dataIndex: 'living',
- label: '现居住地',
- span: 24,
- editCellType: 'textarea'
- },
- {
- dataIndex: 'emergencyContacts',
- label: '紧急联系人',
- span: 24,
- editCellType: 'textarea'
- },
- {
- dataIndex: 'graduateInstitutions',
- label: '毕业院校',
- span: 24
- },
- {
- dataIndex: 'major',
- label: '所学专业',
- span: 12
- },
- {
- dataIndex: 'education',
- label: '毕业学历',
- span: 12
- },
- {
- dataIndex: 'graduationTime',
- label: '毕业时间',
- span: 12
- },
- {
- dataIndex: 'certificate',
- label: '毕业证书',
- span: 12
- },
- {
- dataIndex: 'diploma',
- label: '学位证书',
- span: 12
- },
- {
- dataIndex: 'professionalTitle',
- label: '职称',
- span: 12
- },
- {
- dataIndex: 'stay',
- label: '个人简历电子档',
- span: 12
- },
- {
- dataIndex: 'stayName',
- label: '原单位离职证明',
- span: 12
- },
- {
- dataIndex: 'remittanceName',
- label: '收款人户名',
- span: 12
- },
- {
- dataIndex: 'salaryBank',
- label: '收款银行',
- span: 12
- },
- {
- dataIndex: 'bankName',
- label: '收款开户银行名称',
- span: 24
- },
- {
- dataIndex: 'bankNumber',
- label: '收款帐号',
- span: 12
- },
- {
- dataIndex: 'coupletNumber',
- label: '联行号',
- span: 12
- },
- {
- dataIndex: 'salaryCard',
- label: '银行卡号',
- span: 24
- },
- {
- dataIndex: 'salaryBankName',
- label: '开户行',
- span: 24,
- editCellType: 'textarea'
- }
- ]
- return (
- <div>
- <Row>
- <Col span={8}>
- <h2 className="text-gray-500">员工详情</h2>
- </Col>
- <Col span={16} className="text-right text-gray-500">
- {staff.username}入职于{staff.hiredate}
- </Col>
- <Col span={22}>
- <h2 className="text-2xl pb-4">{staff.username}</h2>
- </Col>
- <Col span={2} />
- </Row>
- <EditableForm
- columns={columns}
- dataSource={staff}
- type="employee"
- tartgetUrl="/staff/change/department"
- />
- </div>
- )
- }
- export default EmployeeForm
|