|
@@ -3,6 +3,7 @@ import { Icon, Modal, message, Spin, Input, Select, DatePicker, Button, Row, Col
|
|
|
import './comprehensive.less';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
+import moment from 'moment';
|
|
|
import { copyrightStateList } from '../../../dataDic.js';
|
|
|
import { companySearch, getCopyrightState, getTime, copyrightDownloadFile, beforeUploadFile, getInUrgentTime, getPreview } from '../../../tools.js';
|
|
|
|
|
@@ -150,13 +151,15 @@ const CopyrightDescForm = Form.create()(React.createClass({
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
if (!this.props.visible && nextProps.visible) {
|
|
|
this.loadData(nextProps.data.uid, nextProps.data.id);
|
|
|
+ this.state.fileList_copyright_apply = [];
|
|
|
+ this.state.fileList_copyright_auth = [];
|
|
|
};
|
|
|
},
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
- if (values.state || values.principal || values.recordTime || values.comment) {
|
|
|
- if (!values.state && !values.principal && !values.recordTime) {
|
|
|
+ if (values.status || values.principal || values.recordTime || values.comment) {
|
|
|
+ if (!values.status || !values.principal || !values.recordTime) {
|
|
|
message.warning("请填写完整的状态流转信息!");
|
|
|
return;
|
|
|
};
|
|
@@ -353,7 +356,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
|
|
|
action={globalConfig.context + "/api/admin/copyright/upload"}
|
|
|
data={{ 'sign': 'copyright_apply', id: this.props.data.id }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
- showUploadList={false}
|
|
|
+ fileList={this.state.fileList_copyright_apply}
|
|
|
onChange={(info) => {
|
|
|
if (info.file.status !== 'uploading') {
|
|
|
console.log(info.file, info.fileList);
|
|
@@ -368,7 +371,8 @@ const CopyrightDescForm = Form.create()(React.createClass({
|
|
|
this.state.copyrightApplyUrl = info.file.response.data;
|
|
|
} else if (info.file.status === 'error') {
|
|
|
message.error(`${info.file.name} 文件上传失败。`);
|
|
|
- }
|
|
|
+ };
|
|
|
+ this.setState({ fileList_copyright_apply: info.fileList.slice(-1) });
|
|
|
}}
|
|
|
>
|
|
|
<Button><Icon type="upload" /> 上传软著申请书 </Button>
|
|
@@ -388,7 +392,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
|
|
|
action={globalConfig.context + "/api/admin/copyright/upload"}
|
|
|
data={{ 'sign': 'copyright_auth', id: this.props.data.id }}
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
- showUploadList={false}
|
|
|
+ fileList={this.state.fileList_copyright_auth}
|
|
|
onChange={(info) => {
|
|
|
if (info.file.status !== 'uploading') {
|
|
|
console.log(info.file, info.fileList);
|
|
@@ -403,7 +407,8 @@ const CopyrightDescForm = Form.create()(React.createClass({
|
|
|
this.state.copyrightAuthUrl = info.file.response.data;
|
|
|
} else if (info.file.status === 'error') {
|
|
|
message.error(`${info.file.name} 文件上传失败。`);
|
|
|
- }
|
|
|
+ };
|
|
|
+ this.setState({ fileList_copyright_auth: info.fileList.slice(-1) });
|
|
|
}}
|
|
|
>
|
|
|
<Button><Icon type="upload" /> 上传软著证书 </Button>
|