瀏覽代碼

v1.0.11 管理端软著完成

yee 8 年之前
父節點
當前提交
be9b623b3a

+ 54 - 60
js/component/account/services/copyright/comPatentAdd.jsx

@@ -13,7 +13,7 @@ const PatentAddFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/getContacts",
             data: {
-                uid: theUid
+                uid: theUid || this.state.uid
             },
             success: function (data) {
                 let theOption = [];
@@ -36,9 +36,6 @@ const PatentAddFrom = Form.create()(React.createClass({
         return {
             loading: false,
             companyOption: [],
-            firstCheck: 0,
-            secondCheck: 0,
-            thirdCheck: 0,
             accelerated: 0,
             acceleratedDate: 0,
             visible: "visible"
@@ -46,40 +43,40 @@ const PatentAddFrom = Form.create()(React.createClass({
     },
     handleSubmit(e) {
         e.preventDefault();
-        if (!this.state.companyName || this.state.companyName === "") {
-            message.warning('请先选择公司!');
-            return;
-        };
         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 + "/techservice/patent/manageApplyPatent",
+                    url: globalConfig.context + "/api/admin/copyright/apply",
                     data: {
-                        'uid': this.state.companyName,
-                        'firstInventorIdNumber': values.firstInventorID,
-                        'firstInventorName': values.firstInventorName,
-                        'patentDes': values.intro,
-                        'secondInventorName': values.secondInventorName,
-                        'thirdInventorName': values.thirdInventorName,
-                        'firstInventorIsPublish': this.state.firstCheck,
-                        'secondInventorIsPublish': this.state.secondCheck,
-                        'thirdInventorIsPublish': this.state.thirdCheck,
-                        'patentProryStatementUrl': this.state.avatarUrl
+                        "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
+                        "workIssue": values.workIssue, // 派单信息, size 0-128
+                        "inUrgent": values.inUrgent, //  加急天数,
+                        //"comment": values.comment, // 备注 size 0-128
+                        "principal": values.principal // 负责人id
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
+                        this.props.okClick();
+                        this.props.closeModal();
+                        this.props.form.resetFields();
                     } else {
                         message.warning(data.error[0].message);
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.okClick();
-                    this.props.form.resetFields();
                 }.bind(this));
             }
         });
@@ -93,9 +90,6 @@ const PatentAddFrom = Form.create()(React.createClass({
             this.setState({ visible: "visible" });
         }
     },
-    acceleratedSelect(value) {
-        this.state.acceleratedDate = value;
-    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -105,47 +99,43 @@ const PatentAddFrom = Form.create()(React.createClass({
         };
         const _me = this;
         return (
-            <Form horizontal onSubmit={this.handleSubmit} className="person-form">
-                <FormItem
-                    wrapperCol={{ span: 24 }}
-                >
-                    <Row>
-                        <Col span={12}>
-                            <span>选择公司:  </span>
+            <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}
-                                value={this.state.uid}
-                                onSelect={(e, n) => { this.setState({ uid: e }); this.getContactsList(e); }}>
+                                onSelect={(e, n) => { this.getContactsList(e); }}>
                                 {this.props.companyOption}
                             </Select>
-                        </Col>
-                        <Col span={12}>
-                            <span>选择联系人:  </span>
+                        )}
+                    </Col>
+                    <Col span={12}>
+                        <span>选择联系人:  </span>
+                        {getFieldDecorator('contact')(
                             <Select placeholder="请选择联系人" style={{ width: 200 }}
                                 notFoundContent="未获取到联系人列表"
-                                value={this.state.contacts}
-                                onSelect={(e, n) => { this.setState({ contacts: e }); }}>
+                                onSelect={(e, n) => { this.setState({ contact: e }); }}>
                                 {this.state.contactsOption}
                             </Select>
-                        </Col>
-                    </Row>
-                </FormItem>
+                        )}
+                    </Col>
+                </Row>
                 <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 18 }}
                     label="派单信息"
                 >
-                    {getFieldDecorator('intro', {
-                        initialValue: this.state.intro || null
-                    })(
+                    {getFieldDecorator('workIssue')(
                         <Input type="textarea"
                             placeholder="多行输入"
                             rows={6} />
-                        )}
+                    )}
                 </FormItem>
                 <FormItem
                     labelCol={{ span: 0 }}
@@ -153,32 +143,35 @@ const PatentAddFrom = Form.create()(React.createClass({
                 >
                     <span>是否加急:</span>
                     <Checkbox onChange={this.acceleratedCheck}></Checkbox>
-                    <Select className={this.state.visible} placeholder="请选择加急时间" style={{ width: 120 }} onChange={this.acceleratedSelect}>
-                        <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>
+                    {getFieldDecorator('inUrgent')(
+                        <Select className={this.state.visible}
+                            placeholder="请选择加急时间"
+                            style={{ width: 120 }}>
+                            <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>
+                    )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="选择咨询师"
                 >
-                    <Select placeholder="请选择咨询师" style={{ width: 200 }}
-                        value={this.state.consultant}
-                        onSelect={(e, n) => { this.setState({ consultant: e }); }}>
-                        {this.props.authorOption}
-                    </Select>
+                    {getFieldDecorator('principal')(
+                        <Select placeholder="请选择咨询师" style={{ width: 200 }}
+                            onSelect={(e, n) => { this.setState({ principal: e }); }}>
+                            {this.props.authorOption}
+                        </Select>
+                    )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="外包公司"
                 >
-                    {getFieldDecorator('intro', {
-                        initialValue: this.state.intro || null
-                    })(
+                    {getFieldDecorator('outsource')(
                         <Input placeholder="输入外包公司" />
-                        )}
+                    )}
                 </FormItem>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">确认</Button>
@@ -227,6 +220,7 @@ const PatentAdd = React.createClass({
                     >
                         <PatentAddFrom
                             spinState={this.spinChange}
+                            closeModal={this.handleCancel}
                             okClick={() => { this.props.closeAdd(false, true) }}
                             companyOption={this.props.companyOption}
                             authorOption={this.props.authorOption} />

+ 105 - 68
js/component/account/services/copyright/comPatentChange.jsx

@@ -12,11 +12,12 @@ const CopyrightDescForm = Form.create()(React.createClass({
             visible: false,
             loading: false,
             stateOption: [],
+            stateTable: [],
             contactsOption: [],
             stateColumns: [{
                 title: '申请状态',
-                dataIndex: 'state',
-                key: 'state',
+                dataIndex: 'status',
+                key: 'status',
                 render: (text) => { return getCopyrightState(text) }
             }, {
                 title: '处理时间',
@@ -44,66 +45,104 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
+        this.loadData();
     },
-    loadData(uid, cid, year) {
+    loadData(uid, id) {
         this.setState({
             loading: true
         });
         $.when($.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/cognizanceLog",
+            cache: false,
+            url: globalConfig.context + "/api/admin/copyright/logs",
             data: {
-                pid: this.state.xid
+                id: id || this.props.data.id
             }
         }), $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts"
+            cache: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: uid || this.props.data.uid
+            }
         }), $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts",
+            cache: false,
+            url: globalConfig.context + "/api/admin/copyright/detail",
+            data: {
+                id: id || this.props.data.id
+            }
         })).done((data1, data2, data3) => {
+            let _me = this;
             //状态流转table
-            if (data1[0].error.length) {
+            if (data1[0].error && data1[0].error.length) {
                 message.warning(data1[0].error[0].message);
                 return;
             };
-            let _me = this;
             this.state.stateTable = [];
-            data1[0].data.map(function (item) {
-                this.state.stateTable.push({
+            data1[0].data.map(function (item, i) {
+                _me.state.stateTable.push({
                     key: i,
                     recordTimeFormattedDate: item.recordTimeFormattedDate,
-                    state: item.state,
+                    status: item.status,
                     principal: item.principal,
                     operator: item.operator,
                     comment: item.comment
                 });
             });
             //获取联系人
-            if (data2[0].error.length) {
+            if (data2[0].error && data2[0].error.length) {
                 message.warning(data2[0].error[0].message);
                 return;
             };
             this.state.contactsOption = [];
             for (let item in data2[0].data) {
                 let theData = data2[0].data[item];
-                contactsOption.push(
+                _me.state.contactsOption.push(
                     <Select.Option value={item} key={theData}>{theData}</Select.Option>
                 );
             };
             //获取详细数据
-            if (data3[0].error.length || !data3[0].data) {
+            if (!data3[0].data && data3[0].error && data3[0].error.length) {
+                message.warning(data3[0].error[0].message);
                 return;
             };
-            let thisdata = data3[0].data;
+            let detailData = data3[0].data;
             this.setState({
-
+                id: detailData.id,
+                province: detailData.province,
+                unitName: detailData.unitName,
+                serialNumber: detailData.serialNumber,
+                createTime: detailData.createTime,
+                acceptTime: detailData.acceptTime,
+                principal: detailData.principal,
+                contact: detailData.contact,
+                copyrightName: detailData.copyrightName,
+                status: detailData.status,
+                comment: detailData.comment,
+                workIssue: detailData.workIssue,
+                outsource: detailData.outsource,
+                inUrgent: detailData.inUrgent,
+                authorizedDate: detailData.authorizedDate,
+                fisrtContact: detailData.fisrtContact,
+                secondContact: detailData.secondContact,
+                thirdContact: detailData.thirdContact,
+                city: detailData.city,
+                area: detailData.area,
+                postcode: detailData.postcode,
+                certificateUrl: detailData.certificateUrl,
+                applicationUrl: detailData.applicationUrl,
+                certificateUrlDownloadFileName: detailData.certificateUrlDownloadFileName,
+                applicationUrlDownloadFileName: detailData.applicationUrlDownloadFileName,
+                authorizedDateFormattedDate: detailData.authorizedDateFormattedDate,
+                createTimeFormattedDate: detailData.createTimeFormattedDate,
+                acceptTimeFormattedDate: detailData.acceptTimeFormattedDate,
             });
         }).always(function () {
             this.setState({
@@ -112,10 +151,9 @@ const CopyrightDescForm = Form.create()(React.createClass({
         }.bind(this));
     },
     componentWillReceiveProps(nextProps) {
-        if (!this.state.visible && nextProps.showDesc) {
-            this.loadData();
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.uid, nextProps.data.id);
         };
-        this.state.visible = nextProps.showDesc;
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -132,29 +170,25 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admin/disposeCognizanceDetail",
+                    url: globalConfig.context + "/api/admin/copyright/modify",
                     data: {
-                        id: this.props.data.cid,
-                        uid: this.props.data.uid,
-                        technicalField1: values.technicalField[0],
-                        technicalField2: values.technicalField[1],
-                        technicalField3: values.technicalField[2],
-                        basicResearchCost: values.basicResearchCost,
-                        contacts: values.contacts,
-                        accident: values.accident,
-                        certificateNumber: values.certificateNumber,
-                        recordTimeFormattedDate: values.recordTime ? values.recordTime.format("YYYY-MM-DD") : undefined,
-                        state: values.state,
-                        principal: values.principal,
-                        comment: values.comment,
+                        "id": this.props.data.id,
+                        "contact": values.contact, // 联系人, 1,2,3
+                        //"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, //  加急天数,
+                        "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) {
                         message.success('保存成功!');
                         this.props.clickOk();
                         this.props.form.resetFields();
-                        this.state.targetKeys = [];
-                        this.state.selectedKeys = [];
                         this.props.spinState(false);
                     } else {
                         message.warning(data.error[0].message);
@@ -167,8 +201,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        //const theData = this.state.data;
-        const theData = {};
+        const theData = this.state;
         const formItemLayout = {
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
@@ -178,18 +211,18 @@ 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.nuitName}</Col>
+                    <Col span={4}>{theData.unitName}</Col>
                     <Col span={4}>公司组织机构代码</Col>
                     <Col span={4}>{theData.unitNumber}</Col>
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>公司地址</Col>
-                    <Col span={4}>{theData.address}</Col>
+                    <Col span={4}>{theData.province}/{theData.city}/{theData.area}</Col>
                     <Col span={4}>联系人</Col>
                     <Col span={4}>
-                        {getFieldDecorator('contacts', {
+                        {getFieldDecorator('contact', {
                             rules: [{ required: true, message: '此项为必填项!' }],
-                            initialValue: theData.contacts
+                            initialValue: theData.contact
                         })(
                             <Select
                                 style={{ display: 'inline-block', width: '200px' }}
@@ -201,11 +234,11 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>编号</Col>
-                    <Col span={4}>xxxxxx</Col>
+                    <Col span={4}>{theData.serialNumber}</Col>
                     <Col span={4}>外包公司</Col>
                     <Col span={4}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('outsource', {
+                            initialValue: theData.outsource
                         })(
                             <Input placeholder="请输入外包公司" />
                             )}
@@ -214,20 +247,8 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Row className="express-desc-row">
                     <Col span={3}>派单详情</Col>
                     <Col span={16}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
-                        })(
-                            <Input type="textarea"
-                                placeholder="多行输入"
-                                rows={6} />
-                            )}
-                    </Col>
-                </Row>
-                <Row className="express-desc-row">
-                    <Col span={3}>备注</Col>
-                    <Col span={16}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('workIssue', {
+                            initialValue: theData.workIssue
                         })(
                             <Input type="textarea"
                                 placeholder="多行输入"
@@ -238,23 +259,39 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Row className="express-desc-row">
                     <Col span={3}>软著名称</Col>
                     <Col span={6}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('copyrightName', {
+                            initialValue: theData.copyrightName
                         })(
                             <Input placeholder="请输入软著名称" />
                             )}
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>下证时间(预计)</Col>
+                    <Col span={3}>加急天数</Col>
                     <Col span={6}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('inUrgent', {
+                            initialValue: theData.inUrgent ? String(theData.inUrgent) : undefined
                         })(
-                            <DatePicker />
+                            <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>
                             )}
                     </Col>
                 </Row>
+                {theData.authorizedDateFormattedDate ? <Row className="express-desc-row">
+                    <Col span={3}>下证时间</Col>
+                    <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                </Row> :
+                    <Row className="express-desc-row">
+                        <Col span={3}>下证时间(预计)</Col>
+                        <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                    </Row>}
                 <p>状态流转记录: </p>
                 <Table style={{ margin: '10px 0' }}
                     pagination={false}
@@ -265,7 +302,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="状态流转"
                     >
-                        {getFieldDecorator('state')(
+                        {getFieldDecorator('status')(
                             <Select placeholder="选择一个状态">{this.state.stateOption}</Select>
                         )}
                     </FormItem>

+ 6 - 0
js/component/account/services/copyright/comprehensive.less

@@ -4,6 +4,12 @@
         line-height: 30px;
         margin-bottom: 10px;
     }
+    .ant-form-item-control {
+        .ant-checkbox-wrapper {
+            margin-left: 34px;
+            margin-right: 20px;
+        }
+    }
 }
 
 .ant-modal-body {

+ 179 - 55
js/component/account/services/copyright/copyright.jsx

@@ -1,12 +1,13 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, DatePicker, message } from 'antd';
-import { copyrightStateList } from '../../../dataDic.js';
-import { getTime, getCopyrightState } from '../../../tools.js';
+import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch } from 'antd';
+import { provinceArr } from '../../../dataDic.js';
+import { getTime, companySearch, getCopyrightState, getInUrgentTime } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import PatentAdd from './comPatentAdd.jsx';
 import PatentChange from './comPatentChange.jsx';
 
+import moment from 'moment';
 import './copyright.less';
 
 const copyright = React.createClass({
@@ -16,26 +17,59 @@ const copyright = React.createClass({
             loading: true
         });
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/techservice/patent/managePatentList",
+            url: globalConfig.context + "/api/admin/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,
+                acceptTime: this.state.acceptTime,
+                authTime: this.state.authTime
             },
             success: function (data) {
                 if (data.error.length || !data.data || !data.data.list) {
                     message.warning(data.error[0].message);
                     return;
-                }
-
+                };
+                for (let i = 0; i < data.data.list.length; i++) {
+                    let thisdata = data.data.list[i];
+                    this.state.data.push({
+                        key: i,
+                        id: thisdata.id,
+                        uid: thisdata.uid,
+                        province: thisdata.province,
+                        unitName: thisdata.unitName,
+                        serialNumber: thisdata.serialNumber,
+                        createTime: thisdata.createTime,
+                        acceptTime: thisdata.acceptTime,
+                        principal: thisdata.principal,
+                        contact: thisdata.contact,
+                        copyrightName: thisdata.copyrightName,
+                        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
+                    });
+                };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
                 this.setState({
-                    dataSource: data.data.list,
+                    dataSource: this.state.data,
                     pagination: this.state.pagination
                 });
             }.bind(this),
@@ -53,20 +87,42 @@ const copyright = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/techservice/cognizance/getContacts",
+            url: globalConfig.context + "/techservice/patent/getAdmin",
             success: function (data) {
-                if (!data.data) {
-                    if (data.error && data.error.length) {
-                        message.warning(data.error[0].message);
-                        return;
-                    };
+                if (data.error.length || !data.data) {
+                    return;
                 };
-                this.state.contactsOption = [];
-                for (let item in data.data) {
-                    let theData = data.data[item];
-                    contactsOption.push(
-                        <Select.Option value={item} key={theData}>{theData}</Select.Option>
-                    );
+                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 () {
@@ -78,13 +134,19 @@ const copyright = React.createClass({
     getInitialState() {
         return {
             visible: false,
-            stateOption: [],
+            provinceOption: [],
+            companyOption: [],
+            authorOption: [],
             data: [],
             selectedRowKeys: [],
             selectedRows: [],
             loading: false,
             showAdd: false,
             showDesc: false,
+            searchMore: true,
+            createTime: [],
+            acceptTime: [],
+            authTime: [],
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -100,40 +162,58 @@ const copyright = React.createClass({
             columns: [
                 {
                     title: '编号',
-                    dataIndex: 'number',
-                    key: 'number',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '省份',
+                    dataIndex: 'province',
+                    key: 'province',
+                }, {
+                    title: '外包公司',
+                    dataIndex: 'outsource',
+                    key: 'outsource',
+                }, {
+                    title: '公司名称',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '认证状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getCopyrightState(text) }
+                }, {
+                    title: '派单信息',
+                    dataIndex: 'workIssue',
+                    key: 'workIssue',
                 }, {
                     title: '软著名称',
                     dataIndex: 'copyrightName',
                     key: 'copyrightName',
                 }, {
-                    title: '加急',
-                    dataIndex: 'urgent',
-                    key: 'urgent',
+                    title: '加急天数',
+                    dataIndex: 'inUrgent',
+                    key: 'inUrgent',
                 }, {
                     title: '咨询师',
-                    dataIndex: 'consultant',
-                    key: 'consultant',
+                    dataIndex: 'principal',
+                    key: 'principal',
                 }, {
                     title: '派单日',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
                 }, {
                     title: '受理日',
-                    dataIndex: 'acceptanceTime',
-                    key: 'acceptanceTime',
+                    dataIndex: 'acceptTimeFormattedDate',
+                    key: 'acceptTimeFormattedDate',
                 }, {
                     title: '(预计)下证时间',
-                    dataIndex: 'endTime',
-                    key: 'endTime',
-                }, {
-                    title: '派单信息',
-                    dataIndex: 'createInfo',
-                    key: 'createInfo',
+                    dataIndex: 'expectTime',
+                    key: 'expectTime',
+                    render: (text) => { return getTime(getInUrgentTime(text[0], text[1])) }
                 }, {
                     title: '备注',
-                    dataIndex: 'explain',
-                    key: 'explain',
+                    dataIndex: 'comment',
+                    key: 'comment',
                 }
             ],
             dataSource: []
@@ -141,13 +221,15 @@ const copyright = React.createClass({
     },
     componentWillMount() {
         let _me = this;
-        copyrightStateList.map(function (item) {
-            _me.state.stateOption.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+        provinceArr.map(function (item) {
+            _me.state.provinceOption.push(
+                <Select.Option value={item} key={item}>{item}</Select.Option>
             )
         });
+        //console.log(this.state.pagination.total);
         this.loadData();
         this.getAuthorList();
+        this.getCompanyList();
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -159,8 +241,8 @@ const copyright = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.cid) {
-                deletedIds.push(rowItem.cid)
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
             }
         }
         this.setState({
@@ -171,9 +253,9 @@ const copyright = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/deleteCognizance",
+            url: globalConfig.context + "/api/admin/copyright/delete",
             data: {
-                ids: deletedIds
+                id: deletedIds
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -204,13 +286,20 @@ const copyright = React.createClass({
             this.loadData();
         };
     },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     search() {
         this.loadData();
     },
     reset() {
-        this.state.searchNumber = undefined;
-        this.state.searchName = undefined;
-        this.state.searchState = undefined;
+        this.state.province = undefined;
+        this.state.unitName = undefined;
+        this.state.createTime = [];
+        this.state.acceptTime = [];
+        this.state.authTime = [];
         this.loadData();
     },
     render() {
@@ -224,29 +313,63 @@ const copyright = React.createClass({
             }
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { MonthPicker, RangePicker } = DatePicker;
         return (
             <div className="foster-box">
                 <div className="foster-content">
                     <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">
-                        <Input placeholder="软著编号" value={this.state.searchNumber} onChange={(e) => { this.setState({ searchNumber: e.target.value }); }} />
-                        <Input placeholder="软著名称" value={this.state.searchName} onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
-                        <Select placeholder="软著状态" value={this.state.searchState} style={{ width: 200 }} onChange={(e) => { this.setState({ searchState: e }); }}>{this.state.stateOption}</Select>
+                        <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>
+                        <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", display: 'none' }}
+                        <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' }}
+                                allowClear={false}
+                                value={[moment(this.state.createTime[0]), moment(this.state.createTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ createTime: dateString }) }} />
+                            <span>受理时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[moment(this.state.acceptTime[0]), moment(this.state.acceptTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ acceptTime: dateString }) }} />
+                            <span>下证时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[moment(this.state.authTime[0]), moment(this.state.authTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ authTime: dateString }) }} />
+                        </div>
                     </div>
                     <div className="foster-table">
                         <Spin spinning={this.state.loading}>
                             <Table columns={this.state.columns}
-                                //rowSelection={rowSelection}
+                                rowSelection={rowSelection}
                                 dataSource={this.state.dataSource}
                                 pagination={this.state.pagination}
                                 onRowClick={this.tableRowClick} />
@@ -254,6 +377,7 @@ const copyright = React.createClass({
                     </div>
                     <PatentChange
                         data={this.state.RowData}
+                        authorOption={this.state.authorOption}
                         showDesc={this.state.showDesc}
                         closeDesc={this.closeDesc} />
                 </div >

+ 8 - 22
js/component/account/services/copyright/copyright.less

@@ -28,6 +28,12 @@
                 margin-left: 10px;
             }
         }
+        .search-more {
+            >span {
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+        }
     }
 }
 .patent-addNew {
@@ -46,26 +52,6 @@
     }
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 .patent-content {
     padding: 20px;
     background: #fff;
@@ -135,9 +121,9 @@
 .ant-modal-content {
     .ant-modal-header {
         padding: 10px 16px;
-        background: #2d2d2d;
+        //background: #2d2d2d;
         .ant-modal-title {
-            color: #fff;
+            //color: #fff;
             font-size: 16px;
             font-weight: 400;
         }

+ 2 - 2
js/component/account/services/patent.less

@@ -47,9 +47,9 @@
 .ant-modal-content {
     .ant-modal-header {
         padding: 10px 16px;
-        background: #2d2d2d;
+        //background: #2d2d2d;
         .ant-modal-title {
-            color: #fff;
+            //color: #fff;
             font-size: 16px;
             font-weight: 400;
         }

+ 2 - 2
js/component/account/set/changeModal.less

@@ -5,8 +5,8 @@
         }
     }
     .ant-modal-header {
-        background: #000;
-        color: #fff;
+        //background: #000;
+        //color: #fff;
         font-size: 18px;
     }
     .ant-modal-body {

File diff suppressed because it is too large
+ 11 - 9
js/component/dataDic.js


+ 54 - 60
js/component/manageCenter/servicesManage/copyright/comPatentAdd.jsx

@@ -13,7 +13,7 @@ const PatentAddFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/getContacts",
             data: {
-                uid: theUid
+                uid: theUid || this.state.uid
             },
             success: function (data) {
                 let theOption = [];
@@ -36,9 +36,6 @@ const PatentAddFrom = Form.create()(React.createClass({
         return {
             loading: false,
             companyOption: [],
-            firstCheck: 0,
-            secondCheck: 0,
-            thirdCheck: 0,
             accelerated: 0,
             acceleratedDate: 0,
             visible: "visible"
@@ -46,40 +43,40 @@ const PatentAddFrom = Form.create()(React.createClass({
     },
     handleSubmit(e) {
         e.preventDefault();
-        if (!this.state.companyName || this.state.companyName === "") {
-            message.warning('请先选择公司!');
-            return;
-        };
         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 + "/techservice/patent/manageApplyPatent",
+                    url: globalConfig.context + "/api/admin/copyright/apply",
                     data: {
-                        'uid': this.state.companyName,
-                        'firstInventorIdNumber': values.firstInventorID,
-                        'firstInventorName': values.firstInventorName,
-                        'patentDes': values.intro,
-                        'secondInventorName': values.secondInventorName,
-                        'thirdInventorName': values.thirdInventorName,
-                        'firstInventorIsPublish': this.state.firstCheck,
-                        'secondInventorIsPublish': this.state.secondCheck,
-                        'thirdInventorIsPublish': this.state.thirdCheck,
-                        'patentProryStatementUrl': this.state.avatarUrl
+                        "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
+                        "workIssue": values.workIssue, // 派单信息, size 0-128
+                        "inUrgent": values.inUrgent, //  加急天数,
+                        //"comment": values.comment, // 备注 size 0-128
+                        "principal": values.principal // 负责人id
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
+                        this.props.okClick();
+                        this.props.closeModal();
+                        this.props.form.resetFields();
                     } else {
                         message.warning(data.error[0].message);
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.okClick();
-                    this.props.form.resetFields();
                 }.bind(this));
             }
         });
@@ -93,9 +90,6 @@ const PatentAddFrom = Form.create()(React.createClass({
             this.setState({ visible: "visible" });
         }
     },
-    acceleratedSelect(value) {
-        this.state.acceleratedDate = value;
-    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -105,47 +99,43 @@ const PatentAddFrom = Form.create()(React.createClass({
         };
         const _me = this;
         return (
-            <Form horizontal onSubmit={this.handleSubmit} className="person-form">
-                <FormItem
-                    wrapperCol={{ span: 24 }}
-                >
-                    <Row>
-                        <Col span={12}>
-                            <span>选择公司:  </span>
+            <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}
-                                value={this.state.uid}
-                                onSelect={(e, n) => { this.setState({ uid: e }); this.getContactsList(e); }}>
+                                onSelect={(e, n) => { this.getContactsList(e); }}>
                                 {this.props.companyOption}
                             </Select>
-                        </Col>
-                        <Col span={12}>
-                            <span>选择联系人:  </span>
+                        )}
+                    </Col>
+                    <Col span={12}>
+                        <span>选择联系人:  </span>
+                        {getFieldDecorator('contact')(
                             <Select placeholder="请选择联系人" style={{ width: 200 }}
                                 notFoundContent="未获取到联系人列表"
-                                value={this.state.contacts}
-                                onSelect={(e, n) => { this.setState({ contacts: e }); }}>
+                                onSelect={(e, n) => { this.setState({ contact: e }); }}>
                                 {this.state.contactsOption}
                             </Select>
-                        </Col>
-                    </Row>
-                </FormItem>
+                        )}
+                    </Col>
+                </Row>
                 <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 18 }}
                     label="派单信息"
                 >
-                    {getFieldDecorator('intro', {
-                        initialValue: this.state.intro || null
-                    })(
+                    {getFieldDecorator('workIssue')(
                         <Input type="textarea"
                             placeholder="多行输入"
                             rows={6} />
-                        )}
+                    )}
                 </FormItem>
                 <FormItem
                     labelCol={{ span: 0 }}
@@ -153,32 +143,35 @@ const PatentAddFrom = Form.create()(React.createClass({
                 >
                     <span>是否加急:</span>
                     <Checkbox onChange={this.acceleratedCheck}></Checkbox>
-                    <Select className={this.state.visible} placeholder="请选择加急时间" style={{ width: 120 }} onChange={this.acceleratedSelect}>
-                        <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>
+                    {getFieldDecorator('inUrgent')(
+                        <Select className={this.state.visible}
+                            placeholder="请选择加急时间"
+                            style={{ width: 120 }}>
+                            <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>
+                    )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="选择咨询师"
                 >
-                    <Select placeholder="请选择咨询师" style={{ width: 200 }}
-                        value={this.state.consultant}
-                        onSelect={(e, n) => { this.setState({ consultant: e }); }}>
-                        {this.props.authorOption}
-                    </Select>
+                    {getFieldDecorator('principal')(
+                        <Select placeholder="请选择咨询师" style={{ width: 200 }}
+                            onSelect={(e, n) => { this.setState({ principal: e }); }}>
+                            {this.props.authorOption}
+                        </Select>
+                    )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="外包公司"
                 >
-                    {getFieldDecorator('intro', {
-                        initialValue: this.state.intro || null
-                    })(
+                    {getFieldDecorator('outsource')(
                         <Input placeholder="输入外包公司" />
-                        )}
+                    )}
                 </FormItem>
                 <FormItem>
                     <Button className="set-submit" type="primary" htmlType="submit">确认</Button>
@@ -227,6 +220,7 @@ const PatentAdd = React.createClass({
                     >
                         <PatentAddFrom
                             spinState={this.spinChange}
+                            closeModal={this.handleCancel}
                             okClick={() => { this.props.closeAdd(false, true) }}
                             companyOption={this.props.companyOption}
                             authorOption={this.props.authorOption} />

+ 166 - 70
js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx

@@ -1,10 +1,10 @@
 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 { copyrightStateList } from '../../../dataDic.js';
-import { getCopyrightState, getTime } from '../../../tools.js';
+import { getCopyrightState, getTime, downloadFile, beforeUploadFile } from '../../../tools.js';
 
 const CopyrightDescForm = Form.create()(React.createClass({
     getInitialState() {
@@ -12,11 +12,12 @@ const CopyrightDescForm = Form.create()(React.createClass({
             visible: false,
             loading: false,
             stateOption: [],
+            stateTable: [],
             contactsOption: [],
             stateColumns: [{
                 title: '申请状态',
-                dataIndex: 'state',
-                key: 'state',
+                dataIndex: 'status',
+                key: 'status',
                 render: (text) => { return getCopyrightState(text) }
             }, {
                 title: '处理时间',
@@ -44,66 +45,105 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
+        this.loadData();
     },
-    loadData(uid, cid, year) {
+    loadData(uid, id) {
+        debugger
         this.setState({
             loading: true
         });
         $.when($.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/cognizanceLog",
+            cache: false,
+            url: globalConfig.context + "/api/admin/copyright/logs",
             data: {
-                pid: this.state.xid
+                id: id || this.props.data.id
             }
         }), $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts"
+            cache: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: uid || this.props.data.uid
+            }
         }), $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts",
+            cache: false,
+            url: globalConfig.context + "/api/admin/copyright/detail",
+            data: {
+                id: id || this.props.data.id
+            }
         })).done((data1, data2, data3) => {
+            let _me = this;
             //状态流转table
-            if (data1[0].error.length) {
+            if (data1[0].error && data1[0].error.length) {
                 message.warning(data1[0].error[0].message);
                 return;
             };
-            let _me = this;
             this.state.stateTable = [];
-            data1[0].data.map(function (item) {
-                this.state.stateTable.push({
+            data1[0].data.map(function (item, i) {
+                _me.state.stateTable.push({
                     key: i,
                     recordTimeFormattedDate: item.recordTimeFormattedDate,
-                    state: item.state,
+                    status: item.status,
                     principal: item.principal,
                     operator: item.operator,
                     comment: item.comment
                 });
             });
             //获取联系人
-            if (data2[0].error.length) {
+            if (data2[0].error && data2[0].error.length) {
                 message.warning(data2[0].error[0].message);
                 return;
             };
             this.state.contactsOption = [];
             for (let item in data2[0].data) {
                 let theData = data2[0].data[item];
-                contactsOption.push(
+                _me.state.contactsOption.push(
                     <Select.Option value={item} key={theData}>{theData}</Select.Option>
                 );
             };
             //获取详细数据
-            if (data3[0].error.length || !data3[0].data) {
+            if (!data3[0].data && data3[0].error && data3[0].error.length) {
+                message.warning(data3[0].error[0].message);
                 return;
             };
-            let thisdata = data3[0].data;
+            let detailData = data3[0].data;
             this.setState({
-
+                id: detailData.id,
+                province: detailData.province,
+                unitName: detailData.unitName,
+                serialNumber: detailData.serialNumber,
+                createTime: detailData.createTime,
+                acceptTime: detailData.acceptTime,
+                principal: detailData.principal,
+                contact: detailData.contact,
+                copyrightName: detailData.copyrightName,
+                status: detailData.status,
+                comment: detailData.comment,
+                workIssue: detailData.workIssue,
+                outsource: detailData.outsource,
+                inUrgent: detailData.inUrgent,
+                authorizedDate: detailData.authorizedDate,
+                fisrtContact: detailData.fisrtContact,
+                secondContact: detailData.secondContact,
+                thirdContact: detailData.thirdContact,
+                city: detailData.city,
+                area: detailData.area,
+                postcode: detailData.postcode,
+                certificateUrl: detailData.certificateUrl,
+                applicationUrl: detailData.applicationUrl,
+                certificateUrlDownloadFileName: detailData.certificateUrlDownloadFileName,
+                applicationUrlDownloadFileName: detailData.applicationUrlDownloadFileName,
+                authorizedDateFormattedDate: detailData.authorizedDateFormattedDate,
+                createTimeFormattedDate: detailData.createTimeFormattedDate,
+                acceptTimeFormattedDate: detailData.acceptTimeFormattedDate,
             });
         }).always(function () {
             this.setState({
@@ -112,10 +152,9 @@ const CopyrightDescForm = Form.create()(React.createClass({
         }.bind(this));
     },
     componentWillReceiveProps(nextProps) {
-        if (!this.state.visible && nextProps.showDesc) {
-            this.loadData();
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.uid, nextProps.data.id);
         };
-        this.state.visible = nextProps.showDesc;
     },
     handleSubmit(e) {
         e.preventDefault();
@@ -132,29 +171,27 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admin/disposeCognizanceDetail",
+                    url: globalConfig.context + "/api/admin/copyright/modify",
                     data: {
-                        id: this.props.data.cid,
-                        uid: this.props.data.uid,
-                        technicalField1: values.technicalField[0],
-                        technicalField2: values.technicalField[1],
-                        technicalField3: values.technicalField[2],
-                        basicResearchCost: values.basicResearchCost,
-                        contacts: values.contacts,
-                        accident: values.accident,
-                        certificateNumber: values.certificateNumber,
-                        recordTimeFormattedDate: values.recordTime ? values.recordTime.format("YYYY-MM-DD") : undefined,
-                        state: values.state,
-                        principal: values.principal,
-                        comment: values.comment,
+                        "id": this.props.data.id,
+                        "contact": values.contact, // 联系人, 1,2,3
+                        //"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, //  加急天数,
+                        "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 //证书
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
                         this.props.clickOk();
                         this.props.form.resetFields();
-                        this.state.targetKeys = [];
-                        this.state.selectedKeys = [];
                         this.props.spinState(false);
                     } else {
                         message.warning(data.error[0].message);
@@ -167,8 +204,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
-        //const theData = this.state.data;
-        const theData = {};
+        const theData = this.state;
         const formItemLayout = {
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
@@ -178,18 +214,18 @@ 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.nuitName}</Col>
+                    <Col span={4}>{theData.unitName}</Col>
                     <Col span={4}>公司组织机构代码</Col>
                     <Col span={4}>{theData.unitNumber}</Col>
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>公司地址</Col>
-                    <Col span={4}>{theData.address}</Col>
+                    <Col span={4}>{theData.province}/{theData.city}/{theData.area}</Col>
                     <Col span={4}>联系人</Col>
                     <Col span={4}>
-                        {getFieldDecorator('contacts', {
+                        {getFieldDecorator('contact', {
                             rules: [{ required: true, message: '此项为必填项!' }],
-                            initialValue: theData.contacts
+                            initialValue: theData.contact
                         })(
                             <Select
                                 style={{ display: 'inline-block', width: '200px' }}
@@ -201,11 +237,11 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 </Row>
                 <Row className="express-desc-row">
                     <Col span={4}>编号</Col>
-                    <Col span={4}>xxxxxx</Col>
+                    <Col span={4}>{theData.serialNumber}</Col>
                     <Col span={4}>外包公司</Col>
                     <Col span={4}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('outsource', {
+                            initialValue: theData.outsource
                         })(
                             <Input placeholder="请输入外包公司" />
                             )}
@@ -214,20 +250,8 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Row className="express-desc-row">
                     <Col span={3}>派单详情</Col>
                     <Col span={16}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
-                        })(
-                            <Input type="textarea"
-                                placeholder="多行输入"
-                                rows={6} />
-                            )}
-                    </Col>
-                </Row>
-                <Row className="express-desc-row">
-                    <Col span={3}>备注</Col>
-                    <Col span={16}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('workIssue', {
+                            initialValue: theData.workIssue
                         })(
                             <Input type="textarea"
                                 placeholder="多行输入"
@@ -238,23 +262,95 @@ const CopyrightDescForm = Form.create()(React.createClass({
                 <Row className="express-desc-row">
                     <Col span={3}>软著名称</Col>
                     <Col span={6}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('copyrightName', {
+                            initialValue: theData.copyrightName
                         })(
                             <Input placeholder="请输入软著名称" />
                             )}
                     </Col>
                 </Row>
                 <Row className="express-desc-row">
-                    <Col span={3}>下证时间(预计)</Col>
+                    <Col span={3}>加急天数</Col>
                     <Col span={6}>
-                        {getFieldDecorator('contacts', {
-                            initialValue: theData.contacts
+                        {getFieldDecorator('inUrgent', {
+                            initialValue: theData.inUrgent ? String(theData.inUrgent) : undefined
                         })(
-                            <DatePicker />
+                            <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>
                             )}
                     </Col>
                 </Row>
+                {theData.authorizedDateFormattedDate ? <Row className="express-desc-row">
+                    <Col span={3}>下证时间</Col>
+                    <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                </Row> :
+                    <Row className="express-desc-row">
+                        <Col span={3}>下证时间(预计)</Col>
+                        <Col span={6}>{theData.authorizedDateFormattedDate}</Col>
+                    </Row>}
+                <div className="hrSituation-roster">
+                    <Upload
+                        name="copyright_apply"
+                        action={globalConfig.context + "/api/admin/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={downloadFile.bind(null, theData.applicationUrl, theData.applicationUrlDownloadFileName)}>{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 + "/api/admin/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={downloadFile.bind(null, theData.certificateUrl, theData.certificateUrlDownloadFileName)}>{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}
@@ -265,7 +361,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="状态流转"
                     >
-                        {getFieldDecorator('state')(
+                        {getFieldDecorator('status')(
                             <Select placeholder="选择一个状态">{this.state.stateOption}</Select>
                         )}
                     </FormItem>

+ 6 - 0
js/component/manageCenter/servicesManage/copyright/comprehensive.less

@@ -4,6 +4,12 @@
         line-height: 30px;
         margin-bottom: 10px;
     }
+    .ant-form-item-control {
+        .ant-checkbox-wrapper {
+            margin-left: 34px;
+            margin-right: 20px;
+        }
+    }
 }
 
 .ant-modal-body {

+ 98 - 33
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -1,14 +1,13 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch } from 'antd';
 import { provinceArr } from '../../../dataDic.js';
-import { getTime, getPatentState, companySearch } from '../../../tools.js';
+import { getTime, companySearch, getCopyrightState, getInUrgentTime } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import PatentAdd from './comPatentAdd.jsx';
 import PatentChange from './comPatentChange.jsx';
 
-//import PatentDesc from '../patent/comPatentDesc.jsx';
-
+import moment from 'moment';
 import './copyright.less';
 
 const copyright = React.createClass({
@@ -18,26 +17,59 @@ const copyright = React.createClass({
             loading: true
         });
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/techservice/patent/managePatentList",
+            url: globalConfig.context + "/api/admin/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,
+                acceptTime: this.state.acceptTime,
+                authTime: this.state.authTime
             },
             success: function (data) {
                 if (data.error.length || !data.data || !data.data.list) {
                     message.warning(data.error[0].message);
                     return;
-                }
-
+                };
+                for (let i = 0; i < data.data.list.length; i++) {
+                    let thisdata = data.data.list[i];
+                    this.state.data.push({
+                        key: i,
+                        id: thisdata.id,
+                        uid: thisdata.uid,
+                        province: thisdata.province,
+                        unitName: thisdata.unitName,
+                        serialNumber: thisdata.serialNumber,
+                        createTime: thisdata.createTime,
+                        acceptTime: thisdata.acceptTime,
+                        principal: thisdata.principal,
+                        contact: thisdata.contact,
+                        copyrightName: thisdata.copyrightName,
+                        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
+                    });
+                };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
                 this.state.pagination.total = data.data.totalCount;
                 this.setState({
-                    dataSource: data.data.list,
+                    dataSource: this.state.data,
                     pagination: this.state.pagination
                 });
             }.bind(this),
@@ -111,6 +143,10 @@ const copyright = React.createClass({
             loading: false,
             showAdd: false,
             showDesc: false,
+            searchMore: true,
+            createTime: [],
+            acceptTime: [],
+            authTime: [],
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -126,8 +162,8 @@ const copyright = React.createClass({
             columns: [
                 {
                     title: '编号',
-                    dataIndex: 'number',
-                    key: 'number',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
                 }, {
                     title: '省份',
                     dataIndex: 'province',
@@ -141,41 +177,43 @@ const copyright = React.createClass({
                     dataIndex: 'unitName',
                     key: 'unitName',
                 }, {
-                    title: '联系方式',
-                    dataIndex: 'contacts',
-                    key: 'contacts',
+                    title: '认证状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getCopyrightState(text) }
                 }, {
                     title: '派单信息',
-                    dataIndex: 'createInfo',
-                    key: 'createInfo',
+                    dataIndex: 'workIssue',
+                    key: 'workIssue',
                 }, {
                     title: '软著名称',
                     dataIndex: 'copyrightName',
                     key: 'copyrightName',
                 }, {
-                    title: '加急',
-                    dataIndex: 'urgent',
-                    key: 'urgent',
+                    title: '加急天数',
+                    dataIndex: 'inUrgent',
+                    key: 'inUrgent',
                 }, {
                     title: '咨询师',
-                    dataIndex: 'consultant',
-                    key: 'consultant',
+                    dataIndex: 'principal',
+                    key: 'principal',
                 }, {
                     title: '派单日',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate',
                 }, {
                     title: '受理日',
-                    dataIndex: 'acceptanceTime',
-                    key: 'acceptanceTime',
+                    dataIndex: 'acceptTimeFormattedDate',
+                    key: 'acceptTimeFormattedDate',
                 }, {
                     title: '(预计)下证时间',
-                    dataIndex: 'endTime',
-                    key: 'endTime',
+                    dataIndex: 'expectTime',
+                    key: 'expectTime',
+                    render: (text) => { return getTime(getInUrgentTime(text[0], text[1])) }
                 }, {
                     title: '备注',
-                    dataIndex: 'explain',
-                    key: 'explain',
+                    dataIndex: 'comment',
+                    key: 'comment',
                 }
             ],
             dataSource: []
@@ -203,8 +241,8 @@ const copyright = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.cid) {
-                deletedIds.push(rowItem.cid)
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
             }
         }
         this.setState({
@@ -215,9 +253,9 @@ const copyright = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/deleteCognizance",
+            url: globalConfig.context + "/api/admin/copyright/delete",
             data: {
-                ids: deletedIds
+                id: deletedIds
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -248,12 +286,20 @@ const copyright = React.createClass({
             this.loadData();
         };
     },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     search() {
         this.loadData();
     },
     reset() {
         this.state.province = undefined;
         this.state.unitName = undefined;
+        this.state.createTime = [];
+        this.state.acceptTime = [];
+        this.state.authTime = [];
         this.loadData();
     },
     render() {
@@ -267,6 +313,7 @@ const copyright = React.createClass({
             }
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { MonthPicker, RangePicker } = DatePicker;
         return (
             <div className="foster-box">
                 <div className="foster-content">
@@ -295,11 +342,29 @@ const copyright = React.createClass({
                             onChange={(e) => { this.setState({ unitName: e }) }}>
                             {this.state.companyOption}
                         </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' }}
+                                allowClear={false}
+                                value={[moment(this.state.createTime[0]), moment(this.state.createTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ createTime: dateString }) }} />
+                            <span>受理时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[moment(this.state.acceptTime[0]), moment(this.state.acceptTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ acceptTime: dateString }) }} />
+                            <span>下证时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[moment(this.state.authTime[0]), moment(this.state.authTime[1])]}
+                                onChange={(date, dateString) => { this.setState({ authTime: dateString }) }} />
+                        </div>
                     </div>
                     <div className="foster-table">
                         <Spin spinning={this.state.loading}>

+ 8 - 22
js/component/manageCenter/servicesManage/copyright/copyright.less

@@ -28,6 +28,12 @@
                 margin-left: 10px;
             }
         }
+        .search-more {
+            >span {
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+        }
     }
 }
 .patent-addNew {
@@ -46,26 +52,6 @@
     }
 }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 .patent-content {
     padding: 20px;
     background: #fff;
@@ -135,9 +121,9 @@
 .ant-modal-content {
     .ant-modal-header {
         padding: 10px 16px;
-        background: #2d2d2d;
+        //background: #2d2d2d;
         .ant-modal-title {
-            color: #fff;
+            //color: #fff;
             font-size: 16px;
             font-weight: 400;
         }

+ 1 - 1
js/component/manageCenter/servicesManage/highTech/fosterDesc/content.less

@@ -59,12 +59,12 @@
         color: #333;
     }
     .user-search {
-        margin: 20px 0;
         input {
             width: 200px;
         }
         >* {
             margin-right: 20px;
+            margin-top: 20px;
         }
         p {
             margin-top: 20px;

+ 3 - 3
js/component/manageCenter/servicesManage/highTech/fosterDesc/hrSituation.jsx

@@ -47,10 +47,10 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                 message.warning("全体人员结构中年龄一栏人数总和小于等于职工人数!");
                 return;
             };
-            if (values.year) {
+            if (!this.state.year && !this.props.year) {
                 message.warning("请输入年份!");
                 return;
-            }
+            };
             if (!err) {
                 this.props.spinState(true);
                 $.ajax({
@@ -61,7 +61,7 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                     data: {
                         id: this.props.data.id,
                         uid: this.props.uid,
-                        year: values.data.year,
+                        year: this.state.year || this.props.year,
                         aboveFifty: values.aboveFifty,
                         belowThirty: values.belowThirty,
                         college: values.college,

+ 6 - 2
js/component/manageCenter/servicesManage/patent/comPatentAdd.jsx

@@ -109,12 +109,13 @@ const PatentAddFrom = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
+                        this.props.okClick();
+                        this.props.closeModal();
                     } else {
                         message.warning(data.error[0].message);
                     }
                 }.bind(this)).always(function () {
                     this.props.spinState(false);
-                    this.props.clickOk();
                     this.props.form.resetFields();
                 }.bind(this));
             }
@@ -275,7 +276,10 @@ const PatentAdd = React.createClass({
                         width='800px'
                         footer=''
                     >
-                        <PatentAddFrom spinState={this.spinChange} closeModal={this.handleCancel} clickOk={this.handleOk} />
+                        <PatentAddFrom
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            okClick={() => { this.props.closeDesc(false, true) }} />
                     </Modal>
                 </Spin>
             </div>

+ 2 - 2
js/component/manageCenter/servicesManage/patent/comprehensive.less

@@ -67,9 +67,9 @@
 .ant-modal-content {
     .ant-modal-header {
         padding: 10px 16px;
-        background: #2d2d2d;
+        //background: #2d2d2d;
         .ant-modal-title {
-            color: #fff;
+            //color: #fff;
             font-size: 16px;
             font-weight: 400;
         }

+ 13 - 11
js/component/manageCenter/userManage/orgList.jsx

@@ -71,7 +71,7 @@ const OrgAdd = React.createClass({
                         <span>用户手机号码:</span>
                         <Input
                             value={this.state.mobile}
-                            onChange={(e) => { this.setState({ mobile : e.target.value }); }} />
+                            onChange={(e) => { this.setState({ mobile: e.target.value }); }} />
                     </div>
                     <div className='orgAdd-input'>
                         <span>公司名称:</span>
@@ -103,7 +103,7 @@ const OrgList = React.createClass({
                 email: this.state.searchEmail,
                 createTime: this.state.searchTime,
                 number: this.state.searchAftId, //阿凡提号
-                aftUsername: this.state.searchAftUsername,
+                unitName: this.state.searchUnitName,
                 auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
@@ -231,12 +231,12 @@ const OrgList = React.createClass({
         this.loadData();
     },
     reset() {
-        this.state.searchAftId = "";
-        this.state.searchLoginId = "";
-        this.state.searchAuditStatus = "";
-        this.state.searchAftUsername = "";
-        this.state.searchEmail = "";
-        this.state.searchTime = [,];
+        this.state.searchAftId = undefined;
+        this.state.searchLoginId = undefined;
+        this.state.searchAuditStatus = undefined;
+        this.state.searchUnitName = undefined;
+        this.state.searchEmail = undefined;
+        this.state.searchTime = [];
         this.loadData();
     },
     searchSwitch() {
@@ -269,8 +269,8 @@ const OrgList = React.createClass({
                             })
                         }
                     </Select>
-                    <Input placeholder="认证名称" value={this.state.searchAftUsername}
-                        onChange={(e) => { this.setState({ searchAftUsername: e.target.value }); }} />
+                    <Input placeholder="公司名称" value={this.state.searchUnitName}
+                        onChange={(e) => { this.setState({ searchUnitName: e.target.value }); }} />
                     <Input placeholder="联系方式" value={this.state.searchEmail}
                         onChange={(e) => { this.setState({ searchEmail: e.target.value }); }} />
                     <Button type="primary" onClick={this.search}>搜索</Button>
@@ -279,7 +279,9 @@ const OrgList = React.createClass({
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                         <p>
                             <span>注册时间:</span>
-                            <RangePicker value={[moment(this.state.searchTime[0]), moment(this.state.searchTime[1])]}
+                            <RangePicker
+                                allowClear={false}
+                                value={[moment(this.state.searchTime[0]), moment(this.state.searchTime[1])]}
                                 onChange={(data, dataString) => { this.setState({ searchTime: dataString }); }} />
                         </p>
                     </div>

+ 24 - 2
js/component/tools.js

@@ -14,7 +14,8 @@ import {
     annualReportStateList,
     cognizanceStateList,
     technologyStateList,
-    copyrightStateList
+    copyrightStateList,
+    vocations
 } from './dataDic.js';
 
 module.exports = {
@@ -119,7 +120,9 @@ module.exports = {
     getTime: function (e, t) {
         if (e && !t) {
             var d = new Date(e);
-            d = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " ";
+            d = d.getFullYear() + "-" +
+                ((d.getMonth() + 1) < 9 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)) + "-" +
+                (d.getDate() < 9 ? '0' + d.getDate() : d.getDate()) + " ";
             // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
             // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
             // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
@@ -305,5 +308,24 @@ module.exports = {
     companySearch(input, option) {
         return option.props.children.indexOf(input) >= 0
     },
+    getInUrgentTime(date, inUrgent) {
+        let now = new Date(date);
+        for (var i = 1; i <= inUrgent;) {
+            now.setDate(now.getDate() + 1);
+            if (!vocations[getKey(now)]) {
+                i++;
+            };
+        };
+        return now;
 
+        function getKey(date) {
+            var year = date.getFullYear(),
+                month = date.getMonth() + 1,
+                day = date.getDate();
+            year = "" + year;
+            month = (month > 9 ? "" : "0") + month;
+            day = (day > 9 ? "" : "0") + day;
+            return year + month + day;
+        }
+    }
 }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.10",
+  "version": "1.0.11",
   "description": "",
   "main": "index.js",
   "scripts": {