|
@@ -1,6 +1,6 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload, Select } from 'antd';
|
|
import { Input, InputNumber, Button, Form, Icon, Spin, message, Table, Modal, Upload, Select } from 'antd';
|
|
-import { beforeUploadFile, downloadFile } from '../../../../tools.js';
|
|
|
|
|
|
+import { beforeUploadFile, newDownloadFile } from '../../../../tools.js';
|
|
import './hrSituation.less'
|
|
import './hrSituation.less'
|
|
import ajax from 'jquery/src/ajax/xhr.js'
|
|
import ajax from 'jquery/src/ajax/xhr.js'
|
|
import $ from 'jquery/src/ajax';
|
|
import $ from 'jquery/src/ajax';
|
|
@@ -47,7 +47,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
message.warning("全体人员结构中年龄一栏人数总和小于等于职工人数!");
|
|
message.warning("全体人员结构中年龄一栏人数总和小于等于职工人数!");
|
|
return;
|
|
return;
|
|
};
|
|
};
|
|
- if (!this.state.year && !this.props.year) {
|
|
|
|
|
|
+ if (!this.state.year && !this.props.data.year) {
|
|
message.warning("请输入年份!");
|
|
message.warning("请输入年份!");
|
|
return;
|
|
return;
|
|
};
|
|
};
|
|
@@ -61,7 +61,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
data: {
|
|
data: {
|
|
id: this.props.data.id,
|
|
id: this.props.data.id,
|
|
uid: this.props.uid,
|
|
uid: this.props.uid,
|
|
- year: this.state.year || this.props.year,
|
|
|
|
|
|
+ year: this.state.year || this.props.data.year,
|
|
aboveFifty: values.aboveFifty,
|
|
aboveFifty: values.aboveFifty,
|
|
belowThirty: values.belowThirty,
|
|
belowThirty: values.belowThirty,
|
|
college: values.college,
|
|
college: values.college,
|
|
@@ -474,7 +474,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
>
|
|
>
|
|
<Button><Icon type="upload" /> 上传花名册 </Button>
|
|
<Button><Icon type="upload" /> 上传花名册 </Button>
|
|
</Upload>
|
|
</Upload>
|
|
- <p style={{ marginTop: '10px' }}>{theData.rosterUrl ? <a onClick={downloadFile.bind(null, theData.rosterUrl, theData.rosterDownloadFileName)}>{theData.rosterDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
|
|
|
|
|
|
+ <p style={{ marginTop: '10px' }}>{theData.rosterUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'roster', '/api/admin/downloadHumanResource')}>{theData.rosterDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
|
|
</div>
|
|
</div>
|
|
<div className="hrSituation-roster">
|
|
<div className="hrSituation-roster">
|
|
<Upload
|
|
<Upload
|
|
@@ -502,7 +502,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
|
|
>
|
|
>
|
|
<Button><Icon type="upload" /> 上传社保情况 </Button>
|
|
<Button><Icon type="upload" /> 上传社保情况 </Button>
|
|
</Upload>
|
|
</Upload>
|
|
- <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ? <a onClick={downloadFile.bind(null, theData.socialSecurityUrl, theData.socialSecurityDownloadFileName)}>{theData.socialSecurityDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
|
|
|
|
|
|
+ <p style={{ marginTop: '10px' }}>{theData.socialSecurityUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'social_security', '/api/admin/downloadHumanResource')}>{theData.socialSecurityDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<span style={{ color: "red" }}>提示</span>
|
|
<span style={{ color: "red" }}>提示</span>
|
|
@@ -633,7 +633,7 @@ const HrSituation = React.createClass({
|
|
socialSecurityUrl: thisdata.socialSecurityUrl,
|
|
socialSecurityUrl: thisdata.socialSecurityUrl,
|
|
socialSecurityDownloadFileName: thisdata.socialSecurityDownloadFileName,
|
|
socialSecurityDownloadFileName: thisdata.socialSecurityDownloadFileName,
|
|
|
|
|
|
- attachment: [thisdata.rosterUrl, thisdata.rosterDownloadFileName, thisdata.socialSecurityUrl, thisdata.socialSecurityDownloadFileName],
|
|
|
|
|
|
+ attachment: [thisdata.id, thisdata.rosterDownloadFileName, thisdata.socialSecurityDownloadFileName],
|
|
|
|
|
|
newEmployment: thisdata.newEmployment,
|
|
newEmployment: thisdata.newEmployment,
|
|
graduateNumber: thisdata.graduateNumber
|
|
graduateNumber: thisdata.graduateNumber
|
|
@@ -699,8 +699,8 @@ const HrSituation = React.createClass({
|
|
key: 'attachment',
|
|
key: 'attachment',
|
|
render: (text) => {
|
|
render: (text) => {
|
|
return <div>
|
|
return <div>
|
|
- <a style={{ marginRight: '10px' }} onClick={downloadFile.bind(null, text[0], text[1])}>{text[1]}</a>
|
|
|
|
- <a onClick={downloadFile.bind(null, text[2], text[3])}>{text[3]}</a>
|
|
|
|
|
|
+ <a style={{ marginRight: '10px' }} onClick={newDownloadFile.bind(null, text[0], 'roster', '/api/admin/downloadHumanResource')}>{text[1]}</a>
|
|
|
|
+ <a onClick={newDownloadFile.bind(null, text[0], 'social_security', '/api/admin/downloadHumanResource')}>{text[2]}</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
}
|
|
}
|