Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT-WEB

wubb 8 years ago
parent
commit
09c485847d

BIN
image/bg.jpg


+ 48 - 66
js/component/account/services/copyright/comPatentAdd.jsx

@@ -1,20 +1,17 @@
 import React from 'react';
-import { Icon, Modal, Button, Form, message, Input, Spin, Checkbox, Select, Row, Col } from 'antd';
+import { Icon, Modal, Button, Form, message, Input, Spin, Select, Row, Col } from 'antd';
 import './comprehensive.less';
 import { companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
 const PatentAddFrom = Form.create()(React.createClass({
-    getContactsList(theUid) {
+    getContactsList() {
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts",
-            data: {
-                uid: theUid || this.state.uid
-            },
+            url: globalConfig.context + "/techservice/cognizance/getContacts",
             success: function (data) {
                 let theOption = [];
                 if (data.error.length || !data.data) {
@@ -37,34 +34,29 @@ const PatentAddFrom = Form.create()(React.createClass({
             loading: false,
             companyOption: [],
             accelerated: 0,
-            acceleratedDate: 0,
             visible: "visible"
         };
     },
     handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
-            if (!values.uid || values.uid === "") {
-                message.warning('请先选择公司!');
-                return;
-            };
             if (!err) {
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admin/copyright/apply",
+                    url: globalConfig.context + "/techservice/copyright/apply",
                     data: {
-                        "uid": values.uid, // 公司用户id,size 0-36, required
+                        //"uid": values.uid, // 公司用户id,size 0-36, required
                         "contact": values.contact, // 联系人, 1,2,3
-                        //"copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
-                        //"copyrightName": values.copyrightName, // 软著名称, size 0-60
-                        "outsource": values.outsource, // 外包公司, size 0-60
+                        "copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
+                        "copyrightName": values.copyrightName, // 软著名称, size 0-60
+                        //"outsource": values.outsource, // 外包公司, size 0-60
                         "workIssue": values.workIssue, // 派单信息, size 0-128
                         "inUrgent": values.inUrgent, //  加急天数,
                         //"comment": values.comment, // 备注 size 0-128
-                        "principal": values.principal // 负责人id
+                        //"principal": values.principal // 负责人id
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -81,20 +73,20 @@ const PatentAddFrom = Form.create()(React.createClass({
             }
         });
     },
-    acceleratedCheck(e) {
-        if (e.target.checked == true) {
-            this.state.accelerated = 1;
-            this.setState({ visible: "show" });
-        } else if (e.target.checked == false) {
-            this.state.accelerated = 0;
-            this.setState({ visible: "visible" });
-        }
+    componentWillMount() {
+        this.getContactsList();
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.visible = "visible";
+            this.props.form.resetFields();
+        };
     },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
-            labelCol: { span: 3 },
+            labelCol: { span: 4 },
             wrapperCol: { span: 14 },
         };
         const _me = this;
@@ -102,21 +94,17 @@ const PatentAddFrom = Form.create()(React.createClass({
             <Form horizontal onSubmit={this.handleSubmit} id="CopyrightDesc-form">
                 <Row>
                     <Col span={12}>
-                        <span>选择公司:  </span>
-                        {getFieldDecorator('uid')(
-                            <Select
-                                placeholder="请选择公司"
-                                notFoundContent="未找到公司"
-                                style={{ width: 200 }}
-                                showSearch
-                                filterOption={companySearch}
-                                onSelect={(e, n) => { this.getContactsList(e); }}>
-                                {this.props.companyOption}
-                            </Select>
-                        )}
+                        <FormItem
+                            {...formItemLayout}
+                            label="软著名称"
+                        >
+                            {getFieldDecorator('copyrightName')(
+                                <Input placeholder="请输入软著名称" />
+                            )}
+                        </FormItem>
                     </Col>
                     <Col span={12}>
-                        <span>选择联系人:  </span>
+                        <span>选择联系人: </span>
                         {getFieldDecorator('contact')(
                             <Select placeholder="请选择联系人" style={{ width: 200 }}
                                 notFoundContent="未获取到联系人列表"
@@ -129,6 +117,17 @@ const PatentAddFrom = Form.create()(React.createClass({
                 <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 18 }}
+                    label="软著简介"
+                >
+                    {getFieldDecorator('copyrightInfo')(
+                        <Input type="textarea"
+                            placeholder="多行输入"
+                            rows={6} />
+                    )}
+                </FormItem>
+                <FormItem
+                    labelCol={{ span: 24 }}
+                    wrapperCol={{ span: 18 }}
                     label="派单信息"
                 >
                     {getFieldDecorator('workIssue')(
@@ -142,37 +141,21 @@ const PatentAddFrom = Form.create()(React.createClass({
                     wrapperCol={{ span: 18 }}
                 >
                     <span>是否加急:</span>
-                    <Checkbox onChange={this.acceleratedCheck}></Checkbox>
                     {getFieldDecorator('inUrgent')(
-                        <Select className={this.state.visible}
+                        <Select
                             placeholder="请选择加急时间"
                             style={{ width: 120 }}>
+                            <Select.Option value="0">不加急</Select.Option>
                             <Select.Option value="3">3天</Select.Option>
                             <Select.Option value="5">5天</Select.Option>
-                            <Select.Option value="10">10天</Select.Option>
-                            <Select.Option value="20">20天</Select.Option>
+                            <Select.Option value="10">6-10天</Select.Option>
+                            <Select.Option value="15">11-15天</Select.Option>
+                            <Select.Option value="20">16-20天</Select.Option>
+                            <Select.Option value="25">21-25天</Select.Option>
+                            <Select.Option value="30">26-30天</Select.Option>
                         </Select>
                     )}
                 </FormItem>
-                <FormItem
-                    {...formItemLayout}
-                    label="选择咨询师"
-                >
-                    {getFieldDecorator('principal')(
-                        <Select placeholder="请选择咨询师" style={{ width: 200 }}
-                            onSelect={(e, n) => { this.setState({ principal: e }); }}>
-                            {this.props.authorOption}
-                        </Select>
-                    )}
-                </FormItem>
-                <FormItem
-                    {...formItemLayout}
-                    label="外包公司"
-                >
-                    {getFieldDecorator('outsource')(
-                        <Input placeholder="输入外包公司" />
-                    )}
-                </FormItem>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">确认</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
@@ -220,10 +203,9 @@ const PatentAdd = React.createClass({
                     >
                         <PatentAddFrom
                             spinState={this.spinChange}
+                            visible={this.state.visible}
                             closeModal={this.handleCancel}
-                            okClick={() => { this.props.closeAdd(false, true) }}
-                            companyOption={this.props.companyOption}
-                            authorOption={this.props.authorOption} />
+                            okClick={() => { this.props.closeAdd(false, true) }} />
                     </Modal>
                 </Spin>
             </div>

+ 130 - 99
js/component/account/services/copyright/comPatentChange.jsx

@@ -1,10 +1,11 @@
 import React from 'react';
-import { Icon, Modal, message, Spin, Input, Select, DatePicker, Button, Row, Col, Table, Form } from 'antd';
+import { Icon, Modal, message, Spin, Input, Select, DatePicker, Button, Row, Col, Table, Form, Upload } from 'antd';
 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 { getCopyrightState, getTime } from '../../../tools.js';
+import { getCopyrightState, getTime, copyrightDownloadFile, beforeUploadFile, getInUrgentTime } from '../../../tools.js';
 
 const CopyrightDescForm = Form.create()(React.createClass({
     getInitialState() {
@@ -47,7 +48,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
         });
         this.loadData();
     },
-    loadData(uid, id) {
+    loadData(id) {
         this.setState({
             loading: true
         });
@@ -56,25 +57,22 @@ const CopyrightDescForm = Form.create()(React.createClass({
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/copyright/logs",
+            url: globalConfig.context + "/techservice/copyright/logs",
             data: {
                 id: id || this.props.data.id
             }
         }), $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/getContacts",
-            data: {
-                uid: uid || this.props.data.uid
-            }
+            url: globalConfig.context + "/techservice/cognizance/getContacts"
         }), $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/copyright/detail",
+            url: globalConfig.context + "/techservice/copyright/detail",
             data: {
                 id: id || this.props.data.id
             }
@@ -124,8 +122,10 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 principal: detailData.principal,
                 contact: detailData.contact,
                 copyrightName: detailData.copyrightName,
+                copyrightNumber: detailData.copyrightNumber,
                 status: detailData.status,
                 comment: detailData.comment,
+                copyrightInfo: detailData.copyrightInfo,
                 workIssue: detailData.workIssue,
                 outsource: detailData.outsource,
                 inUrgent: detailData.inUrgent,
@@ -143,6 +143,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 authorizedDateFormattedDate: detailData.authorizedDateFormattedDate,
                 createTimeFormattedDate: detailData.createTimeFormattedDate,
                 acceptTimeFormattedDate: detailData.acceptTimeFormattedDate,
+                expectTime: [detailData.acceptTime, detailData.inUrgent]
             });
         }).always(function () {
             this.setState({
@@ -152,37 +153,32 @@ const CopyrightDescForm = Form.create()(React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            this.loadData(nextProps.data.uid, nextProps.data.id);
+            this.loadData(nextProps.data.id);
         };
     },
     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) {
-                    message.warning("请填写完整的状态流转信息!");
-                    return;
-                };
-            };
             if (!err) {
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admin/copyright/modify",
+                    url: globalConfig.context + "/techservice/copyright/modify",
                     data: {
                         "id": this.props.data.id,
                         "contact": values.contact, // 联系人, 1,2,3
-                        //"copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
+                        "copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
                         "copyrightName": values.copyrightName, // 软著名称, size 0-60
-                        "outsource": values.outsource, // 外包公司, size 0-60
-                        "workIssue": values.workIssue, // 派单信息, size 0-128
+                        //"copyrightNumber": values.copyrightNumber,
+                        //"outsource": values.outsource, // 外包公司, size 0-60
+                        //"workIssue": values.workIssue, // 派单信息, size 0-128
                         "inUrgent": values.inUrgent, //  加急天数,
-                        "status": values.status, // 状态
-                        "comment": values.comment, // 备注 size 0-128
-                        "recordTime": values.recordTime ? values.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined, // 状态修改时间 yyyy-MM-dd HH:mm:ss
-                        "principal": values.principal // 负责人id
+                        //"status": values.status, // 状态
+                        //"comment": values.comment, // 备注 size 0-128
+                        //"recordTime": values.recordTime ? values.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined, // 状态修改时间 yyyy-MM-dd HH:mm:ss
+                        //"principal": values.principal, // 负责人id
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -210,16 +206,16 @@ const CopyrightDescForm = Form.create()(React.createClass({
         return (
             <Form onSubmit={this.handleSubmit} id="CopyrightDesc-form">
                 <Row className="express-desc-row">
-                    <Col span={4}>公司名称</Col>
-                    <Col span={4}>{theData.unitName}</Col>
+                    <Col span={3}>公司名称</Col>
+                    <Col span={6}>{theData.unitName}</Col>
                     <Col span={4}>公司组织机构代码</Col>
-                    <Col span={4}>{theData.unitNumber}</Col>
+                    <Col span={6}>{theData.unitNumber}</Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={4}>公司地址</Col>
-                    <Col span={4}>{theData.province}/{theData.city}/{theData.area}</Col>
+                    <Col span={3}>公司地址</Col>
+                    <Col span={6}>{theData.province}/{theData.city}/{theData.area}</Col>
                     <Col span={4}>联系人</Col>
-                    <Col span={4}>
+                    <Col span={6}>
                         {getFieldDecorator('contact', {
                             rules: [{ required: true, message: '此项为必填项!' }],
                             initialValue: theData.contact
@@ -233,22 +229,26 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={4}>编号</Col>
-                    <Col span={4}>{theData.serialNumber}</Col>
-                    <Col span={4}>外包公司</Col>
-                    <Col span={4}>
-                        {getFieldDecorator('outsource', {
-                            initialValue: theData.outsource
+                    <Col span={3}>编号</Col>
+                    <Col span={6}>{theData.serialNumber}</Col>
+                    <Col span={4}>软著名称</Col>
+                    <Col span={6}>
+                        {getFieldDecorator('copyrightName', {
+                            initialValue: theData.copyrightName
                         })(
-                            <Input placeholder="请输入外包公司" />
+                            <Input placeholder="请输入软著名称" />
                             )}
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>派单详情</Col>
+                    <Col span={3}>软著编号</Col>
+                    <Col span={6}>{theData.copyrightNumber}</Col>
+                </Row>
+                <Row className="express-desc-row">
+                    <Col span={3}>软著简介</Col>
                     <Col span={16}>
-                        {getFieldDecorator('workIssue', {
-                            initialValue: theData.workIssue
+                        {getFieldDecorator('copyrightInfo', {
+                            initialValue: theData.copyrightInfo
                         })(
                             <Input type="textarea"
                                 placeholder="多行输入"
@@ -257,31 +257,32 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>软著名称</Col>
-                    <Col span={6}>
-                        {getFieldDecorator('copyrightName', {
-                            initialValue: theData.copyrightName
-                        })(
-                            <Input placeholder="请输入软著名称" />
-                            )}
-                    </Col>
+                    <Col span={3}>派单详情</Col>
+                    <Col span={16}>{theData.workIssue}</Col>
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={3}>加急天数</Col>
                     <Col span={6}>
-                        {getFieldDecorator('inUrgent', {
-                            initialValue: theData.inUrgent ? String(theData.inUrgent) : undefined
-                        })(
-                            <Select
-                                placeholder="请选择加急时间"
-                                style={{ width: 120 }}>
-                                <Select.Option value="0">不加急</Select.Option>
-                                <Select.Option value="3">3天</Select.Option>
-                                <Select.Option value="5">5天</Select.Option>
-                                <Select.Option value="10">10天</Select.Option>
-                                <Select.Option value="20">20天</Select.Option>
-                            </Select>
-                            )}
+                        {(() => {
+                            switch (theData.inUrgent) {
+                                case 0:
+                                    return '不加急';
+                                case 3:
+                                    return '3天';
+                                case 5:
+                                    return '5天';
+                                case 10:
+                                    return '6-10天';
+                                case 15:
+                                    return '11-15天';
+                                case 20:
+                                    return '16-20天';
+                                case 25:
+                                    return '21-25天';
+                                case 30:
+                                    return '26-30天';
+                            }
+                        })()}
                     </Col>
                 </Row>
                 {theData.authorizedDateFormattedDate ? <Row className="express-desc-row">
@@ -290,49 +291,79 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 </Row> :
                     <Row className="express-desc-row">
                         <Col span={3}>下证时间(预计)</Col>
-                        <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                        <Col span={6}>
+                            {(() => {
+                                if (theData.expectTime && theData.expectTime[0]) {
+                                    if (theData.expectTime[1]) {
+                                        return getTime(getInUrgentTime(moment(theData.expectTime[0]), theData.expectTime[1]))
+                                    } else {
+                                        return getTime(getInUrgentTime(moment(theData.expectTime[0]), 45))
+                                    };
+                                };
+                            })()}
+                        </Col>
                     </Row>}
+                <div className="hrSituation-roster">
+                    <Upload
+                        name="copyright_apply"
+                        action={globalConfig.context + "/techservice/copyright/upload"}
+                        data={{ 'sign': 'copyright_apply', id: this.props.data.id }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
+                        onChange={(info) => {
+                            if (info.file.status !== 'uploading') {
+                                console.log(info.file, info.fileList);
+                            }
+                            if (info.file.status === 'done') {
+                                if (!info.file.response.error.length) {
+                                    message.success(`${info.file.name} 文件上传成功!`);
+                                } else {
+                                    message.warning(info.file.response.error[0].message);
+                                    return;
+                                };
+                                this.state.copyrightApplyUrl = info.file.response.data;
+                            } else if (info.file.status === 'error') {
+                                message.error(`${info.file.name} 文件上传失败。`);
+                            }
+                        }}
+                    >
+                        <Button><Icon type="upload" /> 上传软著申请书 </Button>
+                    </Upload>
+                    <p style={{ margin: '10px 0' }}>{theData.applicationUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_apply', '/techservice/copyright/download')}>{theData.applicationUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                </div>
+                <div className="hrSituation-roster">
+                    <Upload
+                        name="copyright_auth"
+                        action={globalConfig.context + "/techservice/copyright/upload"}
+                        data={{ 'sign': 'copyright_auth', id: this.props.data.id }}
+                        beforeUpload={beforeUploadFile}
+                        showUploadList={false}
+                        onChange={(info) => {
+                            if (info.file.status !== 'uploading') {
+                                console.log(info.file, info.fileList);
+                            }
+                            if (info.file.status === 'done') {
+                                if (!info.file.response.error.length) {
+                                    message.success(`${info.file.name} 文件上传成功!`);
+                                } else {
+                                    message.warning(info.file.response.error[0].message);
+                                    return;
+                                };
+                                this.state.copyrightAuthUrl = info.file.response.data;
+                            } else if (info.file.status === 'error') {
+                                message.error(`${info.file.name} 文件上传失败。`);
+                            }
+                        }}
+                    >
+                        <Button><Icon type="upload" /> 上传软著证书 </Button>
+                    </Upload>
+                    <p style={{ margin: '10px 0' }}>{theData.certificateUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_auth', '/techservice/copyright/download')}>{theData.certificateUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                </div>
                 <p>状态流转记录: </p>
                 <Table style={{ margin: '10px 0' }}
                     pagination={false}
                     dataSource={this.state.stateTable}
                     columns={this.state.stateColumns} />
-                <div className="clearfix">
-                    <FormItem className="third-item"
-                        {...formItemLayout}
-                        label="状态流转"
-                    >
-                        {getFieldDecorator('status')(
-                            <Select placeholder="选择一个状态">{this.state.stateOption}</Select>
-                        )}
-                    </FormItem>
-                    <FormItem className="third-item"
-                        labelCol={{ span: 6 }}
-                        wrapperCol={{ span: 12 }}
-                        label="处理时间"
-                    >
-                        {getFieldDecorator('recordTime')(
-                            <DatePicker />
-                        )}
-                    </FormItem>
-                    <FormItem className="third-item"
-                        {...formItemLayout}
-                        label="负责人"
-                    >
-                        {getFieldDecorator('principal')(
-                            <Select placeholder="选择负责人">{this.props.authorOption}</Select>
-                        )}
-                    </FormItem>
-                </div>
-                <FormItem
-                    labelCol={{ span: 2 }}
-                    wrapperCol={{ span: 12 }}
-                    label="备注"
-                >
-                    {getFieldDecorator('comment')(
-                        <Input />
-                    )}
-                </FormItem>
                 <FormItem style={{ marginTop: '20px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                     <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>

+ 49 - 149
js/component/account/services/copyright/copyright.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch } from 'antd';
-import { provinceArr } from '../../../dataDic.js';
+import { copyrightStateList } from '../../../dataDic.js';
 import { getTime, companySearch, getCopyrightState, getInUrgentTime } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -20,12 +20,10 @@ const copyright = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/copyright/list",
+            url: globalConfig.context + "/techservice/copyright/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                locationProvince: this.state.province,
-                unitName: this.state.unitName,
                 copyrightName: this.state.copyrightName,
                 status: this.state.status,
                 createTime: this.state.createTime,
@@ -51,19 +49,20 @@ const copyright = React.createClass({
                         principal: thisdata.principal,
                         contact: thisdata.contact,
                         copyrightName: thisdata.copyrightName,
+                        copyrightNumber: thisdata.copyrightNumber,
                         status: thisdata.status,
                         comment: thisdata.comment,
                         workIssue: thisdata.workIssue,
                         outsource: thisdata.outsource,
                         inUrgent: thisdata.inUrgent,
-                        expectTime: [moment(thisdata.acceptTime), thisdata.inUrgent],
                         authorizedDate: thisdata.authorizedDate,
                         fisrtContact: thisdata.fisrtContact,
                         secondContact: thisdata.secondContact,
                         thirdContact: thisdata.thirdContact,
                         authorizedDateFormattedDate: thisdata.authorizedDateFormattedDate,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        acceptTimeFormattedDate: thisdata.acceptTimeFormattedDate
+                        acceptTimeFormattedDate: thisdata.acceptTimeFormattedDate,
+                        expectTime: [thisdata.acceptTime, thisdata.inUrgent]
                     });
                 };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
@@ -79,67 +78,11 @@ const copyright = React.createClass({
             });
         }.bind(this));
     },
-    getAuthorList() {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/techservice/patent/getAdmin",
-            success: function (data) {
-                if (data.error.length || !data.data) {
-                    return;
-                };
-                let _me = this;
-                for (var item in data.data) {
-                    _me.state.authorOption.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
-                    )
-                };
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
-    getCompanyList() {
-        this.setState({
-            loading: true
-        });
-        $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/techservice/patent/getUnitNames",
-            success: function (data) {
-                if (data.error.length || !data.data) {
-                    return;
-                };
-                let _me = this;
-                for (var item in data.data) {
-                    _me.state.companyOption.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
-                    )
-                };
-            }.bind(this),
-        }).always(function () {
-            this.setState({
-                loading: false
-            });
-        }.bind(this));
-    },
     getInitialState() {
         return {
             visible: false,
-            provinceOption: [],
-            companyOption: [],
-            authorOption: [],
+            stateOption: [],
             data: [],
-            selectedRowKeys: [],
-            selectedRows: [],
             loading: false,
             showAdd: false,
             showDesc: false,
@@ -165,18 +108,6 @@ const copyright = React.createClass({
                     dataIndex: 'serialNumber',
                     key: 'serialNumber',
                 }, {
-                    title: '省份',
-                    dataIndex: 'province',
-                    key: 'province',
-                }, {
-                    title: '外包公司',
-                    dataIndex: 'outsource',
-                    key: 'outsource',
-                }, {
-                    title: '公司名称',
-                    dataIndex: 'unitName',
-                    key: 'unitName',
-                }, {
                     title: '认证状态',
                     dataIndex: 'status',
                     key: 'status',
@@ -193,6 +124,26 @@ const copyright = React.createClass({
                     title: '加急天数',
                     dataIndex: 'inUrgent',
                     key: 'inUrgent',
+                    render: (text) => {
+                        switch (text) {
+                            case 0:
+                                return '不加急';
+                            case 3:
+                                return '3天';
+                            case 5:
+                                return '5天';
+                            case 10:
+                                return '6-10天';
+                            case 15:
+                                return '11-15天';
+                            case 20:
+                                return '16-20天';
+                            case 25:
+                                return '21-25天';
+                            case 30:
+                                return '26-30天';
+                        }
+                    }
                 }, {
                     title: '咨询师',
                     dataIndex: 'principal',
@@ -209,7 +160,16 @@ const copyright = React.createClass({
                     title: '(预计)下证时间',
                     dataIndex: 'expectTime',
                     key: 'expectTime',
-                    render: (text) => { return getTime(getInUrgentTime(text[0], text[1])) }
+                    render: (text) => {
+                        if (text[0]) {
+                            if (text[1]) {
+                                return getTime(getInUrgentTime(moment(text[0]), text[1]))
+                            } else {
+                                return getTime(getInUrgentTime(moment(text[0]), 45))
+                            }
+                        };
+                        return;
+                    }
                 }, {
                     title: '备注',
                     dataIndex: 'comment',
@@ -221,15 +181,12 @@ const copyright = React.createClass({
     },
     componentWillMount() {
         let _me = this;
-        provinceArr.map(function (item) {
-            _me.state.provinceOption.push(
-                <Select.Option value={item} key={item}>{item}</Select.Option>
+        copyrightStateList.map(function (item) {
+            _me.state.stateOption.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
-        //console.log(this.state.pagination.total);
         this.loadData();
-        this.getAuthorList();
-        this.getCompanyList();
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -237,38 +194,6 @@ const copyright = React.createClass({
             showDesc: true
         });
     },
-    delectRow() {
-        let deletedIds = [];
-        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
-            let rowItem = this.state.selectedRows[idx];
-            if (rowItem.id) {
-                deletedIds.push(rowItem.id)
-            }
-        }
-        this.setState({
-            selectedRowKeys: [],
-            loading: deletedIds.length > 0
-        });
-        $.ajax({
-            method: "POST",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/copyright/delete",
-            data: {
-                id: deletedIds
-            }
-        }).done(function (data) {
-            if (!data.error.length) {
-                message.success('保存成功!');
-                this.setState({
-                    loading: false,
-                });
-            } else {
-                message.warning(data.error[0].message);
-            };
-            this.loadData();
-        }.bind(this));
-    },
     closeDesc(e, s) {
         this.state.showDesc = e;
         if (s) {
@@ -295,24 +220,14 @@ const copyright = React.createClass({
         this.loadData();
     },
     reset() {
-        this.state.province = undefined;
-        this.state.unitName = undefined;
+        this.state.copyrightName = undefined;
+        this.state.status = undefined;
         this.state.createTime = [];
         this.state.acceptTime = [];
         this.state.authTime = [];
         this.loadData();
     },
     render() {
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-                this.setState({
-                    selectedRows: selectedRows,
-                    selectedRowKeys: selectedRowKeys
-                });
-            }
-        };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
         const { MonthPicker, RangePicker } = DatePicker;
         return (
             <div className="foster-box">
@@ -320,34 +235,21 @@ const copyright = React.createClass({
                     <div className="content-title">
                         <span>软著申请管理</span>
                         <PatentAdd
-                            companyOption={this.state.companyOption}
-                            authorOption={this.state.authorOption}
                             onClick={this.addClick}
                             closeAdd={this.closeAdd} />
                     </div>
                     <div className="foster-query">
-                        <Select placeholder="选择省份"
-                            style={{ width: 200 }}
-                            value={this.state.province}
-                            showSearch
-                            filterOption={companySearch}
-                            onChange={(e) => { this.setState({ province: e }) }}>
-                            {this.state.provinceOption}
-                        </Select>
-                        <Select placeholder="选择公司"
-                            style={{ width: 200 }}
-                            value={this.state.unitName}
-                            showSearch
-                            filterOption={companySearch}
-                            onChange={(e) => { this.setState({ unitName: e }) }}>
-                            {this.state.companyOption}
-                        </Select>
+                        <Input style={{ width: '160px' }}
+                            placeholder="请输入软著名称"
+                            value={this.state.copyrightName}
+                            onChange={(e) => { this.setState({ copyrightName: e.target.value }); }} />
+                        <Select style={{ width: '160px' }}
+                            value={this.state.status}
+                            onChange={(e) => { this.setState({ status: e }) }}
+                            placeholder="选择一个状态">{this.state.stateOption}</Select>
                         <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                         <Button type="primary" onClick={this.search}>搜索</Button>
                         <Button onClick={this.reset}>重置</Button>
-                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
-                            disabled={!hasSelected}
-                            onClick={this.delectRow}>删除<Icon type="minus" /></Button>
                         <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                             <span>派单时间:</span>
                             <RangePicker style={{ width: '240px' }}
@@ -369,7 +271,6 @@ const copyright = React.createClass({
                     <div className="foster-table">
                         <Spin spinning={this.state.loading}>
                             <Table columns={this.state.columns}
-                                rowSelection={rowSelection}
                                 dataSource={this.state.dataSource}
                                 pagination={this.state.pagination}
                                 onRowClick={this.tableRowClick} />
@@ -377,7 +278,6 @@ const copyright = React.createClass({
                     </div>
                     <PatentChange
                         data={this.state.RowData}
-                        authorOption={this.state.authorOption}
                         showDesc={this.state.showDesc}
                         closeDesc={this.closeDesc} />
                 </div >

+ 0 - 1
js/component/account/services/patent.jsx

@@ -77,7 +77,6 @@ const Patent = React.createClass({
                     dataSource: this.state.data,
                     pagination: this.state.pagination
                 });
-                console.log(this.state.data);
             }.bind(this),
         }).always(function () {
             this.setState({

+ 17 - 14
js/component/manageCenter/servicesManage/copyright/comPatentAdd.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Modal, Button, Form, message, Input, Spin, Checkbox, Select, Row, Col } from 'antd';
+import { Icon, Modal, Button, Form, message, Input, Spin, Select, Row, Col } from 'antd';
 import './comprehensive.less';
 import { companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
@@ -81,15 +81,15 @@ const PatentAddFrom = Form.create()(React.createClass({
             }
         });
     },
-    acceleratedCheck(e) {
-        if (e.target.checked == true) {
-            this.state.accelerated = 1;
-            this.setState({ visible: "show" });
-        } else if (e.target.checked == false) {
-            this.state.accelerated = 0;
-            this.setState({ visible: "visible" });
-        }
-    },
+    // acceleratedCheck(e) {
+    //     if (e.target.checked == true) {
+    //         this.state.accelerated = 1;
+    //         this.setState({ visible: "show" });
+    //     } else if (e.target.checked == false) {
+    //         this.state.accelerated = 0;
+    //         this.setState({ visible: "visible" });
+    //     }
+    // },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -142,15 +142,18 @@ const PatentAddFrom = Form.create()(React.createClass({
                     wrapperCol={{ span: 18 }}
                 >
                     <span>是否加急:</span>
-                    <Checkbox onChange={this.acceleratedCheck}></Checkbox>
                     {getFieldDecorator('inUrgent')(
-                        <Select className={this.state.visible}
+                        <Select
                             placeholder="请选择加急时间"
                             style={{ width: 120 }}>
+                            <Select.Option value="0">不加急</Select.Option>
                             <Select.Option value="3">3天</Select.Option>
                             <Select.Option value="5">5天</Select.Option>
-                            <Select.Option value="10">10天</Select.Option>
-                            <Select.Option value="20">20天</Select.Option>
+                            <Select.Option value="10">6-10天</Select.Option>
+                            <Select.Option value="15">11-15天</Select.Option>
+                            <Select.Option value="20">16-20天</Select.Option>
+                            <Select.Option value="25">21-25天</Select.Option>
+                            <Select.Option value="30">26-30天</Select.Option>
                         </Select>
                     )}
                 </FormItem>

+ 42 - 21
js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx

@@ -4,7 +4,7 @@ import './comprehensive.less';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { copyrightStateList } from '../../../dataDic.js';
-import { getCopyrightState, getTime, downloadFile, beforeUploadFile } from '../../../tools.js';
+import { getCopyrightState, getTime, copyrightDownloadFile, beforeUploadFile } from '../../../tools.js';
 
 const CopyrightDescForm = Form.create()(React.createClass({
     getInitialState() {
@@ -48,7 +48,6 @@ const CopyrightDescForm = Form.create()(React.createClass({
         this.loadData();
     },
     loadData(uid, id) {
-        debugger
         this.setState({
             loading: true
         });
@@ -125,6 +124,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 principal: detailData.principal,
                 contact: detailData.contact,
                 copyrightName: detailData.copyrightName,
+                copyrightNumber: detailData.copyrightNumber,
                 status: detailData.status,
                 comment: detailData.comment,
                 workIssue: detailData.workIssue,
@@ -144,6 +144,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 authorizedDateFormattedDate: detailData.authorizedDateFormattedDate,
                 createTimeFormattedDate: detailData.createTimeFormattedDate,
                 acceptTimeFormattedDate: detailData.acceptTimeFormattedDate,
+                expectTime: [detailData.acceptTime, detailData.inUrgent]
             });
         }).always(function () {
             this.setState({
@@ -177,15 +178,14 @@ const CopyrightDescForm = Form.create()(React.createClass({
                         "contact": values.contact, // 联系人, 1,2,3
                         //"copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
                         "copyrightName": values.copyrightName, // 软著名称, size 0-60
+                        "copyrightNumber": values.copyrightNumber,
                         "outsource": values.outsource, // 外包公司, size 0-60
                         "workIssue": values.workIssue, // 派单信息, size 0-128
                         "inUrgent": values.inUrgent, //  加急天数,
                         "status": values.status, // 状态
                         "comment": values.comment, // 备注 size 0-128
                         "recordTime": values.recordTime ? values.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined, // 状态修改时间 yyyy-MM-dd HH:mm:ss
-                        "principal": values.principal, // 负责人id
-                        "": this.state.copyrightApplyUrl,  //申请书
-                        "": this.state.copyrightAuthUrl //证书
+                        "principal": values.principal // 负责人id
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -214,15 +214,15 @@ const CopyrightDescForm = Form.create()(React.createClass({
             <Form onSubmit={this.handleSubmit} id="CopyrightDesc-form">
                 <Row className="express-desc-row">
                     <Col span={4}>公司名称</Col>
-                    <Col span={4}>{theData.unitName}</Col>
+                    <Col span={6}>{theData.unitName}</Col>
                     <Col span={4}>公司组织机构代码</Col>
-                    <Col span={4}>{theData.unitNumber}</Col>
+                    <Col span={6}>{theData.unitNumber}</Col>
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>公司地址</Col>
-                    <Col span={4}>{theData.province}/{theData.city}/{theData.area}</Col>
+                    <Col span={6}>{theData.province}/{theData.city}/{theData.area}</Col>
                     <Col span={4}>联系人</Col>
-                    <Col span={4}>
+                    <Col span={6}>
                         {getFieldDecorator('contact', {
                             rules: [{ required: true, message: '此项为必填项!' }],
                             initialValue: theData.contact
@@ -237,9 +237,9 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>编号</Col>
-                    <Col span={4}>{theData.serialNumber}</Col>
+                    <Col span={6}>{theData.serialNumber}</Col>
                     <Col span={4}>外包公司</Col>
-                    <Col span={4}>
+                    <Col span={6}>
                         {getFieldDecorator('outsource', {
                             initialValue: theData.outsource
                         })(
@@ -248,7 +248,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>派单详情</Col>
+                    <Col span={4}>派单详情</Col>
                     <Col span={16}>
                         {getFieldDecorator('workIssue', {
                             initialValue: theData.workIssue
@@ -260,29 +260,40 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>软著名称</Col>
+                    <Col span={4}>软著名称</Col>
                     <Col span={6}>
                         {getFieldDecorator('copyrightName', {
                             initialValue: theData.copyrightName
                         })(
-                            <Input placeholder="请输入软著名称" />
+                            <Input style={{ width: 160 }} placeholder="请输入软著名称" />
+                            )}
+                    </Col>
+                    <Col span={4}>软著编号</Col>
+                    <Col span={6}>
+                        {getFieldDecorator('copyrightNumber', {
+                            initialValue: theData.copyrightNumber
+                        })(
+                            <Input placeholder="请输入软著编号" />
                             )}
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>加急天数</Col>
+                    <Col span={4}>加急天数</Col>
                     <Col span={6}>
                         {getFieldDecorator('inUrgent', {
                             initialValue: theData.inUrgent ? String(theData.inUrgent) : undefined
                         })(
                             <Select
                                 placeholder="请选择加急时间"
-                                style={{ width: 120 }}>
+                                style={{ width: 160 }}>
                                 <Select.Option value="0">不加急</Select.Option>
                                 <Select.Option value="3">3天</Select.Option>
                                 <Select.Option value="5">5天</Select.Option>
-                                <Select.Option value="10">10天</Select.Option>
-                                <Select.Option value="20">20天</Select.Option>
+                                <Select.Option value="10">6-10天</Select.Option>
+                                <Select.Option value="15">11-15天</Select.Option>
+                                <Select.Option value="20">16-20天</Select.Option>
+                                <Select.Option value="25">21-25天</Select.Option>
+                                <Select.Option value="30">26-30天</Select.Option>
                             </Select>
                             )}
                     </Col>
@@ -293,7 +304,17 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 </Row> :
                     <Row className="express-desc-row">
                         <Col span={3}>下证时间(预计)</Col>
-                        <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                        <Col span={6}>
+                            {(() => {
+                                if (theData.expectTime && theData.expectTime[0]) {
+                                    if (theData.expectTime[1]) {
+                                        return getTime(getInUrgentTime(moment(theData.expectTime[0]), theData.expectTime[1]))
+                                    } else {
+                                        return getTime(getInUrgentTime(moment(theData.expectTime[0]), 45))
+                                    };
+                                };
+                            })()}
+                        </Col>
                     </Row>}
                 <div className="hrSituation-roster">
                     <Upload
@@ -321,7 +342,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传软著申请书 </Button>
                     </Upload>
-                    <p style={{ margin: '10px 0' }}>{theData.applicationUrl ? <a onClick={downloadFile.bind(null, theData.applicationUrl, theData.applicationUrlDownloadFileName)}>{theData.applicationUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ margin: '10px 0' }}>{theData.applicationUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_apply', '/api/admin/copyright/download')}>{theData.applicationUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <div className="hrSituation-roster">
                     <Upload
@@ -349,7 +370,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     >
                         <Button><Icon type="upload" /> 上传软著证书 </Button>
                     </Upload>
-                    <p style={{ margin: '10px 0' }}>{theData.certificateUrl ? <a onClick={downloadFile.bind(null, theData.certificateUrl, theData.certificateUrlDownloadFileName)}>{theData.certificateUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                    <p style={{ margin: '10px 0' }}>{theData.certificateUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_auth', '/api/admin/copyright/download')}>{theData.certificateUrlDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
                 <p>状态流转记录: </p>
                 <Table style={{ margin: '10px 0' }}

+ 49 - 6
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch } from 'antd';
-import { provinceArr } from '../../../dataDic.js';
+import { provinceArr, copyrightStateList } from '../../../dataDic.js';
 import { getTime, companySearch, getCopyrightState, getInUrgentTime } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -24,8 +24,8 @@ const copyright = React.createClass({
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                locationProvince: this.state.province,
-                unitName: this.state.unitName,
+                province: this.state.province,
+                uid: this.state.unitName,
                 copyrightName: this.state.copyrightName,
                 status: this.state.status,
                 createTime: this.state.createTime,
@@ -51,12 +51,13 @@ const copyright = React.createClass({
                         principal: thisdata.principal,
                         contact: thisdata.contact,
                         copyrightName: thisdata.copyrightName,
+                        copyrightNumber: thisdata.copyrightNumber,
                         status: thisdata.status,
                         comment: thisdata.comment,
                         workIssue: thisdata.workIssue,
                         outsource: thisdata.outsource,
                         inUrgent: thisdata.inUrgent,
-                        expectTime: [moment(thisdata.acceptTime), thisdata.inUrgent],
+                        expectTime: [thisdata.acceptTime, thisdata.inUrgent],
                         authorizedDate: thisdata.authorizedDate,
                         fisrtContact: thisdata.fisrtContact,
                         secondContact: thisdata.secondContact,
@@ -135,6 +136,7 @@ const copyright = React.createClass({
         return {
             visible: false,
             provinceOption: [],
+            stateOption: [],
             companyOption: [],
             authorOption: [],
             data: [],
@@ -193,6 +195,26 @@ const copyright = React.createClass({
                     title: '加急天数',
                     dataIndex: 'inUrgent',
                     key: 'inUrgent',
+                    render: (text) => {
+                        switch (text) {
+                            case 0:
+                                return '不加急';
+                            case 3:
+                                return '3天';
+                            case 5:
+                                return '5天';
+                            case 10:
+                                return '6-10天';
+                            case 15:
+                                return '11-15天';
+                            case 20:
+                                return '16-20天';
+                            case 25:
+                                return '21-25天';
+                            case 30:
+                                return '26-30天';
+                        }
+                    }
                 }, {
                     title: '咨询师',
                     dataIndex: 'principal',
@@ -209,7 +231,16 @@ const copyright = React.createClass({
                     title: '(预计)下证时间',
                     dataIndex: 'expectTime',
                     key: 'expectTime',
-                    render: (text) => { return getTime(getInUrgentTime(text[0], text[1])) }
+                    render: (text) => {
+                        if (text[0]) {
+                            if (text[1]) {
+                                return getTime(getInUrgentTime(moment(text[0]), text[1]))
+                            } else {
+                                return getTime(getInUrgentTime(moment(text[0]), 45))
+                            }
+                        };
+                        return;
+                    }
                 }, {
                     title: '备注',
                     dataIndex: 'comment',
@@ -226,7 +257,11 @@ const copyright = React.createClass({
                 <Select.Option value={item} key={item}>{item}</Select.Option>
             )
         });
-        //console.log(this.state.pagination.total);
+        copyrightStateList.map(function (item) {
+            _me.state.stateOption.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
         this.loadData();
         this.getAuthorList();
         this.getCompanyList();
@@ -342,6 +377,14 @@ const copyright = React.createClass({
                             onChange={(e) => { this.setState({ unitName: e }) }}>
                             {this.state.companyOption}
                         </Select>
+                        <Input style={{ width: '160px' }}
+                            placeholder="请输入软著名称"
+                            value={this.state.copyrightName}
+                            onChange={(e) => { this.setState({ copyrightName: e.target.value }); }} />
+                        <Select style={{ width: '160px' }}
+                            value={this.state.status}
+                            onChange={(e) => { this.setState({ status: e }) }}
+                            placeholder="选择一个状态">{this.state.stateOption}</Select>
                         <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                         <Button type="primary" onClick={this.search}>搜索</Button>
                         <Button onClick={this.reset}>重置</Button>

+ 3 - 0
js/component/tools.js

@@ -305,6 +305,9 @@ module.exports = {
     downloadFile: function (path, fileName) {
         window.open(globalConfig.context + '/open/downloadFile?path=' + path + '&fileName=' + fileName)
     },
+    copyrightDownloadFile: function (id, sign, url) {
+        window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign)
+    },
     companySearch(input, option) {
         return option.props.children.indexOf(input) >= 0
     },