Browse Source

v.1.0.21 update

yee 8 years ago
parent
commit
6cb40063b8

+ 284 - 184
js/component/account/services/activity.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
+import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch, Form } from 'antd';
 import { technicalSourceList } from '../../dataDic.js';
 import { techFieldList } from '../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile } from '../../tools.js';
@@ -8,89 +8,89 @@ import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
-const ActivityDesc = React.createClass({
+
+const ActivityForm = Form.create()(React.createClass({
     getInitialState() {
         return {
-            visible: false,
-            loading: false,
             targetKeys: [],
             selectedKeys: []
         };
     },
-    handleOk() {
-        this.setState({
-            loading: true,
-        });
+    loadData(id) {
+        this.setState({ loading: true });
         $.ajax({
-            method: "POST",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/user/cognizance/activity",
+            url: globalConfig.context + "/api/user/cognizance/activityDetail",
             data: {
-                id: this.props.data.id,
-                activityName: this.state.activityName,
-                activityNumber: this.state.activityNumber,
-                startDateFormattedDate: this.state.startDateFormattedDate,
-                endDateFormattedDate: this.state.endDateFormattedDate,
-                technicalField1: this.state.techField[0],
-                technicalField2: this.state.techField[1],
-                technicalField3: this.state.techField[2],
-                technicalSource: this.state.technicalSource,
-                intellectualPropertyNumber: this.state.targetKeys.join(","),
-                budget: this.state.budget,
-                firstYearExpenditure: this.state.firstYearExpenditure,
-                secondYearExpenditure: this.state.secondYearExpenditure,
-                thirdYearExpenditure: this.state.thirdYearExpenditure,
-                implement: this.state.implement,
-                technologyInnovation: this.state.technologyInnovation,
-                achievement: this.state.achievement,
-                proofUrl: this.state.proofUrl,
-                projectMode: this.state.projectMode
+                id: id || this.props.data.id
             }
         }).done(function (data) {
-            if (!data.error.length) {
-                message.success('保存成功!');
-                this.setState({
-                    loading: false,
-                    visible: false
-                });
-                this.props.closeDesc(false);
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                };
             } else {
-                message.warning(data.error[0].message);
                 this.setState({
-                    loading: false
+                    data: data.data,
+                    targetKeys: data.data.intellectualPropertyNumber ? data.data.intellectualPropertyNumber.split(",") : [],
+                    techField: [Number(data.data.technicalField1), data.data.technicalField2 ? Number(data.data.technicalField2) : null, data.data.technicalField3 ? Number(data.data.technicalField3) : null]
                 });
             };
+        }.bind(this)).always(function (data) {
+            this.setState({ loading: false });
         }.bind(this));
     },
-    handleCancel(e) {
-        this.setState({
-            visible: false,
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({ loading: true });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + "/api/user/cognizance/activity",
+                    data: {
+                        id: this.props.data.id,
+                        uid: this.props.uid,
+                        activityName: values.activityName,
+                        activityNumber: values.activityNumber,
+                        projectMode: values.projectMode,
+                        startDateFormattedDate: values.startDate ? values.startDate.format("YYYY-MM-DD") : null,
+                        endDateFormattedDate: values.endDate ? values.endDate.format("YYYY-MM-DD") : null,
+                        technicalField1: values.techField[0],
+                        technicalField2: values.techField[1],
+                        technicalField3: values.techField[2],
+                        technicalSource: values.technicalSource,
+                        intellectualPropertyNumber: this.state.targetKeys.join(","),
+                        budget: values.budget,
+                        implement: values.implement,
+                        technologyInnovation: values.technologyInnovation,
+                        achievement: values.achievement,
+                        proofUrl: this.state.proofUrl
+                    }
+                }).done(function (data) {
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.props.closeModal(true);
+                    } else {
+                        message.warning(data.error[0].message);
+                    };
+                    this.setState({ loading: false });
+                }.bind(this));
+            }
         });
-        this.props.closeDesc(false);
+    },
+    componentWillMount() {
+        this.loadData();
     },
     componentWillReceiveProps(nextProps) {
-        this.state.visible = nextProps.showDesc;
-        if (!this.props.showDesc && nextProps.showDesc) {
-            this.state.id = nextProps.data.id;
-            this.state.activityName = nextProps.data.activityName;
-            this.state.activityNumber = nextProps.data.activityNumber;
-            this.state.startDateFormattedDate = nextProps.data.startDateFormattedDate;
-            this.state.endDateFormattedDate = nextProps.data.endDateFormattedDate;
-            this.state.techField = nextProps.data.techField;
-            this.state.technicalSource = nextProps.data.technicalSource;
-            this.state.targetKeys = nextProps.data.intellectualPropertyNumber || [];
-            this.state.budget = nextProps.data.budget;
-            this.state.firstYearExpenditure = nextProps.data.firstYearExpenditure;
-            this.state.secondYearExpenditure = nextProps.data.secondYearExpenditure;
-            this.state.thirdYearExpenditure = nextProps.data.thirdYearExpenditure;
-            this.state.implement = nextProps.data.implement;
-            this.state.technologyInnovation = nextProps.data.technologyInnovation;
-            this.state.achievement = nextProps.data.achievement;
+        if (!this.props.visible && nextProps.visible) {
             this.state.mockData = nextProps.data.mockData;
-            this.state.projectMode = nextProps.data.projectMode ? String(nextProps.data.projectMode) : undefined;
-            this.state.proofUrl = nextProps.data.proofUrl;
-            this.state.proofDownloadFileName = nextProps.data.proofDownloadFileName;
+            this.loadData(nextProps.data.id);
+            this.props.form.resetFields();
         };
     },
     intellectualChange(nextTargetKeys, direction, moveKeys) {
@@ -100,63 +100,108 @@ const ActivityDesc = React.createClass({
         this.setState({ selectedKeys: [...sourceSelectedKeys, ...targetSelectedKeys] });
     },
     render() {
-        if (this.props.data) {
+        const FormItem = Form.Item;
+        const { getFieldDecorator } = this.props.form;
+        const theData = this.state.data;
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        if (theData) {
             return (
-                <div className="admin-desc">
-                    <Modal title="企业研究开发活动情况详情" visible={this.state.visible} onCancel={this.handleCancel}
-                        width='800px' footer={[
-                            <Button key="submit" type="primary" size="large" loading={this.state.loading} onClick={this.handleOk}>保存</Button>,
-                            <Button key="back" type="ghost" size="large" onClick={this.handleCancel}>取消</Button>
-                        ]}
-                        className="admin-desc-content">
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <Form onSubmit={this.handleSubmit} id="admin-desc-content">
                         <div className="clearfix">
-                            <div className="half-div">
-                                <p>研发活动编号:</p>
-                                <Input value={this.state.activityNumber}
-                                    onChange={(e) => { this.setState({ activityNumber: e.target.value }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>研发活动名称:</p>
-                                <Input value={this.state.activityName}
-                                    onChange={(e) => { this.setState({ activityName: e.target.value }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>开始日期:</p>
-                                <DatePicker
-                                    value={this.state.startDateFormattedDate ? moment(this.state.startDateFormattedDate) : null}
-                                    onChange={(data, dataString) => { this.setState({ startDateFormattedDate: dataString }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>结束日期:</p>
-                                <DatePicker
-                                    value={this.state.endDateFormattedDate ? moment(this.state.endDateFormattedDate) : null}
-                                    onChange={(data, dataString) => { this.setState({ endDateFormattedDate: dataString }); }} />
-                            </div>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="研发活动编号"
+                            >
+                                {getFieldDecorator('activityNumber', {
+                                    initialValue: theData.activityNumber
+                                })(
+                                    <Input />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="研发活动名称"
+                            >
+                                {getFieldDecorator('activityName', {
+                                    initialValue: theData.activityName
+                                })(
+                                    <Input />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="开始日期"
+                            >
+                                {getFieldDecorator('startDate', {
+                                    initialValue: theData.startDateFormattedDate ? moment(theData.startDateFormattedDate) : null
+                                })(
+                                    <DatePicker />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="结束日期"
+                            >
+                                {getFieldDecorator('endDate', {
+                                    initialValue: theData.endDateFormattedDate ? moment(theData.endDateFormattedDate) : null
+                                })(
+                                    <DatePicker />
+                                    )}
+                            </FormItem>
                         </div>
-                        <div>
-                            <p>技术领域:</p>
-                            <Cascader
-                                style={{ width: 500 }}
-                                options={techFieldList}
-                                value={this.state.techField}
-                                onChange={(value, selectedOptions) => { this.setState({ techField: value }); console.log(value) }}
-                                placeholder="选择技术领域"
-                                showSearch
-                            />,
+                        <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="技术领域"
+                            >
+                                {getFieldDecorator('techField', {
+                                    initialValue: this.state.techField
+                                })(
+                                    <Cascader
+                                        style={{ width: 500 }}
+                                        options={techFieldList}
+                                        placeholder="选择技术领域"
+                                        showSearch
+                                    />
+                                    )}
+                            </FormItem>
                         </div>
-                        <div className="half-div">
-                            <p>技术来源:</p>
-                            <Select placeholder="选择技术来源" style={{ width: 230 }}
-                                value={this.state.technicalSource}
-                                onChange={(e) => { this.setState({ technicalSource: e }) }}>
-                                {
-                                    technicalSourceList.map(function (item, i) {
-                                        return <Select.Option key={1000 + i} value={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-                            </Select>
+                        <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="技术来源"
+                            >
+                                {getFieldDecorator('technicalSource', {
+                                    initialValue: theData.technicalSource ? String(theData.technicalSource) : undefined,
+                                })(
+                                    <Select placeholder="选择技术来源" style={{ width: 230 }}>
+                                        {
+                                            technicalSourceList.map(function (item, i) {
+                                                return <Select.Option key={1000 + i} value={item.value} >{item.key}</Select.Option>
+                                            })
+                                        }
+                                    </Select>
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="立项类型"
+                            >
+                                {getFieldDecorator('projectMode', {
+                                    initialValue: theData.projectMode
+                                })(
+                                    <Select style={{ width: 120 }}>
+                                        <Select.Option value='0'>内部立项</Select.Option>
+                                        <Select.Option value='1'>外部立项</Select.Option>
+                                    </Select>
+                                    )}
+                            </FormItem>
                         </div>
-                        <div style={{ marginTop: '10px' }}>
+                        <div style={{ marginBottom: '20px' }}>
                             <p>知识产权编号:</p>
                             <Transfer
                                 dataSource={this.props.mockData}
@@ -172,82 +217,88 @@ const ActivityDesc = React.createClass({
                                 render={item => `${item.name}-${item.key}`}
                             />
                         </div>
-                        <div>
-                            <p>研发经费总预算(万元):</p>
-                            <InputNumber value={this.state.budget || 0}
-                                onChange={(e) => { this.setState({ budget: e }); }} />
-                        </div>
+                        <FormItem className="half-div"
+                            labelCol={{ span: 8 }}
+                            wrapperCol={{ span: 12 }}
+                            label="研发经费总预算"
+                        >
+                            {getFieldDecorator('budget', {
+                                initialValue: theData.budget
+                            })(
+                                <InputNumber />
+                                )}
+                            <span>万元</span>
+                        </FormItem>
                         <div className="clearfix" >
-                            <p>研发经费近三年总支出(万元):</p>
-                            <div className="half-div">
-                                <span>总计(万元):</span>
-                                <InputNumber value={
-                                    this.state.firstYearExpenditure + this.state.secondYearExpenditure + this.state.thirdYearExpenditure || 0
-                                } />
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前一年):</span>
-                                <span>{this.state.firstYearExpenditure}
-                                </span>
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前二年):</span>
-                                <span>{this.state.secondYearExpenditure}
-                                </span>
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前三年):</span>
-                                <span>{this.state.thirdYearExpenditure}
-                                </span>
-                            </div>
+                            <p>研发经费近三年总支出:</p>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="总计"
+                            >
+                                <span>{
+                                    (theData.firstYearExpenditure || 0) +
+                                    (theData.secondYearExpenditure || 0) +
+                                    (theData.thirdYearExpenditure || 0)
+                                }</span>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前一年)"
+                            >
+                                <span>{theData.firstYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前二年)"
+                            >
+                                <span>{theData.secondYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前三年)"
+                            >
+                                <span>{theData.thirdYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
                         </div>
                         <div className="clearfix">
                             <div className="half-div">
                                 <p>目的及组织实施方式(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.implement}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ implement: e.target.value });
-                                    }} />
+                                {getFieldDecorator('implement', {
+                                    initialValue: theData.implement
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                             <div className="half-div">
                                 <p>核心技术及创新点(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.technologyInnovation}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ technologyInnovation: e.target.value });
-                                    }} />
+                                {getFieldDecorator('technologyInnovation', {
+                                    initialValue: theData.technologyInnovation
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                             <div className="half-div">
                                 <p>取得的阶段性成果(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.achievement}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ achievement: e.target.value });
-                                    }} />
+                                {getFieldDecorator('achievement', {
+                                    initialValue: theData.achievement
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                         </div>
-                        <Select style={{ width: 120 }}
-                            placeholder='请选择立项类型'
-                            value={this.state.projectMode}
-                            onChange={(e) => { this.setState({ projectMode: e }); }}>
-                            <Select.Option value='1'>内部立项</Select.Option>
-                            <Select.Option value='2'>外部立项</Select.Option>
-                        </Select>
                         <div style={{ width: '50%' }}>
                             <Upload
                                 name="ratepay"
-                                action={globalConfig.context + "/api/user/cognizance/uploadProof"}
-                                data={{ 'sign': 'proof' }}
+                                action={globalConfig.context + "/api/admin/uploadProof"}
+                                data={{ 'sign': 'proof', 'uid': this.props.uid }}
                                 beforeUpload={beforeUploadFile}
                                 showUploadList={false}
                                 onChange={(info) => {
@@ -269,17 +320,63 @@ const ActivityDesc = React.createClass({
                             >
                                 <Button><Icon type="upload" /> 上传立项证明材料 </Button>
                             </Upload>
-                            <p>{this.state.proofUrl ? <a onClick={newDownloadFile.bind(null, this.state.id, 'proof', '/api/user/cognizance/downloadProof')}>{this.state.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                            <p>{theData.proofUrl ? <a onClick={newDownloadFile.bind(null, theData.id, 'proof', '/api/admin/downloadProof')}>{theData.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                         </div>
-                    </Modal>
-                </div>
-            );
+                        <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 >
+                </Spin >
+            )
         } else {
-            return <div></div>
-        }
+            return (<div></div>)
+        };
+    }
+}));
+
+const ActivityDesc = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+        if (e) {
+            this.props.closeDesc(false, true);
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        return (
+            <div className="admin-desc">
+                <Modal title="企业研究开发活动情况详情"
+                    visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='800px'
+                    footer=''
+                    className="admin-desc-content">
+                    <ActivityForm
+                        visible={this.state.visible}
+                        data={this.props.data}
+                        uid={this.props.uid}
+                        mockData={this.props.mockData}
+                        spinState={this.spinChange}
+                        closeModal={this.handleCancel} />
+                </Modal>
+            </div>
+        );
     },
 });
 
+
 const Activity = React.createClass({
     loadData(pageNo) {
         this.state.data = [];
@@ -345,6 +442,7 @@ const Activity = React.createClass({
                     technicalField3: thisdata.technicalField3,
                     technicalSource: String(thisdata.technicalSource),
                     intellectualPropertyNumber: thisdata.intellectualPropertyNumber ? thisdata.intellectualPropertyNumber.split(",") : [],
+                    intellectualPropertyNumberText: thisdata.intellectualPropertyNumber,
                     budget: thisdata.budget,
                     firstYearExpenditure: thisdata.firstYearExpenditure,
                     secondYearExpenditure: thisdata.secondYearExpenditure,
@@ -421,8 +519,8 @@ const Activity = React.createClass({
                     render: (text) => { return getTechnicalSource(text) }
                 }, {
                     title: '知识产权编号',
-                    dataIndex: 'intellectualPropertyNumber',
-                    key: 'intellectualPropertyNumber'
+                    dataIndex: 'intellectualPropertyNumberText',
+                    key: 'intellectualPropertyNumberText'
                 }, {
                     title: '开始时间',
                     dataIndex: 'startDateFormattedDate',
@@ -477,9 +575,11 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e) {
+    closeDesc(e, s) {
         this.state.showDesc = e;
-        this.loadData();
+        if (s) {
+            this.loadData();
+        };
     },
     search() {
         this.loadData();

+ 1 - 1
js/component/account/services/technologyChange.jsx

@@ -85,7 +85,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             projectModeState: false,
             subsidyState: false,
             stateColumns: [{
-                title: '专利状态',
+                title: '科技项目状态',
                 dataIndex: 'state',
                 key: 'state',
                 render: (text) => { return getCognizanceState(text) }

+ 5 - 5
js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx

@@ -261,6 +261,11 @@ const CopyrightDescForm = Form.create()(React.createClass({
                             )}
                     </Col>
                 </Row>
+                <p>状态流转记录: </p>
+                <Table style={{ margin: '10px 0', background: "#eee" }}
+                    pagination={false}
+                    dataSource={this.state.stateTable}
+                    columns={this.state.stateColumns} />
                 <Row className="express-desc-row">
                     <Col span={4}>编号</Col>
                     <Col span={8}>{theData.serialNumber}</Col>
@@ -387,11 +392,6 @@ const CopyrightDescForm = Form.create()(React.createClass({
                     </Upload>
                     <p style={{ margin: '10px 0' }}>{theData.certificateUrl ? <a onClick={copyrightDownloadFile.bind(null, theData.id, 'copyright_auth', '/api/admin/copyright/download')}>软著证书</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                 </div>
-                <p>状态流转记录: </p>
-                <Table style={{ margin: '10px 0' }}
-                    pagination={false}
-                    dataSource={this.state.stateTable}
-                    columns={this.state.stateColumns} />
                 <div className="clearfix">
                     <FormItem className="third-item"
                         {...formItemLayout}

+ 16 - 2
js/component/manageCenter/servicesManage/copyright/copyright.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader, Switch } from 'antd';
 import { provinceArr, copyrightStateList } from '../../../dataDic.js';
-import { getTime, companySearch, getCopyrightState, getInUrgentTime } from '../../../tools.js';
+import { getTime, companySearch, getCopyrightState, getInUrgentTime, getSearchUrl } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import PatentAdd from './comPatentAdd.jsx';
@@ -64,7 +64,8 @@ const copyright = React.createClass({
                         thirdContact: thisdata.thirdContact,
                         authorizedDateFormattedDate: thisdata.authorizedDateFormattedDate,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        acceptTimeFormattedDate: thisdata.acceptTimeFormattedDate
+                        acceptTimeFormattedDate: thisdata.acceptTimeFormattedDate,
+                        founder: thisdata.founder
                     });
                 };
                 this.state.pagination.defaultCurrent = data.data.pageNo;
@@ -243,6 +244,10 @@ const copyright = React.createClass({
                         };
                         return;
                     }
+                }, {
+                    title: '创建人',
+                    dataIndex: 'founder',
+                    key: 'founder'
                 }
             ],
             dataSource: []
@@ -263,6 +268,15 @@ const copyright = React.createClass({
         this.loadData();
         this.getAuthorList();
         this.getCompanyList();
+        if (window.location.search) {
+            let theArr = getSearchUrl(window.location.search);
+            let theObj = {};
+            theObj.id = theArr[0];
+            theObj.uid = theArr[1];
+            if (theObj.id != 'null' && theObj.uid != 'null') {
+                this.tableRowClick(theObj);
+            };
+        };
     },
     tableRowClick(record, index) {
         this.state.RowData = record;

+ 279 - 208
js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch } from 'antd';
+import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber, Switch, Form } from 'antd';
 import { technicalSourceList } from '../../../../dataDic.js';
 import { techFieldList } from '../../../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, newDownloadFile, getProportion, saveProportion } from '../../../../tools.js';
@@ -7,113 +7,88 @@ import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
-const ActivityDesc = React.createClass({
+const ActivityForm = Form.create()(React.createClass({
     getInitialState() {
         return {
-            visible: false,
-            loading: false,
             targetKeys: [],
             selectedKeys: []
         };
     },
-    handleOk() {
-        this.setState({
-            loading: true,
-        });
+    loadData(id) {
+        this.setState({ loading: true });
         $.ajax({
-            method: "POST",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/activity",
+            url: globalConfig.context + "/api/admin/activityDetail",
             data: {
-                id: this.props.data.id,
-                uid: this.props.uid,
-                activityName: this.state.activityName,
-                activityNumber: this.state.activityNumber,
-                startDateFormattedDate: this.state.startDateFormattedDate,
-                endDateFormattedDate: this.state.endDateFormattedDate,
-                technicalField1: this.state.techField[0],
-                technicalField2: this.state.techField[1],
-                technicalField3: this.state.techField[2],
-                technicalSource: this.state.technicalSource,
-                intellectualPropertyNumber: this.state.targetKeys.join(","),
-                budget: this.state.budget,
-                firstYearExpenditure: this.state.firstYearExpenditure,
-                secondYearExpenditure: this.state.secondYearExpenditure,
-                thirdYearExpenditure: this.state.thirdYearExpenditure,
-                implement: this.state.implement,
-                technologyInnovation: this.state.technologyInnovation,
-                achievement: this.state.achievement,
-                proofUrl: this.state.proofUrl
-            },
-            success: function (data) {
-                if (data.data) {
-                    this.setState({
-                        id: this.props.data.id,
-                        activityName: this.state.activityName,
-                        activityNumber: this.state.activityNumber,
-                        startDateFormattedDate: this.state.startDateFormattedDate,
-                        endDateFormattedDate: this.state.endDateFormattedDate,
-                        techField: this.state.techField,
-                        technicalSource: this.state.technicalSource,
-                        intellectualPropertyNumber: this.state.targetKeys,
-                        budget: this.state.budget,
-                        firstYearExpenditure: this.state.firstYearExpenditure,
-                        secondYearExpenditure: this.state.secondYearExpenditure,
-                        thirdYearExpenditure: this.state.thirdYearExpenditure,
-                        implement: this.state.implement,
-                        technologyInnovation: this.state.technologyInnovation,
-                        achievement: this.state.achievement,
-                        projectMode: this.state.projectMode
-                    });
-                } else if (data.error.length && data.error[0].message) {
-                    message.warning(data.error[0].message);
-                }
-            }.bind(this),
+                id: id || this.props.data.id
+            }
         }).done(function (data) {
-            if (!data.error.length) {
-                message.success('保存成功!');
-                this.setState({
-                    loading: false,
-                    visible: false
-                });
-                this.props.closeDesc(false, true);
-            } else {
-                message.warning(data.error[0].message);
-                this.setState({
-                    loading: false
-                });
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                };
             };
+            this.setState({
+                data: data.data,
+                targetKeys: data.data.intellectualPropertyNumber ? data.data.intellectualPropertyNumber.split(",") : [],
+                techField: [Number(data.data.technicalField1), data.data.technicalField2 ? Number(data.data.technicalField2) : null, data.data.technicalField3 ? Number(data.data.technicalField3) : null]
+            });
+        }.bind(this)).always(function (data) {
+            this.setState({ loading: false });
         }.bind(this));
     },
-    handleCancel(e) {
-        this.setState({
-            visible: false,
+    handleSubmit(e) {
+        e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({ loading: true });
+                $.ajax({
+                    method: "POST",
+                    dataType: "json",
+                    crossDomain: false,
+                    url: globalConfig.context + "/api/admin/activity",
+                    data: {
+                        id: this.props.data.id,
+                        uid: this.props.uid,
+                        activityName: values.activityName,
+                        activityNumber: values.activityNumber,
+                        projectMode: values.projectMode,
+                        startDateFormattedDate: values.startDate ? values.startDate.format("YYYY-MM-DD") : null,
+                        endDateFormattedDate: values.endDate ? values.endDate.format("YYYY-MM-DD") : null,
+                        technicalField1: values.techField[0],
+                        technicalField2: values.techField[1],
+                        technicalField3: values.techField[2],
+                        technicalSource: values.technicalSource,
+                        intellectualPropertyNumber: this.state.targetKeys.join(","),
+                        budget: values.budget,
+                        implement: values.implement,
+                        technologyInnovation: values.technologyInnovation,
+                        achievement: values.achievement,
+                        proofUrl: this.state.proofUrl
+                    }
+                }).done(function (data) {
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.props.closeModal(true);
+                    } else {
+                        message.warning(data.error[0].message);
+                    };
+                    this.setState({ loading: false });
+                }.bind(this));
+            }
         });
-        this.props.closeDesc(false);
+    },
+    componentWillMount() {
+        this.loadData();
     },
     componentWillReceiveProps(nextProps) {
-        if (!this.state.showDesc && nextProps.showDesc) {
-            this.state.activityName = nextProps.data.activityName;
-            this.state.activityNumber = nextProps.data.activityNumber;
-            this.state.startDateFormattedDate = nextProps.data.startDateFormattedDate;
-            this.state.endDateFormattedDate = nextProps.data.endDateFormattedDate;
-            this.state.techField = nextProps.data.techField;
-            this.state.technicalSource = nextProps.data.technicalSource;
-            this.state.targetKeys = nextProps.data.intellectualPropertyNumber || [];
-            this.state.budget = nextProps.data.budget;
-            this.state.firstYearExpenditure = nextProps.data.firstYearExpenditure;
-            this.state.secondYearExpenditure = nextProps.data.secondYearExpenditure;
-            this.state.thirdYearExpenditure = nextProps.data.thirdYearExpenditure;
-            this.state.implement = nextProps.data.implement;
-            this.state.technologyInnovation = nextProps.data.technologyInnovation;
-            this.state.achievement = nextProps.data.achievement;
-            this.state.projectMode = nextProps.data.projectMode ? String(nextProps.data.projectMode) : undefined;
-            this.state.proofUrl = nextProps.data.proofUrl;
-            this.state.proofDownloadFileName = nextProps.data.proofDownloadFileName;
+        if (!this.props.visible && nextProps.visible) {
             this.state.mockData = nextProps.data.mockData;
+            this.loadData(nextProps.data.id);
+            this.props.form.resetFields();
         };
-        this.state.visible = nextProps.showDesc;
     },
     intellectualChange(nextTargetKeys, direction, moveKeys) {
         this.setState({ targetKeys: nextTargetKeys });
@@ -122,63 +97,108 @@ const ActivityDesc = React.createClass({
         this.setState({ selectedKeys: [...sourceSelectedKeys, ...targetSelectedKeys] });
     },
     render() {
-        if (this.props.data) {
+        const FormItem = Form.Item;
+        const { getFieldDecorator } = this.props.form;
+        const theData = this.state.data;
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        if (theData) {
             return (
-                <div className="admin-desc">
-                    <Modal title="企业研究开发活动情况详情" visible={this.state.visible} onCancel={this.handleCancel}
-                        width='800px' footer={[
-                            <Button key="submit" type="primary" size="large" loading={this.state.loading} onClick={this.handleOk}>保存</Button>,
-                            <Button key="back" type="ghost" size="large" onClick={this.handleCancel}>取消</Button>
-                        ]}
-                        className="admin-desc-content">
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <Form onSubmit={this.handleSubmit} id="admin-desc-content">
                         <div className="clearfix">
-                            <div className="half-div">
-                                <p>研发活动编号:</p>
-                                <Input value={this.state.activityNumber}
-                                    onChange={(e) => { this.setState({ activityNumber: e.target.value }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>研发活动名称:</p>
-                                <Input value={this.state.activityName}
-                                    onChange={(e) => { this.setState({ activityName: e.target.value }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>开始日期:</p>
-                                <DatePicker
-                                    value={this.state.startDateFormattedDate ? moment(this.state.startDateFormattedDate) : null}
-                                    onChange={(data, dataString) => { this.setState({ startDateFormattedDate: dataString }); }} />
-                            </div>
-                            <div className="half-div">
-                                <p>结束日期:</p>
-                                <DatePicker
-                                    value={this.state.endDateFormattedDate ? moment(this.state.endDateFormattedDate) : null}
-                                    onChange={(data, dataString) => { this.setState({ endDateFormattedDate: dataString }); }} />
-                            </div>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="研发活动编号"
+                            >
+                                {getFieldDecorator('activityNumber', {
+                                    initialValue: theData.activityNumber
+                                })(
+                                    <Input />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="研发活动名称"
+                            >
+                                {getFieldDecorator('activityName', {
+                                    initialValue: theData.activityName
+                                })(
+                                    <Input />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="开始日期"
+                            >
+                                {getFieldDecorator('startDate', {
+                                    initialValue: theData.startDateFormattedDate ? moment(theData.startDateFormattedDate) : null
+                                })(
+                                    <DatePicker />
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="结束日期"
+                            >
+                                {getFieldDecorator('endDate', {
+                                    initialValue: theData.endDateFormattedDate ? moment(theData.endDateFormattedDate) : null
+                                })(
+                                    <DatePicker />
+                                    )}
+                            </FormItem>
                         </div>
-                        <div>
-                            <p>技术领域:</p>
-                            <Cascader
-                                style={{ width: 500 }}
-                                options={techFieldList}
-                                value={this.state.techField}
-                                onChange={(value, selectedOptions) => { this.setState({ techField: value }); console.log(value) }}
-                                placeholder="选择技术领域"
-                                showSearch
-                            />,
+                        <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="技术领域"
+                            >
+                                {getFieldDecorator('techField', {
+                                    initialValue: this.state.techField
+                                })(
+                                    <Cascader
+                                        style={{ width: 500 }}
+                                        options={techFieldList}
+                                        placeholder="选择技术领域"
+                                        showSearch
+                                    />
+                                    )}
+                            </FormItem>
                         </div>
-                        <div className="half-div">
-                            <p>技术来源:</p>
-                            <Select placeholder="选择技术来源" style={{ width: 230 }}
-                                value={this.state.technicalSource}
-                                onChange={(e) => { this.setState({ technicalSource: e }) }}>
-                                {
-                                    technicalSourceList.map(function (item, i) {
-                                        return <Select.Option key={1000 + i} value={item.value} >{item.key}</Select.Option>
-                                    })
-                                }
-                            </Select>
+                        <div className="clearfix">
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="技术来源"
+                            >
+                                {getFieldDecorator('technicalSource', {
+                                    initialValue: theData.technicalSource ? String(theData.technicalSource) : undefined,
+                                })(
+                                    <Select placeholder="选择技术来源" style={{ width: 230 }}>
+                                        {
+                                            technicalSourceList.map(function (item, i) {
+                                                return <Select.Option key={1000 + i} value={item.value} >{item.key}</Select.Option>
+                                            })
+                                        }
+                                    </Select>
+                                    )}
+                            </FormItem>
+                            <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="立项类型"
+                            >
+                                {getFieldDecorator('projectMode', {
+                                    initialValue: theData.projectMode
+                                })(
+                                    <Select style={{ width: 120 }}>
+                                        <Select.Option value='0'>内部立项</Select.Option>
+                                        <Select.Option value='1'>外部立项</Select.Option>
+                                    </Select>
+                                    )}
+                            </FormItem>
                         </div>
-                        <div style={{ marginTop: '10px' }}>
+                        <div style={{ marginBottom: '20px' }}>
                             <p>知识产权编号:</p>
                             <Transfer
                                 dataSource={this.props.mockData}
@@ -194,77 +214,83 @@ const ActivityDesc = React.createClass({
                                 render={item => `${item.name}-${item.key}`}
                             />
                         </div>
-                        <div>
-                            <p>研发经费总预算(万元):</p>
-                            <InputNumber value={this.state.budget || 0}
-                                onChange={(e) => { this.setState({ budget: e }); }} />
-                        </div>
+                        <FormItem className="half-div"
+                            labelCol={{ span: 8 }}
+                            wrapperCol={{ span: 12 }}
+                            label="研发经费总预算"
+                        >
+                            {getFieldDecorator('budget', {
+                                initialValue: theData.budget
+                            })(
+                                <InputNumber />
+                                )}
+                            <span>万元</span>
+                        </FormItem>
                         <div className="clearfix" >
-                            <p>研发经费近三年总支出(万元):</p>
-                            <div className="half-div">
-                                <span>总计(万元):</span>
+                            <p>研发经费近三年总支出:</p>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="总计"
+                            >
                                 <span>{
-                                    (this.state.firstYearExpenditure || 0) +
-                                    (this.state.secondYearExpenditure || 0) +
-                                    (this.state.thirdYearExpenditure || 0)
+                                    (theData.firstYearExpenditure || 0) +
+                                    (theData.secondYearExpenditure || 0) +
+                                    (theData.thirdYearExpenditure || 0)
                                 }</span>
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前一年):</span>
-                                <span>{this.state.firstYearExpenditure}
-                                </span>
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前二年):</span>
-                                <span>{this.state.secondYearExpenditure}</span>
-                            </div>
-                            <div className="half-div">
-                                <span>其中(前三年):</span>
-                                <span>{this.state.thirdYearExpenditure}</span>
-                            </div>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前一年)"
+                            >
+                                <span>{theData.firstYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前二年)"
+                            >
+                                <span>{theData.secondYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
+                            <FormItem className="half-item"
+                                labelCol={{ span: 8 }}
+                                wrapperCol={{ span: 12 }}
+                                label="其中(前三年)"
+                            >
+                                <span>{theData.thirdYearExpenditure}</span>
+                                <span>万元</span>
+                            </FormItem>
                         </div>
                         <div className="clearfix">
                             <div className="half-div">
                                 <p>目的及组织实施方式(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.implement}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ implement: e.target.value });
-                                    }} />
+                                {getFieldDecorator('implement', {
+                                    initialValue: theData.implement
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                             <div className="half-div">
                                 <p>核心技术及创新点(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.technologyInnovation}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ technologyInnovation: e.target.value });
-                                    }} />
+                                {getFieldDecorator('technologyInnovation', {
+                                    initialValue: theData.technologyInnovation
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                             <div className="half-div">
                                 <p>取得的阶段性成果(限400字):</p>
-                                <Input type="textarea" rows={6}
-                                    value={this.state.achievement}
-                                    onChange={(e) => {
-                                        if (e.target.value.length > 400) {
-                                            return;
-                                        }
-                                        this.setState({ achievement: e.target.value });
-                                    }} />
+                                {getFieldDecorator('achievement', {
+                                    initialValue: theData.achievement
+                                })(
+                                    <Input type="textarea" rows={6} />
+                                    )}
                             </div>
                         </div>
-                        <Select style={{ width: 120 }}
-                            placeholder='请选择立项类型'
-                            value={this.state.projectMode}
-                            onChange={(e) => { this.setState({ projectMode: e }); }}>
-                            <Select.Option value='1'>内部立项</Select.Option>
-                            <Select.Option value='2'>外部立项</Select.Option>
-                        </Select>
                         <div style={{ width: '50%' }}>
                             <Upload
                                 name="ratepay"
@@ -291,14 +317,58 @@ const ActivityDesc = React.createClass({
                             >
                                 <Button><Icon type="upload" /> 上传立项证明材料 </Button>
                             </Upload>
-                            <p>{this.state.proofUrl ? <a onClick={newDownloadFile.bind(null, this.props.data.id, 'proof', '/api/admin/downloadProof')}>{this.state.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
+                            <p>{theData.proofUrl ? <a onClick={newDownloadFile.bind(null, theData.id, 'proof', '/api/admin/downloadProof')}>{theData.proofDownloadFileName}</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                         </div>
-                    </Modal>
-                </div>
-            );
+                        <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 >
+                </Spin >
+            )
         } else {
-            return <div></div>
-        }
+            return (<div></div>)
+        };
+    }
+}));
+
+const ActivityDesc = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        if (e) {
+            this.props.closeDesc(true);
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc;
+    },
+    render() {
+        return (
+            <div className="admin-desc">
+                <Modal title="企业研究开发活动情况详情"
+                    visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='800px'
+                    footer=''
+                    className="admin-desc-content">
+                    <ActivityForm
+                        visible={this.state.visible}
+                        data={this.props.data}
+                        uid={this.props.uid}
+                        mockData={this.props.mockData}
+                        spinState={this.spinChange}
+                        closeModal={this.handleCancel} />
+                </Modal>
+            </div>
+        );
     },
 });
 
@@ -371,6 +441,7 @@ const Activity = React.createClass({
                     technicalField3: thisdata.technicalField3,
                     technicalSource: thisdata.technicalSource ? String(thisdata.technicalSource) : undefined,
                     intellectualPropertyNumber: thisdata.intellectualPropertyNumber ? thisdata.intellectualPropertyNumber.split(",") : [],
+                    intellectualPropertyNumberText:thisdata.intellectualPropertyNumber,
                     budget: thisdata.budget,
                     firstYearExpenditure: thisdata.firstYearExpenditure,
                     secondYearExpenditure: thisdata.secondYearExpenditure,
@@ -449,8 +520,8 @@ const Activity = React.createClass({
                     render: (text) => { return getTechnicalSource(text) }
                 }, {
                     title: '知识产权编号',
-                    dataIndex: 'intellectualPropertyNumber',
-                    key: 'intellectualPropertyNumber'
+                    dataIndex: 'intellectualPropertyNumberText',
+                    key: 'intellectualPropertyNumberText'
                 }, {
                     title: '开始时间',
                     dataIndex: 'startDateFormattedDate',
@@ -505,9 +576,9 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    closeDesc(e, s) {
-        this.state.showDesc = e;
-        if (s) {
+    closeDesc(e) {
+        this.state.showDesc = false;
+        if (e) {
             this.loadData();
         };
     },

+ 24 - 4
js/component/manageCenter/servicesManage/highTech/highTechApply.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Icon, InputNumber, Form, Button, Input, Radio, Select, Spin, Table, DatePicker, message, Cascader, Modal } from 'antd';
 import { provinceArr, cognizanceStateList } from '../../../dataDic.js';
 import { techFieldList } from '../../../DicTechFieldList.js';
-import { getTime, getCognizanceState, companySearch } from '../../../tools.js';
+import { getTime, getCognizanceState, companySearch, getSearchUrl } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -306,6 +306,13 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                                 <span className="item-title">申请年份: </span>
                                 <span>{theData.year}</span>
                             </div>
+                        </div>
+                        <div className="form-title">状态流转记录: </div>
+                        <Table style={{ marginBottom: '20px', background: "#eee" }}
+                            pagination={false}
+                            dataSource={this.state.stateTable}
+                            columns={this.state.stateColumns} />
+                        <div className="clearfix">
                             <FormItem className="half-item"
                                 labelCol={{ span: 3 }}
                                 wrapperCol={{ span: 14 }}
@@ -449,8 +456,6 @@ const CognizanceDescFrom = Form.create()(React.createClass({
                                 </Radio.Group>
                                 )}
                         </FormItem>
-                        <div className="form-title">状态流转记录: </div>
-                        <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
                         <div className="clearfix">
                             <FormItem className="third-item"
                                 {...formItemLayout}
@@ -785,7 +790,8 @@ const Cognizance = React.createClass({
                         issuingDate: thisdata.issuingDate,
                         consultant: thisdata.consultant,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate,
-                        issuingDateFormattedDate: thisdata.issuingDateFormattedDate
+                        issuingDateFormattedDate: thisdata.issuingDateFormattedDate,
+                        founder: thisdata.founder
                     });
                 };
                 this.state.pagination.current = data.data.pageNo;
@@ -928,6 +934,10 @@ const Cognizance = React.createClass({
                     dataIndex: 'issuingDate',
                     key: 'issuingDate',
                     render: (text) => { return getTime(text, 36) }
+                }, {
+                    title: '创建人',
+                    dataIndex: 'founder',
+                    key: 'founder'
                 }
             ],
             dataSource: []
@@ -943,6 +953,16 @@ const Cognizance = React.createClass({
         this.loadData();
         this.getAuthorList();
         this.getCompanyList();
+        if (window.location.search) {
+            let theArr = getSearchUrl(window.location.search);
+            let theObj = {};
+            theObj.cid = theArr[0];
+            theObj.uid = theArr[1];
+            theObj.year = theArr[2];
+            if (theObj.cid != 'null' && theObj.uid != 'null' && theObj.year != 'null') {
+                this.tableRowClick(theObj);
+            };
+        };
         //        this.getContactsList();
     },
     tableRowClick(record, index) {

+ 22 - 46
js/component/manageCenter/servicesManage/patent/comPatentAdd.jsx

@@ -18,10 +18,17 @@ class Avatar extends React.Component {
             return;
         };
         if (info.file.status === 'done') {
-            // Get this url from response in real world.
+            if (!info.file.response.error.length) {
+                message.success(`${info.file.name} 文件上传成功!`);
+            } else {
+                message.warning(info.file.response.error[0].message);
+                return;
+            };
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
             this.props.urlData(info.file.response.data);
-        }
+        } else if (info.file.status === 'error') {
+            message.error(`${info.file.name} 文件上传失败。`);
+        };
     }
     render() {
         return (
@@ -123,11 +130,8 @@ const PatentAddFrom = Form.create()(React.createClass({
                         'firstInventorName': values.firstInventorName,
                         'patentDes': values.intro,
                         'secondInventorName': values.secondInventorName,
+                        'office': values.office,
                         'thirdInventorName': values.thirdInventorName,
-                        'office':values.office,
-                        //'firstInventorIsPublish': this.state.firstCheck,
-                        //'secondInventorIsPublish': this.state.secondCheck,
-                        //'thirdInventorIsPublish': this.state.thirdCheck,
                         'patentProryStatementUrl': this.state.avatarUrl
                     }
                 }).done(function (data) {
@@ -145,27 +149,6 @@ const PatentAddFrom = Form.create()(React.createClass({
             }
         });
     },
-    // firstInventorCheck(e) {
-    //     if (e.target.checked == true) {
-    //         this.state.firstCheck = 1;
-    //     } else if (e.target.checked == false) {
-    //         this.state.firstCheck = 0;
-    //     }
-    // },
-    // secondInventorCheck(e) {
-    //     if (e.target.checked == true) {
-    //         this.state.secondCheck = 1;
-    //     } else if (e.target.checked == false) {
-    //         this.state.secondCheck = 0;
-    //     };
-    // },
-    // thirdInventorCheck(e) {
-    //     if (e.target.checked == true) {
-    //         this.state.thirdCheck = 1;
-    //     } else if (e.target.checked == false) {
-    //         this.state.thirdCheck = 0;
-    //     };
-    // },
     avatarUrl(e) {
         this.state.avatarUrl = e;
     },
@@ -212,17 +195,6 @@ const PatentAddFrom = Form.create()(React.createClass({
                         )}
                 </FormItem>
                 <FormItem
-                    {...formItemLayout}
-                    label="事务所"
-                >
-                    {getFieldDecorator('office', {
-                        rules: [{ required: true, message: '请填写一个事务所!' }],
-                        initialValue: this.state.office || null
-                    })(
-                        <Input />
-                        )}
-                </FormItem>
-                <FormItem
                     labelCol={{ span: 24 }}
                     wrapperCol={{ span: 18 }}
                     label="专利简要描述"
@@ -235,26 +207,30 @@ const PatentAddFrom = Form.create()(React.createClass({
                             rows={6} />
                         )}
                 </FormItem>
+                <FormItem
+                    {...formItemLayout}
+                    label="事务所"
+                >
+                    {getFieldDecorator('office')(
+                        <Input className="mini-input" />
+                    )}
+                </FormItem>
                 <p>第一发明人</p>
                 <FormItem
                     {...formItemLayout}
                     label="姓名"
                 >
-                    {getFieldDecorator('firstInventorName', {
-                        rules: [{ required: true, message: '请输入姓名!' }]
-                    })(
+                    {getFieldDecorator('firstInventorName')(
                         <Input className="mini-input" />
-                        )}
+                    )}
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
                     label="身份证"
                 >
-                    {getFieldDecorator('firstInventorID', {
-                        rules: [{ required: true, message: '请输入身份证号!' }]
-                    })(
+                    {getFieldDecorator('firstInventorID')(
                         <Input className="mini-input" />
-                        )}
+                    )}
                 </FormItem>
                 <p>第二发明人</p>
                 <FormItem

+ 22 - 47
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -53,8 +53,6 @@ const PatentDesc = React.createClass({
             loading: false,
             patentTypeOption: [],
             patentFieldOption: [],
-            patentStateOption: [],
-            adminOption: [],
             stateTable: [],
             stateColumns: [{
                 title: '申请状态',
@@ -96,20 +94,12 @@ const PatentDesc = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/admin/patent/logs",
             data: { pid: this.state.xid }
-        }), $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/patent/getPrincipal"
-        }), $.ajax({
-            method: "get",
-            dataType: "json",
-            crossDomain: false,
-            url: globalConfig.context + "/api/admin/patent/patentStatus"
-        })).done((data1, data2, data3, data4) => {
+        })).done((data1, data2) => {
             let _me = this;
-            if (data1[0].error.length) {
-                message.warning(data1[0].error[0].message);
+            if (!data1[0].data) {
+                if (data1[0].error.length) {
+                    message.warning(data1[0].error[0].message);
+                };
             } else {
                 this.state.data = data1[0].data;
                 this.state.patentDes = data1[0].data.patentDes;
@@ -123,8 +113,10 @@ const PatentDesc = React.createClass({
                 this.state.uid = data1[0].data.uid;
                 this.state.id = data1[0].data.id;
             };
-            if (data2[0].error.length) {
-                message.warning(data2[0].error[0].message);
+            if (!data2[0].data) {
+                if (data2[0].error.length) {
+                    message.warning(data2[0].error[0].message);
+                };
             } else {
                 _me.state.stateTable = [];
                 data2[0].data.map(function (item) {
@@ -140,27 +132,6 @@ const PatentDesc = React.createClass({
                     });
                 });
             };
-            if (data3[0].error.length) {
-                message.warning(data3[0].error[0].message);
-            } else {
-                for (var item in data3[0].data) {
-                    _me.state.adminOption.push(
-                        <Select.Option value={item} key={item}>{data3[0].data[item]}</Select.Option>
-                    )
-                };
-            };
-            if (!data4[0].data) {
-                if (data4[0].error && data4[0].error.length) {
-                    message.warning(data4[0].error[0].message);
-                };
-            } else {
-                _me.state.patentStateOption = [];
-                for (var item in data4[0].data) {
-                    _me.state.patentStateOption.push(
-                        <Select.Option value={item} key={item}>{data4[0].data[item]}</Select.Option>
-                    )
-                };
-            };
         }).always(function () {
             this.setState({
                 loading: false
@@ -274,7 +245,6 @@ const PatentDesc = React.createClass({
         this.state.adminName = undefined;
         this.state.recordTime = undefined;
         this.state.comment = undefined;
-        this.state.adminOption = [];
         if (nextProps.data && !this.state.visible && nextProps.showDesc) {
             this.state.xid = nextProps.data.pid;
             this.loadData();
@@ -329,6 +299,12 @@ const PatentDesc = React.createClass({
                                     </Select>
                                 </div>
                             </div>
+                            <p>专利状态流转记录:</p>
+                            <Table
+                                style={{ margin: '10px 0', background: "#eee" }}
+                                pagination={false}
+                                dataSource={this.state.stateTable}
+                                columns={this.state.stateColumns} />
                             <div>
                                 <p className="widthHalf"><span>事务所:</span><Input value={this.state.office} onChange={(e) => { this.setState({ office: e.target.value }); }} /></p>
                             </div>
@@ -414,15 +390,14 @@ const PatentDesc = React.createClass({
                             </div>
                             <div className="avatar-text"><span>专利稿件上传</span><span>授权通知书上传</span><span>专利证书上传</span></div>
                             <div className="clearfix">
-                                <p>专利状态流转记录:</p>
-                                <Table
-                                    style={{ margin: '10px 0' }}
-                                    pagination={false}
-                                    dataSource={this.state.stateTable}
-                                    columns={this.state.stateColumns} />
                                 <div className="widthThird">
                                     <span>状态流转:</span>
-                                    <Select placeholder='请选择状态' value={this.state.patentStateAdd} style={{ width: 150 }} onChange={(e) => { this.setState({ patentStateAdd: e }); }}>{this.state.patentStateOption}</Select>
+                                    <Select placeholder='请选择状态'
+                                        value={this.state.patentStateAdd}
+                                        style={{ width: 150 }}
+                                        onChange={(e) => { this.setState({ patentStateAdd: e }); }}>
+                                        {this.props.patentStateOption}
+                                    </Select>
                                 </div>
                                 <p className="widthThird">
                                     <span>处理时间:</span>
@@ -437,7 +412,7 @@ const PatentDesc = React.createClass({
                                         value={this.state.adminName}
                                         style={{ width: 150 }}
                                         onChange={(e) => { this.setState({ adminName: e }); }}>
-                                        {this.state.adminOption}
+                                        {this.props.adminOption}
                                     </Select>
                                 </div>
                             </div>

+ 160 - 20
js/component/manageCenter/servicesManage/patent/comprehensive.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, DatePicker, message, Upload } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, Switch, DatePicker, message, Upload, Modal } from 'antd';
 import { patentTypeList, patentStateList, provinceArr } from '../../../dataDic.js';
-import { getTime, getPatentState, beforeUploadFile, companySearch } from '../../../tools.js';
+import { getTime, getPatentState, beforeUploadFile, companySearch, getSearchUrl } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
@@ -86,7 +86,8 @@ const Patent = React.createClass({
                         createTime: thisdata.createTime,   //派单日
                         author: thisdata.author, //撰写人
                         office: thisdata.office, //事务所
-                        principal: thisdata.principal //负责人
+                        principal: thisdata.principal, //负责人
+                        founder: thisdata.founder //创建人
                     });
                 };
                 this.state.pagination.current = data.data.pageNo;
@@ -102,26 +103,63 @@ const Patent = React.createClass({
             });
         }.bind(this));
     },
-    getCompanyList() {
+    getOptionList() {
         this.setState({
             loading: true
         });
-        $.ajax({
+        $.when($.ajax({
             method: "get",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/getUnitNames",
-            success: function (data) {
-                if (data.error.length || !data.data) {
-                    return;
+            data: { "pid": this.state.xid },
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/patent/getPrincipal"
+        }), $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/patent/patentStatus"
+        })).done((data1, data2, data3) => {
+            let _me = this;
+            if (!data1[0].data) {
+                if (data1[0].error.length) {
+                    message.warning(data1[0].error[0].message);
                 };
-                let _me = this;
-                for (var item in data.data) {
+            } else {
+                for (var item in data1[0].data) {
                     _me.state.companyOption.push(
-                        <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
+                        <Select.Option value={item} key={item}>{data1[0].data[item]}</Select.Option>
                     )
                 };
-            }.bind(this),
+            };
+            if (!data2[0].data) {
+                if (data2[0].error.length) {
+                    message.warning(data2[0].error[0].message);
+                };
+            } else {
+                _me.state.adminOption = [];
+                for (var item in data2[0].data) {
+                    _me.state.adminOption.push(
+                        <Select.Option value={item} key={item}>{data2[0].data[item]}</Select.Option>
+                    )
+                };
+            };
+            if (!data3[0].data) {
+                if (data3[0].error && data3[0].error.length) {
+                    message.warning(data3[0].error[0].message);
+                };
+            } else {
+                _me.state.patentStateOption = [];
+                for (var item in data3[0].data) {
+                    _me.state.patentStateOption.push(
+                        <Select.Option value={item} key={item}>{data3[0].data[item]}</Select.Option>
+                    )
+                };
+            };
         }).always(function () {
             this.setState({
                 loading: false
@@ -140,6 +178,7 @@ const Patent = React.createClass({
             searchMore: true,
             data: [],
             loading: false,
+            visible: false,
             selectedRowKeys: [],
             selectedRows: [],
             pagination: {
@@ -199,6 +238,10 @@ const Patent = React.createClass({
                     dataIndex: 'endTime',
                     key: 'endTime',
                     render: text => { return getTime(text) },
+                }, {
+                    title: '创建人',
+                    dataIndex: 'founder',
+                    key: 'founder'
                 }
             ],
             dataSource: []
@@ -222,7 +265,16 @@ const Patent = React.createClass({
             )
         });
         this.loadData();
-        this.getCompanyList();
+        this.getOptionList();
+        if (window.location.search) {
+            let theArr = getSearchUrl(window.location.search);
+            let theObj = {};
+            theObj.pid = theArr[0];
+            theObj.uid = theArr[1];
+            if (theObj.pid != 'null' && theObj.uid != 'null') {
+                this.tableRowClick(theObj);
+            };
+        };
     },
     tableRowClick(record, index) {
         this.state.RowData = record;
@@ -327,6 +379,55 @@ const Patent = React.createClass({
             this.loadData();
         }.bind(this));
     },
+    circulation() {
+        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)
+            }
+        }
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/patent/circulation",
+            data: {
+                ids: deletedIds,
+                principal: this.state.principal,
+                state: this.state.status,
+                comment: this.state.comment,
+                recordTimeFormattedDate: this.state.recordTime
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({
+                    loading: false,
+                    visible: false
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    showModal() {
+        this.setState({
+            visible: true,
+            principal: undefined,
+            status: undefined,
+            comment: undefined,
+            recordTime: undefined
+        });
+    },
+    handleCancel() {
+        this.setState({ visible: false });
+    },
     render() {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
@@ -387,6 +488,7 @@ const Patent = React.createClass({
                     <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                         disabled={!hasSelected}
                         onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                    <Button type="ghost" onClick={this.showModal}>专利批量流转<Icon type="retweet" /></Button>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                         <div>
                             <span>派单日:</span>
@@ -427,16 +529,54 @@ const Patent = React.createClass({
                             onRowClick={this.tableRowClick} />
                     </Spin>
                 </div>
-                <PatentDesc data={this.state.RowData} showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
+                <PatentDesc
+                    data={this.state.RowData}
+                    adminOption={this.state.adminOption}
+                    patentStateOption={this.state.patentStateOption}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+                <Modal title="专利批量流转" visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='800px'
+                    footer={[
+                        <Button key="submit" type="primary" size="large" onClick={this.circulation}>保存</Button>,
+                        <Button key="back" type="ghost" size="large" onClick={this.handleCancel}>取消</Button>,
+                    ]} className="patent-desc-content">
+                    <div className="clearfix">
+                        <div className="widthThird">
+                            <span>状态流转:</span>
+                            <Select placeholder='请选择状态'
+                                value={this.state.status}
+                                style={{ width: 150 }}
+                                onChange={(e) => { this.setState({ status: e }); }}>
+                                {this.state.patentStateOption}
+                            </Select>
+                        </div>
+                        <p className="widthThird">
+                            <span>处理时间:</span>
+                            <DatePicker
+                                value={this.state.recordTime ? moment(this.state.recordTime) : undefined}
+                                format="YYYY-MM-DD HH:mm:ss"
+                                onChange={(data, dataString) => { this.setState({ recordTime: dataString }); }} />
+                        </p>
+                        <div className="widthThird">
+                            <span>负责人:</span>
+                            <Select placeholder='请填写负责人'
+                                value={this.state.principal}
+                                style={{ width: 150 }}
+                                onChange={(e) => { this.setState({ principal: e }); }}>
+                                {this.state.adminOption}
+                            </Select>
+                        </div>
+                    </div>
+                    <div>
+                        <span>备注:</span>
+                        <Input value={this.state.comment} placeholder='请填写备注' style={{ width: 400 }} onChange={(e) => { this.setState({ comment: e.target.value }); }} />
+                    </div>
+                </Modal>
             </div >
         );
     }
 });
 
 export default Patent;
-
-// <span>授权日:</span>
-//     <RangePicker style={{ width: '240px' }}
-//         allowClear={false}
-//         value={[moment(this.state.authTime[0]), moment(this.state.authTime[1])]}
-//         onChange={(date, dateString) => { this.setState({ authTime: dateString }) }} />

+ 12 - 4
js/component/manageCenter/servicesManage/technology/applyChange.jsx

@@ -69,8 +69,9 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                         key: i,
                         state: data.data[i].state,
                         recordTime: data.data[i].recordTime,
-                        recordTimeFormattedDate:data.data[i].recordTimeFormattedDate,
+                        recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
                         principal: data.data[i].principal,
+                        operator: data.data[i].operator,
                         comment: data.data[i].comment
                     });
                 };
@@ -175,7 +176,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             projectModeState: false,
             subsidyState: false,
             stateColumns: [{
-                title: '专利状态',
+                title: '科技项目状态',
                 dataIndex: 'state',
                 key: 'state',
                 render: (text) => { return getTechnologyState(text) }
@@ -188,6 +189,10 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                 dataIndex: 'principal',
                 key: 'principal',
             }, {
+                title: '操作人',
+                dataIndex: 'operator',
+                key: 'operator',
+            }, {
                 title: '备注',
                 dataIndex: 'comment',
                 key: 'comment',
@@ -310,6 +315,11 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                             </FormItem>
                         </div>
                     </div>
+                    <div className="item-title">状态流转记录: </div>
+                    <Table style={{ background: "#eee" }}
+                        pagination={false}
+                        dataSource={this.state.stateTable}
+                        columns={this.state.stateColumns} />
                     <div className="clearfix">
                         <FormItem className="third-item"
                             {...formItemLayout}
@@ -427,8 +437,6 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                         </Upload>
                         <p style={{ marginTop: '10px' }}>{theData.approvalUrl ? <a onClick={techDownloadFile.bind(null, "/api/admin/techproject/download", this.state.data.id)}>项目材料</a> : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}</p>
                     </div>
-                    <div className="form-title">状态流转记录: </div>
-                    <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
                     <div className="clearfix">
                         <FormItem className="third-item"
                             {...formItemLayout}

+ 17 - 3
js/component/manageCenter/servicesManage/technology/applyManage.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Button, Select, Spin, Table, message } from 'antd';
 import { provinceArr } from '../../../dataDic.js';
-import { companySearch, getTechnologyState } from '../../../tools.js';
+import { companySearch, getTechnologyState, getSearchUrl } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import './technology.less';
@@ -60,7 +60,8 @@ const ApplyManage = React.createClass({
                         website: thisdata.website,
                         accountNumber: thisdata.accountNumber,
                         password: thisdata.password,
-                        consultant: thisdata.consultant
+                        consultant: thisdata.consultant,
+                        founder: thisdata.founder
                     });
                 };
                 this.state.pagination.current = data.data.pageNo;
@@ -172,7 +173,7 @@ const ApplyManage = React.createClass({
             companyOption: [],
             companyAddOption: [],
             authorOption: [],
-            consultantOption:[],
+            consultantOption: [],
             selectedRows: [],
             selectedRowKeys: [],
             loading: false,
@@ -244,6 +245,10 @@ const ApplyManage = React.createClass({
                     title: '负责人',
                     dataIndex: 'consultant',
                     key: 'consultant'
+                }, {
+                    title: '创建人',
+                    dataIndex: 'founder',
+                    key: 'founder'
                 }
             ],
             dataSource: []
@@ -260,6 +265,15 @@ const ApplyManage = React.createClass({
         this.getAuthorList();
         this.getCompanyList();
         this.getConsultant();
+        if (window.location.search) {
+            let theArr = getSearchUrl(window.location.search);
+            let theObj = {};
+            theObj.pid = theArr[0];
+            theObj.uid = theArr[1];
+            if (theObj.pid != 'null' && theObj.uid != 'null') {
+                this.tableRowClick(theObj);
+            };
+        };
     },
     tableRowClick(record, index) {
         this.state.RowData = record;

+ 20 - 8
js/component/manageCenter/topTab.jsx

@@ -48,15 +48,15 @@ const MessageModal = React.createClass({
                     dataIndex: 'noticeType',
                     key: 'noticeType',
                     render: (text) => {
-                        switch (text) {
+                        switch (text[0]) {
                             case 1:
-                                return <a href={globalConfig.context + "/admin/servicesManage/patent.html#comprehensive"}> 专利申请管理 </a>;
+                                return <a href={globalConfig.context + "/admin/servicesManage/patent.html?rid=" + text[1] + "&uid=" + text[2] + "#comprehensive"}> 专利申请管理 </a>;
                             case 3:
-                                return <a href={globalConfig.context + "/admin/servicesManage/copyright.html#copyright"}> 软著申请管理 </a>;
+                                return <a href={globalConfig.context + "/admin/servicesManage/copyright.html?rid=" + text[1] + "&uid=" + text[2] + "#copyright"}> 软著申请管理 </a>;
                             case 2:
-                                return <a href={globalConfig.context + "/admin/servicesManage/highTech.html#highTechApply"}> 高企认定管理 </a>;
+                                return <a href={globalConfig.context + "/admin/servicesManage/highTech.html?rid=" + text[1] + "&uid=" + text[2] + "&year=" + text[3] + "#highTechApply"}> 高企认定管理 </a>;
                             case 4:
-                                return <a href={globalConfig.context + "/admin/servicesManage/technology.html#applyManage"}> 科技项目申报管理 </a>;
+                                return <a href={globalConfig.context + "/admin/servicesManage/technology.html?rid=" + text[1] + "&uid=" + text[2] + "#applyManage"}> 科技项目申报管理 </a>;
                         }
                     }
                 }, {
@@ -67,6 +67,14 @@ const MessageModal = React.createClass({
                     title: '内容',
                     dataIndex: 'content',
                     key: 'content',
+                }, {
+                    title: '公司',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '业务员',
+                    dataIndex: 'principle',
+                    key: 'principle',
                 }
             ],
             data: []
@@ -100,10 +108,12 @@ const MessageModal = React.createClass({
                     key: i + 1,
                     id: thisdata.id,
                     aid: thisdata.aid,
-                    noticeType: thisdata.noticeType,
+                    noticeType: [thisdata.noticeType, thisdata.rid, thisdata.uid, thisdata.year],
                     content: thisdata.content,
                     createTime: thisdata.createTime,
                     createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                    principle: thisdata.principle,
+                    unitName: thisdata.unitName
                 });
             };
             this.state.pagination.current = data.data.pageNo;
@@ -146,10 +156,12 @@ const MessageModal = React.createClass({
                     key: i + 1,
                     id: thisdata.id,
                     aid: thisdata.aid,
-                    noticeType: thisdata.noticeType,
+                    noticeType: [thisdata.noticeType, thisdata.rid, thisdata.uid, thisdata.year],
                     content: thisdata.content,
                     createTime: thisdata.createTime,
                     createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                    principle: thisdata.principle,
+                    unitName: thisdata.unitName
                 });
             };
             this.state.UnreadPagination.current = data.data.pageNo;
@@ -189,7 +201,7 @@ const MessageModal = React.createClass({
                 <Spin spinning={this.state.loading} className='spin-box'>
                     <Modal title="信息中心" visible={this.state.visible}
                         onOk={this.handleOk} onCancel={this.handleCancel}
-                        width='600px' footer=''
+                        width='800px' footer=''
                     >
                         <Tabs defaultActiveKey="1">
                             <Tabs.TabPane tab="新信息" key="1">

+ 3 - 3
js/component/manageCenter/userManage/orgCertify.jsx

@@ -158,14 +158,14 @@ const OrgCertify = Form.create()(React.createClass({
                 }).done(function (data) {
                     if (!data.error.length) {
                         message.success('保存成功!');
+                        this.props.handleOk();
                     } else {
                         message.warning(data.error[0].message);
-                    }
+                    };
                 }.bind(this)).always(function () {
                     this.setState({
                         visible: false,
                     });
-                    this.props.handleOk();
                 }.bind(this));
             }
         });
@@ -310,7 +310,7 @@ const OrgCertify = Form.create()(React.createClass({
                 </FormItem>
                 <FormItem
                     {...formItemLayout}
-                    label="联系人电话"
+                    label="第三联系人电话"
                 >
                     {getFieldDecorator('thirdMobile', {
                         initialValue: this.state.thirdMobile

+ 10 - 0
js/component/tools.js

@@ -527,5 +527,15 @@ module.exports = {
                 };
             }
         });
+    },
+    //获取window.location.search传的值
+    getSearchUrl(e){
+        let searchURL = e;
+        searchURL = searchURL.substring(1, searchURL.length);
+        let theArr = [
+            searchURL.split("&")[0].split("=")[1],
+            searchURL.split("&")[1].split("=")[1],
+            searchURL.split("&")[2] ? searchURL.split("&")[2].split("=")[1] : undefined];
+        return theArr;
     }
 }

+ 1 - 1
package.json

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