|
@@ -1,5 +1,5 @@
|
|
|
import React from 'react';
|
|
|
-import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload } from 'antd';
|
|
|
+import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload, Select } from 'antd';
|
|
|
import { beforeUploadFile, downloadFile } from '../../../../tools.js';
|
|
|
import './hrSituation.less'
|
|
|
import ajax from 'jquery/src/ajax/xhr.js'
|
|
@@ -9,9 +9,20 @@ import $ from 'jquery/src/ajax';
|
|
|
const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ yearOption: []
|
|
|
};
|
|
|
},
|
|
|
+ componentWillMount() {
|
|
|
+ let d = new Date();
|
|
|
+ let _me = this;
|
|
|
+ d = d.getFullYear();
|
|
|
+ for (let i = d; i > d - 20; i--) {
|
|
|
+ _me.state.yearOption.push(
|
|
|
+ <Select.Option value={i.toString()} key={i}>{i}</Select.Option>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
@@ -112,16 +123,15 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
return (
|
|
|
<Form onSubmit={this.handleSubmit} className="hrSituation-form">
|
|
|
<div className="clearfix">
|
|
|
- <FormItem className="half-item"
|
|
|
- {...formItemLayout}
|
|
|
- label="年份"
|
|
|
- >
|
|
|
- {getFieldDecorator('year', {
|
|
|
- initialValue: this.props.data.year || null
|
|
|
- })(
|
|
|
- <InputNumber />
|
|
|
- )}
|
|
|
- </FormItem>
|
|
|
+ <div className="activityCost-title"><span>年份: </span>
|
|
|
+ {
|
|
|
+ theData.year ? <span>{theData.year}</span> :
|
|
|
+ <Select placeholder="请选择年份" style={{ width: 200 }}
|
|
|
+ onSelect={(e, n) => { this.state.year = e }}>
|
|
|
+ {this.state.yearOption}
|
|
|
+ </Select>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<p className="hrSituation-title">总体情况</p>
|
|
|
<div className="clearfix">
|
|
@@ -131,7 +141,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmTotal', {
|
|
|
- initialValue: this.props.data.firmTotal || null
|
|
|
+ initialValue: this.props.data.firmTotal || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -141,7 +151,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techTotal', {
|
|
|
- initialValue: this.props.data.techTotal || null
|
|
|
+ initialValue: this.props.data.techTotal || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -162,7 +172,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmInService', {
|
|
|
- initialValue: this.props.data.firmInService || null
|
|
|
+ initialValue: this.props.data.firmInService || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -172,7 +182,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techInService', {
|
|
|
- initialValue: this.props.data.techInService || null
|
|
|
+ initialValue: this.props.data.techInService || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -183,7 +193,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmPartTime', {
|
|
|
- initialValue: this.props.data.firmPartTime || null
|
|
|
+ initialValue: this.props.data.firmPartTime || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -193,7 +203,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techPartTime', {
|
|
|
- initialValue: this.props.data.techPartTime || null
|
|
|
+ initialValue: this.props.data.techPartTime || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -204,7 +214,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmTemporary', {
|
|
|
- initialValue: this.props.data.firmTemporary || null
|
|
|
+ initialValue: this.props.data.firmTemporary || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -214,7 +224,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techTemporary', {
|
|
|
- initialValue: this.props.data.techTemporary || null
|
|
|
+ initialValue: this.props.data.techTemporary || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -225,7 +235,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmForeign', {
|
|
|
- initialValue: this.props.data.firmForeign || null
|
|
|
+ initialValue: this.props.data.firmForeign || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -235,7 +245,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techForeign', {
|
|
|
- initialValue: this.props.data.techForeign || null
|
|
|
+ initialValue: this.props.data.techForeign || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -246,7 +256,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmAbroad', {
|
|
|
- initialValue: this.props.data.firmAbroad || null
|
|
|
+ initialValue: this.props.data.firmAbroad || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -256,7 +266,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techAbroad', {
|
|
|
- initialValue: this.props.data.techAbroad || null
|
|
|
+ initialValue: this.props.data.techAbroad || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -267,7 +277,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="企业职工"
|
|
|
>
|
|
|
{getFieldDecorator('firmCore', {
|
|
|
- initialValue: this.props.data.firmCore || null
|
|
|
+ initialValue: this.props.data.firmCore || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -277,7 +287,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="科技人员"
|
|
|
>
|
|
|
{getFieldDecorator('techCore', {
|
|
|
- initialValue: this.props.data.techCore || null
|
|
|
+ initialValue: this.props.data.techCore || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -291,7 +301,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="博士"
|
|
|
>
|
|
|
{getFieldDecorator('doctor', {
|
|
|
- initialValue: this.props.data.doctor || null
|
|
|
+ initialValue: this.props.data.doctor || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -301,7 +311,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="硕士"
|
|
|
>
|
|
|
{getFieldDecorator('master', {
|
|
|
- initialValue: this.props.data.master || null
|
|
|
+ initialValue: this.props.data.master || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -311,7 +321,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="本科"
|
|
|
>
|
|
|
{getFieldDecorator('undergraduate', {
|
|
|
- initialValue: this.props.data.undergraduate || null
|
|
|
+ initialValue: this.props.data.undergraduate || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -321,7 +331,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="大专及以下"
|
|
|
>
|
|
|
{getFieldDecorator('college', {
|
|
|
- initialValue: this.props.data.college || null
|
|
|
+ initialValue: this.props.data.college || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -334,7 +344,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="高级职称"
|
|
|
>
|
|
|
{getFieldDecorator('seniorTitle', {
|
|
|
- initialValue: this.props.data.seniorTitle || null
|
|
|
+ initialValue: this.props.data.seniorTitle || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -344,7 +354,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="中级职称"
|
|
|
>
|
|
|
{getFieldDecorator('intermediateTitle', {
|
|
|
- initialValue: this.props.data.intermediateTitle || null
|
|
|
+ initialValue: this.props.data.intermediateTitle || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -354,7 +364,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="初级职称"
|
|
|
>
|
|
|
{getFieldDecorator('juniorTitle', {
|
|
|
- initialValue: this.props.data.juniorTitle || null
|
|
|
+ initialValue: this.props.data.juniorTitle || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -364,7 +374,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="高级技工"
|
|
|
>
|
|
|
{getFieldDecorator('seniorMechanic', {
|
|
|
- initialValue: this.props.data.seniorMechanic || null
|
|
|
+ initialValue: this.props.data.seniorMechanic || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -377,7 +387,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="30及以下"
|
|
|
>
|
|
|
{getFieldDecorator('belowThirty', {
|
|
|
- initialValue: this.props.data.belowThirty || null
|
|
|
+ initialValue: this.props.data.belowThirty || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -387,7 +397,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="31-34"
|
|
|
>
|
|
|
{getFieldDecorator('thirtyoneToThirtyfour', {
|
|
|
- initialValue: this.props.data.thirtyoneToThirtyfour || null
|
|
|
+ initialValue: this.props.data.thirtyoneToThirtyfour || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -397,7 +407,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="41-50"
|
|
|
>
|
|
|
{getFieldDecorator('fortyoneToFifty', {
|
|
|
- initialValue: this.props.data.fortyoneToFifty || null
|
|
|
+ initialValue: this.props.data.fortyoneToFifty || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -407,7 +417,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="50以上"
|
|
|
>
|
|
|
{getFieldDecorator('aboveFifty', {
|
|
|
- initialValue: this.props.data.aboveFifty || null
|
|
|
+ initialValue: this.props.data.aboveFifty || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -421,7 +431,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="新增就业人数"
|
|
|
>
|
|
|
{getFieldDecorator('newEmployment', {
|
|
|
- initialValue: this.props.data.newEmployment || null
|
|
|
+ initialValue: this.props.data.newEmployment || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|
|
@@ -432,7 +442,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
|
label="高校应届毕业生人数"
|
|
|
>
|
|
|
{getFieldDecorator('graduateNumber', {
|
|
|
- initialValue: this.props.data.graduateNumber || null
|
|
|
+ initialValue: this.props.data.graduateNumber || 0
|
|
|
})(
|
|
|
<InputNumber />
|
|
|
)}
|