yee il y a 8 ans
Parent
commit
3f756d967f

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 6
build/admin/servicesManage/patent.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
build/admin/userManage.css


Fichier diff supprimé car celui-ci est trop grand
+ 14 - 13
build/admin/userManage.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
build/user/account/index.css


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
build/user/account/services.css


Fichier diff supprimé car celui-ci est trop grand
+ 20 - 20
build/user/account/services.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
build/user/account/set.css


Fichier diff supprimé car celui-ci est trop grand
+ 29 - 26
build/user/account/set.js


Fichier diff supprimé car celui-ci est trop grand
+ 9 - 9
build/user/certify.js


Fichier diff supprimé car celui-ci est trop grand
+ 10 - 9
build/user/groupCertify.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
build/user/login.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
build/user/signIn.js


Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
build/vendors.js


+ 14 - 9
js/component/account/leftTab.less

@@ -12,7 +12,7 @@
                 margin: 0;
                 border-right: none;
                 text-align: center;
-                font-size: 16px;
+                font-size: 18px;
                 color: #4466bf;
                 background: #d5e4f7;
                 border-top: 1px solid #f2f8fd;
@@ -22,20 +22,25 @@
                 } 
             }
         }
-        .ant-menu-item { 
-            padding: 0;
-            margin: 0;
-            border-right: none;
+        .ant-menu-submenu-selected {
+            .ant-menu-submenu-title {
+                background: #fff;
+            }
+        }
+        .ant-menu-item {
+            padding: 0!important;
             text-align: center;
-            font-size: 16px;
-            color: #4466bf;
-            background: #d5e4f7;
-            border-top: 1px solid #f2f8fd;
+            background: #fafafa;
+            font-size: 14px;
+            color: #333;
             border-bottom: 1px solid #c0d2e4;
         }
         .ant-menu-item-selected {
             background: #fff;
+            color: #4466bf;
+            font-size: 16px;
             border-left: 3px solid #58a3ff;
+            border-right: none;
         }
     }
 }

+ 506 - 0
js/component/account/services/activity.jsx

@@ -0,0 +1,506 @@
+import React from 'react';
+import { Icon, Button, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
+import { techFieldList, technicalSourceList } from '../../dataDic.js';
+import { getTechField, getTechnicalSource } from '../../tools.js';
+import './activity.less';
+import moment from 'moment';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+const ActivityDesc = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            targetKeys: [],
+            selectedKeys: []
+        };
+    },
+    handleOk() {
+        this.setState({
+            loading: true,
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/disposeActivity",
+            data: {
+                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
+            },
+            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
+                    });
+                } else if (data.error.length && data.error[0].message) {
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({
+                    loading: false,
+                    visible: false
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.props.closeDesc(false);
+        }.bind(this));
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc;
+        if (nextProps.data) {
+            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;
+        };
+    },
+    intellectualChange(nextTargetKeys, direction, moveKeys) {
+        this.setState({ targetKeys: nextTargetKeys });
+
+        console.log('targetKeys: ', this.state.targetKeys);
+        console.log('direction: ', this.state.direction);
+        console.log('moveKeys: ', this.state.moveKeys);
+    },
+    intellectualSelectChange(sourceSelectedKeys, targetSelectedKeys) {
+        this.setState({ selectedKeys: [...sourceSelectedKeys, ...targetSelectedKeys] });
+
+        console.log('sourceSelectedKeys: ', this.state.sourceSelectedKeys);
+        console.log('targetSelectedKeys: ', this.state.targetSelectedKeys);
+    },
+    render() {
+        const mockData = [];
+        for (let i = 0; i < 20; i++) {
+            mockData.push({
+                key: 20000 + i.toString(),
+                title: `content${i + 1}`,
+                description: `description of content${i + 1}`,
+            });
+        };
+        if (this.props.data) {
+            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">
+                        <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>
+                        </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="Please select"
+                                showSearch
+                            />,
+                        </div>
+                        <div>
+                            <p>技术来源:</p>
+                            <Select placeholder="选择技术来源" style={{ width: 240 }}
+                                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>
+                        <div>
+                            <p>知识产权编号:</p>
+                            <Transfer
+                                dataSource={mockData}
+                                titles={['Source', 'Target']}
+                                targetKeys={this.state.targetKeys}
+                                selectedKeys={this.state.selectedKeys}
+                                onChange={this.intellectualChange}
+                                onSelectChange={this.intellectualSelectChange}
+                                render={item => item.title}
+                            />
+                        </div>
+                        <div>
+                            <p>研发经费总预算(万元):</p>
+                            <InputNumber value={this.state.budget}
+                                onChange={(e) => { this.setState({ budget: e.target.value }); }} />
+                        </div>
+                        <div className="clearfix" >
+                            <p>研发经费近三年总支出(万元):</p>
+                            <div className="half-div">
+                                <span>总计(万元):</span>
+                                <InputNumber value={this.state.activityNumber}
+                                    onChange={(e) => { this.setState({ activityNumber: e.target.value }); }} />
+                            </div>
+                            <div className="half-div">
+                                <span>其中(第一年):</span>
+                                <InputNumber value={this.state.firstYearExpenditure}
+                                    onChange={(e) => { this.setState({ firstYearExpenditure: e.target.value }); }} />
+                            </div>
+                            <div className="half-div">
+                                <span>其中(第二年):</span>
+                                <InputNumber value={this.state.secondYearExpenditure}
+                                    onChange={(e) => { this.setState({ secondYearExpenditure: e.target.value }); }} />
+                            </div>
+                            <div className="half-div">
+                                <span>其中(第三年):</span>
+                                <InputNumber value={this.state.thirdYearExpenditure}
+                                    onChange={(e) => { this.setState({ thirdYearExpenditure: e.target.value }); }} />
+                            </div>
+                        </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 });
+                                    }} />
+                            </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 });
+                                    }} />
+                            </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 });
+                                    }} />
+                            </div>
+                        </div>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+const Activity = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.when($.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/activity",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                activityNumber: this.state.activityNumber,
+                activityName: this.state.activityName,
+                startDate: this.state.startDate,
+                endDate: this.state.endDate
+            }
+        }),$.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/intellectualList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: 99,
+            }
+        })).done((data1,data2) => {
+            let data = data1[0];
+            let intellectualList = data2[0];
+            debugger
+            if (data.error.length || !data.data || !data.data.list) {
+                message.warning(data.error[0].message);
+                return;
+            }
+            for (let i = 0; i < data.data.list.length; i++) {
+                let thisdata = data.data.list[i];
+                this.state.data.push({
+                    key: i,
+                    id: thisdata.id,
+                    uid: thisdata.uid,
+                    activityNumber: thisdata.activityNumber,
+                    activityName: thisdata.activityName,
+                    startDate: thisdata.startDate,
+                    endDate: thisdata.endDate,
+                    techField: [Number(thisdata.technicalField1), Number(thisdata.technicalField2), Number(thisdata.technicalField3)],
+                    technicalField: getTechField(thisdata.technicalField1, thisdata.technicalField2, thisdata.technicalField3),
+                    technicalField1: thisdata.technicalField1,
+                    technicalField2: thisdata.technicalField2,
+                    technicalField3: thisdata.technicalField3,
+                    technicalSource: getTechnicalSource(thisdata.technicalSource),
+                    intellectualPropertyNumber: thisdata.intellectualPropertyNumber.split(","),
+                    budget: thisdata.budget,
+                    firstYearExpenditure: thisdata.firstYearExpenditure,
+                    secondYearExpenditure: thisdata.secondYearExpenditure,
+                    thirdYearExpenditure: thisdata.thirdYearExpenditure,
+                    implement: thisdata.implement,
+                    technologyInnovation: thisdata.technologyInnovation,
+                    achievement: thisdata.achievement,
+                    internalLaborCost: thisdata.internalLaborCost,
+                    internalDirectCost: thisdata.internalDirectCost,
+                    internalDepreciationCost: thisdata.internalDepreciationCost,
+                    internalAmortizationCost: thisdata.internalAmortizationCost,
+                    internalDesignCost: thisdata.internalDesignCost,
+                    internalEquipmentCost: thisdata.internalEquipmentCost,
+                    internalOtherCost: thisdata.internalOtherCost,
+                    externalTotalCost: thisdata.externalTotalCost,
+                    externalAbroadCost: thisdata.externalAbroadCost,
+                    enterpriseFiller: thisdata.enterpriseFiller,
+                    signDate: thisdata.signDate,
+                    sortNumber: thisdata.sortNumber,
+                    startDateFormattedDate: thisdata.startDateFormattedDate,
+                    endDateFormattedDate: thisdata.endDateFormattedDate
+                });
+            };
+            this.state.pagination.current = data.data.pageNo;
+            this.state.pagination.total = data.data.totalCount;
+            this.setState({
+                dataSource: this.state.data,
+                pagination: this.state.pagination
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '研发活动编号',
+                    dataIndex: 'activityNumber',
+                    key: 'activityNumber'
+                }, {
+                    title: '研发活动名称',
+                    dataIndex: 'activityName',
+                    key: 'activityName'
+                }, {
+                    title: '技术领域',
+                    dataIndex: 'technicalField',
+                    key: 'technicalField'
+                }, {
+                    title: '技术来源',
+                    dataIndex: 'technicalSource',
+                    key: 'technicalSource'
+                }, {
+                    title: '知识产权编号',
+                    dataIndex: 'intellectualPropertyNumber',
+                    key: 'intellectualPropertyNumber'
+                }, {
+                    title: '开始时间',
+                    dataIndex: 'startDateFormattedDate',
+                    key: 'startDateFormattedDate'
+                }, {
+                    title: '结束时间',
+                    dataIndex: 'endDateFormattedDate',
+                    key: 'endDateFormattedDate'
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            }
+        }
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/deleteActivity",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    closeDesc(e) {
+        this.state.showDesc = e;
+        this.loadData();
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.activityName = undefined;
+        this.state.activityNumber = undefined;
+        this.loadData();
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows,
+                    selectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>标准制定情况汇总</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="研发活动名称" value={this.state.activityName}
+                        onChange={(e) => { this.setState({ activityName: e.target.value }); }} />
+                    <Input placeholder="研发活动编号" value={this.state.activityNumber}
+                        onChange={(e) => { this.setState({ activityNumber: e.target.value }); }} />
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <p>
+                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
+                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                            disabled={!hasSelected}
+                            onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                    </p>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                            rowSelection={rowSelection}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <ActivityDesc data={this.state.RowData} showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default Activity;

+ 49 - 0
js/component/account/services/activity.less

@@ -0,0 +1,49 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .user-search {
+        margin: 20px 0;
+        input {
+            width: 200px;
+        }
+        >* {
+            margin-right: 20px;
+        }
+        p {
+            margin-top: 20px;
+            button {
+                margin-right: 20px;
+            }
+        }
+    }
+}
+
+.admin-desc-content {
+    .ant-modal-body {
+        >div {
+            margin-top: 10px;
+            p {
+                margin: 6px 0;
+            }
+        }
+    }
+    .half-div {
+        width: 50%;
+        float: left;
+        margin-top: 10px;
+        >span {
+            display: inline-block;
+            width: 100px;
+        }
+        >input {
+            width: 60%;
+        }
+        >textarea {
+            width: 94%;
+        }
+    }
+}

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

@@ -3,6 +3,8 @@ import '../content.less';
 import LeftTab from './leftTab.jsx';
 
 import Patent from './patent.jsx';
+import Activity from './activity.jsx';
+import Standard from './standard.jsx';
 
 const Content = React.createClass({
     getInitialState() {
@@ -32,6 +34,10 @@ const Content = React.createClass({
                         switch (this.state.leftKey) {
                             case 'patent':
                                 return <Patent />;
+                            case 'activity':
+                                return <Activity />;
+                            case 'standard':
+                                return <Standard />;
                         };
                     })()}
                 </div>

+ 11 - 7
js/component/account/services/leftTab.jsx

@@ -26,7 +26,7 @@ const LeftTab = React.createClass({
         return (
             <Menu onClick={this.handleClick}
                 selectedKeys={[this.state.current]}
-                defaultOpenKeys={['sub1']}
+                defaultOpenKeys={["sub1", "sub2", "sub3"]}
                 mode="vertical"
                 className="account-left"
                 mode="inline"
@@ -39,12 +39,16 @@ const LeftTab = React.createClass({
                         软著申请
                     </Menu.Item>
                 </SubMenu>
-                <Menu.Item key="company">
-                    高企认定
-                </Menu.Item>
-                <Menu.Item key="technology">
-                    科技项目申报
-                </Menu.Item>
+                <SubMenu key="sub2" title={<span>高企认定</span>}>
+                    <Menu.Item key="standard">
+                        标准制定情况
+                    </Menu.Item>
+                    <Menu.Item key="activity">
+                        企业研究开发活动
+                    </Menu.Item>
+                </SubMenu>
+                <SubMenu key="sub3" title={<span>科技项目申报</span>}>
+                </SubMenu>
             </Menu>
         );
     }

+ 337 - 0
js/component/account/services/standard.jsx

@@ -0,0 +1,337 @@
+import React from 'react';
+import { Icon, Button, Input, Spin, Table, message, Radio, Select, Modal } from 'antd';
+import './standard.less';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+
+const StandardDesc = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    handleOk() {
+        this.setState({
+            loading: true,
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/developStandard",
+            data: {
+                id: this.props.data.id,
+                standardName: this.state.standardName,
+                standardNumber: this.state.standardNumber,
+                standardLevel: this.state.standardLevel,
+                participateWay: this.state.participateWay
+            },
+            success: function (data) {
+                if (data.data) {
+                    this.setState({
+                        id: data.data.id,
+                        standardName: data.data.standardName,
+                        standardNumber: data.data.standardNumber,
+                        standardLevel: data.data.standardLevel,
+                        participateWay: data.data.participateWay
+                    });
+                } else if (data.error.length && data.error[0].message) {
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this),
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({
+                    loading: false,
+                    visible: false
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.props.closeDesc(false);
+        }.bind(this));
+    },
+    handleCancel(e) {
+        this.setState({
+            visible: false,
+        });
+        this.props.closeDesc(false);
+    },
+    componentWillReceiveProps(nextProps) {
+        this.state.visible = nextProps.showDesc;
+        if (nextProps.data) {
+            this.state.standardName = nextProps.data.standardName;
+            this.state.standardNumber = nextProps.data.standardNumber;
+            this.state.standardLevel = nextProps.data.standardLevel;
+            this.state.participateWay = nextProps.data.participateWay;
+        };
+    },
+    render() {
+        if (this.props.data) {
+            return (
+                <div className="admin-desc">
+                    <Modal title="企业参与国家标准或行业标准制定情况明细" visible={this.state.visible} onCancel={this.handleCancel}
+                        width='400px' 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">
+                        <div>
+                            <p>标准名称:</p>
+                            <Input defaultValue={this.props.data.standardName} value={this.state.standardName}
+                                onChange={(e) => { this.setState({ standardName: e.target.value }); }} />
+                        </div>
+                        <div>
+                            <p>标准编号:</p>
+                            <Input value={this.state.standardNumber}
+                                onChange={(e) => { this.setState({ standardNumber: e.target.value }); }} />
+                        </div>
+                        <div>
+                            <p>标准级别:</p>
+                            <Radio.Group value={this.state.standardLevel} onChange={(e) => { this.setState({ standardLevel: e.target.value }) }}>
+                                <Radio value="0">国家</Radio>
+                                <Radio value="1">行业</Radio>
+                            </Radio.Group>
+                        </div>
+                        <div>
+                            <p>参与方式:</p>
+                            <Radio.Group value={this.state.participateWay} onChange={(e) => { this.setState({ participateWay: e.target.value }) }}>
+                                <Radio value="0">主持</Radio>
+                                <Radio value="1">参与</Radio>
+                            </Radio.Group>
+                        </div>
+                    </Modal>
+                </div>
+            );
+        } else {
+            return <div></div>
+        }
+    },
+});
+
+const Standard = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/standard",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                standardName: this.state.standardName,
+                standardNumber: this.state.standardNumber,
+                standardLevel: this.state.standardLevel,
+                participateWay: this.state.participateWay
+            },
+            success: function (data) {
+                if (data.error.length || !data.data || !data.data.list) {
+                    message.warning(data.error[0].message);
+                    return;
+                }
+                for (let i = 0; i < data.data.list.length; i++) {
+                    let thisdata = data.data.list[i];
+                    this.state.data.push({
+                        key: i + 1,
+                        id: thisdata.id,
+                        uid: thisdata.uid,
+                        standardName: thisdata.standardName,
+                        standardNumber: thisdata.standardNumber,
+                        standardLevel: String(thisdata.standardLevel),
+                        participateWay: String(thisdata.participateWay),
+                        createTime: thisdata.createTime,
+                        createTimeFormattedDate: thisdata.createTimeFormattedDate
+                    });
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                this.setState({
+                    dataSource: this.state.data,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'key',
+                    key: 'key'
+                }, {
+                    title: '标准名称',
+                    dataIndex: 'standardName',
+                    key: 'standardName'
+                }, {
+                    title: '标准编号',
+                    dataIndex: 'standardNumber',
+                    key: 'standardNumber'
+                }, {
+                    title: '标准级别',
+                    dataIndex: 'standardLevel',
+                    key: 'standardLevel',
+                    render: text => {
+                        switch (String(text)) {
+                            case "0":
+                                return "国家";
+                            case "1":
+                                return "行业";
+                        }
+                    }
+                }, {
+                    title: '参与方式',
+                    dataIndex: 'participateWay',
+                    key: 'participateWay',
+                    render: text => {
+                        switch (String(text)) {
+                            case "0":
+                                return "主持";
+                            case "1":
+                                return "参与";
+                        }
+                    }
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    delectRow() {
+        let deletedIds = [];
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.id) {
+                deletedIds.push(rowItem.id)
+            }
+        }
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedIds.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/techservice/cognizance/deleteStandard",
+            data: {
+                ids: deletedIds
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({
+                    loading: false,
+                });
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.loadData();
+        }.bind(this));
+    },
+    closeDesc(e) {
+        this.state.showDesc = e;
+        this.loadData();
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.standardName = undefined;
+        this.state.standardNumber = undefined;
+        this.state.standardLevel = undefined;
+        this.state.participateWay = undefined;
+        this.loadData();
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows,
+                    selectedRowKeys: selectedRowKeys
+                });
+            }
+        }
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>标准制定情况汇总</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="标准名称" value={this.state.standardName}
+                        onChange={(e) => { this.setState({ standardName: e.target.value }); }} />
+                    <Input placeholder="标准编号" value={this.state.standardNumber}
+                        onChange={(e) => { this.setState({ standardNumber: e.target.value }); }} />
+                    <Select placeholder="标准级别" style={{ width: 200 }}
+                        value={this.state.standardLevel}
+                        onChange={(e) => { this.setState({ standardLevel: e }) }}>
+                        <Select.Option value="0" >国家</Select.Option>
+                        <Select.Option value="1" >行业</Select.Option>
+                    </Select>
+                    <Select placeholder="参与方式" style={{ width: 200 }}
+                        value={this.state.participateWay}
+                        onChange={(e) => { this.setState({ participateWay: e }) }}>
+                        <Select.Option value="0" >主持</Select.Option>
+                        <Select.Option value="1" >参与</Select.Option>
+                    </Select>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <p>
+                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            onClick={this.tableRowClick}>添加<Icon type="plus" /></Button>
+                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                            disabled={!hasSelected}
+                            onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                    </p>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                            rowSelection={rowSelection}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <StandardDesc data={this.state.RowData} showDesc={this.state.showDesc} closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default Standard;

+ 32 - 0
js/component/account/services/standard.less

@@ -0,0 +1,32 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        font-size: 16px;
+        color: #333;
+    }
+    .user-search {
+        margin: 20px 0 ;
+        input {
+            width: 200px;
+        }
+        >* {
+            margin-right: 20px;
+        }
+        p {
+            margin-top:20px; 
+            button {
+                margin-right: 20px;
+            }
+        }
+    }
+}
+.admin-desc-content {
+    .ant-modal-body {
+        >div {
+            p {
+                margin: 6px 0;
+            }
+        }
+    }
+}

+ 68 - 8
js/component/account/set/ablt.jsx

@@ -12,7 +12,7 @@ class EditableTagGroup extends React.Component {
             tags: ['我的标签:', '标签1', '标签2'],
             inputVisible: false,
             inputValue: '',
-            propsBool:true
+            propsBool: true
         }
     }
 
@@ -45,7 +45,7 @@ class EditableTagGroup extends React.Component {
         });
     }
     componentWillReceiveProps(nextProps) {
-        if ( nextProps.abltArr && this.state.propsBool ) {
+        if (nextProps.abltArr && this.state.propsBool) {
             nextProps.abltArr.unshift("我的标签:");
             this.state.tags = nextProps.abltArr;
             this.state.propsBool = false;
@@ -73,9 +73,9 @@ class EditableTagGroup extends React.Component {
                         onChange={this.handleInputChange.bind(this)}
                         onBlur={this.handleInputConfirm.bind(this)}
                         onPressEnter={this.handleInputConfirm.bind(this)}
-                        />
+                    />
                 )}
-                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length >10 ? true : false} onClick={this.showInput.bind(this)}>+ 新标签</Button>}
+                {!inputVisible && <Button className="addtips" type="dashed" disabled={tags.length > 10 ? true : false} onClick={this.showInput.bind(this)}>+ 新标签</Button>}
             </div>
         );
     }
@@ -97,9 +97,13 @@ const Base = React.createClass({
             dataType: "json",
             url: globalConfig.context + "/api/user/ability",
             success: function (data) {
-                if (data.data && data.data.abilityLabel) {
+                if (data.data) {
                     this.setState({
-                        abltArr: data.data.abilityLabel.split(","),
+                        abltArr: data.data.abilityLabel ? data.data.abilityLabel.split(",") : [],
+                        intellectRight: data.data.intellectRight,
+                        scienceAchievement: data.data.scienceAchievement,
+                        researchInnovation: data.data.researchInnovation,
+                        personnel: data.data.personnel
                     });
                 };
             }.bind(this),
@@ -123,7 +127,12 @@ const Base = React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/user/userAbility",
             data: {
-                'abilityLabel': theTags
+                'abilityLabel': theTags,
+                "intellectRight": this.state.intellectRight,
+                "scienceAchievement": this.state.scienceAchievement,
+                "researchInnovation": this.state.researchInnovation,
+                "personnel": this.state.personnel
+
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -145,8 +154,59 @@ const Base = React.createClass({
                         <p className="acc-title">能力标签</p>
                         <p className="tips-title">最多可设置10个标签。请用简洁明确的关键词来展示你的职业能力。</p>
                         <EditableTagGroup abltArr={this.state.abltArr} tagsArr={this.getTagsArr} />
-                        <Button className="set-submit" type="primary" onClick={this.submit}>保存</Button>
                     </div>
+                    {userData.type == "1" ? <div className="acc-detail clearfix">
+                        <p className="acc-title">能力标签</p>
+                        <div className="acc-area">
+                            <p>知识产权对企业竞争力的作用 (限400字) </p>
+                            <Input type="textarea" rows={6}
+                                value={this.state.intellectRight}
+                                onChange={(e) => {
+                                    if (e.target.value.length > 400) {
+                                        message.warning("长度超过400字!");
+                                        return;
+                                    };
+                                    this.setState({ intellectRight: e.target.value });
+                                }} />
+                        </div>
+                        <div className="acc-area">
+                            <p>科技成果转化情况 (限400字) </p>
+                            <Input type="textarea" rows={6}
+                                value={this.state.scienceAchievement}
+                                onChange={(e) => {
+                                    if (e.target.value.length > 400) {
+                                        message.warning("长度超过400字!");
+                                        return;
+                                    };
+                                    this.setState({ scienceAchievement: e.target.value })
+                                }} />
+                        </div>
+                        <div className="acc-area">
+                            <p>研究开发与技术创新组织管理情况 (限400字) </p>
+                            <Input type="textarea" rows={6}
+                                value={this.state.researchInnovation}
+                                onChange={(e) => {
+                                    if (e.target.value.length > 400) {
+                                        message.warning("长度超过400字!");
+                                        return;
+                                    };
+                                    this.setState({ researchInnovation: e.target.value })
+                                }} />
+                        </div>
+                        <div className="acc-area">
+                            <p>管理与科技人员情况 (限400字) </p>
+                            <Input type="textarea" rows={6}
+                                value={this.state.personnel}
+                                onChange={(e) => {
+                                    if (e.target.value.length > 400) {
+                                        message.warning("长度超过400字!");
+                                        return;
+                                    };
+                                    this.setState({ personnel: e.target.value })
+                                }} />
+                        </div>
+                    </div> : <div></div>}
+                    <Button className="set-submit" type="primary" onClick={this.submit}>保存</Button>
                 </div>
             </Spin>
         )

+ 9 - 0
js/component/account/set/ablt.less

@@ -27,4 +27,13 @@
         width: 120px;
         border-radius: 4px;
     }
+    .acc-area {
+        width: 40%;
+        float: left;
+        margin-bottom: 20px;
+        margin-right: 20px;
+        .ant-input {
+            margin-top: 10px;
+        }
+    }
 }

+ 1 - 1
js/component/account/set/content.jsx

@@ -17,7 +17,7 @@ const Content = React.createClass({
     getInitialState() {
         return {
             loading: false,
-            leftKey: 'hrSituation',
+            leftKey: 'standard',
             userType: '0'
         };
     },

+ 232 - 34
js/component/account/set/hrSituation.jsx

@@ -11,10 +11,37 @@ const PersonFrom = Form.create()(React.createClass({
         $.ajax({
             method: "get",
             dataType: "json",
-            url: globalConfig.context + "/api/user/member",
+            url: globalConfig.context + "/api/user/humanResource",
             success: function (data) {
                 if (data.data) {
-
+                    this.setState({
+                        aboveFifty: data.data.aboveFifty,
+                        belowThirty: data.data.belowThirty,
+                        college: data.data.college,
+                        doctor: data.data.doctor,
+                        firmAbroad: data.data.firmAbroad,
+                        firmCore: data.data.firmCore,
+                        firmForeign: data.data.firmForeign,
+                        firmInService: data.data.firmInService,
+                        firmPartTime: data.data.firmPartTime,
+                        firmTemporary: data.data.firmTemporary,
+                        firmTotal: data.data.firmTotal,
+                        fortyoneToFifty: data.data.fortyoneToFifty,
+                        intermediateTitle: data.data.intermediateTitle,
+                        juniorTitle: data.data.juniorTitle,
+                        master: data.data.master,
+                        seniorMechanic: data.data.seniorMechanic,
+                        seniorTitle: data.data.seniorTitle,
+                        techAbroad: data.data.techAbroad,
+                        techCore: data.data.techCore,
+                        techForeign: data.data.techForeign,
+                        techInService: data.data.techInService,
+                        techPartTime: data.data.techPartTime,
+                        techTemporary: data.data.techTemporary,
+                        techTotal: data.data.techTotal,
+                        thirtyoneToThirtyfour: data.data.thirtyoneToThirtyfour,
+                        undergraduate: data.data.undergraduate
+                    });
                 }
             }.bind(this),
         }).always(function () {
@@ -29,28 +56,62 @@ const PersonFrom = Form.create()(React.createClass({
     handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
+            debugger
+            if (values.firmTotal < values.firmInService + values.firmPartTime + values.firmTemporary) {
+                message.warning("总体情况的在职人员数、兼职人员数、临时聘用人员数相加小于等于企业职工总数!");
+                return;
+            };
+            if (values.firmTotal < values.techTotal) {
+                message.warning("科技人员数小于等于企业职工总数!");
+                return;
+            };
+            if (values.firmInService < values.techInService || values.firmPartTime < values.techPartTime || values.firmTemporary < values.techTemporary ||
+                values.firmForeign < values.techForeign || values.firmAbroad < values.techAbroad || values.firmCore < values.techCore) {
+                message.warning("科技人员各项人数小于等于企业职工各项人数!");
+                return;
+            };
+            if (values.firmTotal < values.doctor + values.master + values.undergraduate + values.college) {
+                message.warning("全体人员结构中学历一栏人数总和小于等于职工人数!");
+                return;
+            };
+            if (values.firmTotal < values.belowThirty + values.thirtyoneToThirtyfour + values.fortyoneToFifty + values.aboveFifty) {
+                message.warning("全体人员结构中年龄一栏人数总和小于等于职工人数!");
+                return;
+            };
             if (!err) {
                 this.props.spinState(true);
                 $.ajax({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/user/userInfo",
+                    url: globalConfig.context + "/api/user/SaveHumanResource",
                     data: {
-                        "nickname": values.nickname,
-                        "residenceProvince": cmbP,
-                        "residenceCity": cmbC,
-                        "residenceArea": cmbA,
-                        "personPortraitUrl": this.state.avatarUrlData,
-                        "lifePhotoUrl": lifePhotoUrl,
-                        "personalProfile": values.intro,
-                        "email": values.email,
-                        "fixedTelArea": this.state.fixTelArea,
-                        "fixedTel": this.state.fixTel,
-                        "fixedTelExtension": this.state.fixTelExtension,
-                        "qq": values.qq,
-                        "postalAddress": values.address,
-                        "postcode": values.postcode
+                        aboveFifty: values.aboveFifty,
+                        belowThirty: values.belowThirty,
+                        college: values.college,
+                        doctor: values.doctor,
+                        firmAbroad: values.firmAbroad,
+                        firmCore: values.firmCore,
+                        firmForeign: values.firmForeign,
+                        firmInService: values.firmInService,
+                        firmPartTime: values.firmPartTime,
+                        firmTemporary: values.firmTemporary,
+                        firmTotal: values.firmTotal,
+                        fortyoneToFifty: values.fortyoneToFifty,
+                        intermediateTitle: values.intermediateTitle,
+                        juniorTitle: values.juniorTitle,
+                        master: values.master,
+                        seniorMechanic: values.seniorMechanic,
+                        seniorTitle: values.seniorTitle,
+                        techAbroad: values.techAbroad,
+                        techCore: values.techCore,
+                        techForeign: values.techForeign,
+                        techInService: values.techInService,
+                        techPartTime: values.techPartTime,
+                        techTemporary: values.techTemporary,
+                        techTotal: values.techTotal,
+                        thirtyoneToThirtyfour: values.thirtyoneToThirtyfour,
+                        undergraduate: values.undergraduate,
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -84,7 +145,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmTotal', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmTotal || null
                         })(
                             <InputNumber />
                             )}
@@ -95,7 +156,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techTotal', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techTotal || null
                         })(
                             <InputNumber />
                             )}
@@ -106,7 +167,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmInService', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmInService || null
                         })(
                             <InputNumber />
                             )}
@@ -116,7 +177,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techInService', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techInService || null
                         })(
                             <InputNumber />
                             )}
@@ -127,7 +188,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmPartTime', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmPartTime || null
                         })(
                             <InputNumber />
                             )}
@@ -137,7 +198,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techPartTime', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techPartTime || null
                         })(
                             <InputNumber />
                             )}
@@ -147,8 +208,8 @@ const PersonFrom = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="企业职工"
                     >
-                        {getFieldDecorator('firmPartTime', {
-                            initialValue: this.state.nickname || null
+                        {getFieldDecorator('firmTemporary', {
+                            initialValue: this.state.firmTemporary || null
                         })(
                             <InputNumber />
                             )}
@@ -157,8 +218,8 @@ const PersonFrom = Form.create()(React.createClass({
                         {...formItemLayout}
                         label="科技人员"
                     >
-                        {getFieldDecorator('techPartTime', {
-                            initialValue: this.state.nickname || null
+                        {getFieldDecorator('techTemporary', {
+                            initialValue: this.state.techTemporary || null
                         })(
                             <InputNumber />
                             )}
@@ -169,7 +230,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmForeign', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmForeign || null
                         })(
                             <InputNumber />
                             )}
@@ -179,7 +240,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techForeign', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techForeign || null
                         })(
                             <InputNumber />
                             )}
@@ -190,7 +251,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmAbroad', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmAbroad || null
                         })(
                             <InputNumber />
                             )}
@@ -200,7 +261,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techAbroad', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techAbroad || null
                         })(
                             <InputNumber />
                             )}
@@ -211,7 +272,7 @@ const PersonFrom = Form.create()(React.createClass({
                         label="企业职工"
                     >
                         {getFieldDecorator('firmCore', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.firmCore || null
                         })(
                             <InputNumber />
                             )}
@@ -221,14 +282,151 @@ const PersonFrom = Form.create()(React.createClass({
                         label="科技人员"
                     >
                         {getFieldDecorator('techCore', {
-                            initialValue: this.state.nickname || null
+                            initialValue: this.state.techCore || null
                         })(
                             <InputNumber />
                             )}
                     </FormItem>
                 </div>
                 <p className="hrSituation-title">全体人员结构</p>
-                <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
+                <div className="clearfix">
+                    <span className="hrSituation-span">学历人数</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="博士"
+                    >
+                        {getFieldDecorator('doctor', {
+                            initialValue: this.state.doctor || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="硕士"
+                    >
+                        {getFieldDecorator('master', {
+                            initialValue: this.state.master || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="本科"
+                    >
+                        {getFieldDecorator('undergraduate', {
+                            initialValue: this.state.undergraduate || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="大专及以下"
+                    >
+                        {getFieldDecorator('college', {
+                            initialValue: this.state.college || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <span className="hrSituation-span">职称人数</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="高级职称"
+                    >
+                        {getFieldDecorator('seniorTitle', {
+                            initialValue: this.state.seniorTitle || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="中级职称"
+                    >
+                        {getFieldDecorator('intermediateTitle', {
+                            initialValue: this.state.intermediateTitle || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="初级职称"
+                    >
+                        {getFieldDecorator('juniorTitle', {
+                            initialValue: this.state.juniorTitle || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="高级技工"
+                    >
+                        {getFieldDecorator('seniorMechanic', {
+                            initialValue: this.state.seniorMechanic || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                </div>
+                <div className="clearfix">
+                    <span className="hrSituation-span">年龄人数</span>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="30及以下"
+                    >
+                        {getFieldDecorator('belowThirty', {
+                            initialValue: this.state.belowThirty || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="31-34"
+                    >
+                        {getFieldDecorator('thirtyoneToThirtyfour', {
+                            initialValue: this.state.thirtyoneToThirtyfour || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="41-50"
+                    >
+                        {getFieldDecorator('fortyoneToFifty', {
+                            initialValue: this.state.fortyoneToFifty || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                    <FormItem className="half-item"
+                        {...formItemLayout}
+                        label="50以上"
+                    >
+                        {getFieldDecorator('aboveFifty', {
+                            initialValue: this.state.aboveFifty || null
+                        })(
+                            <InputNumber />
+                            )}
+                    </FormItem>
+                </div>
+                <div style={{ marginLeft: "40px" }}>
+                    <span style={{ color: "red" }}>提示</span>
+                    <p>1、总体情况的在职人员数、兼职人员数、临时聘用人员数相加小于等于企业职工总数。</p>
+                    <p>2、科技人员数小于等于企业职工总数。</p>
+                    <p>3、科技人员各项人数小于等于企业职工各项人数。</p>
+                    <p>4、全体人员结构中学历一栏人数总和小于等于职工人数。</p>
+                    <p>5、全体人员结构中年龄一栏人数总和小于等于职工人数。</p>
+                    <Button style={{ marginTop: "20px" }} className="set-submit" type="primary" htmlType="submit">保存</Button>
+                </div>
             </Form >
         );
     },

Fichier diff supprimé car celui-ci est trop grand
+ 1150 - 7
js/component/dataDic.js


+ 36 - 15
js/component/manageCenter/userManage/orgList.jsx

@@ -2,6 +2,7 @@ import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
+import moment from 'moment';
 import './userList.less';
 import OrgDesc from './orgDesc.jsx';
 import { auditStatusList } from '../../dataDic.js';
@@ -20,10 +21,12 @@ const UserList = React.createClass({
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                mobile: this.state.searchMobile, //登录名
+                mobile: this.state.searchLoginId, //登录名
+                email: this.state.searchEmail,
                 createTime: this.state.searchTime,
-                number: this.state.searchNumber, //阿凡提号
-                auditStatus: this.state.searchAudit
+                number: this.state.searchAftId, //阿凡提号
+                aftUsername: this.state.searchAftUsername,
+                auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
                 if (data.error.length || !data.data || !data.data.list) {
@@ -40,6 +43,7 @@ const UserList = React.createClass({
                         createTime: thisdata.createTime,
                         aftUsername: thisdata.aftUsername,
                         number: thisdata.number,
+                        auditStatus:thisdata.auditStatus,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate
                     });
                 };
@@ -61,6 +65,7 @@ const UserList = React.createClass({
             searchMore: true,
             data: [],
             loading: false,
+            searchTime:[,],
             pagination: {
                 defaultCurrent: 1,
                 defaultPageSize: 10,
@@ -87,10 +92,19 @@ const UserList = React.createClass({
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
                     render: text => {
-                        if (text == 5) {
-                            return "已认证"
-                        } else {
-                            return "未认证"
+                        switch (String(text)) {
+                            case "0":
+                                return "未提交审核";
+                            case "1":
+                                return "提交审核";
+                            case "2":
+                                return "审核未打款";
+                            case "3":
+                                return "审核已打款";
+                            case "4":
+                                return "认证未通过";
+                            case "5":
+                                return "已认证";
                         }
                     },
                 }, {
@@ -136,7 +150,7 @@ const UserList = React.createClass({
         this.state.searchAuditStatus = "";
         this.state.searchAftUsername = "";
         this.state.searchEmail = "";
-        this.state.searchTime = [];
+        this.state.searchTime = [,];
         this.loadData();
     },
     searchSwitch() {
@@ -155,24 +169,31 @@ const UserList = React.createClass({
                     <span>组织用户管理</span>
                 </div>
                 <div className="user-search">
-                    <Input placeholder="阿凡提号" onChange={(e) => { this.state.searchAftId = e.target.value; }} />
-                    <Input placeholder="登录号" onChange={(e) => { this.state.searchLoginId = e.target.value; }} />
-                    <Select placeholder="选择认证状态" style={{ width: 200 }}
-                        onChange={(e) => { this.state.searchAuditStatus = e }}>
+                    <Input placeholder="阿凡提号" value={this.state.searchAftId}
+                        onChange={(e) => { this.setState({ searchAftId: e.target.value }); }} />
+                    <Input placeholder="登录号" value={this.state.searchLoginId}
+                        onChange={(e) => { this.setState({ searchLoginId: e.target.value }); }} />
+                    <Select placeholder="选择认证状态" style={{ width: 140 }}
+                        value={this.state.searchAuditStatus}
+                        onChange={(e) => { this.setState({ searchAuditStatus: e }) }}>
                         {
                             auditStatusList.map(function (item, i) {
                                 return <Select.Option key={i} value={item.value} >{item.key}</Select.Option>
                             })
                         }
                     </Select>
-                    <Input placeholder="认证名称" onChange={(e) => { this.state.searchAftUsername = e.target.value; }} />
-                    <Input placeholder="联系方式" onChange={(e) => { this.state.searchEmail = e.target.value; }} />
+                    <Input placeholder="认证名称" value={this.state.searchAftUsername}
+                        onChange={(e) => { this.setState({ searchAftUsername: e.target.value }); }} />
+                    <Input placeholder="联系方式" value={this.state.searchEmail}
+                        onChange={(e) => { this.setState({ searchEmail : e.target.value }); }} />
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                         <p>
-                            <span>注册时间:</span><RangePicker onChange={(data,dataString)=>{this.state.searchTime = dataString }} />
+                            <span>注册时间:</span>
+                            <RangePicker value={[moment(this.state.searchTime[0]),moment(this.state.searchTime[1])]}
+                                onChange={(data, dataString) => { this.setState({searchTime : dataString}); }} />
                         </p>
                     </div>
                 </div>

+ 37 - 18
js/component/manageCenter/userManage/userList.jsx

@@ -1,7 +1,8 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message,DatePicker } from 'antd';
+import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
+import moment from 'moment';
 import './userList.less';
 import UserDesc from './userDesc.jsx';
 import { auditStatusList } from '../../dataDic.js';
@@ -20,11 +21,11 @@ const UserList = React.createClass({
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                mobile:this.state.searchLoginId, //登录名
-                email: this.state.searchEmail, 
+                mobile: this.state.searchLoginId, //登录名
+                email: this.state.searchEmail,
                 createTime: this.state.searchTime,
                 number: this.state.searchAftId, //阿凡提号
-                aftUsername : this.state.searchAftUsername,
+                aftUsername: this.state.searchAftUsername,
                 auditStatus: this.state.searchAuditStatus
             },
             success: function (data) {
@@ -40,8 +41,9 @@ const UserList = React.createClass({
                         mobile: thisdata.mobile,
                         email: thisdata.email,
                         createTime: thisdata.createTime,
-                        aftUsername:thisdata.aftUsername,
+                        aftUsername: thisdata.aftUsername,
                         number: thisdata.number,
+                        auditStatus:thisdata.auditStatus,
                         createTimeFormattedDate: thisdata.createTimeFormattedDate
                     });
                 };
@@ -89,10 +91,19 @@ const UserList = React.createClass({
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
                     render: text => {
-                        if (text == 5) {
-                            return "已认证"
-                        } else {
-                            return "未认证"
+                        switch (String(text)) {
+                            case "0":
+                                return "未提交审核";
+                            case "1":
+                                return "提交审核";
+                            case "2":
+                                return "审核未打款";
+                            case "3":
+                                return "审核已打款";
+                            case "4":
+                                return "认证未通过";
+                            case "5":
+                                return "已认证";
                         }
                     },
                 }, {
@@ -113,7 +124,8 @@ const UserList = React.createClass({
                     key: 'author',
                 }
             ],
-            dataSource: []
+            dataSource: [],
+            searchTime: [,]
         };
     },
     componentWillMount() {
@@ -138,7 +150,7 @@ const UserList = React.createClass({
         this.state.searchAuditStatus = "";
         this.state.searchAftUsername = "";
         this.state.searchEmail = "";
-        this.state.searchTime = [];
+        this.state.searchTime = [,];
         this.loadData();
     },
     searchSwitch() {
@@ -157,24 +169,31 @@ const UserList = React.createClass({
                     <span>个人用户管理</span>
                 </div>
                 <div className="user-search">
-                    <Input placeholder="阿凡提号" onChange={(e) => { this.state.searchAftId = e.target.value; }} />
-                    <Input placeholder="登录号" onChange={(e) => { this.state.searchLoginId = e.target.value; }} />
-                    <Select placeholder="选择认证状态" style={{ width: 200 }}
-                        onChange={(e) => { this.state.searchAuditStatus = e }}>
+                    <Input placeholder="阿凡提号" value={this.state.searchAftId}
+                        onChange={(e) => { this.setState({ searchAftId: e.target.value }); }} />
+                    <Input placeholder="登录号" value={this.state.searchLoginId}
+                        onChange={(e) => { this.setState({ searchLoginId: e.target.value }); }} />
+                    <Select placeholder="选择认证状态" style={{ width: 140 }}
+                        value={this.state.searchAuditStatus}
+                        onChange={(e) => { this.setState({ searchAuditStatus: e }) }}>
                         {
                             auditStatusList.map(function (item, i) {
                                 return <Select.Option key={i} value={item.value} >{item.key}</Select.Option>
                             })
                         }
                     </Select>
-                    <Input placeholder="认证名称" onChange={(e) => { this.state.searchAftUsername = e.target.value; }} />
-                    <Input placeholder="联系方式" onChange={(e) => { this.state.searchEmail = e.target.value; }} />
+                    <Input placeholder="认证名称" value={this.state.searchAftUsername}
+                        onChange={(e) => { this.setState({ searchAftUsername: e.target.value }); }} />
+                    <Input placeholder="联系方式" value={this.state.searchEmail}
+                        onChange={(e) => { this.setState({ searchEmail: e.target.value }); }} />
                     <Button type="primary" onClick={this.search}>搜索</Button>
                     <Button onClick={this.reset}>重置</Button>
                     <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
                         <p>
-                            <span>注册时间:</span><RangePicker onChange={(data,dataString)=>{this.state.searchTime = dataString }} />
+                            <span>注册时间:</span>
+                            <RangePicker value={[moment(this.state.searchTime[0]), moment(this.state.searchTime[1])]}
+                                onChange={(data, dataString) => { this.setState({ searchTime: dataString }); }} />
                         </p>
                     </div>
                 </div>

+ 1 - 1
js/component/manageCenter/userManage/userList.less

@@ -8,7 +8,7 @@
     .user-search {
         margin: 10px 0;
         >input {
-            width: 200px;
+            width: 140px;
         }
         >input,
         >button,

+ 56 - 2
js/component/tools.js

@@ -1,8 +1,12 @@
-import {message} from 'antd';
+import {
+    message
+} from 'antd';
 import {
     provinceList,
     patentTypeList,
-    patentStateList
+    patentStateList,
+    techFieldList,
+    technicalSourceList
 } from './dataDic.js';
 
 module.exports = {
@@ -144,5 +148,55 @@ module.exports = {
             });
             return theState;
         }
+    },
+    getTechnicalSource: function (e) {
+        if (e) {
+            let theSource = '';
+            technicalSourceList.map(function (item) {
+                if (item.value == e) {
+                    theSource = item.key;
+                };
+            });
+            return theSource;
+        }
+    },
+    getTechField: function (field1, field2, field3) {
+        let fieldList = [];
+        for (let i = 0; i < techFieldList.length; i++) {
+            fieldList.push({
+                value: techFieldList[i].value,
+                label: techFieldList[i].label
+            });
+            if (techFieldList[i].children) {
+                for (let j = 0; j < techFieldList[i].children.length; j++) {
+                    fieldList.push({
+                        value: techFieldList[i].children[j].value,
+                        label: techFieldList[i].children[j].label
+                    });
+                    if (techFieldList[i].children[j].children) {
+                        for (let n = 0; n < techFieldList[i].children[j].children.length; n++) {
+                            fieldList.push({
+                                value: techFieldList[i].children[j].children[n].value,
+                                label: techFieldList[i].children[j].children[n].label
+                            });
+                        }
+                    };
+                };
+            }
+        };
+        fieldList.sort(function (a, b) { return a.value - b.value });
+        let fieldKey= "";
+        fieldList.map(function (item) {
+            if (field1 == item.value) {
+                fieldKey = item.label;
+            };
+            if (field2 == item.value) {
+                fieldKey = fieldKey + "/" + item.label;
+            };
+            if (field3 == item.value) {
+                fieldKey = fieldKey + "/" + item.label;
+            };
+        });
+        return fieldKey;
     }
 }