yee 7 éve%!(EXTRA string=óta)
szülő
commit
77b0e72d6f
25 módosított fájl, 2000 hozzáadás és 231 törlés
  1. 5 4
      js/component/account/services/cognizance.jsx
  2. 15 6
      js/component/account/services/content.jsx
  3. 391 0
      js/component/account/services/contract/contract.jsx
  4. 155 0
      js/component/account/services/contract/contract.less
  5. 351 0
      js/component/account/services/contract/contractAdd.jsx
  6. 686 0
      js/component/account/services/contract/contractDetail.jsx
  7. 5 4
      js/component/account/services/copyright/copyright.jsx
  8. 9 6
      js/component/account/services/leftTab.jsx
  9. 2 2
      js/component/account/services/patent.jsx
  10. 8 7
      js/component/account/services/technology.jsx
  11. 23 10
      js/component/manageCenter/servicesManage/contract/contract.jsx
  12. 3 0
      js/component/manageCenter/servicesManage/contract/contract.less
  13. 64 21
      js/component/manageCenter/servicesManage/contract/contractAdd.jsx
  14. 215 76
      js/component/manageCenter/servicesManage/contract/contractDetail.jsx
  15. 9 11
      js/component/manageCenter/servicesManage/copyright/copyright.jsx
  16. 9 12
      js/component/manageCenter/servicesManage/highTech/highTechApply.jsx
  17. 4 4
      js/component/manageCenter/servicesManage/highTech/highTechInfo.jsx
  18. 1 1
      js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx
  19. 15 17
      js/component/manageCenter/servicesManage/patent/comprehensive.jsx
  20. 6 6
      js/component/manageCenter/servicesManage/technology/applyChange.jsx
  21. 12 14
      js/component/manageCenter/servicesManage/technology/applyManage.jsx
  22. 2 2
      js/component/manageCenter/topTab.jsx
  23. 3 8
      js/component/manageCenter/userManage/orgList.jsx
  24. 2 7
      js/component/manageCenter/userManage/userList.jsx
  25. 5 13
      js/component/tools.js

+ 5 - 4
js/component/account/services/cognizance.jsx

@@ -752,9 +752,6 @@ const Cognizance = React.createClass({
             <div className="user-content" >
                 <div className="content-title">
                     <span>高企申请管理</span>
-                    <Button style={{ background: "#ea0862", border: "none", color: "#fff", float: "right" }}
-                        disabled={this.state.ButtonDisabled}
-                        onClick={this.addClick}>申请高企认定<Icon type="plus" /></Button>
                 </div>
                 <div className="user-search">
                     <p>
@@ -786,4 +783,8 @@ const Cognizance = React.createClass({
     }
 });
 
-export default Cognizance;
+export default Cognizance;
+
+// <Button style={{ background: "#ea0862", border: "none", color: "#fff", float: "right" }}
+//                         disabled={this.state.ButtonDisabled}
+//                         onClick={this.addClick}>申请高企认定<Icon type="plus" /></Button>

+ 15 - 6
js/component/account/services/content.jsx

@@ -2,23 +2,32 @@ import React from 'react';
 import '../content.less';
 import LeftTab from './leftTab.jsx';
 
-import Patent from './patent';
+import Contract from './contract/contract';
 
 const Content = React.createClass({
     getInitialState() {
         return {
             loading: false,
-            leftKey: 'patent',
-            component: Patent,
+            leftKey: 'contract',
+            component: Contract,
             userType: '0'
         };
     },
     handlekey(key) {
         switch (key) {
-            case 'patent':
+            case 'contract':
                 this.setState({
-                    component: Patent,
-                    leftKey: 'patent'
+                    component: Contract,
+                    leftKey: 'contract'
+                });
+                break;
+            case 'patent':
+                require.ensure([], () => {
+                    const Patent = require('./patent').default;
+                    this.setState({
+                        component: Patent,
+                        leftKey: 'patent'
+                    });
                 });
                 break;
             case 'cognizance':

+ 391 - 0
js/component/account/services/contract/contract.jsx

@@ -0,0 +1,391 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch, Modal } from 'antd';
+import { provinceArr, contractStateList, contractTypeList } from '../../../dataDic.js';
+import { getTime, companySearch, getContractState, getContractType, getInUrgentTime, getSearchUrl } from '../../../tools.js';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import ContractAdd from './contractAdd.jsx';
+import ContractDetail from './contractDetail.jsx';
+
+import moment from 'moment';
+import './contract.less';
+
+const Contract = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/contract/list",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                province: this.state.province,
+                uid: this.state.unitId,
+                type: this.state.contractType,
+                status: this.state.contractState,
+                startDateFormattedDate: this.state.startDateFormattedDate,
+                endDateFormattedDate: this.state.endDateFormattedDate,
+            },
+            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,
+                        type: thisdata.type,
+                        signDate: thisdata.signDate,
+                        founder: thisdata.founder,
+                        describe: thisdata.describe,
+                        status: thisdata.status,
+                        signDateFormattedDate: thisdata.signDateFormattedDate
+                    });
+                };
+                this.state.pagination.defaultCurrent = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                this.setState({
+                    dataSource: this.state.data,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getAuthorList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/contract/principal",
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    return;
+                };
+                let _me = this, theArr = [];
+                for (var item in data.data) {
+                    theArr.push(
+                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    authorOption: theArr
+                });
+            }.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 + "/api/admin/getUnitNames",
+            success: function (data) {
+                if (data.error.length || !data.data) {
+                    return;
+                };
+                let _me = this, theArr = [];
+                for (var item in data.data) {
+                    theArr.push(
+                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    companyOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getStateList() {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/contract/status",
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                };
+                let _me = this, theArr = [];
+                for (var item in data.data) {
+                    theArr.push(
+                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                    )
+                };
+                this.setState({
+                    statusOption: theArr
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            visible: false,
+            data: [],
+            loading: false,
+            showAdd: false,
+            showDesc: false,
+            searchMore: true,
+            startDateFormattedDate: [],
+            endDateFormattedDate: [],
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                }, {
+                    title: '省份',
+                    dataIndex: 'province',
+                    key: 'province',
+                }, {
+                    title: '公司名称',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '创建时间',
+                    dataIndex: 'signDateFormattedDate',
+                    key: 'signDateFormattedDate',
+                }, {
+                    title: '合同状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getContractState(text) }
+                }, {
+                    title: '合同类型',
+                    dataIndex: 'type',
+                    key: 'type',
+                    render: (text) => { return getContractType(text) }
+                }, {
+                    title: '创建人',
+                    dataIndex: 'founder',
+                    key: 'founder'
+                }, {
+                    title: '技术员',
+                    dataIndex: 'techPrincipal',
+                    key: 'techPrincipal',
+                }, {
+                    title: '描述',
+                    dataIndex: 'describe',
+                    key: 'describe',
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount() {
+        let _me = this, pArr = [], tArr = [], sArr = [];
+        provinceArr.map(function (item) {
+            pArr.push(
+                <Select.Option value={item} key={item}>{item}</Select.Option>
+            )
+        });
+        contractTypeList.map(function (item) {
+            tArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        contractStateList.map(function (item) {
+            sArr.push(
+                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
+            )
+        });
+        this.setState({
+            provinceOption: pArr,
+            typeOption: tArr,
+            stateOption: sArr
+        });
+        this.loadData();
+        this.getAuthorList();
+        this.getCompanyList();
+        this.getStateList();
+        // if (window.location.search) {
+        //     let theArr = getSearchUrl(window.location.search);
+        //     if (theArr.length > 1) {
+        //         let theObj = {};
+        //         theObj.id = theArr[0];
+        //         theObj.uid = theArr[1];
+        //         if (theObj.id != 'null' && theObj.uid != 'null') {
+        //             this.tableRowClick(theObj);
+        //         };
+        //     } else if (theArr.length == 1) {
+        //         this.state.unitName = theArr[0];
+        //     };
+        // };
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    addClick() {
+        this.setState({
+            showAdd: true
+        });
+    },
+    closeAdd(e, s) {
+        this.state.showAdd = e;
+        if (s) {
+            this.loadData();
+        };
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.province = undefined;
+        this.state.unitId = undefined;
+        this.state.contractState = undefined;
+        this.state.contractType = undefined;
+        this.state.startDateFormattedDate = [];
+        this.state.endDateFormattedDate = [];
+        this.loadData();
+    },
+    render() {
+        const { MonthPicker, RangePicker } = DatePicker;
+        return (
+            <div className="foster-box">
+                <div className="foster-content">
+                    <div className="content-title">
+                        <span>合同申请管理</span>
+                        <ContractAdd
+                            companyOption={this.state.companyOption}
+                            authorOption={this.state.authorOption}
+                            typeOption={this.state.typeOption}
+                            onClick={this.addClick}
+                            closeAdd={this.closeAdd} />
+                    </div>
+                    <div className="foster-query">
+                        <Select placeholder="选择省份"
+                            style={{ width: 100 }}
+                            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.unitId}
+                            showSearch
+                            filterOption={companySearch}
+                            onChange={(e) => { this.setState({ unitId: e }) }}>
+                            {this.state.companyOption}
+                        </Select>
+                        <Select placeholder="选择一个合同类型"
+                            style={{ width: 200 }}
+                            value={this.state.contractType}
+                            showSearch
+                            filterOption={companySearch}
+                            onChange={(e) => { this.setState({ contractType: e }) }}>
+                            {this.state.typeOption}
+                        </Select>
+                        <Select style={{ width: 120 }}
+                            value={this.state.searchStatus}
+                            onChange={(e) => { this.setState({ contractState: e }) }}
+                            placeholder="选择一个状态">
+                            {this.state.stateOption}
+                        </Select>
+                        <span>更多搜索  <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
+                        <Button type="primary" onClick={this.search}>搜索</Button>
+                        <Button onClick={this.reset}>重置</Button>
+                        <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                            <span>创建时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[this.state.startDateFormattedDate[0] ? moment(this.state.startDateFormattedDate[0]) : null,
+                                this.state.startDateFormattedDate[1] ? moment(this.state.startDateFormattedDate[1]) : null]}
+                                onChange={(date, dateString) => { this.setState({ startDateFormattedDate: dateString }) }} />
+                            <span>结束时间:</span>
+                            <RangePicker style={{ width: '240px' }}
+                                allowClear={false}
+                                value={[this.state.endDateFormattedDate[0] ? moment(this.state.endDateFormattedDate[0]) : null,
+                                this.state.endDateFormattedDate[1] ? moment(this.state.endDateFormattedDate[1]) : null]}
+                                onChange={(date, dateString) => { this.setState({ endDateFormattedDate: dateString }) }} />
+                        </div>
+                    </div>
+                    <div className="foster-table">
+                        <Spin spinning={this.state.loading}>
+                            <Table columns={this.state.columns}
+                                dataSource={this.state.dataSource}
+                                pagination={this.state.pagination}
+                                onRowClick={this.tableRowClick} />
+                        </Spin>
+                    </div>
+                    <ContractDetail
+                        data={this.state.RowData}
+                        authorOption={this.state.authorOption}
+                        statusOption={this.state.statusOption}
+                        showDesc={this.state.showDesc}
+                        closeDesc={this.closeDesc} />
+                </div >
+            </div>
+        );
+    }
+});
+
+export default Contract;

+ 155 - 0
js/component/account/services/contract/contract.less

@@ -0,0 +1,155 @@
+.foster-content {
+    padding: 20px;
+    background: #fff;
+    .content-title {
+        line-height: 32px;
+        >span {
+            color: #333;
+            font-size: 16px;
+            margin-bottom: 10px;
+        }
+    }
+    .foster-query {
+        margin-bottom: 10px;
+        >* {
+            margin-top: 10px;
+            margin-right: 20px;
+        }
+        .search-more {
+            margin-top: 0;
+            >span {
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+        }
+    }
+}
+
+.patent-addNew {
+    float: right;
+    margin-left: 20px;
+    button {
+        background: #ea0862;
+        color: #fff;
+        border: none;
+        border-radius: 4px;
+        padding: 6px 10px;
+        margin-left: 20px;
+    }
+    button:hover {
+        background: #ea0862;
+    }
+}
+
+.patent-content {
+    padding: 20px;
+    background: #fff;
+    .content-title {
+        height: 32px;
+        margin-bottom: 10px;
+        >span {
+            color: #333;
+            font-size: 16px;
+            margin-bottom: 10px;
+        }
+        .patent-addNew {
+            float: right;
+            margin-left: 20px;
+            button {
+                background: #ea0862;
+                color: #fff;
+                border: none;
+                border-radius: 4px;
+                padding: 6px 10px;
+            }
+        }
+    }
+    .patent-alert {
+        font-size: 14px;
+        padding: 8px 48px;
+        >i {
+            font-size: 19px;
+            top: 8px;
+        }
+    }
+    .patent-query {
+        margin-bottom: 10px;
+        >input {
+            width: 180px;
+            margin-right: 20px;
+        }
+        >div {
+            margin-right: 20px;
+        }
+        button {
+            margin-left: 20px;
+        }
+        >span {
+            margin-left: 20px;
+            >span {
+                margin-left: 10px;
+            }
+        }
+        .search-more {
+            >p {
+                margin-top: 10px;
+                >span {
+                    margin-right: 10px;
+                }
+            }
+            >div {
+                margin-top: 10px;
+                >div {
+                    margin-right: 20px;
+                }
+            }
+        }
+    }
+}
+
+#CopyrightDesc-form {
+    font-size: 12px;
+    .express-desc-row {
+        line-height: 30px;
+        margin-bottom: 10px;
+    }
+    .ant-form-item-control {
+        .ant-checkbox-wrapper {
+            margin-left: 34px;
+            margin-right: 20px;
+        }
+    }
+    .download-file {
+        a {
+            display: inline-block;
+            width: 80px;
+        }
+    }
+    .half-item {
+        float: left;
+        width: 50%;
+        height: 36px;
+        margin-bottom: 10px;
+        button {
+            margin-left: 20px
+        }
+    }
+    .third-item {
+        float: left;
+        width: 33%;
+        height: 36px;
+        margin-bottom: 10px;
+        >p {
+            line-height: 30px;
+        }
+    }
+    .item-title {
+        line-height: 30px;
+        font-size: 14px;
+        color: #666;
+    }
+    .form-title {
+        font-size: 16px;
+        color: #333;
+    }
+}

+ 351 - 0
js/component/account/services/contract/contractAdd.jsx

@@ -0,0 +1,351 @@
+import React from 'react';
+import { Icon, Modal, Button, Form, message, Input, Spin, Select, Checkbox, InputNumber } from 'antd';
+import './contract.less';
+import { companySearch } from '../../../tools.js';
+import ajax from 'jquery/src/ajax/xhr.js'
+import $ from 'jquery/src/ajax';
+
+const ContractAddFrom = Form.create()(React.createClass({
+    getContactsList(theUid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: theUid || this.state.uid
+            },
+            success: function (data) {
+                let theOption = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                };
+                for (let item in data.data) {
+                    let theData = data.data[item];
+                    theOption.push(
+                        <Select.Option value={item} key={theData}>{theData}</Select.Option>
+                    );
+                };
+                this.setState({
+                    contactsOption: theOption
+                });
+            }.bind(this),
+        });
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            companyOption: [],
+            accelerated: 0,
+            acceleratedDate: 0,
+            visible: "visible"
+        };
+    },
+    componentWillMount() {
+        let d = new Date(), _me = this, theArr = [];
+        d = d.getFullYear() - 1;
+        for (let i = d; i < d + 20; i++) {
+            theArr.push(
+                <Select.Option value={i.toString()} key={i}>{i}</Select.Option>
+            )
+        };
+        this.state.yearOption = theArr;
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.patentCheck = false;
+            this.state.copyrightCheck = false;
+            this.state.highTechCheck = false;
+            this.state.techProjectCheck = false;
+            this.props.form.resetFields();
+        };
+    },
+    handleSave(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (!values.uid || values.uid === "") {
+                message.warning('请先选择公司!');
+                return;
+            };
+            if (!err) {
+                this.props.spinState(true);
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + "/api/admin/contract/apply",
+                    data: {
+                        "uid": values.uid,
+                        "contacts": values.contacts, //联系人
+                        "type": values.type, //合同类型
+                        "depict": values.depict, // "合同描述",
+                        "patentNum": this.state.patentCheck ? values.patentNum : undefined,
+                        "copyrightNum": this.state.copyrightCheck ? values.copyrightNum : undefined,
+                        "cognizanceYear": this.state.highTechCheck ? values.cognizanceYear : undefined,
+                        "techProjectNum": this.state.techProjectCheck ? values.techProjectNum : undefined,
+                        "comment": values.comment //"备注"
+                    }
+                }).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);
+                }.bind(this));
+            }
+        });
+    },
+    handleSubmit() {
+        this.props.form.validateFields((err, values) => {
+            if (!values.uid || values.uid === "") {
+                message.warning('请先选择公司!');
+                return;
+            };
+            if (!err) {
+                this.props.spinState(true);
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + "/api/admin/contract/submit",
+                    data: {
+                        "uid": values.uid,
+                        "contacts": values.contacts, //联系人
+                        "type": values.type, //合同类型
+                        "depict": values.depict, // "合同描述",
+                        "patentNum": this.state.patentCheck ? values.patentNum : undefined,
+                        "copyrightNum": this.state.copyrightCheck ? values.copyrightNum : undefined,
+                        "cognizanceYear": this.state.highTechCheck ? values.cognizanceYear : undefined,
+                        "techProjectNum": this.state.techProjectCheck ? values.techProjectNum : undefined,
+                        "principals": values.principals,
+                        "comment": values.comment //"备注"
+                    }
+                }).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);
+                }.bind(this));
+            }
+        });
+    },
+    render() {
+        const FormItem = Form.Item;
+        const { getFieldDecorator } = this.props.form;
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 14 },
+        };
+        const _me = this;
+        return (
+            <Form horizontal onSubmit={this.handleSave} id="CopyrightDesc-form">
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="公司名称" >
+                        {getFieldDecorator('uid')(
+                            <Select
+                                placeholder="请选择公司"
+                                notFoundContent="未找到公司"
+                                style={{ width: 260 }}
+                                showSearch
+                                filterOption={companySearch}
+                                onSelect={(e, n) => { this.getContactsList(e); }}>
+                                {this.props.companyOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="联系人" >
+                        {getFieldDecorator('contacts')(
+                            <Select placeholder="请选择联系人"
+                                style={{ width: 260 }}
+                                notFoundContent="未获取到联系人列表">
+                                {this.state.contactsOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="合同类型" >
+                        {getFieldDecorator('type')(
+                            <Select placeholder="请选择合同类型"
+                                style={{ width: 260 }}>
+                                {this.props.typeOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                </div>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 19 }}
+                    label="合同描述" >
+                    {getFieldDecorator('depict')(
+                        <Input type="textarea"
+                            placeholder="多行输入"
+                            rows={4} />
+                    )}
+                </FormItem>
+                <div className="clearfix">
+                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                        <Checkbox checked={this.state.highTechCheck} onChange={(e) => {
+                            this.setState({ highTechCheck: e.target.checked });
+                        }}></Checkbox>
+                    </span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label={"高企申请"} >
+                        {getFieldDecorator('cognizanceYear')(
+                            <Select placeholder="请选择年份"
+                                style={{ width: 120 }}
+                                onSelect={(e, n) => { this.setState({ year: e }); }}>
+                                {this.state.yearOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                        <Checkbox checked={this.state.patentCheck} onChange={(e) => {
+                            this.setState({ patentCheck: e.target.checked });
+                        }}></Checkbox>
+                    </span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label={"专利申请"} >
+                        {getFieldDecorator('patentNum')(
+                            <InputNumber />
+                        )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                        <Checkbox checked={this.state.copyrightCheck} onChange={(e) => {
+                            this.setState({ copyrightCheck: e.target.checked });
+                        }}></Checkbox>
+                    </span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label={"软著申请"} >
+                        {getFieldDecorator('copyrightNum')(
+                            <InputNumber />
+                        )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
+                        <Checkbox checked={this.state.techProjectCheck} onChange={(e) => {
+                            this.setState({ techProjectCheck: e.target.checked });
+                        }}></Checkbox>
+                    </span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label={"科技项目申请"} >
+                        {getFieldDecorator('techProjectNum')(
+                            <InputNumber />
+                        )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label={"审核人"} >
+                        {getFieldDecorator('principals')(
+                            <Select
+                                placeholder="请选择审核人"
+                                notFoundContent="未找到"
+                                style={{ width: 260 }}
+                                showSearch
+                                multiple
+                                filterOption={companySearch} >
+                                {this.props.authorOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                </div>
+                <FormItem
+                    labelCol={{ span: 3 }}
+                    wrapperCol={{ span: 19 }}
+                    label="备注" >
+                    {getFieldDecorator('comment')(
+                        <Input type="textarea"
+                            placeholder="多行输入"
+                            rows={2} />
+                    )}
+                </FormItem>
+                <FormItem style={{ paddingLeft: '40px' }}>
+                    <Button className="set-submit" type="primary" htmlType="submit">保存草稿</Button>
+                    <Button onClick={this.handleSubmit} type="ghost" style={{ marginLeft: '20px' }}>提交</Button>
+                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
+                </FormItem>
+            </Form >
+        );
+    },
+}));
+
+
+
+const ContractAdd = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeAdd(false);
+    },
+    spinChange(e) {
+        this.setState({
+            loading: e
+        });
+    },
+    render() {
+        return (
+            <div className="patent-addNew">
+                <Button className="patent-addNew" type="primary" onClick={this.showModal}>申请合同<Icon type="plus" /></Button>
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <Modal title="申请新合同"
+                        visible={this.state.visible}
+                        onCancel={this.handleCancel}
+                        width='800px'
+                        footer=''
+                    >
+                        <ContractAddFrom
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            visible={this.state.visible}
+                            okClick={() => { this.props.closeAdd(false, true) }}
+                            companyOption={this.props.companyOption}
+                            authorOption={this.props.authorOption}
+                            typeOption={this.props.typeOption} />
+                    </Modal>
+                </Spin>
+            </div>
+        );
+    },
+});
+export default ContractAdd;

+ 686 - 0
js/component/account/services/contract/contractDetail.jsx

@@ -0,0 +1,686 @@
+import React from 'react';
+import { Icon, Modal, message, Spin, Input, Select, DatePicker, Button, Table, Form, Upload } from 'antd';
+import './contract.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import { copyrightStateList } from '../../../dataDic.js';
+import { companySearch, getCopyrightState, getPatentType, getPatentState, gethighTechState, getTechnologyState } from '../../../tools.js';
+
+const ContractDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            stateOption: [],
+            stateTable: [],
+            contactsOption: [],
+            stateColumns: [
+                {
+                    title: '申请状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getCopyrightState(text) }
+                }, {
+                    title: '处理时间',
+                    dataIndex: 'recordTimeFormattedDate',
+                    key: 'recordTimeFormattedDate',
+                }, {
+                    title: '负责人',
+                    dataIndex: 'principal',
+                    key: 'principal',
+                }, {
+                    title: '操作人',
+                    dataIndex: 'operator',
+                    key: 'operator',
+                }, {
+                    title: '备注',
+                    dataIndex: 'comment',
+                    key: 'comment',
+                }
+            ],
+            patentColumns: [
+                {
+                    title: '专利名称',
+                    dataIndex: 'patentName',
+                    key: 'patentName',
+                    width: 200
+                }, {
+                    title: '专利编号',
+                    dataIndex: 'patentNumber',
+                    key: 'patentNumber',
+                    width: 200
+                }, {
+                    title: '专利状态',
+                    dataIndex: 'patentState',
+                    key: 'patentState',
+                    render: text => { return getPatentState(text) },
+                    width: 120
+                }, {
+                    title: '专利类型',
+                    dataIndex: 'patentCatagory',
+                    key: 'patentCatagory',
+                    render: text => { return getPatentType(text) },
+                    width: 160
+                }, {
+                    title: '当前操作人',
+                    dataIndex: 'principal',
+                    key: 'principal',
+                    width: 200
+                }
+            ],
+            copyrightColumns: [
+                {
+                    title: '软著名称',
+                    dataIndex: 'copyrightName',
+                    key: 'copyrightName',
+                    width: 200
+                }, {
+                    title: '软著编号',
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                    width: 200
+                }, {
+                    title: '软著状态',
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getCopyrightState(text) },
+                    width: 120
+                }, {
+                    title: '加急天数',
+                    dataIndex: 'inUrgent',
+                    key: 'inUrgent',
+                    render: (text) => {
+                        switch (text) {
+                            case 0:
+                                return '不加急(45个工作日)';
+                            case 3:
+                                return '3个工作日';
+                            case 5:
+                                return '5个工作日';
+                            case 10:
+                                return '6-10个工作日';
+                            case 15:
+                                return '11-15个工作日';
+                            case 20:
+                                return '16-20个工作日';
+                            case 25:
+                                return '21-25个工作日';
+                            case 30:
+                                return '26-30个工作日';
+                            case 35:
+                                return '31-35个工作日';
+                        }
+                    },
+                    width: 220
+                }, {
+                    title: '当前操作人',
+                    dataIndex: 'principal',
+                    key: 'principal'
+                }
+            ],
+            highTechColumns: [
+                {
+                    title: '申请年份',
+                    dataIndex: 'year',
+                    key: 'year',
+                    width: 200
+                }, {
+                    title: '申请状态',
+                    dataIndex: 'state',
+                    key: 'state',
+                    render: (text) => { return gethighTechState(text) },
+                    width: 200
+                }, {
+                    title: '证书编号',
+                    dataIndex: 'certificateNumber',
+                    key: 'certificateNumber',
+                    width: 260
+                }, {
+                    title: '当前操作人',
+                    dataIndex: 'techPrincipal',
+                    key: 'techPrincipal',
+                    width: 200
+                }
+            ],
+            techProjectColumns: [
+                {
+                    title: '项目名称',
+                    dataIndex: 'projectName',
+                    key: 'projectName',
+                    width: 260
+                }, {
+                    title: '项目类型',
+                    dataIndex: 'projectCatagory',
+                    key: 'projectCatagory',
+                    width: 200
+                }, {
+                    title: '项目状态',
+                    dataIndex: 'state',
+                    key: 'state',
+                    render: text => { return getTechnologyState(text) },
+                    width: 120
+                }, {
+                    title: '技术领域',
+                    dataIndex: 'techField',
+                    key: 'techField',
+                    width: 200
+                }, {
+                    title: '当前操作人',
+                    dataIndex: 'principle',
+                    key: 'principle',
+                    width: 200
+                }
+            ]
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+        this.getContactsList();
+        this.loadColumnsData();
+    },
+    getContactsList(uid) {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/getContacts",
+            data: {
+                uid: uid || this.props.data.uid
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                };
+                this.setState({
+                    contactsList: data.data
+                });
+            }.bind(this),
+        });
+    },
+    loadData(id) {
+        this.setState({
+            loading: true
+        });
+        $.when($.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/log",
+            data: {
+                cid: id || this.props.data.id
+            }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/detail",
+            data: {
+                id: id || this.props.data.id
+            }
+        })).done((data1, data2) => {
+            let _me = this;
+            //状态流转table
+            this.state.stateTable = [];
+            if (data1[0].error && data1[0].error.length) {
+                message.warning(data1[0].error[0].message);
+            } else {
+                data1[0].data.map(function (item, i) {
+                    _me.state.stateTable.push({
+                        key: i,
+                        recordTimeFormattedDate: item.recordTimeFormattedDate,
+                        status: item.status,
+                        principal: item.principal,
+                        operator: item.operator,
+                        comment: item.comment
+                    });
+                });
+            };
+            //获取详细数据
+            if (!data2[0].data) {
+                if (data2[0].error && data2[0].error.length) {
+                    message.warning(data2[0].error[0].message);
+                };
+            } else {
+                let detailData = data2[0].data;
+                this.setState({
+                    data: detailData
+                });
+            };
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadColumnsData(id) {
+        this.setState({
+            loading: true
+        });
+        $.when($.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/techProject",
+            data: {
+                contractId: id || this.props.data.id
+            }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/cognizance",
+            data: {
+                contractId: id || this.props.data.id
+            }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/copyright",
+            data: {
+                contractId: id || this.props.data.id
+            }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/patent",
+            data: {
+                contractId: id || this.props.data.id
+            }
+        })).done((data1, data2, data3, data4) => {
+            let patentArr = [], techProjectArr = [], cognizanceArr = [], copyrightArr = [];
+            if (!data1[0].data) {
+                if (data1[0].error && data1[0].error.length) {
+                    message.warning(data1[0].error[0].message)
+                };
+            } else {
+                data1[0].data.map(function (item, i) {
+                    techProjectArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "projectName": item.projectName,  //项目名称
+                        "projectCatagory": item.projectCatagory, //项目类型
+                        "state": item.state,   //状态
+                        "techField": item.techField, //领域
+                        "principle": item.principle,  //当前负责人(技术员)
+                        "tableType": "techProject"
+                    });
+                });
+            };
+            if (!data2[0].data) {
+                if (data2[0].error && data2[0].error.length) {
+                    message.warning(data2[0].error[0].message)
+                };
+            } else {
+                data2[0].data.map(function (item, i) {
+                    cognizanceArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "year": item.year,
+                        "serialNumber": item.serialNumber,
+                        "state": item.state,   //状态
+                        "certificateNumber": item.certificateNumber,
+                        "techPrincipal": item.techPrincipal,  //当前负责人(技术员)
+                        "tableType": "cognizance"
+                    });
+                });
+            };
+            if (!data3[0].data) {
+                if (data3[0].error && data3[0].error.length) {
+                    message.warning(data3[0].error[0].message)
+                };
+            } else {
+                data3[0].data.map(function (item, i) {
+                    copyrightArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "copyrightName": item.copyrightName,  //项目名称
+                        "serialNumber": item.serialNumber,
+                        "state": item.state,   //状态
+                        "inUrgent": item.inUrgent, //加急天数
+                        "principal": item.principal,  //当前负责人(技术员)
+                        "tableType": "copyright"
+                    });
+                });
+            };
+            if (!data4[0].data) {
+                if (data4[0].error && data4[0].error.length) {
+                    message.warning(data4[0].error[0].message)
+                };
+            } else {
+                data4[0].data.map(function (item, i) {
+                    patentArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "patentName": item.patentName,  //项目名称
+                        "patentNumber": item.patentNumber, //专利号        
+                        "serialNumber": item.serialNumber, //编号
+                        "patentState": item.patentState,   //状态
+                        "patentCatagory": item.patentCatagory, //专利类别
+                        "principal": item.principal,  //当前负责人(技术员)
+                        "tableType": "patent"
+                    });
+                });
+            };
+            this.setState({
+                patentTableData: patentArr,
+                copyrightTableData: copyrightArr,
+                highTechTableData: cognizanceArr,
+                techProjectTableData: techProjectArr
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    foundHighTech() {
+        
+    },
+    foundPatent() {
+
+    },
+    foundCopyright() {
+
+    },
+    foundTechProject() {
+
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.loadData(nextProps.data.id);
+            this.loadColumnsData(nextProps.data.id);
+            this.getContactsList(nextProps.data.uid);
+        };
+    },
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (values.status || values.principal || values.recordTime || values.comment) {
+                if (!values.status || !values.principal || !values.recordTime) {
+                    message.warning("请填写完整的状态流转信息!");
+                    return;
+                };
+            };
+            if (!err) {
+                this.props.spinState(true);
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + "/api/admin/contract/circulation",
+                    data: {
+                        "cid": this.props.data.id,
+                        "comment": values.comment,
+                        "status": values.status,
+                        "principals": values.principals //流转分发人
+                    }
+                }).done(function (data) {
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.props.clickOk();
+                        this.props.form.resetFields();
+                        this.props.spinState(false);
+                    } else {
+                        message.warning(data.error[0].message);
+                        this.props.spinState(false);
+                    }
+                }.bind(this));
+            }
+        });
+    },
+    tableRowClick(record, index) {
+        switch (record.tableType) {
+            case 'patent':
+                window.open(globalConfig.context + "/admin/servicesManage/patent.html?contractId=" + record.contractId + "#comprehensive");
+                break;
+            case 'copyright':
+                window.open(globalConfig.context + "/admin/servicesManage/copyright.html?contractId=" + record.contractId + "#copyright");
+                break;
+            case 'cognizance':
+                window.open(globalConfig.context + "/admin/servicesManage/highTech.html?contractId=" + record.contractId + "#highTechApply");
+                break;
+            case 'techProject':
+                window.open(globalConfig.context + "/admin/servicesManage/technology.html?contractId=" + record.contractId + "#applyManage");
+                break;
+        };
+    },
+    render() {
+        const FormItem = Form.Item;
+        const { getFieldDecorator } = this.props.form;
+        const theData = this.state.data || {};
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 18 },
+        };
+        const _me = this;
+        return (
+            <Form onSubmit={this.handleSubmit} id="CopyrightDesc-form">
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="公司名称" >
+                        {getFieldDecorator('unitName')(
+                            <span>{theData.unitName}</span>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="组织机构代码" >
+                        {getFieldDecorator('orgCode')(
+                            <span>{theData.orgCode}</span>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="公司地址" >
+                        {getFieldDecorator('address')(
+                            <span>{theData.address}</span>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="联系人" >
+                        <span>{this.state.contactsList ? this.state.contactsList[theData.contacts] : ''}</span>
+                    </FormItem>
+                </div>
+                <p style={{ fontSize: '14px', color: '#333' }}>状态流转记录: </p>
+                <Table style={{ margin: '10px 0', background: "#eee" }}
+                    pagination={false}
+                    dataSource={this.state.stateTable}
+                    columns={this.state.stateColumns} />
+                <div className="clearfix" style={{ padding: '0 4px', paddingTop: '20px', marginBottom: '10px', background: '#eee' }}>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="状态流转"
+                    >
+                        {getFieldDecorator('status')(
+                            <Select
+                                style={{ width: 200 }}
+                                placeholder="选择一个状态">
+                                {this.props.statusOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="处理时间"
+                    >
+                        {getFieldDecorator('recordTime')(
+                            <DatePicker />
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="负责人"
+                    >
+                        {getFieldDecorator('principals')(
+                            <Select
+                                showSearch
+                                style={{ width: 200 }}
+                                filterOption={companySearch}
+                                placeholder="选择负责人">
+                                {this.props.authorOption}
+                            </Select>
+                        )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="备注">
+                        {getFieldDecorator('comment')(
+                            <Input />
+                        )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="高企申请">
+                        {getFieldDecorator('cognizanceYear', {
+                            initialValue: theData.cognizanceYear
+                        })(
+                            <span>{theData.cognizanceYear} 年</span>
+                            )}
+                        {theData.cognizanceStatus == 1 ? <Button onClick={this.foundHighTech}>创建申请</Button> : <span></span>}
+                    </FormItem>
+                </div>
+                <Table size="small" scroll={{ y: 500 }}
+                    columns={this.state.highTechColumns}
+                    dataSource={this.state.highTechTableData}
+                    pagination={false}
+                    onRowClick={this.tableRowClick} />
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="专利申请">
+                        {getFieldDecorator('patentNum', {
+                            initialValue: theData.patentNum
+                        })(
+                            <span>{theData.patentNum} 条</span>
+                            )}
+                        {theData.patentStatus == 1 ? <Button onClick={this.foundPatent}>创建申请</Button> : <span></span>}
+                    </FormItem>
+                </div>
+                <Table size="small" scroll={{ y: 500 }}
+                    columns={this.state.patentColumns}
+                    dataSource={this.state.patentTableData}
+                    pagination={false}
+                    onRowClick={this.tableRowClick} />
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="软著申请">
+                        {getFieldDecorator('copyrightNum', {
+                            initialValue: theData.copyrightNum
+                        })(
+                            <span>{theData.copyrightNum} 条</span>
+                            )}
+                        {theData.copyrightStatus == 1 ? <Button onClick={this.foundCopyright}>创建申请</Button> : <span></span>}
+                    </FormItem>
+                </div>
+                <Table size="small" scroll={{ y: 500 }}
+                    columns={this.state.copyrightColumns}
+                    dataSource={this.state.copyrightTableData}
+                    pagination={false}
+                    onRowClick={this.tableRowClick} />
+                <div className="clearfix">
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label=" 科技项目申请">
+                        {getFieldDecorator('techProjectNum', {
+                            initialValue: theData.techProjectNum
+                        })(
+                            <span>{theData.techProjectNum} 条</span>
+                            )}
+                        {theData.techProjectStatus == 1 ? <Button onClick={this.foundTechProject}>创建申请</Button> : <span></span>}
+                    </FormItem>
+                </div>
+                <Table size="small" scroll={{ y: 500 }}
+                    columns={this.state.techProjectColumns}
+                    dataSource={this.state.techProjectTableData}
+                    pagination={false}
+                    onRowClick={this.tableRowClick} />
+                <FormItem style={{ marginTop: '20px' }}>
+                    <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                    <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
+                </FormItem>
+            </Form>
+        );
+    }
+}));
+
+const ContractDetail = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleOk() {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false, true);
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    spinChange(e) {
+        this.setState({
+            loading: e
+        });
+    },
+    render() {
+        return (
+            <div className="patent-addNew">
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <Modal title="软著详情" visible={this.state.visible}
+                        onOk={this.handleOk} onCancel={this.handleCancel}
+                        width='1000px'
+                        footer=''
+                    >
+                        <ContractDetailForm
+                            visible={this.state.visible}
+                            authorOption={this.props.authorOption}
+                            statusOption={this.props.statusOption}
+                            data={this.props.data}
+                            spinState={this.spinChange}
+                            closeModal={this.handleCancel}
+                            clickOk={this.handleOk} />
+                    </Modal>
+                </Spin>
+            </div>
+        );
+    }
+});
+export default ContractDetail;

+ 5 - 4
js/component/account/services/copyright/copyright.jsx

@@ -232,9 +232,6 @@ const copyright = React.createClass({
                 <div className="foster-content">
                     <div className="content-title">
                         <span>软著申请管理</span>
-                        <PatentAdd
-                            onClick={this.addClick}
-                            closeAdd={this.closeAdd} />
                     </div>
                     <div className="foster-query">
                         <Input style={{ width: '160px' }}
@@ -287,4 +284,8 @@ const copyright = React.createClass({
     }
 });
 
-export default copyright;
+export default copyright;
+
+// <PatentAdd
+//     onClick={this.addClick}
+//     closeAdd={this.closeAdd} />

+ 9 - 6
js/component/account/services/leftTab.jsx

@@ -8,11 +8,11 @@ const MenuItemGroup = Menu.ItemGroup;
 const LeftTab = React.createClass({
     getInitialState() {
         return {
-            current: 'patent',
+            current: 'contract',
             subKey: 'sub1',
             keyList: [
-                { key: 'sub1', value: ['patent', 'copyright', 'intellectual'] },
-                { key: 'sub2', value: ['standard', 'activity', 'activityCostList', 'orgTechCenter', 'techProduct', 'ratepay', 'finance', 'achievement', 'honorList','annualReport','cognizance','companyDetail'] },
+                { key: 'sub1', value: ['contract', 'patent', 'copyright', 'intellectual'] },
+                { key: 'sub2', value: ['standard', 'activity', 'activityCostList', 'orgTechCenter', 'techProduct', 'ratepay', 'finance', 'achievement', 'honorList', 'annualReport', 'cognizance', 'companyDetail'] },
                 { key: 'sub3', value: ['technology'] }
             ]
         };
@@ -46,12 +46,15 @@ const LeftTab = React.createClass({
                 className="account-left"
                 mode="inline"
             >
-                <SubMenu key="sub1" title={<span>知识产权申请</span>}>
+                <SubMenu key="sub1" title={<span>知识产权管理</span>}>
+                    <Menu.Item key="contract">
+                        合同申请
+                    </Menu.Item>
                     <Menu.Item key="patent">
-                        专利申请
+                        专利管理
                     </Menu.Item>
                     <Menu.Item key="copyright">
-                        软著申请
+                        软著管理
                     </Menu.Item>
                     <Menu.Item key="intellectual">
                         知识产权管理

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

@@ -187,7 +187,6 @@ const Patent = React.createClass({
             <div className="patent-content" >
                 <div className="content-title">
                     <span>专利申请管理</span>
-                    {userData.type == '0' ? <span></span> : <PatentAdd ButtonDisabled={this.state.ButtonDisabled} closeDesc={this.closeDesc} />}
                 </div>
                 <div className="patent-query">
                     <Input placeholder="专利号" value={this.state.searchNum} onChange={(e) => { this.setState({ searchNum: e.target.value }); }} />
@@ -211,4 +210,5 @@ const Patent = React.createClass({
     }
 });
 
-export default Patent;
+export default Patent;
+//                    {userData.type == '0' ? <span></span> : <PatentAdd ButtonDisabled={this.state.ButtonDisabled} closeDesc={this.closeDesc} />}

+ 8 - 7
js/component/account/services/technology.jsx

@@ -240,12 +240,6 @@ const Technology = React.createClass({
             <div className="foster-content" >
                 <div className="content-title">
                     <span>科技项目申报管理</span>
-                    <div className="foster-query" style={{ float: "right" }}>
-                        <div>
-                            <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
-                                onClick={this.addClick}>申请新科技项目<Icon type="plus" /></Button>
-                        </div>
-                    </div>
                 </div>
                 <div className="patent-table">
                     <Spin spinning={this.state.loading}>
@@ -270,4 +264,11 @@ const Technology = React.createClass({
     }
 });
 
-export default Technology;
+export default Technology;
+
+// <div className="foster-query" style={{ float: "right" }}>
+//     <div>
+//         <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+//             onClick={this.addClick}>申请新科技项目<Icon type="plus" /></Button>
+//     </div>
+// </div>

+ 23 - 10
js/component/manageCenter/servicesManage/contract/contract.jsx

@@ -40,17 +40,20 @@ const Contract = React.createClass({
                     let thisdata = data.data.list[i];
                     this.state.data.push({
                         key: i,
+                        completeDate: thisdata.completeDate,
+                        completeDateFormattedDate: thisdata.completeDateFormattedDate,
+                        contacts: thisdata.contacts,
+                        depict: thisdata.depict,
+                        founder: thisdata.founder,
                         id: thisdata.id,
-                        uid: thisdata.uid,
                         province: thisdata.province,
-                        unitName: thisdata.unitName,
                         serialNumber: thisdata.serialNumber,
-                        type: thisdata.type,
                         signDate: thisdata.signDate,
-                        founder: thisdata.founder,
-                        describe: thisdata.describe,
+                        signDateFormattedDate: thisdata.signDateFormattedDate,
                         status: thisdata.status,
-                        signDateFormattedDate: thisdata.signDateFormattedDate
+                        type: thisdata.type,
+                        uid: thisdata.uid,
+                        unitName: thisdata.unitName,
                     });
                 };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
@@ -267,9 +270,15 @@ const Contract = React.createClass({
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
-        this.setState({
-            showDesc: true
-        });
+        if (record.status === '0') {
+            this.setState({
+                showAdd: true
+            });
+        } else {
+            this.setState({
+                showDesc: true
+            });
+        };
     },
     closeDesc(e, s) {
         this.state.showDesc = e;
@@ -283,7 +292,9 @@ const Contract = React.createClass({
         });
     },
     closeAdd(e, s) {
-        this.state.showAdd = e;
+        this.setState({
+            showAdd: e
+        });
         if (s) {
             this.loadData();
         };
@@ -316,7 +327,9 @@ const Contract = React.createClass({
                             companyOption={this.state.companyOption}
                             authorOption={this.state.authorOption}
                             typeOption={this.state.typeOption}
+                            data={this.state.RowData}
                             onClick={this.addClick}
+                            showAdd={this.state.showAdd}
                             closeAdd={this.closeAdd} />
                     </div>
                     <div className="foster-query">

+ 3 - 0
js/component/manageCenter/servicesManage/contract/contract.less

@@ -152,4 +152,7 @@
         font-size: 16px;
         color: #333;
     }
+    .contract-Table {
+        margin-bottom: 20px;
+    }
 }

+ 64 - 21
js/component/manageCenter/servicesManage/contract/contractAdd.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Modal, Button, Form, message, Input, Spin, Select, Checkbox, InputNumber } from 'antd';
+import { Icon, Modal, Button, Form, message, Input, Spin, Select, Checkbox, InputNumber, DatePicker } from 'antd';
 import './contract.less';
 import { companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js'
@@ -13,7 +13,7 @@ const ContractAddFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/getContacts",
             data: {
-                uid: theUid || this.state.uid
+                uid: theUid
             },
             success: function (data) {
                 let theOption = [];
@@ -53,6 +53,10 @@ const ContractAddFrom = Form.create()(React.createClass({
             )
         };
         this.state.yearOption = theArr;
+        if (this.props.data) {
+            this.getContactsList(this.props.data.uid);
+            this.state.data = this.props.data || {};
+        };
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
@@ -60,6 +64,10 @@ const ContractAddFrom = Form.create()(React.createClass({
             this.state.copyrightCheck = false;
             this.state.highTechCheck = false;
             this.state.techProjectCheck = false;
+            if (nextProps.data.uid) {
+                this.getContactsList(nextProps.data.uid);
+            };
+            this.state.data = nextProps.data || {};
             this.props.form.resetFields();
         };
     },
@@ -146,6 +154,7 @@ const ContractAddFrom = Form.create()(React.createClass({
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
+        const theData = this.state.data || {};
         const formItemLayout = {
             labelCol: { span: 6 },
             wrapperCol: { span: 14 },
@@ -157,8 +166,10 @@ const ContractAddFrom = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="公司名称" >
-                        {getFieldDecorator('uid')(
-                            <Select
+                        {getFieldDecorator('uid', {
+                            initialValue: theData.uid
+                        })(
+                            theData.uid ? <span>{theData.unitName}</span> : <Select
                                 placeholder="请选择公司"
                                 notFoundContent="未找到公司"
                                 style={{ width: 260 }}
@@ -167,39 +178,45 @@ const ContractAddFrom = Form.create()(React.createClass({
                                 onSelect={(e, n) => { this.getContactsList(e); }}>
                                 {this.props.companyOption}
                             </Select>
-                        )}
+                            )}
                     </FormItem>
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="联系人" >
-                        {getFieldDecorator('contacts')(
+                        {getFieldDecorator('contacts', {
+                            initialValue: theData.contacts
+                        })(
                             <Select placeholder="请选择联系人"
                                 style={{ width: 260 }}
                                 notFoundContent="未获取到联系人列表">
                                 {this.state.contactsOption}
                             </Select>
-                        )}
+                            )}
                     </FormItem>
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="合同类型" >
-                        {getFieldDecorator('type')(
+                        {getFieldDecorator('type', {
+                            initialValue: theData.type
+                        })(
                             <Select placeholder="请选择合同类型"
                                 style={{ width: 260 }}>
                                 {this.props.typeOption}
                             </Select>
-                        )}
+                            )}
                     </FormItem>
                 </div>
                 <FormItem
                     labelCol={{ span: 3 }}
                     wrapperCol={{ span: 19 }}
                     label="合同描述" >
-                    {getFieldDecorator('depict')(
+                    {getFieldDecorator('depict', {
+                        initialValue: theData.depict
+                    })(
                         <Input type="textarea"
                             placeholder="多行输入"
                             rows={4} />
-                    )}
+                        )}
                 </FormItem>
                 <div className="clearfix">
                     <span style={{ float: "left", lineHeight: '32px', marginLeft: '50px' }}>
@@ -210,13 +227,15 @@ const ContractAddFrom = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label={"高企申请"} >
-                        {getFieldDecorator('cognizanceYear')(
+                        {getFieldDecorator('cognizanceYear', {
+                            initialValue: theData.cognizanceYear
+                        })(
                             <Select placeholder="请选择年份"
                                 style={{ width: 120 }}
                                 onSelect={(e, n) => { this.setState({ year: e }); }}>
                                 {this.state.yearOption}
                             </Select>
-                        )}
+                            )}
                     </FormItem>
                 </div>
                 <div className="clearfix">
@@ -228,9 +247,11 @@ const ContractAddFrom = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label={"专利申请"} >
-                        {getFieldDecorator('patentNum')(
+                        {getFieldDecorator('patentNum', {
+                            initialValue: theData.patentNum
+                        })(
                             <InputNumber />
-                        )}
+                            )}
                     </FormItem>
                 </div>
                 <div className="clearfix">
@@ -242,9 +263,11 @@ const ContractAddFrom = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label={"软著申请"} >
-                        {getFieldDecorator('copyrightNum')(
+                        {getFieldDecorator('copyrightNum', {
+                            initialValue: theData.copyrightNum
+                        })(
                             <InputNumber />
-                        )}
+                            )}
                     </FormItem>
                 </div>
                 <div className="clearfix">
@@ -256,9 +279,11 @@ const ContractAddFrom = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label={"科技项目申请"} >
-                        {getFieldDecorator('techProjectNum')(
+                        {getFieldDecorator('techProjectNum', {
+                            initialValue: theData.techProjectNum
+                        })(
                             <InputNumber />
-                        )}
+                            )}
                     </FormItem>
                 </div>
                 <div className="clearfix">
@@ -277,16 +302,26 @@ const ContractAddFrom = Form.create()(React.createClass({
                             </Select>
                         )}
                     </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="处理时间"
+                    >
+                        {getFieldDecorator('recordTime')(
+                            <DatePicker />
+                        )}
+                    </FormItem>
                 </div>
                 <FormItem
                     labelCol={{ span: 3 }}
                     wrapperCol={{ span: 19 }}
                     label="备注" >
-                    {getFieldDecorator('comment')(
+                    {getFieldDecorator('comment', {
+                        initialValue: theData.comment
+                    })(
                         <Input type="textarea"
                             placeholder="多行输入"
                             rows={2} />
-                    )}
+                        )}
                 </FormItem>
                 <FormItem style={{ paddingLeft: '40px' }}>
                     <Button className="set-submit" type="primary" htmlType="submit">保存草稿</Button>
@@ -310,6 +345,7 @@ const ContractAdd = React.createClass({
     showModal() {
         this.setState({
             visible: true,
+            data: {}
         });
     },
     handleCancel(e) {
@@ -318,6 +354,12 @@ const ContractAdd = React.createClass({
         });
         this.props.closeAdd(false);
     },
+    componentWillReceiveProps(nextProps) {
+        if (nextProps.showAdd && nextProps.data) {
+            this.state.data = nextProps.data;
+        };
+        this.state.visible = nextProps.showAdd;
+    },
     spinChange(e) {
         this.setState({
             loading: e
@@ -338,6 +380,7 @@ const ContractAdd = React.createClass({
                             spinState={this.spinChange}
                             closeModal={this.handleCancel}
                             visible={this.state.visible}
+                            data={this.state.data}
                             okClick={() => { this.props.closeAdd(false, true) }}
                             companyOption={this.props.companyOption}
                             authorOption={this.props.authorOption}

+ 215 - 76
js/component/manageCenter/servicesManage/contract/contractDetail.jsx

@@ -43,45 +43,53 @@ const ContractDetailForm = Form.create()(React.createClass({
                 {
                     title: '专利名称',
                     dataIndex: 'patentName',
-                    key: 'patentName'
+                    key: 'patentName',
+                    width: 200
                 }, {
                     title: '专利编号',
                     dataIndex: 'patentNumber',
-                    key: 'patentNumber'
+                    key: 'patentNumber',
+                    width: 200
                 }, {
                     title: '专利状态',
                     dataIndex: 'patentState',
-                    key: 'patentName',
+                    key: 'patentState',
                     render: text => { return getPatentState(text) },
+                    width: 120
                 }, {
                     title: '专利类型',
-                    dataIndex: 'patentType',
-                    key: 'patentType',
+                    dataIndex: 'patentCatagory',
+                    key: 'patentCatagory',
                     render: text => { return getPatentType(text) },
+                    width: 160
                 }, {
                     title: '当前操作人',
-                    dataIndex: 'techPrincipal',
-                    key: 'techPrincipal'
+                    dataIndex: 'principal',
+                    key: 'principal',
+                    width: 200
                 }
             ],
             copyrightColumns: [
                 {
                     title: '软著名称',
                     dataIndex: 'copyrightName',
-                    key: 'copyrightName'
+                    key: 'copyrightName',
+                    width: 200
                 }, {
                     title: '软著编号',
-                    dataIndex: 'copyrightNumber',
-                    key: 'copyrightNumber'
+                    dataIndex: 'serialNumber',
+                    key: 'serialNumber',
+                    width: 200
                 }, {
                     title: '软著状态',
-                    dataIndex: 'copyrightState',
-                    key: 'copyrightName',
-                    render: (text) => { return getCopyrightState(text) }
+                    dataIndex: 'status',
+                    key: 'status',
+                    render: (text) => { return getCopyrightState(text) },
+                    width: 120
                 }, {
                     title: '加急天数',
-                    dataIndex: 'copyrightType',
-                    key: 'copyrightType',
+                    dataIndex: 'inUrgent',
+                    key: 'inUrgent',
                     render: (text) => {
                         switch (text) {
                             case 0:
@@ -103,55 +111,65 @@ const ContractDetailForm = Form.create()(React.createClass({
                             case 35:
                                 return '31-35个工作日';
                         }
-                    }
+                    },
+                    width: 220
                 }, {
                     title: '当前操作人',
-                    dataIndex: 'techPrincipal',
-                    key: 'techPrincipal'
+                    dataIndex: 'principal',
+                    key: 'principal'
                 }
             ],
             highTechColumns: [
                 {
                     title: '申请年份',
-                    dataIndex: 'highTechYear',
-                    key: 'highTechYear'
+                    dataIndex: 'year',
+                    key: 'year',
+                    width: 200
                 }, {
                     title: '申请状态',
-                    dataIndex: 'highTechState',
-                    key: 'highTechName',
-                    render: (text) => { return gethighTechState(text) }
+                    dataIndex: 'state',
+                    key: 'state',
+                    render: (text) => { return gethighTechState(text) },
+                    width: 200
                 }, {
                     title: '证书编号',
-                    dataIndex: 'highTechType',
-                    key: 'highTechType',
+                    dataIndex: 'certificateNumber',
+                    key: 'certificateNumber',
+                    width: 260
                 }, {
                     title: '当前操作人',
                     dataIndex: 'techPrincipal',
-                    key: 'techPrincipal'
+                    key: 'techPrincipal',
+                    width: 200
                 }
             ],
             techProjectColumns: [
                 {
                     title: '项目名称',
-                    dataIndex: 'techProjectName',
-                    key: 'techProjectName'
+                    dataIndex: 'projectName',
+                    key: 'projectName',
+                    width: 260
                 }, {
                     title: '项目类型',
-                    dataIndex: 'techProjectCatagory',
-                    key: 'techProjectCatagory'
+                    dataIndex: 'projectCatagory',
+                    key: 'projectCatagory',
+                    width: 200
                 }, {
                     title: '项目状态',
-                    dataIndex: 'techProjectState',
-                    key: 'techProjectState',
-                    render: text => { return getTechnologyState(text) }
+                    dataIndex: 'state',
+                    key: 'state',
+                    render: text => { return getTechnologyState(text) },
+                    width: 120
                 }, {
                     title: '技术领域',
-                    dataIndex: 'techProjectField',
-                    key: 'techProjectField'
+                    dataIndex: 'techField',
+                    key: 'techField',
+                    width: 200
                 }, {
                     title: '当前操作人',
-                    dataIndex: 'techPrincipal',
-                    key: 'techPrincipal'
+                    dataIndex: 'principle',
+                    key: 'principle',
+                    width: 200
                 }
             ]
         };
@@ -159,6 +177,7 @@ const ContractDetailForm = Form.create()(React.createClass({
     componentWillMount() {
         this.loadData();
         this.getContactsList();
+        this.loadColumnsData();
     },
     getContactsList(uid) {
         $.ajax({
@@ -191,9 +210,9 @@ const ContractDetailForm = Form.create()(React.createClass({
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/contract/logs",
+            url: globalConfig.context + "/api/admin/contract/log",
             data: {
-                id: id || this.props.data.id
+                cid: id || this.props.data.id
             }
         }), $.ajax({
             method: "get",
@@ -239,7 +258,7 @@ const ContractDetailForm = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    loadColumnsData() {
+    loadColumnsData(id) {
         this.setState({
             loading: true
         });
@@ -248,29 +267,126 @@ const ContractDetailForm = Form.create()(React.createClass({
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/contract/logs",
+            url: globalConfig.context + "/api/admin/contract/techProject",
             data: {
-                id: id || this.props.data.id
+                contractId: id || this.props.data.id
             }
         }), $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/getContacts",
+            url: globalConfig.context + "/api/admin/contract/cognizance",
             data: {
-                uid: uid || this.props.data.uid
+                contractId: id || this.props.data.id
             }
         }), $.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             cache: false,
-            url: globalConfig.context + "/api/admin/contract/detail",
+            url: globalConfig.context + "/api/admin/contract/copyright",
             data: {
-                id: id || this.props.data.id
+                contractId: id || this.props.data.id
+            }
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            cache: false,
+            url: globalConfig.context + "/api/admin/contract/patent",
+            data: {
+                contractId: id || this.props.data.id
             }
-        })).done(() => {
+        })).done((data1, data2, data3, data4) => {
+            let patentArr = [], techProjectArr = [], cognizanceArr = [], copyrightArr = [];
+            if (!data1[0].data) {
+                if (data1[0].error && data1[0].error.length) {
+                    message.warning(data1[0].error[0].message)
+                };
+            } else {
+                data1[0].data.map(function (item, i) {
+                    techProjectArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "projectName": item.projectName,  //项目名称
+                        "projectCatagory": item.projectCatagory, //项目类型
+                        "state": item.state,   //状态
+                        "techField": item.techField, //领域
+                        "principle": item.principle,  //当前负责人(技术员)
+                        "tableType": "techProject"
+                    });
+                });
+            };
+            if (!data2[0].data) {
+                if (data2[0].error && data2[0].error.length) {
+                    message.warning(data2[0].error[0].message)
+                };
+            } else {
+                data2[0].data.map(function (item, i) {
+                    cognizanceArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "year": item.year,
+                        "serialNumber": item.serialNumber,
+                        "state": item.state,   //状态
+                        "certificateNumber": item.certificateNumber,
+                        "techPrincipal": item.techPrincipal,  //当前负责人(技术员)
+                        "tableType": "cognizance"
+                    });
+                });
+            };
+            if (!data3[0].data) {
+                if (data3[0].error && data3[0].error.length) {
+                    message.warning(data3[0].error[0].message)
+                };
+            } else {
+                data3[0].data.map(function (item, i) {
+                    copyrightArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "copyrightName": item.copyrightName,  //项目名称
+                        "serialNumber": item.serialNumber,
+                        "state": item.state,   //状态
+                        "inUrgent": item.inUrgent, //加急天数
+                        "principal": item.principal,  //当前负责人(技术员)
+                        "tableType": "copyright"
+                    });
+                });
+            };
+            if (!data4[0].data) {
+                if (data4[0].error && data4[0].error.length) {
+                    message.warning(data4[0].error[0].message)
+                };
+            } else {
+                data4[0].data.map(function (item, i) {
+                    patentArr.push({
+                        "key": i,
+                        "id": item.id, //科技项目ID
+                        "uid": item.uid, //用户ID
+                        "contractId": item.contractId,  //合同ID
+                        "patentName": item.patentName,  //项目名称
+                        "patentNumber": item.patentNumber, //专利号        
+                        "serialNumber": item.serialNumber, //编号
+                        "patentState": item.patentState,   //状态
+                        "patentCatagory": item.patentCatagory, //专利类别
+                        "principal": item.principal,  //当前负责人(技术员)
+                        "tableType": "patent"
+                    });
+                });
+            };
+            this.setState({
+                patentTableData: patentArr,
+                copyrightTableData: copyrightArr,
+                highTechTableData: cognizanceArr,
+                techProjectTableData: techProjectArr
+            });
         }).always(function () {
             this.setState({
                 loading: false
@@ -281,7 +397,25 @@ const ContractDetailForm = Form.create()(React.createClass({
 
     },
     foundPatent() {
-
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/contract/createPatent",
+            data: {
+                id: this.props.data.id
+            },
+            success: function (data) {
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                        return;
+                    };
+                };
+                this.loadData();
+                this.loadColumnsData();
+            }.bind(this),
+        });
     },
     foundCopyright() {
 
@@ -292,6 +426,7 @@ const ContractDetailForm = Form.create()(React.createClass({
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id);
+            this.loadColumnsData(nextProps.data.id);
             this.getContactsList(nextProps.data.uid);
         };
     },
@@ -310,20 +445,12 @@ const ContractDetailForm = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admin/copyright/modify",
+                    url: globalConfig.context + "/api/admin/contract/circulation",
                     data: {
-                        "id": this.props.data.id,
-                        "contact": values.contact, // 联系人, 1,2,3
-                        //"copyrightInfo": values.copyrightInfo, // 软著简介,size 0-255
-                        "copyrightName": values.copyrightName, // 软著名称, size 0-60
-                        "copyrightNumber": values.copyrightNumber,
-                        "outsource": values.outsource, // 外包公司, size 0-60
-                        //"workIssue": values.workIssue, // 派单信息, size 0-128
-                        "inUrgent": values.inUrgent, //  加急天数,
-                        "status": values.status, // 状态
-                        "comment": values.comment, // 备注 size 0-128
-                        "recordTime": values.recordTime ? values.recordTime.format("YYYY-MM-DD HH:mm:ss") : undefined, // 状态修改时间 yyyy-MM-dd HH:mm:ss
-                        "principal": values.principal // 负责人id
+                        "cid": this.props.data.id,
+                        "comment": values.comment,
+                        "status": values.status,
+                        "principals": values.principals //流转分发人
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -339,6 +466,22 @@ const ContractDetailForm = Form.create()(React.createClass({
             }
         });
     },
+    tableRowClick(record, index) {
+        switch (record.tableType) {
+            case 'patent':
+                window.open(globalConfig.context + "/admin/servicesManage/patent.html?contractId=" + record.contractId + "#comprehensive");
+                break;
+            case 'copyright':
+                window.open(globalConfig.context + "/admin/servicesManage/copyright.html?contractId=" + record.contractId + "#copyright");
+                break;
+            case 'cognizance':
+                window.open(globalConfig.context + "/admin/servicesManage/highTech.html?contractId=" + record.contractId + "#highTechApply");
+                break;
+            case 'techProject':
+                window.open(globalConfig.context + "/admin/servicesManage/technology.html?contractId=" + record.contractId + "#applyManage");
+                break;
+        };
+    },
     render() {
         const FormItem = Form.Item;
         const { getFieldDecorator } = this.props.form;
@@ -375,11 +518,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                     <FormItem className="half-item"
                         {...formItemLayout}
                         label="联系人" >
-                        {(() => {
-                            if (this.state.contactsList && theData.contacts) {
-                                debugger
-                            }
-                        })()}
+                        <span>{this.state.contactsList ? this.state.contactsList[theData.contacts] : ''}</span>
                     </FormItem>
                 </div>
                 <p style={{ fontSize: '14px', color: '#333' }}>状态流转记录: </p>
@@ -412,7 +551,7 @@ const ContractDetailForm = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="负责人"
                     >
-                        {getFieldDecorator('principal')(
+                        {getFieldDecorator('principals')(
                             <Select
                                 showSearch
                                 style={{ width: 200 }}
@@ -439,10 +578,10 @@ const ContractDetailForm = Form.create()(React.createClass({
                         })(
                             <span>{theData.cognizanceYear} 年</span>
                             )}
-                        {theData.cognizanceStatus == 1 ? <Button onClick={this.foundHighTech}>创建申请</Button> : <span></span>}
                     </FormItem>
+                    {theData.cognizanceStatus == 0 ? <Button onClick={this.foundHighTech}>创建申请</Button> : <span></span>}
                 </div>
-                <Table size="small" scroll={{ y: 500 }}
+                <Table className="contract-Table" size="small" scroll={{ y: 500 }}
                     columns={this.state.highTechColumns}
                     dataSource={this.state.highTechTableData}
                     pagination={false}
@@ -456,10 +595,10 @@ const ContractDetailForm = Form.create()(React.createClass({
                         })(
                             <span>{theData.patentNum} 条</span>
                             )}
-                        {theData.patentStatus == 1 ? <Button onClick={this.foundPatent}>创建申请</Button> : <span></span>}
                     </FormItem>
+                    {theData.patentStatus == 0 ? <Button onClick={this.foundPatent}>创建申请</Button> : <span></span>}
                 </div>
-                <Table size="small" scroll={{ y: 500 }}
+                <Table className="contract-Table" size="small" scroll={{ y: 500 }}
                     columns={this.state.patentColumns}
                     dataSource={this.state.patentTableData}
                     pagination={false}
@@ -473,10 +612,10 @@ const ContractDetailForm = Form.create()(React.createClass({
                         })(
                             <span>{theData.copyrightNum} 条</span>
                             )}
-                        {theData.copyrightStatus == 1 ? <Button onClick={this.foundCopyright}>创建申请</Button> : <span></span>}
                     </FormItem>
+                    {theData.copyrightStatus == 0 ? <Button onClick={this.foundCopyright}>创建申请</Button> : <span></span>}
                 </div>
-                <Table size="small" scroll={{ y: 500 }}
+                <Table className="contract-Table" size="small" scroll={{ y: 500 }}
                     columns={this.state.copyrightColumns}
                     dataSource={this.state.copyrightTableData}
                     pagination={false}
@@ -490,10 +629,10 @@ const ContractDetailForm = Form.create()(React.createClass({
                         })(
                             <span>{theData.techProjectNum} 条</span>
                             )}
-                        {theData.techProjectStatus == 1 ? <Button onClick={this.foundTechProject}>创建申请</Button> : <span></span>}
                     </FormItem>
+                    {theData.techProjectStatus == 0 ? <Button onClick={this.foundTechProject}>创建申请</Button> : <span></span>}
                 </div>
-                <Table size="small" scroll={{ y: 500 }}
+                <Table className="contract-Table" size="small" scroll={{ y: 500 }}
                     columns={this.state.techProjectColumns}
                     dataSource={this.state.techProjectTableData}
                     pagination={false}
@@ -545,7 +684,7 @@ const ContractDetail = React.createClass({
                 <Spin spinning={this.state.loading} className='spin-box'>
                     <Modal title="软著详情" visible={this.state.visible}
                         onOk={this.handleOk} onCancel={this.handleCancel}
-                        width='800px'
+                        width='1000px'
                         footer=''
                     >
                         <ContractDetailForm

+ 9 - 11
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -338,19 +338,17 @@ const copyright = React.createClass({
         this.getCompanyList();
         this.getStateList();
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.id = theArr[0].value;
-                theObj.uid = theArr[1].value;
-                if (theObj.id != 'null' && theObj.uid != 'null') {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                if (theObj.rid != 'null' && theObj.uid != 'null') {
                     this.tableRowClick(theObj);
                 };
-            } else if (theArr.length == 1) {
-                if (theArr[0].key == 'uid') {
-                    this.state.unitName = theArr[0].value;
-                } else if (theArr[0].key == 'contractId ') {
-                    this.state.contractId = theArr[0].value;
+            } else {
+                if (theObj.uid) {
+                    this.state.unitName = theObj.uid;
+                } else if (theObj.contractId) {
+                    this.state.contractId = theObj.contractId;
                 };
             };
         };

+ 9 - 12
js/component/manageCenter/servicesManage/highTech/highTechApply.jsx

@@ -1080,20 +1080,17 @@ const Cognizance = React.createClass({
         this.getSalesmanList();
         this.getCompanyList();
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.cid = theArr[0].value;
-                theObj.uid = theArr[1].value;
-                theObj.year = theArr[2].value;
-                if (theObj.cid != 'null' && theObj.uid != 'null' && theObj.year != 'null') {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.cid = theObj.rid;
+                if (theObj.rid != 'null' && theObj.uid != 'null' && theObj.year != 'null') {
                     this.tableRowClick(theObj);
                 };
-            } else if (theArr.length == 1) {
-                if (theArr[0].key == 'uid') {
-                    this.state.unitName = theArr[0].value;
-                } else if (theArr[0].key == 'contractId ') {
-                    this.state.contractId = theArr[0].value;
+            } else {
+                if (theObj.uid) {
+                    this.state.unitName = theObj.uid;
+                } else if (theObj.contractId) {
+                    this.state.contractId = theObj.contractId;
                 };
             };
         };

+ 4 - 4
js/component/manageCenter/servicesManage/highTech/highTechInfo.jsx

@@ -1016,10 +1016,10 @@ const highTechInfo = React.createClass({
     },
     componentWillMount() {
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            this.loadInfoData(theArr[0].value);
-            this.loadHumanData(theArr[0].value);
-            this.loadLegalData(theArr[0].value);
+            let theObj = getSearchUrl(window.location.search);
+            this.loadInfoData(theObj.uid);
+            this.loadHumanData(theObj.uid);
+            this.loadLegalData(theObj.uid);
         };
     },
     render() {

+ 1 - 1
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -296,7 +296,7 @@ const PatentDesc = React.createClass({
         this.state.recordTime = undefined;
         this.state.comment = undefined;
         if (nextProps.data && !this.state.visible && nextProps.showDesc) {
-            this.state.xid = nextProps.data.pid;
+            this.state.xid = nextProps.data.id;
             this.loadData(nextProps.data.uid);
             this.getContactsList(nextProps.data.uid);
         };

+ 15 - 17
js/component/manageCenter/servicesManage/patent/comprehensive.jsx

@@ -44,7 +44,7 @@ const Patent = React.createClass({
                     let thisdata = data.data.list[i];
                     this.state.data.push({
                         key: i,
-                        pid: thisdata.id,
+                        id: thisdata.id,
                         oid: thisdata.oid,
                         uid: thisdata.uid,
                         number: thisdata.serialNumber || '',
@@ -114,7 +114,7 @@ const Patent = React.createClass({
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/getUnitNames",
-            data: { "pid": this.state.xid },
+            data: { "pid": this.state.data.id },
         }), $.ajax({
             method: "get",
             dataType: "json",
@@ -275,19 +275,17 @@ const Patent = React.createClass({
             )
         });
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.pid = theArr[0].value;
-                theObj.uid = theArr[1].value;
-                if (theObj.pid != 'null' && theObj.uid != 'null') {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                if (theObj.rid != 'null' && theObj.uid != 'null') {
                     this.tableRowClick(theObj);
                 };
-            } else if (theArr.length == 1) {
-                if (theArr[0].key == 'uid') {
-                    this.state.unitId = theArr[0].value;
-                } else if (theArr[0].key == 'contractId ') {
-                    this.state.contractId = theArr[0].value;
+            } else {
+                if (theObj.uid) {
+                    this.state.unitName = theObj.uid;
+                } else if (theObj.contractId) {
+                    this.state.contractId = theObj.contractId;
                 };
             };
         };
@@ -371,8 +369,8 @@ const Patent = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.pid) {
-                deletedIds.push(rowItem.pid)
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
             }
         }
         this.setState({
@@ -403,8 +401,8 @@ const Patent = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.pid) {
-                deletedIds.push(rowItem.pid)
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
             }
         }
         this.setState({

+ 6 - 6
js/component/manageCenter/servicesManage/technology/applyChange.jsx

@@ -16,7 +16,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/techproject/techProjectDetial",
             data: {
-                pid: id || this.props.data.pid
+                pid: id || this.props.data.id
             },
             success: function (data) {
                 if (!data.data) {
@@ -53,7 +53,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/techproject/techProjectLog",
             data: {
-                pid: id || this.props.data.pid
+                pid: id || this.props.data.id
             },
             success: function (data) {
                 if (!data.data) {
@@ -225,7 +225,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                     crossDomain: false,
                     url: globalConfig.context + "/api/admin/techproject/updateTechProject",
                     data: {
-                        id: this.props.data.pid,
+                        id: this.props.data.id,
                         uid: this.props.data.uid,
                         contacts: contacts,
                         department: values.department,
@@ -259,8 +259,8 @@ const ApplyChangeFrom = Form.create()(React.createClass({
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.state.fileList = [];
-            this.loadData(nextProps.data.pid);
-            this.getStateData(nextProps.data.pid);
+            this.loadData(nextProps.data.id);
+            this.getStateData(nextProps.data.id);
             this.getContactsList(nextProps.data.uid);
             this.getDepartmentList(nextProps.data.uid);
         };
@@ -458,7 +458,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                         <Upload
                             name="avatar"
                             action={globalConfig.context + "/api/admin/techproject/upload"}
-                            data={{ 'uid': this.props.data.uid, 'id': this.props.data.pid, 'sign': 'tech_project' }}
+                            data={{ 'uid': this.props.data.uid, 'id': this.props.data.id, 'sign': 'tech_project' }}
                             beforeUpload={beforeUploadFile}
                             fileList={this.state.fileList}
                             onChange={(info) => {

+ 12 - 14
js/component/manageCenter/servicesManage/technology/applyManage.jsx

@@ -47,7 +47,7 @@ const ApplyManage = React.createClass({
                     }
                     this.state.data.push({
                         key: i,
-                        pid: thisdata.id,
+                        id: thisdata.id,
                         uid: thisdata.uid,
                         serialNumber: thisdata.serialNumber,
                         province: thisdata.province,
@@ -300,19 +300,17 @@ const ApplyManage = React.createClass({
         this.getCompanyList();
         this.getConsultant();
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.pid = theArr[0].value;
-                theObj.uid = theArr[1].value;
-                if (theObj.pid != 'null' && theObj.uid != 'null') {
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.rid) {
+                theObj.id = theObj.rid;
+                if (theObj.rid != 'null' && theObj.uid != 'null') {
                     this.tableRowClick(theObj);
                 };
-            } else if (theArr.length == 1) {
-                if (theArr[0].key == 'uid') {
-                    this.state.unitName = theArr[0].value;
-                } else if (theArr[0].key == 'contractId ') {
-                    this.state.contractId = theArr[0].value;
+            } else {
+                if (theObj.uid) {
+                    this.state.unitName = theObj.uid;
+                } else if (theObj.contractId) {
+                    this.state.contractId = theObj.contractId;
                 };
             };
         };
@@ -333,8 +331,8 @@ const ApplyManage = React.createClass({
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
-            if (rowItem.pid) {
-                deletedIds.push(rowItem.pid)
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
             }
         }
         this.setState({

+ 2 - 2
js/component/manageCenter/topTab.jsx

@@ -58,9 +58,9 @@ const MessageModal = React.createClass({
                             case 4:
                                 return <a href={globalConfig.context + "/admin/servicesManage/technology.html?rid=" + record.rid + "&uid=" + record.uid + "#applyManage"}> {record.noticeTypeName} </a>;
                             case 5:
-                                return <a href={globalConfig.context + "/admin/userManage.html?uid=" + record.uid + "&type=0" + (window.showUserList ? "#userList" : "#customerList")}> {record.noticeTypeName} </a>;
+                                return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=0" + (window.showUserList ? "#userList" : "#customerList")}> {record.noticeTypeName} </a>;
                             case 6:
-                                return <a href={globalConfig.context + "/admin/userManage.html?uid=" + record.uid + "&type=1" + (window.showOrgList ? "#orgList" : "#customerList")}> {record.noticeTypeName} </a >;
+                                return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=1" + (window.showOrgList ? "#orgList" : "#customerList")}> {record.noticeTypeName} </a >;
                         }
                     }
                 }, {

+ 3 - 8
js/component/manageCenter/userManage/orgList.jsx

@@ -201,14 +201,9 @@ const OrgList = React.createClass({
     componentWillMount() {
         this.loadData();
         if (window.location.search) {
-            let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.id = theArr[0];
-                theObj.type = theArr[1];
-                if (theObj.id != 'null' && theObj.type != 'null') {
-                    this.tableRowClick(theObj);
-                };
+            let theObj = getSearchUrl(window.location.search);
+            if (theObj.id != 'null' && theObj.type != 'null') {
+                this.tableRowClick(theObj);
             };
         };
     },

+ 2 - 7
js/component/manageCenter/userManage/userList.jsx

@@ -189,13 +189,8 @@ const UserList = React.createClass({
         this.loadData();
         if (window.location.search) {
             let theArr = getSearchUrl(window.location.search);
-            if (theArr.length > 1) {
-                let theObj = {};
-                theObj.id = theArr[0];
-                theObj.type = theArr[1];
-                if (theObj.id != 'null' && theObj.type != 'null') {
-                    this.tableRowClick(theObj);
-                };
+            if (theObj.id != 'null' && theObj.type != 'null') {
+                this.tableRowClick(theObj);
             };
         };
     },

+ 5 - 13
js/component/tools.js

@@ -538,24 +538,16 @@ module.exports = {
     //获取window.location.search传的值
     getSearchUrl(e){
         let searchURL = e;
+        let theObj = {};
         searchURL = searchURL.substring(1, searchURL.length);
-        let theArr = [{
-            key:searchURL.split("&")[0].split("=")[0],
-            value:searchURL.split("&")[0].split("=")[1]
-        }];
+        theObj[searchURL.split("&")[0].split("=")[0]] = searchURL.split("&")[0].split("=")[1];        
         if ( searchURL.split("&")[1] ) {
-            theArr.push({
-                key:searchURL.split("&")[1].split("=")[0],
-                value:searchURL.split("&")[1].split("=")[1]
-            });
+            theObj[searchURL.split("&")[1].split("=")[0]] = searchURL.split("&")[1].split("=")[1];
             if ( searchURL.split("&")[2] ) {
-                theArr.push({
-                    key:searchURL.split("&")[2].split("=")[0],
-                    value:searchURL.split("&")[2].split("=")[1]
-                });
+                theObj[searchURL.split("&")[2].split("=")[0]] = searchURL.split("&")[2].split("=")[1];
             };
         };
-        return theArr;
+        return theObj;
     },
     //预览接口
     getPreview(id,url,sign,callback){