Sfoglia il codice sorgente

Accept Merge Request #50 merge 1.0.43 : (master -> test)

Merge Request: merge 1.0.43
Created By: @seirios
Accepted By: @seirios
URL: https://coding.net/t/aft/p/AFT-WEB/git/merge/50
seirios 7 anni fa
parent
commit
e70bff2f88
43 ha cambiato i file con 9432 aggiunte e 198 eliminazioni
  1. 2 1
      css/sign.less
  2. BIN
      image/level_1.png
  3. BIN
      image/level_2.png
  4. BIN
      image/level_3.png
  5. BIN
      image/level_4.png
  6. BIN
      image/level_5.png
  7. 16 0
      js/admin/userOrder.js
  8. 14 6
      js/component/account/index/content.jsx
  9. 34 0
      js/component/account/index/content.less
  10. 5 2
      js/component/account/index/leftTab.jsx
  11. 64 11
      js/component/account/index/normal.jsx
  12. 264 0
      js/component/account/index/serviceList.jsx
  13. 0 0
      js/component/account/index/techList.jsx
  14. 16 16
      js/component/account/set/edu.jsx
  15. 12 0
      js/component/dataDic.js
  16. 24 10
      js/component/manageCenter/achievement/batchImport.jsx
  17. 13 4
      js/component/manageCenter/achievement/techAchievement.jsx
  18. 101 49
      js/component/manageCenter/achievement/techAchievementDesc.jsx
  19. 1 1
      js/component/manageCenter/demand/batchImport.jsx
  20. 12 3
      js/component/manageCenter/demand/techDemand.jsx
  21. 27 2
      js/component/manageCenter/demand/techDemandDesc.jsx
  22. 24 21
      js/component/manageCenter/idea/activity/activity.jsx
  23. 4 1
      js/component/manageCenter/idea/content.less
  24. 48 14
      js/component/manageCenter/idea/news/news.jsx
  25. 1 0
      js/component/manageCenter/topTab.jsx
  26. 11 3
      js/component/manageCenter/userManage/content.jsx
  27. 3 0
      js/component/manageCenter/userManage/leftTab.jsx
  28. 465 0
      js/component/manageCenter/userManage/levelSet.jsx
  29. 75 3
      js/component/manageCenter/userManage/userList.less
  30. 328 0
      js/component/manageCenter/userOrder/consultOrderList.jsx
  31. 55 0
      js/component/manageCenter/userOrder/content.jsx
  32. 63 0
      js/component/manageCenter/userOrder/content.less
  33. 45 0
      js/component/manageCenter/userOrder/leftTab.jsx
  34. 419 0
      js/component/manageCenter/userOrder/memberOrderList.jsx
  35. 16 16
      js/component/sign/account.jsx
  36. 2 2
      js/component/sign/group.less
  37. 15 15
      js/component/sign/groupAccount.jsx
  38. 16 10
      js/component/subscriberDetail/content.jsx
  39. 14 1
      js/component/tools.js
  40. 7203 0
      package-lock.json
  41. 2 2
      package.json
  42. 8 1
      webpack.config.js
  43. 10 4
      webpack/entry.config.js

+ 2 - 1
css/sign.less

@@ -34,4 +34,5 @@
             background: #fff;
         }
     }
-}
+}
+.group{margin-top: 0;}

BIN
image/level_1.png


BIN
image/level_2.png


BIN
image/level_3.png


BIN
image/level_4.png


BIN
image/level_5.png


+ 16 - 0
js/admin/userOrder.js

@@ -0,0 +1,16 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../css/base.less';
+
+import TopTab from '../component/manageCenter/topTab.jsx';
+import Footer from '../component/manageCenter/bottom.jsx';
+import Content from '../component/manageCenter/userOrder/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'userOrder'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 14 - 6
js/component/account/index/content.jsx

@@ -10,14 +10,14 @@ class Content extends Component {
             component: 'div'
         };
     }
-    componentWillMount() {
+    componentWillMount () {
         if (window.location.hash) {
             this.getKey(window.location.hash.substr(1));
         } else {
             this.getKey("normal");
         };
     }
-    getKey(key) {
+    getKey (key) {
         switch (key) {
             case 'normal':
                 require.ensure([], () => {
@@ -35,18 +35,26 @@ class Content extends Component {
                     });
                 });
                 break;
-            case 'orderList':
+            case 'techList':
                 require.ensure([], () => {
-                    const OrderList = require('./orderList').default;
+                    const TechList = require('./techList').default;
                     this.setState({
-                        component: OrderList
+                        component: TechList
+                    });
+                });
+                break;
+            case 'serviceList':
+                require.ensure([], () => {
+                    const ServiceList = require('./serviceList').default;
+                    this.setState({
+                        component: ServiceList
                     });
                 });
                 break;
         };
         window.location.hash = key;
     }
-    render() {
+    render () {
         return (
             <div className="acc-content">
                 <LeftTab handlekey={this.getKey.bind(this)} />

+ 34 - 0
js/component/account/index/content.less

@@ -9,6 +9,12 @@
                 font-size: 18px;
                 color: @a-color;
             }
+            img {
+                vertical-align: top;
+                margin-left: 10px;
+                width: 22px;
+                height: 22px;
+            }
         }
         .index-userdata {
             background: #fff;
@@ -142,4 +148,32 @@
                 width: auto;
             }
         }
+        .content-title {
+            color: #333;
+            font-size: 16px;
+        }
+        .user-search {
+            margin: 10px 0;
+            >input {
+                width: 140px;
+            }
+            >input,
+            >button,
+            .ant-select {
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+            .search-div {
+                display: inline-block;
+                margin-top: 10px;
+                margin-right: 10px;
+            }
+        }
+    }
+
+    .modal-box {
+        margin-top: 20px;
+        >button {
+            margin-right: 20px;
+        }
     }

+ 5 - 2
js/component/account/index/leftTab.jsx

@@ -34,8 +34,11 @@ const LeftTab = React.createClass({
                 <Menu.Item key="collection">
                     我感兴趣
                 </Menu.Item>
-                <Menu.Item key="orderList">
-                    我的订单
+                <Menu.Item key="techList">
+                    科技订单
+                </Menu.Item>
+                <Menu.Item key="serviceList">
+                    服务订单
                 </Menu.Item>
             </Menu>
         );

+ 64 - 11
js/component/account/index/normal.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Spin, Button, Tabs, message } from 'antd';
+import { Spin, Button, Tabs, message, Modal } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
@@ -12,15 +12,21 @@ import weixin from '../../../../image/weixin-w.png';
 import qq from '../../../../image/qq-w.png';
 import weibo from '../../../../image/weibo-w.png';
 
-const TabPane = Tabs.TabPane;
+import level1 from '../../../../image/level_1.png';
+import level2 from '../../../../image/level_2.png';
+import level3 from '../../../../image/level_3.png';
+import level4 from '../../../../image/level_4.png';
+import level5 from '../../../../image/level_5.png';
+
 
 const Content = React.createClass({
-    getInitialState() {
+    getInitialState () {
         return {
-            loading: false
+            loading: false,
+            visible: false
         };
     },
-    getData() {
+    getData () {
         this.setState({
             loading: false
         });
@@ -36,6 +42,7 @@ const Content = React.createClass({
                     achievementNum: data.data.achievementNum,
                     copyrightNum: data.data.copyrightNum,
                     demandNum: data.data.demandNum,
+                    gradeName: data.data.gradeName,
                     email: data.data.email,
                     intellectualPropertyNum: data.data.intellectualPropertyNum,
                     logoUrl: data.data.logoUrl,
@@ -46,7 +53,8 @@ const Content = React.createClass({
                     personPortraitUrl: data.data.personPortraitUrl,
                     techProjectNum: data.data.techProjectNum,
                     type: data.data.type,
-                    uid: data.data.uid
+                    uid: data.data.uid,
+                    visible: !data.data.lvl || data.data.lvl == 0 ? true : false
                 })
             }
         }.bind(this)).always(function () {
@@ -55,18 +63,43 @@ const Content = React.createClass({
             });
         }.bind(this));
     },
-    componentWillMount() {
+    componentWillMount () {
         this.getData();
     },
-    tabChange(key) {
+    tabChange (key) {
 
     },
-    render() {
+    render () {
+        const TabPane = Tabs.TabPane;
         return (
             <Spin spinning={this.state.loading} className='spin-box'>
                 <div className="index-content">
                     <div className="index-userdata clearfix">
-                        <p className="acc-title">欢迎, <span>{this.state.nickname || ('No.' + this.state.number)}</span>     </p>
+                        <p className="acc-title">
+                            欢迎,
+                            <span>{this.state.nickname || ('No.' + this.state.number)}</span>
+                            <img src={(() => {
+                                switch (this.state.level) {
+                                    case 1:
+                                        return globalConfig.avatarUploadHost + '/rank/level_1.png';
+                                    case 2:
+                                        return globalConfig.avatarUploadHost + '/rank/level_2.png';
+                                    case 3:
+                                        return globalConfig.avatarUploadHost + '/rank/level_3.png';
+                                    case 4:
+                                        return globalConfig.avatarUploadHost + '/rank/level_4.png';
+                                    case 5:
+                                        return globalConfig.avatarUploadHost + '/rank/level_5.png';
+                                    default:
+                                        return ""
+                                }
+                            })()} alt="" />
+                            {(() => {
+                                if (this.state.level < 2) {
+                                    return <span><a href={globalConfig.context + '/portal/membership.html'}>升级高级会员</a>获取更多会员权益</span>;
+                                }
+                            })()}
+                        </p>
                         <div className="userdata-img">
                             {this.state.personPortraitUrl || this.state.logoUrl ?
                                 <img src={globalConfig.avatarHost + "/upload" + (this.state.type == 0 ? this.state.personPortraitUrl : this.state.logoUrl)} alt="" />
@@ -75,7 +108,7 @@ const Content = React.createClass({
                         <div className="userdata-content">
                             {(() => {
                                 if (this.state.level > 0) {
-                                    return <p className="userdata-lvl"><span>Lv.{this.state.level}</span> 用户</p>;
+                                    return <p className="userdata-lvl"><span>{this.state.gradeName}</span></p>;
                                 } else {
                                     return <p className="userdata-lvl"><span>用户未认证</span><a style={{ marginLeft: '20px' }} href={userData.type == 1 ? globalConfig.context + "/user/groupCertify.html" : globalConfig.context + "/user/certify.html"}>进行实名认证</a></p>;
                                 };
@@ -108,6 +141,26 @@ const Content = React.createClass({
                         <Collection />
                     </div>
                 </div>
+                <Modal maskClosable={false}
+                    title="实名认证提示"
+                    visible={this.state.visible}
+                    onCancel={() => {
+                        this.setState({
+                            visible: false,
+                        });
+                    }}
+                    width='400px'
+                    footer={[]} >
+                    <p style={{ textAlign: 'center' }}>
+                        <span>您还未进行实名认证,请完成实名认证,为您提供更多服务</span>
+                    </p>
+                    <div style={{ marginTop: '20px', textAlign: 'center' }}>
+                        <Button type="primary"
+                            onClick={() => {
+                                window.open(this.state.type == 1 ? globalConfig.context + "/user/groupCertify.html" : globalConfig.context + "/user/certify.html")
+                            }}>马上去</Button>
+                    </div>
+                </Modal>
             </Spin>
         )
     }

+ 264 - 0
js/component/account/index/serviceList.jsx

@@ -0,0 +1,264 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, message, DatePicker, Modal } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './content.less';
+import { getTime } from '../../tools'
+
+
+const OrderList = React.createClass({
+    loadData (pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/member/selectMemberOrder",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                id: this.state.searchOrderNumber,
+                orderState: this.state.searchOrderStatus,
+                startTime: this.state.searchTime[0],
+                endTime: this.state.searchTime[1]
+            },
+            success: function (data) {
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        this.state.data.push({
+                            key: i,
+                            formattedOrderTime: thisdata.formattedOrderTime,
+                            formattedPaymentTime: thisdata.formattedPaymentTime,
+                            formattedValidTime: thisdata.formattedValidTime,
+                            gradeName: thisdata.gradeName,
+                            id: thisdata.id,
+                            menberType: thisdata.menberType,
+                            orderState: thisdata.orderState,
+                            orderTime: thisdata.orderTime,
+                            paymentId: thisdata.paymentId,
+                            paymentTime: thisdata.paymentTime,
+                            paymentType: thisdata.paymentType,
+                            paymentValue: thisdata.paymentValue,
+                            price: thisdata.price,
+                            userId: thisdata.userId,
+                            validMonth: thisdata.validMonth,
+                            validTime: thisdata.validTime
+                        });
+                    };
+                    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 {
+            searchMore: true,
+            visible: false,
+            deleteId: null,
+            data: [],
+            searchTime: [],
+            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: 'id',
+                    key: 'id',
+                }, {
+                    title: '会员类型',
+                    dataIndex: 'gradeName',
+                    key: 'gradeName',
+                }, {
+                    title: '订单状态',
+                    dataIndex: 'orderState',
+                    key: 'orderState',
+                    render: (text, record) => {
+                        if (text == 1) {
+                            return '已完成'
+                        } else {
+                            let now = new Date();
+                            let endTime = new Date(record.orderTime + 24 * 60 * 60 * 1000 * 15)
+                            if (now > endTime) {
+                                return '已失效'
+                            } else {
+                                return '未支付'
+                            }
+                        }
+                    }
+                }, {
+                    title: '生成时间',
+                    dataIndex: 'formattedOrderTime',
+                    key: 'formattedOrderTime',
+                }, {
+                    title: '支付内容',
+                    dataIndex: 'payText',
+                    key: 'payText',
+                    render: (text, record) => {
+                        return record.price + '元 / ' + record.validMonth + '月'
+                    }
+                }, {
+                    title: '支付时间',
+                    dataIndex: 'formattedPaymentTime',
+                    key: 'formattedPaymentTime',
+                }, {
+                    title: '有效时间',
+                    dataIndex: 'validTime',
+                    key: 'validTime',
+                    render: (index, record) => {
+                        if (record.paymentTime && record.validMonth && record.orderState == 1) {
+                            return getTime(record.paymentTime) + ' -- ' + getTime(record.paymentTime, record.validMonth)
+                        }
+                    }
+                }, {
+                    title: '操作',
+                    dataIndex: 'action',
+                    key: 'action',
+                    render: (text, record) => {
+                        let now = new Date();
+                        let endTime = new Date(record.orderTime + 24 * 60 * 60 * 1000 * 15)
+                        if (record.orderState == 0 && now < endTime) {
+                            return <div>
+                                <Button type="primary" onClick={() => { }}>支付</Button>
+                                <Button style={{ marginLeft: '10px' }} type="primary"
+                                    onClick={() => { this.setState({ visible: true, deleteId: record.id }) }} >取消订单</Button>
+                            </div>
+                        } else if (record.orderState == 0) {
+                            return <div><Button type="primary"
+                                onClick={() => { this.setState({ visible: true, deleteId: record.id }) }}>取消订单</Button></div>
+                        }
+                    }
+                }
+            ],
+            dataSource: []
+        };
+    },
+    delRow () {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/member/delMemberOrder",
+            data: {
+                id: this.state.deleteId
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                deleteId: null,
+                visible: false,
+                loading: false,
+            });
+            this.loadData();
+        }.bind(this));
+    },
+    componentWillMount () {
+        this.loadData();
+    },
+    search () {
+        this.loadData();
+    },
+    reset () {
+        this.state.searchOrderNumber = undefined;
+        this.state.searchOrderStatus = undefined;
+        this.state.searchOrderType = undefined;
+        this.state.searchTime = [];
+        this.loadData();
+    },
+    render () {
+        const { RangePicker } = DatePicker;
+        const Option = Select.Option;
+        return (
+            <div className="collection" >
+                <div className="content-title">
+                    <span>服务订单列表</span>
+                </div>
+                <div className="user-search" style={{ display: 'none' }}>
+                    <Input placeholder="订单编号" value={this.state.searchOrderNumber}
+                        onChange={(e) => { this.setState({ searchOrderNumber: e.target.value }); }} />
+                    <Select placeholder="订单类型" value={this.state.searchOrderType} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchOrderType: e }) }}>
+                        <Option value="0">会员服务</Option>
+                        <Option value="1">科技服务</Option>
+                    </Select>
+                    <Select placeholder="订单状态" value={this.state.searchOrderStatus} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchOrderStatus: e }) }}>
+                        <Option value="0">未付款</Option>
+                        <Option value="1">已付款</Option>
+                    </Select>
+                    <div className="search-div">
+                        <span>订单生成时间:</span>
+                        <RangePicker
+                            allowClear={false}
+                            value={[this.state.searchTime[0] ? moment(this.state.searchTime[0]) : null,
+                            this.state.searchTime[1] ? moment(this.state.searchTime[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ searchTime: dataString }); }} />
+                    </div>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <Modal title="取消确认" width={600} className="activity-modal"
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    onCancel={() => { this.setState({ visible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="clearfix">
+                            <div>
+                                <span>是否确定取消这个订单?取消后后订单不可恢复!</span>
+                            </div>
+                            <div className="modal-box" >
+                                <Button type="primary" onClick={this.delRow}>确认</Button>
+                                <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
+                            </div>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div >
+        );
+    }
+});
+
+export default OrderList;

js/component/account/index/orderList.jsx → js/component/account/index/techList.jsx


+ 16 - 16
js/component/account/set/edu.jsx

@@ -21,20 +21,20 @@ class Avatar extends React.Component {
             propsbool: true,
         }
     }
-    handleChange(info) {
+    handleChange (info) {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
             this.props.urlData(info.file.response.data);
         }
     }
-    componentWillReceiveProps(nextProps) {
+    componentWillReceiveProps (nextProps) {
         if (nextProps.picUrl && this.state.propsbool) {
-            this.state.imageUrl = globalConfig.avatarHost + "/upload" + nextProps.picUrl;
+            this.state.imageUrl = globalConfig.context + "/open/downLoadPicture?path=" + nextProps.picUrl;
             this.state.propsbool = false;
         }
     }
-    render() {
+    render () {
         const imageUrl = this.state.imageUrl;
         return (
             <Upload
@@ -57,7 +57,7 @@ class Avatar extends React.Component {
 };
 
 const EduFrom = Form.create()(React.createClass({
-    getData() {
+    getData () {
         this.props.spinState(true);
         $.ajax({
             method: "get",
@@ -86,7 +86,7 @@ const EduFrom = Form.create()(React.createClass({
             this.props.spinState(false);
         }.bind(this));
     },
-    getInitialState() {
+    getInitialState () {
         return {
             loading: false,
             xueweiPicUrl: '',
@@ -94,10 +94,10 @@ const EduFrom = Form.create()(React.createClass({
             eduPfs: []
         };
     },
-    componentDidMount() {
+    componentDidMount () {
         this.getData();
     },
-    handleSubmit(e) {
+    handleSubmit (e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (!err) {
@@ -131,19 +131,19 @@ const EduFrom = Form.create()(React.createClass({
             }
         });
     },
-    downloadPic(type) {
+    downloadPic (type) {
         window.open(globalConfig.context + "/open/downLoadPicture?path=" + type)
     },
-    handleyear(e) {
+    handleyear (e) {
         this.state.graduationTimeYear = e;
     },
-    xueliPicUrl(e) {
+    xueliPicUrl (e) {
         this.state.xueliPicUrl = e;
     },
-    xueweiPicUrl(e) {
+    xueweiPicUrl (e) {
         this.state.xueweiPicUrl = e;
     },
-    render() {
+    render () {
         const { getFieldDecorator } = this.props.form;
         const formItemLayout = {
             labelCol: { span: 4 },
@@ -250,17 +250,17 @@ const EduFrom = Form.create()(React.createClass({
 }));
 
 const Person = React.createClass({
-    getInitialState() {
+    getInitialState () {
         return {
             loading: false
         };
     },
-    spinChange(e) {
+    spinChange (e) {
         this.setState({
             loading: e
         });
     },
-    render() {
+    render () {
         return (
             <Spin spinning={this.state.loading} className='spin-box'>
                 <div className="set-edu">

+ 12 - 0
js/component/dataDic.js

@@ -40,6 +40,7 @@ module.exports = {
             key: "发明专利"
         }
     ],
+    
     patentFieldList:[
        {
             value: "0",
@@ -801,4 +802,15 @@ module.exports = {
             key: "线下现场"
         }
     ],
+    //是否精品
+    boutique:[
+        {
+            value: "0",
+            key: "否"
+        }, {
+            value: "1",
+            key: "是"
+        }
+    ],
+    
 };

+ 24 - 10
js/component/manageCenter/achievement/batchImport.jsx

@@ -11,23 +11,23 @@ const BatchImport = React.createClass({
             error: false
         };
     },
-    showModal() {
+    showModal () {
         this.setState({
             visible: true,
         });
     },
-    handleOk(e) {
+    handleOk (e) {
         this.setState({
             visible: false,
         });
     },
-    handleCancel(e) {
+    handleCancel (e) {
         this.setState({
             visible: false,
         });
     },
     //数据反向转化
-    getDataCategory(e, row) {
+    getDataCategory (e, row) {
         switch (e) {
             case "成果":
                 return 0;
@@ -41,7 +41,7 @@ const BatchImport = React.createClass({
                 break;
         }
     },
-    getOwnerType(e, row) {
+    getOwnerType (e, row) {
         switch (e) {
             case "个人":
                 return 0;
@@ -53,7 +53,7 @@ const BatchImport = React.createClass({
                 break;
         }
     },
-    getCategory(e, row) {
+    getCategory (e, row) {
         let theType = null, _me = this;
         if (e) {
             achievementCategoryList.map(function (item) {
@@ -68,7 +68,7 @@ const BatchImport = React.createClass({
             return theType;
         };
     },
-    getCooperationMode(e, row) {
+    getCooperationMode (e, row) {
         switch (e) {
             case "技术转让":
                 return 0;
@@ -81,7 +81,7 @@ const BatchImport = React.createClass({
         }
     },
     //提交
-    handleSubmit() {
+    handleSubmit () {
         let rowsArr = this.state.inputValue.split(/[\r\n]/g);
         let columnArr = [], _me = this;
         if (!rowsArr.length) {
@@ -93,7 +93,7 @@ const BatchImport = React.createClass({
                 this.state.error = false;
                 return;
             };
-            let theArr = rowsArr[i].split(/\t+/);
+            let theArr = rowsArr[i].split(/\t/);
             if (theArr.length == columnLength) {
                 columnArr.push({
                     dataCategory: _me.getDataCategory(theArr[0], i + 1),
@@ -114,6 +114,20 @@ const BatchImport = React.createClass({
                 return;
             };
         };
+        // for (let i = 0; i < columnArr.length; i++) {
+        //     if (columnArr[i].dataCategory.toString().length > 1) { console.log((i + 1) + "行:" + "dataCategory") }
+        //     if (columnArr[i].name.toString().length > 31) { console.log((i + 1) + "行:" + "name") }
+        //     if (columnArr[i].category.toString().length > 1) { console.log((i + 1) + "行:" + "category") }
+        //     if (columnArr[i].ownerName.toString().length > 31) { console.log((i + 1) + "行:" + "ownerName") }
+        //     if (columnArr[i].ownerIdNumber.toString().length > 35) { console.log((i + 1) + "行:" + "ownerIdNumber") }
+        //     if (columnArr[i].ownerMobile.toString().length > 11) { console.log((i + 1) + "行:" + "ownerMobile") }
+        //     if (columnArr[i].ownerEmail.toString().length > 254) { console.log((i + 1) + "行:" + "ownerEmail") }
+        //     if (columnArr[i].ownerPostalAddress.toString().length > 254) { console.log((i + 1) + "行:" + "ownerPostalAddress") }
+        //     if (columnArr[i].cooperationMode.toString().length > 1) { console.log((i + 1) + "行:" + "cooperationMode") }
+        //     if (columnArr[i].introduction.toString().length > 298) { console.log((i + 1) + "行:" + "introduction") }
+        //     if (columnArr[i].keyword.toString().length > 44) { console.log((i + 1) + "行:" + "ownerType") }
+        //     if (columnArr[i].ownerType.toString().length > 1) { console.log((i + 1) + "行:" + "ownerType") }
+        // }
         if (columnArr.length > 1000) {
             message.warning("数据条数不能多于1000条!");
             return;
@@ -142,7 +156,7 @@ const BatchImport = React.createClass({
             };
         }.bind(this));
     },
-    render() {
+    render () {
         return (
             <div>
                 <Button type="primary" onClick={this.showModal}>批量导入</Button>

+ 13 - 4
js/component/manageCenter/achievement/techAchievement.jsx

@@ -6,7 +6,7 @@ import moment from 'moment';
 import './techAchievement.less';
 import TechAchievementDesc from './techAchievementDesc.jsx';
 import { achievementCategoryList, techAuditStatusList } from '../../dataDic.js';
-import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus } from '../../tools.js';
+import { beforeUploadFile, companySearch, getAchievementCategory, getSearchUrl, getTechAuditStatus ,getboutique} from '../../tools.js';
 import BatchImport from './batchImport';
 
 const AchievementList = React.createClass({
@@ -33,7 +33,8 @@ const AchievementList = React.createClass({
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 releaseStatus: this.state.releaseStatus ? Number(this.state.releaseStatus) : undefined, //是否发布(0--未发布,1--已发布)
-                auditStatus: this.state.auditStatus
+                auditStatus: this.state.auditStatus,
+                boutique:this.state.boutique
             },
             success: function (data) {
                 let theArr = [];
@@ -59,7 +60,8 @@ const AchievementList = React.createClass({
                             status: thisdata.status,
                             releaseDate: thisdata.releaseDate,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            auditStatus: thisdata.auditStatus
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -124,7 +126,14 @@ const AchievementList = React.createClass({
                     dataIndex: 'auditStatus',
                     key: 'auditStatus',
                     render: text => { return getTechAuditStatus(text) }
-                }, {
+                }, 
+                {
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
                     title: '发布时间',
                     dataIndex: 'releaseDateFormattedDate',
                     key: 'releaseDateFormattedDate',

+ 101 - 49
js/component/manageCenter/achievement/techAchievementDesc.jsx

@@ -7,27 +7,26 @@ import { maturityList, innovationList, transferModeList } from '../../dataDic';
 import { IndustryObject, getIndustryCategory } from '../../DicIndustryList.js';
 import { beforeUploadFile, splitUrl, companySearch, getTransferMode, getAchievementCategory, getTechAuditStatus, getDemandType, getMaturity, getInnovation } from '../../tools.js';
 import throttle from '../../throttle.js';
-
 const KeyWordTagGroup = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             tags: [],
             inputVisible: false,
             inputValue: ''
         };
     },
-    handleClose (removedTag) {
+    handleClose(removedTag) {
         const tags = this.state.tags.filter(tag => tag !== removedTag);
         this.props.tagsArr(tags);
         this.setState({ tags });
     },
-    showInput () {
+    showInput() {
         this.setState({ inputVisible: true }, () => this.input.focus());
     },
-    handleInputChange (e) {
+    handleInputChange(e) {
         this.setState({ inputValue: e.target.value });
     },
-    handleInputConfirm () {
+    handleInputConfirm() {
         const state = this.state;
         const inputValue = state.inputValue;
         let tags = state.tags;
@@ -41,15 +40,15 @@ const KeyWordTagGroup = React.createClass({
             inputValue: '',
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.state.tags = this.props.keyWordArr;
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (this.props.keyWordArr != nextProps.keyWordArr) {
             this.state.tags = nextProps.keyWordArr;
         };
     },
-    render () {
+    render() {
         const { tags, inputVisible, inputValue } = this.state;
         return (
             <div className="keyWord-tips">
@@ -80,31 +79,31 @@ const KeyWordTagGroup = React.createClass({
 });
 
 const PicturesWall = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             previewVisible: false,
             previewImage: '',
             fileList: [],
         }
     },
-    handleCancel () {
+    handleCancel() {
         this.setState({ previewVisible: false })
     },
-    handlePreview (file) {
+    handlePreview(file) {
         this.setState({
             previewImage: file.url || file.thumbUrl,
             previewVisible: true,
         });
     },
-    handleChange (info) {
+    handleChange(info) {
         let fileList = info.fileList;
         this.setState({ fileList });
         this.props.fileList(fileList);
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         this.state.fileList = nextProps.pictureUrl;
     },
-    render () {
+    render() {
         const { previewVisible, previewImage, fileList } = this.state;
         const uploadButton = (
             <div>
@@ -132,7 +131,7 @@ const PicturesWall = React.createClass({
 });
 
 const AchievementDetailShow = Form.create()(React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             loading: false,
             buttonLoading: false,
@@ -146,7 +145,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             businessPlanFileList: []
         };
     },
-    loadData (id, detailApiUrl) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
@@ -184,7 +183,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    offShelf () {
+    offShelf() {
         this.setState({
             loading: true
         });
@@ -207,7 +206,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         }.bind(this));
     },
-    modifyBroker () {
+    modifyBroker() {
         this.props.form.validateFields((err, values) => {
             if (!err) {
                 this.setState({
@@ -237,7 +236,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         });
     },
-    formSubmit () {
+    formSubmit() {
         this.props.form.validateFields((err, values) => {
             if (values.auditStatus == 3 && !values.techBrokerId) {
                 message.warning('必须选择一个技术经纪人!');
@@ -275,7 +274,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }
         });
     },
-    handleSubmit (e) {
+    handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             if (values.auditStatus == 4) {
@@ -287,7 +286,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             };
         });
     },
-    buildMatchList () {
+    buildMatchList() {
         this.setState({
             buttonLoading: true
         });
@@ -310,7 +309,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             };
         }.bind(this));
     },
-    getContactsList (theUid) {
+    getContactsList(theUid) {
         $.ajax({
             method: "get",
             dataType: "json",
@@ -333,10 +332,10 @@ const AchievementDetailShow = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.loadData(this.props.data.id, this.props.detailApiUrl);
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id, nextProps.detailApiUrl);
             this.state.textFileList = [];
@@ -345,7 +344,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
             this.props.form.resetFields();
         };
     },
-    render () {
+    render() {
         const theData = this.state.data || {};
         const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
@@ -386,7 +385,31 @@ const AchievementDetailShow = Form.create()(React.createClass({
                             label="类型" >
                             <span>{getAchievementCategory(theData.category)}</span>
                         </FormItem>
-                    </div>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="军民融合" >
+                            {(() => {
+                                switch (theData.jmrhFlag) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
+                            label="精品成果" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                    </div>            
                     <div className="clearfix">
                         <FormItem className="half-item"
                             {...formItemLayout}
@@ -730,7 +753,7 @@ const AchievementDetailShow = Form.create()(React.createClass({
 }));
 
 const AchievementDetailForm = Form.create()(React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             loading: false,
             auditStatus: 0,
@@ -745,7 +768,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             dataSource: [],
         };
     },
-    loadData (id, detailApiUrl) {
+    loadData(id, detailApiUrl) {
         this.setState({
             loading: true
         });
@@ -784,7 +807,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    getContactsList (theUid) {
+    getContactsList(theUid) {
         $.ajax({
             method: "get",
             dataType: "json",
@@ -813,16 +836,16 @@ const AchievementDetailForm = Form.create()(React.createClass({
             }.bind(this),
         });
     },
-    getTagsArr (e) {
+    getTagsArr(e) {
         this.setState({ tags: e });
     },
-    getMaturityPictureUrl (e) {
+    getMaturityPictureUrl(e) {
         this.setState({ maturityPictureUrl: e });
     },
-    getTechnicalPictureUrl (e) {
+    getTechnicalPictureUrl(e) {
         this.setState({ technicalPictureUrl: e });
     },
-    handleSearch (e) {
+    handleSearch(e) {
         if (this.props.detailApiUrl.indexOf('org') != -1) {
             $.ajax({
                 method: "get",
@@ -877,7 +900,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             });
         };
     },
-    handleSubmit (e) {
+    handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
             //keyword长度判断
@@ -959,7 +982,9 @@ const AchievementDetailForm = Form.create()(React.createClass({
                         releaseStatus: values.releaseStatus,
                         techPlanUrl: this.state.techPlanUrl,
                         businessPlanUrl: this.state.businessPlanUrl,
-                        auditStatus: this.state.auditStatus
+                        auditStatus: this.state.auditStatus,
+                        jmrhFlag: values.jmrhFlag,
+                        boutique: values.boutique,                       
                     }
                 }).done(function (data) {
                     this.state.auditStatus = 0;
@@ -976,13 +1001,13 @@ const AchievementDetailForm = Form.create()(React.createClass({
             }
         });
     },
-    componentWillMount () {
+    componentWillMount() {
         this.state.therottleSearch = throttle(this.handleSearch, 1000, { leading: false }).bind(this);
         if (this.props.data && this.props.data.id) {
             this.loadData(this.props.data.id, this.props.detailApiUrl);
         };
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             if (nextProps.data && nextProps.data.id) {
                 this.loadData(nextProps.data.id, nextProps.detailApiUrl);
@@ -998,7 +1023,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
             this.props.form.resetFields();
         };
     },
-    render () {
+    render() {
         const theData = this.state.data || {};
         const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
@@ -1051,6 +1076,34 @@ const AchievementDetailForm = Form.create()(React.createClass({
                                 </Select>
                                 )}
                         </FormItem>
+                        <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="军民融合" >
+                                {getFieldDecorator('jmrhFlag', {
+                                    initialValue: theData.jmrhFlag
+                                })(
+                                    <Radio.Group>
+                                        <Radio value="0">否</Radio>
+                                        <Radio value="1">是</Radio>
+                                    </Radio.Group>
+                                    )}
+                        </FormItem>
+                        
+                        
+                         <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="精品成果" >
+                                {getFieldDecorator('boutique', {
+                                    initialValue: theData.boutique
+                                })(
+                                    <Radio.Group>
+                                        <Radio value="0">否</Radio>
+                                        <Radio value="1">是</Radio>
+                                    </Radio.Group>
+                                    )}
+                        </FormItem>
+                        
+                        
                         <div className="clearfix">
                             <FormItem className="half-item"
                                 {...formItemLayout}
@@ -1130,7 +1183,6 @@ const AchievementDetailForm = Form.create()(React.createClass({
                             {...formItemLayout}
                             label="成熟度" >
                             {getFieldDecorator('maturity', {
-                                rules: [{ type: 'string', required: true, message: '此项为必填项!' }],
                                 initialValue: theData.maturity
                             })(
                                 <Select placeholder="选择成熟度" style={{ width: 160 }} >
@@ -1497,7 +1549,7 @@ const AchievementDetailForm = Form.create()(React.createClass({
 }));
 
 const AchievementDetail = React.createClass({
-    getInitialState () {
+    getInitialState() {
         return {
             visible: false,
             tabsKey: 1,
@@ -1551,7 +1603,7 @@ const AchievementDetail = React.createClass({
             dataSource: [],
         };
     },
-    getTechBrodersList () {
+    getTechBrodersList() {
         this.setState({
             loading: true
         });
@@ -1584,7 +1636,7 @@ const AchievementDetail = React.createClass({
             });
         }.bind(this));
     },
-    getTableList () {
+    getTableList() {
         this.setState({
             loading: true
         });
@@ -1627,31 +1679,31 @@ const AchievementDetail = React.createClass({
             });
         }.bind(this));
     },
-    tableRowClick (record, index) {
+    tableRowClick(record, index) {
         window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
     },
-    handleCancel (e) {
+    handleCancel(e) {
         this.setState({
             visible: false,
         });
         this.props.closeDesc(false);
     },
-    handleOk (e) {
+    handleOk(e) {
         this.setState({
             visible: false,
         });
         this.props.closeDesc(false, true);
     },
-    componentWillMount () {
+    componentWillMount() {
         this.getTechBrodersList();
     },
-    componentWillReceiveProps (nextProps) {
+    componentWillReceiveProps(nextProps) {
         if (!this.state.visible && nextProps.showDesc) {
             this.state.tabsKey = "1";
         };
         this.state.visible = nextProps.showDesc;
     },
-    render () {
+    render() {
         if (this.props.data) {
             return (
                 <div className="patent-desc">

+ 1 - 1
js/component/manageCenter/demand/batchImport.jsx

@@ -67,7 +67,7 @@ const BatchImport = React.createClass({
                 this.state.error = false;
                 return;
             };
-            let theArr = rowsArr[i].split(/\t+/);
+            let theArr = rowsArr[i].split(/\t/);
             if (theArr.length == columnLength) {
                 columnArr.push({
                     dataCategory: _me.getDataCategory(theArr[0], i + 1),

+ 12 - 3
js/component/manageCenter/demand/techDemand.jsx

@@ -6,7 +6,7 @@ import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './techDemandDesc.jsx';
 import { demandTypeList } from '../../dataDic.js';
-import { companySearch, getDemandType, getSearchUrl, beforeUploadFile } from '../../tools.js';
+import { companySearch, getDemandType, getSearchUrl, beforeUploadFile ,getboutique} from '../../tools.js';
 import BatchImport from './batchImport';
 
 const DemandList = React.createClass({
@@ -36,6 +36,7 @@ const DemandList = React.createClass({
                 releaseDateStartDate: this.state.releaseDate[0],
                 releaseDateEndDate: this.state.releaseDate[1],
                 auditStatus: this.state.auditStatus,
+                boutique:this.state.boutique,
                 employerName: this.state.searchType == 1 ? this.state.searchName : undefined,
                 username: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('org') == -1 ? this.state.searchName : undefined,
                 unitName: this.state.searchType == 0 && this.props['data-listApiUrl'].indexOf('user') == -1 ? this.state.searchName : undefined,
@@ -70,7 +71,8 @@ const DemandList = React.createClass({
                             principalId: thisdata.principalId,
                             validityPeriodFormattedDate: thisdata.validityPeriodFormattedDate,
                             releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
-                            auditStatus: thisdata.auditStatus
+                            auditStatus: thisdata.auditStatus,
+                            boutique: thisdata.boutique
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -117,7 +119,14 @@ const DemandList = React.createClass({
                     title: '需求名称',
                     dataIndex: 'name',
                     key: 'name',
-                }, {
+                }, 
+              	{
+                    title: '是否精品',
+                    dataIndex: 'boutique',
+                    key: 'boutique',
+                    render: text => { return getboutique(text) }
+                },
+                {
                     title: '关键字',
                     dataIndex: 'keyword',
                     key: 'keyword',

+ 27 - 2
js/component/manageCenter/demand/techDemandDesc.jsx

@@ -598,6 +598,18 @@ const DemandDetailShow = Form.create()(React.createClass({
                         </FormItem>
                         <FormItem className="half-item"
                             {...formItemLayout}
+                            label="精品需求" >
+                            {(() => {
+                                switch (theData.boutique) {
+                                    case "0":
+                                        return <span>否</span>;
+                                    case "1":
+                                        return <span>是</span>;
+                                }
+                            })()}
+                        </FormItem>
+                        <FormItem className="half-item"
+                            {...formItemLayout}
                             label="有效期限" >
                             <span>{theData.validityPeriodFormattedDate}</span>
                         </FormItem>
@@ -800,7 +812,7 @@ const DemandDetailForm = Form.create()(React.createClass({
                         fixedCycle: values.fixedCycle,
                         peopleNumber: values.peopleNumber,
                         fixedScheme: values.fixedScheme,
-                        costEscrow: values.costEscrow,
+                        costEscrow: values.costEscrow,                        
                         budgetCost: values.budgetCost,
                         //
                         switchSign: this.state.switchValue ? 1 : 0,
@@ -818,7 +830,8 @@ const DemandDetailForm = Form.create()(React.createClass({
                         validityPeriodFormattedDate: values.validityPeriod ? values.validityPeriod.format('YYYY-MM-DD') : undefined,
                         //
                         status: this.state.status,
-                        auditStatus: this.state.auditStatus
+                        auditStatus: this.state.auditStatus,
+                        boutique: values.boutique, 
                     }
                 }).done(function (data) {
                     this.state.auditStatus = 0;
@@ -1224,6 +1237,18 @@ const DemandDetailForm = Form.create()(React.createClass({
                                 )}
                         </FormItem>
                         <FormItem className="half-item"
+                                {...formItemLayout}
+                                label="精品需求" >
+                                {getFieldDecorator('boutique', {
+                                    initialValue: theData.boutique
+                                })(
+                                    <Radio.Group>
+                                        <Radio value="0">否</Radio>
+                                        <Radio value="1">是</Radio>
+                                    </Radio.Group>
+                                    )}
+                        </FormItem>
+                        <FormItem className="half-item"
                             {...formItemLayout}
                             label="有效期限" >
                             {getFieldDecorator('validityPeriod', {

+ 24 - 21
js/component/manageCenter/idea/activity/activity.jsx

@@ -8,24 +8,24 @@ import $ from 'jquery/src/ajax';
 
 
 const Avatar = React.createClass({
-    getInitialState() {
+    getInitialState () {
         return {
             imageUrl: ''
         }
     },
-    handleChange(info) {
+    handleChange (info) {
         if (info.file.status === 'done') {
             // Get this url from response in real world.
             getBase64(info.file.originFileObj, imageUrl => this.setState({ imageUrl }));
             this.props.urlData(info.file.response.data);
         }
     },
-    componentWillReceiveProps(nextProps) {
+    componentWillReceiveProps (nextProps) {
         if (this.props.visible && !nextProps.visible) {
             this.state.imageUrl = null;
         };
     },
-    render() {
+    render () {
         const imageUrl = this.state.imageUrl;
         return (
             <Upload
@@ -47,31 +47,31 @@ const Avatar = React.createClass({
 });
 
 const PicturesWall = React.createClass({
-    getInitialState() {
+    getInitialState () {
         return {
             previewVisible: false,
             previewImage: '',
             fileList: [],
         }
     },
-    handleCancel() {
+    handleCancel () {
         this.setState({ previewVisible: false })
     },
-    handlePreview(file) {
+    handlePreview (file) {
         this.setState({
             previewImage: file.url || file.thumbUrl,
             previewVisible: true,
         });
     },
-    handleChange(info) {
+    handleChange (info) {
         let fileList = info.fileList;
         this.setState({ fileList });
         this.props.fileList(fileList);
     },
-    componentWillReceiveProps(nextProps) {
+    componentWillReceiveProps (nextProps) {
         this.state.fileList = nextProps.pictureUrl;
     },
-    render() {
+    render () {
         const { previewVisible, previewImage, fileList } = this.state;
         const uploadButton = (
             <div>
@@ -99,7 +99,7 @@ const PicturesWall = React.createClass({
 });
 
 const Activity = React.createClass({
-    loadData(pageNo) {
+    loadData (pageNo) {
         this.setState({
             loading: true
         });
@@ -156,7 +156,7 @@ const Activity = React.createClass({
             });
         }.bind(this));
     },
-    loadDetailData() {
+    loadDetailData () {
         this.setState({
             loading: true
         });
@@ -190,7 +190,7 @@ const Activity = React.createClass({
             });
         }.bind(this));
     },
-    getInitialState() {
+    getInitialState () {
         return {
             loading: false,
             visible: false,
@@ -244,14 +244,14 @@ const Activity = React.createClass({
             tableData: []
         };
     },
-    tableRowClick(record, index) {
+    tableRowClick (record, index) {
         this.state.RowData = record;
         this.loadDetailData();
         this.setState({
             visible: true
         });
     },
-    componentWillMount() {
+    componentWillMount () {
         this.loadData();
         let theTypeOption = [], theFormOption = [];
         activityType.map((item) => {
@@ -267,7 +267,7 @@ const Activity = React.createClass({
         this.state.activityTypeOption = theTypeOption;
         this.state.activityFormOption = theFormOption;
     },
-    submit() {
+    submit () {
         if (!this.state.RowData.name) {
             message.warning('必须填写一个标题!');
             return;
@@ -289,7 +289,7 @@ const Activity = React.createClass({
             return;
         };
         let imgUrls = null;
-        if (this.state.RowData.imgUrls.length) {
+        if (this.state.RowData.imgUrls && this.state.RowData.imgUrls.length) {
             let picArr = [];
             this.state.RowData.imgUrls.map(function (item) {
                 picArr.push(item.response.data);
@@ -336,7 +336,7 @@ const Activity = React.createClass({
             });
         }.bind(this));
     },
-    cleanCache(sign) {
+    cleanCache (sign) {
         this.setState({
             loading: true
         });
@@ -361,7 +361,7 @@ const Activity = React.createClass({
             });
         }.bind(this));
     },
-    delectRow() {
+    delectRow () {
         let deletedIds = [];
         for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
             let rowItem = this.state.selectedRows[idx];
@@ -393,7 +393,7 @@ const Activity = React.createClass({
             this.loadData();
         }.bind(this));
     },
-    reset() {
+    reset () {
         this.state.startDate = undefined;
         this.state.endDate = undefined;
         this.state.searchName = undefined;
@@ -402,7 +402,7 @@ const Activity = React.createClass({
         this.state.searchForm = undefined;
         this.loadData();
     },
-    render() {
+    render () {
         const rowSelection = {
             selectedRowKeys: this.state.selectedRowKeys,
             onChange: (selectedRowKeys, selectedRows) => {
@@ -573,6 +573,9 @@ const Activity = React.createClass({
                                     <Input value={this.state.asist} style={{ width: '320px', marginRight: '20px' }}
                                         onChange={(e) => { this.setState({ asist: e.target.value }); }} />
                                     <Button onClick={() => {
+                                        if (!this.state.asist || this.state.asist.length == 0) {
+                                            return;
+                                        }
                                         let _me = this, theArr = this.state.asistArray.concat(), theBool = true;
                                         if (!theArr.length) {
                                             theArr.push(this.state.asist);

+ 4 - 1
js/component/manageCenter/idea/content.less

@@ -112,4 +112,7 @@
     vertical-align: middle;
     font-size: 28px;
     color: #999;
-}
+}
+.jmrhFlag{margin-right: 15px;}
+.provin{width: 100px;height: 28px;line-height: 28px;border-radius: 4px;border-color: #d9d9d9;padding:4px 3px;transition: all .5s;}
+.provin:focus{outline: none;box-shadow: 0px 0px 6px #80b9ff;border-color: #80b9ff;}

+ 48 - 14
js/component/manageCenter/idea/news/news.jsx

@@ -5,8 +5,8 @@ import Editors from '../../../richTextEditors'
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-
-
+import {provinceList} from '../../../NewDicProvinceList';
+console.log(provinceList[0].id)
 const Avatar = React.createClass({
     getInitialState() {
         return {
@@ -45,8 +45,8 @@ const Avatar = React.createClass({
         );
     }
 });
-
 const News = React.createClass({
+	
     loadData(pageNo, theType) {
         this.setState({
             loading: true
@@ -65,7 +65,7 @@ const News = React.createClass({
                 startCreateTime: this.state.startDate, //新闻开始时间 yyyy-MM-dd
                 endCreateTime: this.state.endDate, //新闻结束时间 yyyy-MM-dd
                 source: this.state.searchSource,
-                hot: this.state.searchHot, //是否放在首页
+                hot: this.state.searchHot, //是否放在首页                    
             },
             success: function (data) {
                 let theArr = [];
@@ -85,12 +85,13 @@ const News = React.createClass({
                             titleImg: thisdata.titleImg,
                             author: thisdata.author,
                             type: thisdata.type,
-                            hot: thisdata.hot,
+                            hot: thisdata.hot,                                                       
                             source: thisdata.source,
                             sourceUrl: thisdata.sourceUrl,
                             summary: thisdata.summary,
                             content: thisdata.content,
                             createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                            
                         });
                     };
                     this.state.pagination.current = data.data.pageNo;
@@ -119,17 +120,21 @@ const News = React.createClass({
             data: {
                 id: this.state.RowData.id //新闻主键ID(数字类型,非字符串)
             },
-            success: function (data) {
+            success: function (data) {            	
                 let theObj = {};
-                if (!data.data) {
+                if (!data.data) {               	      			
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
-                    };
+                    }                   
                 } else {
-                    theObj = data.data;
+                    theObj = data.data;  
+                  if(theObj.provinceId==null||theObj.provinceId==''){
+                 	theObj.provinceId=11
+                 }
                 };
                 this.setState({
                     RowData: theObj,
+                    
                 });
             }.bind(this),
         }).always(function () {
@@ -183,6 +188,7 @@ const News = React.createClass({
                     width: '50%'
                 }
             ],
+            list:provinceList,
             tableData: []
         };
     },
@@ -203,7 +209,7 @@ const News = React.createClass({
             this.state.startDate = undefined;
             this.state.endDate = undefined;
             this.state.searchSource = undefined;
-            this.state.searchHot = undefined;
+            this.state.searchHot = undefined;         
             this.loadData(1, nextProps.newsType);
         };
     },
@@ -234,13 +240,17 @@ const News = React.createClass({
                 titleImg: this.state.RowData.titleImg,
                 author: this.state.RowData.author,
                 type: this.props.newsType,
-                hot: this.state.RowData.hot || 0,
+                hot: this.state.RowData.hot || 0,          
                 source: this.state.RowData.source,
                 sourceUrl: this.state.RowData.sourceUrl,
                 summary: this.state.RowData.summary,
                 content: this.state.RowData.content,
                 createTimeFormattedDate: this.state.RowData.createTimeFormattedDate,
+                jmrhFlag: this.state.RowData.jmrhFlag ,   
+                provinceId: this.state.RowData.provinceId, 
             },
+            
+            
             success: function (data) {
                 if (data.error && data.error.length) {
                     message.warning(data.error[0].message);
@@ -333,6 +343,7 @@ const News = React.createClass({
             }
         };
         const hasSelected = this.state.selectedRowKeys.length > 0;
+      
         return (
             <div className="admin-content" >
                 <div className="admin-content-title">
@@ -360,7 +371,7 @@ const News = React.createClass({
                             onChange={(e) => { this.setState({ searchAuthor: e.target.value }); }} />
                         <Input placeholder="来源" style={{ width: 100 }}
                             value={this.state.searchSource}
-                            onChange={(e) => { this.setState({ searchSource: e.target.value }); }} />
+                            onChange={(e) => { this.setState({ searchSource: e.target.value }); }} />                                                   
                         {this.props.newsType == 2 || this.props.newsType == 3 ? <Select placeholder="显示在首页"
                             style={{ width: 100 }}
                             value={this.state.searchHot}
@@ -478,9 +489,19 @@ const News = React.createClass({
                                         value={this.state.RowData.createTimeFormattedDate ? moment(this.state.RowData.createTimeFormattedDate, "YYYY-MM-DD") : undefined}
                                         onChange={(t, str) => {
                                             this.state.RowData.createTimeFormattedDate = str;
-                                            this.setState({ RowData: this.state.RowData });
+                                            this.setState({ RowData: this.state.RowData});
                                         }} />
                                 </div>
+                            </div>   
+	                            <div className="modal-box news-box">
+		                        <span className="modal-box-title jmrhFlag">军民融合:</span>  	                        
+	                            <Radio.Group value={this.state.RowData.jmrhFlag} onChange={(e) => {
+	                                this.state.RowData.jmrhFlag = e.target.value;
+	                                this.setState({ RowData: this.state.RowData  });
+	                            }} >
+	                                <Radio value={0}>否</Radio>
+	                                <Radio value={1}>是</Radio>
+	                            </Radio.Group> 
                             </div>
                             {this.props.newsType == 2 || this.props.newsType == 3 ? <div className="modal-box news-box">
                                 <span className="modal-box-title">发布在首页</span>
@@ -496,7 +517,20 @@ const News = React.createClass({
                             </div> : <div></div>}
                         </div>
                         <div className="modal-box">
-                            <span className="modal-box-title">新闻内容</span>
+                            <span className="modal-box-title">选择省份</span> 
+                            <select  value={this.state.RowData.provinceId}  onChange={(e) => {
+	                                this.state.RowData.provinceId = e.target.value;
+	                                this.setState({RowData: this.state.RowData});
+	                            }} className="provin">
+						        {
+						          this.state.list.map(function(name){
+						            return (				            	
+						            	<option value={name.id} key={name.id} >{name.name}</option>				            	
+						            )
+						          })
+						        }
+						        
+				        </select>
                         </div>
                         <Editors textContent={this.state.RowData.content}
                             uploadUrl={'/api/admin/news/upload'}

+ 1 - 0
js/component/manageCenter/topTab.jsx

@@ -498,6 +498,7 @@ const TopTab = React.createClass({
                         <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/achievement.html"}>科技成果管理</a></Col>
                         <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/demand.html"}>科技需求管理</a></Col>
                         <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/idea.html"}>科技思想管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'userOrder' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userOrder.html"}>用户订单管理</a></Col>
                         <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                     </Row>
                 </div>

+ 11 - 3
js/component/manageCenter/userManage/content.jsx

@@ -12,14 +12,14 @@ class Content extends Component {
             component: <div />,
         };
     }
-    componentWillMount() {
+    componentWillMount () {
         if (window.location.hash) {
             this.getKey(window.location.hash.substr(1));
         } else {
             this.getKey(window.showCustomer ? 'customerList' : 'userList');
         };
     }
-    getKey(key) {
+    getKey (key) {
         switch (key) {
             case 'userList':
                 require.ensure([], () => {
@@ -45,6 +45,14 @@ class Content extends Component {
                     });
                 });
                 break;
+            case 'levelSet':
+                require.ensure([], () => {
+                    const LevelSet = require('./levelSet').default;
+                    this.setState({
+                        component: <LevelSet />,
+                    });
+                });
+                break;
             case 'customerSearch':
                 require.ensure([], () => {
                     const CustomerSearch = require('./customerSearch').default;
@@ -64,7 +72,7 @@ class Content extends Component {
         };
         window.location.hash = key;
     }
-    render() {
+    render () {
         return (
             <div className="manage-content">
                 <LeftTab handlekey={this.getKey.bind(this)} />

+ 3 - 0
js/component/manageCenter/userManage/leftTab.jsx

@@ -37,6 +37,9 @@ const LeftTab = React.createClass({
                 <Menu.Item style={{ display: window.showCustomer ? 'block' : 'none' }} key="customerList">
                     我的客户列表
                 </Menu.Item>
+                <Menu.Item style={{ display: window.showCustomer ? 'block' : 'none' }} key="levelSet">
+                    会员等级设置
+                </Menu.Item>
                 <Menu.Item style={{ display: window.showCustomer ? 'block' : 'none' }} key="customerSearch">
                     客户查询
                 </Menu.Item>

+ 465 - 0
js/component/manageCenter/userManage/levelSet.jsx

@@ -0,0 +1,465 @@
+import React from 'react';
+import { Icon, Button, Input, Spin, Table, message, Modal, Tabs, InputNumber, Checkbox, Select } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './userList.less';
+
+const ListAdd = React.createClass({
+    getInitialState () {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    showModal () {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel (e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    handleOk () {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/addGradeName",
+            data: {
+                gradeName: this.state.lvlName,
+                memberRank: this.state.level
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success("添加成功!");
+                    this.state.visible = false;
+                    this.props.refresh(this.state.level);
+                }
+                this.setState({
+                    loading: false
+                })
+            }.bind(this),
+        });
+    },
+    render () {
+        const Option = Select.Option;
+        return (
+            <div className="patent-desc" style={{ float: 'right', marginRight: '20px' }}>
+                <Button type="primary" onClick={this.showModal}>添加新等级</Button>
+                <Modal maskClosable={false}
+                    title="新增用户等级"
+                    visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    afterClose={() => { this.state.lvlName = undefined; this.state.level = undefined }}
+                    width='400px'
+                    footer={[
+                        <Button key="submit" type="primary" loading={this.state.loading} onClick={this.handleOk}>提交</Button>,
+                        <Button key="back" onClick={this.handleCancel}>返回</Button>
+                    ]}
+                    className="admin-desc-content">
+                    <div className='orgAdd-input'>
+                        <span>会员等级名称:</span>
+                        <Input value={this.state.lvlName} style={{ width: '200px' }}
+                            onChange={(e) => { this.setState({ lvlName: e.target.value }); }} />
+                    </div>
+                    <div className='orgAdd-input'>
+                        <span>会员等级:</span>
+                        <Select value={this.state.level} style={{ width: 120 }}
+                            onChange={(e) => { this.setState({ level: e }) }}>
+                            <Option value="2">2</Option>
+                            <Option value="3">3</Option>
+                            <Option value="4">4</Option>
+                            <Option value="5">5</Option>
+                        </Select>
+                    </div>
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const ListDelete = React.createClass({
+    getInitialState () {
+        return {
+            visible: false,
+            loading: false
+        };
+    },
+    showModal () {
+        this.setState({
+            visible: true,
+        });
+    },
+    handleCancel (e) {
+        this.setState({
+            visible: false,
+        });
+    },
+    handleOk () {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/delGrade",
+            data: {
+                id: this.props.rid
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success("删除成功!");
+                    this.state.visible = false;
+                    this.props.refreshForDel();
+                }
+                this.setState({
+                    loading: false
+                })
+            }.bind(this),
+        });
+    },
+    render () {
+        return (
+            <div className="patent-desc" style={{ float: 'right', marginRight: '20px' }}>
+                <Button type="ghost" onClick={this.showModal}>删除</Button>
+                <Modal maskClosable={false}
+                    title="删除用户等级"
+                    visible={this.state.visible}
+                    onCancel={this.handleCancel}
+                    width='400px'
+                    footer={[
+                        <Button key="submit" type="primary" loading={this.state.loading} onClick={this.handleOk}>提交</Button>,
+                        <Button key="back" onClick={this.handleCancel}>返回</Button>
+                    ]} >
+                    <div className="level-tabs-modal">
+                        <p>
+                            <Icon type="exclamation-circle-o" />
+                            <span> 确认要删除该用户等级吗?删除以后不可恢复!</span>
+                        </p>
+                    </div>
+                </Modal>
+            </div>
+        );
+    }
+});
+
+const SetContent = React.createClass({
+    getInitialState () {
+        return {
+            visible: false,
+            loading: false,
+            columns: [
+                {
+                    title: '会员时长',
+                    dataIndex: 'time',
+                    key: 'time',
+                    render: (text, record, index) => {
+                        return <div>
+                            <Input style={{ width: '80px' }}
+                                value={record.time}
+                                onChange={(e) => {
+                                    record.time = e.target.value;
+                                    this.setState({ dataSource: this.state.dataSource });
+                                }} />
+                            <span style={{ marginLeft: '10px' }}>个月</span>
+                        </div>
+                    }
+                }, {
+                    title: '金额',
+                    dataIndex: 'money',
+                    key: 'money',
+                    render: (text, record, index) => {
+                        return <div>
+                            <InputNumber step={0.01} min={0}
+                                value={record.money}
+                                onChange={(e) => {
+                                    record.money = e;
+                                    this.setState({ dataSource: this.state.dataSource });
+                                }} />
+                            <span style={{ marginLeft: '10px' }}>元</span>
+                        </div>
+                    }
+                }
+            ],
+            dataSource: [],
+            selectedRowKeys: []
+        };
+    },
+    componentWillMount () {
+        this.state.checked01 = this.props.business.checked01;
+        this.state.checked02 = this.props.business.checked02;
+        this.state.checked03 = this.props.business.checked03;
+        this.state.checked04 = this.props.business.checked04;
+        this.state.checked05 = this.props.business.checked05;
+        this.state.checked06 = this.props.business.checked06;
+        this.state.checked07 = this.props.business.checked07;
+        this.state.checked08 = this.props.business.checked08;
+        for (let item in this.props.cost) {
+            this.state.dataSource.push({
+                key: this.state.dataSource.length,
+                time: item,
+                money: this.props.cost[item]
+            })
+        }
+    },
+    remove () {
+        this.state.selectedRowKeys.sort((a, b) => { return b - a });
+        let theArr = this.state.dataSource.concat();
+        for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) {
+            let dataIndex = this.state.selectedRowKeys[idx];
+            theArr.map((item, index) => {
+                if (item.key === dataIndex) {
+                    theArr.splice(index, 1);
+                }
+            })
+        };
+        this.state.dataSource = [];
+        for (let i = 0; i < theArr.length; i++) {
+            let item = theArr[i];
+            this.state.dataSource.push({
+                key: i,
+                time: item.time,
+                money: item.money
+            })
+        };
+        this.setState({
+            dataSource: this.state.dataSource,
+            selectedRowKeys: []
+        });
+    },
+    addNew () {
+        this.state.dataSource.push({
+            key: this.state.dataSource.length,
+            time: '',
+            money: ''
+        });
+        this.setState({
+            dataSource: this.state.dataSource
+        })
+    },
+    submit () {
+        this.setState({ loading: true });
+        let theCost = {};
+        if (this.state.dataSource.length) {
+            for (let i = 0; i < this.state.dataSource.length; i++) {
+                let theMoney = this.state.dataSource[i].money;
+                let theTime = this.state.dataSource[i].time;
+                theCost[theTime] = theMoney;
+            }
+        };
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/addBusinessAndCost",
+            data: {
+                id: this.props.rid,
+                business: JSON.stringify({
+                    "1008": this.state.checked08 ? "1" : "0",
+                    "1007": this.state.checked07 ? "1" : "0",
+                    "1006": this.state.checked06 ? "1" : "0",
+                    "1005": this.state.checked05 ? "1" : "0",
+                    "1004": this.state.checked04 ? "1" : "0",
+                    "1003": this.state.checked03 ? "1" : "0",
+                    "1002": this.state.checked02 ? "1" : "0",
+                    "1001": this.state.checked01 ? "1" : "0",
+                }),
+                cost: JSON.stringify(theCost)
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    message.success("保存成功!");
+                    this.state.visible = false
+                }
+                this.setState({
+                    loading: false
+                })
+            }.bind(this),
+        });
+    },
+    render () {
+        const rowSelection = {
+            type: 'checkbox',
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows,
+                    selectedRowKeys: selectedRowKeys
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        return (
+            <Spin spinning={this.state.loading}>
+                <div className="level-tabs">
+                    <div className="level-tabs-title">
+                        <span>会员等级费用设置</span>
+                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            onClick={this.addNew}>添加<Icon type="plus" /></Button>
+                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                            disabled={!hasSelected}
+                            onClick={this.remove}>删除<Icon type="minus" /></Button>
+                    </div>
+                    <Table className="level-tabs-table no-all-select"
+                        columns={this.state.columns}
+                        dataSource={this.state.dataSource}
+                        pagination={false}
+                        rowSelection={rowSelection} />
+                    <div className="level-tabs-title">
+                        <span>会员等级增值服务设置</span>
+                    </div>
+                    <div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked01}
+                                onChange={(e) => { this.setState({ checked01: e.target.checked }) }}>
+                                科技成果,专家信息定点推送
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked02}
+                                onChange={(e) => { this.setState({ checked02: e.target.checked }) }}>
+                                查看专家的联系方式
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked03}
+                                onChange={(e) => { this.setState({ checked03: e.target.checked }) }}>
+                                任何业务申请,付费业享受会员专属折扣
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked04}
+                                onChange={(e) => { this.setState({ checked04: e.target.checked }) }}>
+                                一对一的技术经纪人服务,进行技术成果媒合服务
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked05}
+                                onChange={(e) => { this.setState({ checked05: e.target.checked }) }}>
+                                一对一的科技咨询师服务
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked06}
+                                onChange={(e) => { this.setState({ checked06: e.target.checked }) }}>
+                                一对一的专业技术顾问,搜集技术情报,提供研发高参
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked07}
+                                onChange={(e) => { this.setState({ checked07: e.target.checked }) }}>
+                                免费参加现场业务培训会
+                        </Checkbox>
+                        </div>
+                        <div className="level-checkbox">
+                            <Checkbox checked={this.state.checked08}
+                                onChange={(e) => { this.setState({ checked08: e.target.checked }) }}>
+                                免前期费用做科技类扶持资金项目申报
+                        </Checkbox>
+                        </div>
+                    </div>
+                    <div className="level-tabs-save">
+                        <Button type="primary" onClick={this.submit}>保存</Button>
+                        <ListDelete rid={this.props.rid} refreshForDel={this.props.refreshForDel} />
+                    </div>
+                </div>
+            </Spin>
+        );
+    }
+});
+
+
+const LevelSet = React.createClass({
+    loadData (pageNo) {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/selectMemberGrade",
+            data: {
+            },
+            success: function (data) {
+                let theArr = [];
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let item = data.data[i];
+                        let theBusiness = {};
+                        theBusiness['checked01'] = (item.business && item.business['1001'] == 1 ? true : false);
+                        theBusiness['checked02'] = (item.business && item.business['1002'] == 1 ? true : false);
+                        theBusiness['checked03'] = (item.business && item.business['1003'] == 1 ? true : false);
+                        theBusiness['checked04'] = (item.business && item.business['1004'] == 1 ? true : false);
+                        theBusiness['checked05'] = (item.business && item.business['1005'] == 1 ? true : false);
+                        theBusiness['checked06'] = (item.business && item.business['1006'] == 1 ? true : false);
+                        theBusiness['checked07'] = (item.business && item.business['1007'] == 1 ? true : false);
+                        theBusiness['checked08'] = (item.business && item.business['1008'] == 1 ? true : false);
+                        theArr.push(
+                            <Tabs.TabPane tab={item.gradeName + '( Lv.' + item.memberRank + ' )'} key={item.memberRank}>
+                                <SetContent business={theBusiness} cost={item.cost || []} rid={item.id} refreshForDel={this.refreshForDel} />
+                            </Tabs.TabPane>
+                        )
+                    };
+                    this.setState({ tabPane: theArr })
+                }
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState () {
+        return {
+            tabPane: [],
+            activeKey: '1',
+            loading: false
+        };
+    },
+    componentWillMount () {
+        this.loadData();
+    },
+    refresh (e) {
+        this.state.activeKey = e;
+        this.loadData()
+    },
+    refreshForDel () {
+        this.state.activeKey = '1';
+        this.loadData();
+    },
+    tabChange (e) {
+        this.setState({ activeKey: e });
+    },
+    render () {
+        return (
+            <div className="user-content" >
+                <div className="content-title clearfix">
+                    <span>会员等级管理</span>
+                    <ListAdd refresh={this.refresh} />
+                </div>
+                <div>
+                    <Tabs activeKey={this.state.activeKey} onChange={this.tabChange}>
+                        {this.state.tabPane}
+                    </Tabs>
+                </div>
+            </div >
+        );
+    }
+});
+
+export default LevelSet;

+ 75 - 3
js/component/manageCenter/userManage/userList.less

@@ -13,6 +13,7 @@
         >input,
         >button,
         .ant-select {
+            margin-top: 10px;
             margin-right: 10px;
         }
         .ant-switch {
@@ -21,6 +22,33 @@
         .search-more {
             margin: 10px 0;
         }
+        .search-div {
+            display: inline-block;
+            margin-top: 10px;
+            margin-right: 10px;
+        }
+    }
+    .level-tabs {
+        padding: 0 20px;
+        .level-tabs-title {
+            >span {
+                font-size: 14px;
+            }
+            >button {
+                margin-left: 20px;
+            }
+        }
+        .level-tabs-table {
+            width: 600px;
+            margin: 20px 0;
+        }
+        .level-checkbox {
+            margin-top: 20px;
+        }
+        .level-tabs-save {
+            margin-top: 20px;
+            width: 600px;
+        }
     }
 }
 
@@ -36,9 +64,9 @@
         margin-right: 20px;
     }
     .idcard-imgbox {
-            height: 200px;
-            padding-top: 200px;
-            position: relative;
+        height: 200px;
+        padding-top: 200px;
+        position: relative;
         >img {
             position: absolute;
             top: 0;
@@ -46,6 +74,27 @@
             height: 200px;
         }
     }
+    .modal-box {
+        overflow: hidden;
+        line-height: 28px;
+        margin-bottom: 10px;
+        .modal-box-title {
+            float: left;
+            width: 84px;
+            text-align: right;
+            margin-right: 20px;
+        }
+        .modal-box-detail {
+            float: left;
+            width: 400px;
+            >span {
+                margin-right: 6px;
+            }
+        }
+        >button {
+            margin-right: 20px;
+        }
+    }
 }
 
 .admin-desc-content {
@@ -68,4 +117,27 @@
             line-height: 28px;
         }
     }
+}
+
+.level-tabs-modal {
+    p {
+        line-height: 36px;
+        text-align: center;
+        i {
+            vertical-align: middle;
+            font-size: 20px;
+            color: #E85050
+        }
+        span {
+            margin-left: 10px;
+        }
+    }
+}
+
+.no-all-select {
+    .ant-table-selection {
+        .ant-checkbox {
+            display: none;
+        }
+    }
 }

+ 328 - 0
js/component/manageCenter/userOrder/consultOrderList.jsx

@@ -0,0 +1,328 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, message, DatePicker, Modal, InputNumber, Radio } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './content.less';
+import moment from 'moment';
+import { getTime } from '../../tools';
+
+
+const OrderList = React.createClass({
+    loadData (pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/selectMemberOrderBa",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                id: this.state.searchOrderNumber,
+                nickname: this.state.searchName,
+                mobile: this.state.searchAftNumber,
+                orderState: this.state.searchOrderStatus,
+                startTime: this.state.searchTime[0],
+                endTime: this.state.searchTime[1]
+            },
+            success: function (data) {
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    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,
+                            formattedOrderTime: thisdata.formattedOrderTime,
+                            formattedPaymentTime: thisdata.formattedPaymentTime,
+                            formattedValidTime: thisdata.formattedValidTime,
+                            expertName: thisdata.expertName,
+                            nickname: thisdata.nickname,
+                            mobile: thisdata.mobile,
+                            orderState: thisdata.orderState,
+                            orderTime: thisdata.orderTime,
+                            paymentId: thisdata.paymentId,
+                            paymentTime: thisdata.paymentTime,
+                            paymentType: thisdata.paymentType,
+                            paymentValue: thisdata.paymentValue,
+                            price: thisdata.price,
+                            userId: thisdata.userId,
+                            validMonth: thisdata.validMonth,
+                            validTime: thisdata.validTime,
+                        });
+                    };
+                    this.state.pagination.current = data.data.pNo;
+                    this.state.pagination.total = data.data.countWhere;
+                };
+                this.setState({
+                    dataSource: this.state.data,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState () {
+        return {
+            searchMore: true,
+            data: [],
+            modalData: {},
+            visible: false,
+            searchTime: [],
+            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: 'id',
+                    key: 'id',
+                }, {
+                    title: '账号',
+                    dataIndex: 'mobile',
+                    key: 'mobile',
+                }, {
+                    title: '认证名称',
+                    dataIndex: 'nickname',
+                    key: 'nickname',
+                }, {
+                    title: '专家名称',
+                    dataIndex: 'expertName',
+                    key: 'expertName',
+                }, {
+                    title: '订单状态',
+                    dataIndex: 'orderState',
+                    key: 'orderState',
+                    render: (text) => {
+                        if (text == 1) {
+                            return '已支付'
+                        } else {
+                            return '未支付'
+                        };
+                    }
+                }, {
+                    title: '生成时间',
+                    dataIndex: 'formattedOrderTime',
+                    key: 'formattedOrderTime',
+                }, {
+                    title: '支付时间',
+                    dataIndex: 'formattedPaymentTime',
+                    key: 'formattedPaymentTime',
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount () {
+        this.loadData();
+    },
+    search () {
+        this.loadData();
+    },
+    reset () {
+        this.state.searchOrderNumber = undefined;
+        this.state.searchAftNumber = undefined;
+        this.state.searchOrderStatus = undefined;
+        this.state.searchName = undefined;
+        this.state.searchTime = [];
+        this.loadData();
+    },
+    submit () {
+        if (this.state.modalData.paymentType == 1 && !this.state.modalData.formattedPaymentTime) {
+            message.warning('状态为已支付时支付时间必填');
+            return
+        }
+        this.setState({ loading: true });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/updateMemberOrder",
+            data: {
+                id: this.state.modalData.id,
+                userId: this.state.modalData.userId,
+                memberRank: this.state.modalData.menberType,
+                validMonth: this.state.modalData.validMonth,
+                paymentValue: this.state.modalData.paymentValue,
+                orderState: this.state.modalData.orderState,
+                paymentTime: this.state.modalData.formattedPaymentTime,
+                paymentType: this.state.modalData.paymentType,
+                paymentId: this.state.modalData.paymentId
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({ loading: false, visible: false });
+                this.loadData();
+            } else {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
+            this.setState({ loading: false });
+        }.bind(this));
+    },
+    tableRowClick (record, index) {
+        let theObj = {};
+        for (let item in record) {
+            theObj[item] = record[item]
+        }
+        this.state.modalData = theObj;
+        this.setState({ visible: true });
+    },
+    render () {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        const Option = Select.Option;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>专家咨询订单列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="订单编号" value={this.state.searchOrderNumber}
+                        onChange={(e) => { this.setState({ searchOrderNumber: e.target.value }); }} />
+                    <Input placeholder="用户账号" value={this.state.searchAftNumber}
+                        onChange={(e) => { this.setState({ searchAftNumber: e.target.value }); }} />
+                    <Input placeholder="认证名称" value={this.state.searchName}
+                        onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
+                    <Select placeholder="订单状态" value={this.state.searchOrderStatus} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchOrderStatus: e }) }}>
+                        <Option value="0">未付款</Option>
+                        <Option value="1">已付款</Option>
+                    </Select>
+                    <div className="search-div">
+                        <span>订单生成时间:</span>
+                        <RangePicker
+                            allowClear={false}
+                            value={[this.state.searchTime[0] ? moment(this.state.searchTime[0]) : null,
+                            this.state.searchTime[1] ? moment(this.state.searchTime[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ searchTime: dataString }); }} />
+                    </div>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns} class="no-all-select"
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <Modal title="订单详情" width={600} className="activity-modal"
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.modalData = {}; }}
+                    onCancel={() => { this.setState({ visible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="clearfix">
+                            <div className="modal-box">
+                                <span className="modal-box-title">专家名称</span>
+                                <div className="modal-box-detail">
+                                    <span>{this.state.modalData.expertName}</span>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">订单金额</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <span>{this.state.modalData.price}</span>
+                                    <span> 元</span>
+                                </div>
+                                <span className="modal-box-title">实际支付金额</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <InputNumber value={this.state.modalData.paymentValue} step={0.01} onChange={(e) => {
+                                        this.state.modalData.paymentValue = e;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                    <span> 元</span>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付方式</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Input value={this.state.modalData.paymentType} onChange={(e) => {
+                                        this.state.modalData.paymentType = e.target.value;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                </div>
+                                <span className="modal-box-title">流水号</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Input value={this.state.modalData.paymentId} onChange={(e) => {
+                                        this.state.modalData.paymentId = e.target.value;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付状态</span>
+                                <div className="modal-box-detail">
+                                    <Radio.Group value={this.state.modalData.orderState}
+                                        onChange={(e) => {
+                                            this.state.modalData.orderState = e.target.value;
+                                            this.setState({ modalData: this.state.modalData });
+                                        }} >
+                                        <Radio value={0}>未支付</Radio>
+                                        <Radio value={1}>已支付</Radio>
+                                    </Radio.Group>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付时间</span>
+                                <div className="modal-box-detail">
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择支付时间"
+                                        value={this.state.modalData.formattedPaymentTime ? moment(this.state.modalData.formattedPaymentTime, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.modalData.formattedPaymentTime = str;
+                                            this.setState({ modalData: this.state.modalData });
+                                        }} />
+                                </div>
+                            </div>
+                        </div>
+                        <div className="modal-box" style={{ marginTop: '100px' }}>
+                            <Button type="primary" onClick={this.submit}>提交</Button>
+                            <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div >
+        );
+    }
+});
+
+export default OrderList;

+ 55 - 0
js/component/manageCenter/userOrder/content.jsx

@@ -0,0 +1,55 @@
+import React, { Component } from 'react';
+import '../content.less';
+import './content.less';
+import LeftTab from './leftTab';
+
+
+class Content extends Component {
+    constructor() {
+        super();
+        this.state = {
+            loading: false,
+            component: <div></div>,
+        };
+    }
+    componentWillMount () {
+        if (window.location.hash) {
+            this.getKey(window.location.hash.substr(1));
+        } else {
+            this.getKey("membership");
+        };
+    }
+    getKey (key) {
+        switch (key) {
+            case 'membership':
+                require.ensure([], () => {
+                    const Membership = require('./memberOrderList').default;
+                    this.setState({
+                        component: <Membership />
+                    });
+                });
+                break;
+            case 'consult':
+                require.ensure([], () => {
+                    const Consult = require('./consultOrderList').default;
+                    this.setState({
+                        component: <Consult />
+                    });
+                });
+                break;
+        };
+        window.location.hash = key;
+    }
+    render () {
+        return (
+            <div className="manage-content">
+                <LeftTab handlekey={this.getKey.bind(this)} />
+                <div className="content-right">
+                    {this.state.component}
+                </div>
+            </div>
+        )
+    }
+}
+
+export default Content;

+ 63 - 0
js/component/manageCenter/userOrder/content.less

@@ -0,0 +1,63 @@
+.user-content {
+    background: #fff;
+    padding: 20px;
+    .content-title {
+        color: #333;
+        font-size: 16px;
+    }
+    .user-search {
+        margin: 10px 0;
+        >input {
+            width: 140px;
+        }
+        >input,
+        >button,
+        .ant-select {
+            margin-top: 10px;
+            margin-right: 10px;
+        }
+        .ant-switch {
+            margin-left: 10px;
+        }
+        .search-more {
+            margin: 10px 0;
+        }
+        .search-div {
+            display: inline-block;
+            margin-top: 10px;
+            margin-right: 10px;
+        }
+    }
+}
+
+.ant-modal-body {
+    .modal-box {
+        overflow: hidden;
+        line-height: 28px;
+        margin-bottom: 10px;
+        .modal-box-title {
+            float: left;
+            width: 84px;
+            text-align: right;
+            margin-right: 20px;
+        }
+        .modal-box-detail {
+            float: left;
+            width: 400px;
+            >span {
+                margin-right: 6px;
+            }
+        }
+        >button {
+            margin-right: 20px;
+        }
+    }
+}
+
+.no-all-select {
+    .ant-table-selection {
+        .ant-checkbox {
+            display: none;
+        }
+    }
+}

+ 45 - 0
js/component/manageCenter/userOrder/leftTab.jsx

@@ -0,0 +1,45 @@
+import React from 'react';
+import { Menu, Icon } from 'antd';
+import '../leftTab.less';
+const SubMenu = Menu.SubMenu;
+const MenuItemGroup = Menu.ItemGroup;
+
+
+const LeftTab = React.createClass({
+    getInitialState () {
+        return {
+            current: 'membership',
+        };
+    },
+    handleClick (e) {
+        this.props.handlekey(e.key);
+        this.setState({
+            current: e.key,
+        });
+    },
+    componentWillMount () {
+        if (window.location.hash) {
+            this.state.current = window.location.hash.substr(1);
+        };
+    },
+    render () {
+        return (
+            <Menu onClick={this.handleClick}
+                selectedKeys={[this.state.current]}
+                mode="vertical"
+                className="account-left" >
+                <Menu.Item key="membership">
+                    会员服务订单
+                </Menu.Item>
+                <Menu.Item key="consult">
+                    专家咨询订单
+                </Menu.Item>
+                <Menu.Item key="technology">
+                    科技服务订单
+                </Menu.Item>
+            </Menu>
+        );
+    },
+});
+
+export default LeftTab;

+ 419 - 0
js/component/manageCenter/userOrder/memberOrderList.jsx

@@ -0,0 +1,419 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, message, DatePicker, Modal, InputNumber, Radio } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import './content.less';
+import moment from 'moment';
+import { getTime } from '../../tools';
+
+
+const OrderList = React.createClass({
+    loadData (pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/selectMemberOrderBa",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                id: this.state.searchOrderNumber,
+                nickname: this.state.searchName,
+                mobile: this.state.searchAftNumber,
+                orderState: this.state.searchOrderStatus, //支付状态 0,1
+                startTime: this.state.searchTime[0],
+                endTime: this.state.searchTime[1]
+            },
+            success: function (data) {
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    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,
+                            formattedOrderTime: thisdata.formattedOrderTime,
+                            formattedPaymentTime: thisdata.formattedPaymentTime,
+                            formattedValidTime: thisdata.formattedValidTime,
+                            gradeName: thisdata.gradeName,
+                            menberType: thisdata.menberType,
+                            nickname: thisdata.nickname,
+                            mobile: thisdata.mobile,
+                            orderState: thisdata.orderState,
+                            orderTime: thisdata.orderTime,
+                            paymentId: thisdata.paymentId,
+                            paymentTime: thisdata.paymentTime,
+                            paymentType: thisdata.paymentType,
+                            paymentValue: thisdata.paymentValue,
+                            price: thisdata.price,
+                            userId: thisdata.userId,
+                            validMonth: thisdata.validMonth,
+                            validTime: thisdata.validTime,
+                        });
+                    };
+                    this.state.pagination.current = data.data.pNo;
+                    this.state.pagination.total = data.data.countWhere;
+                };
+                this.setState({
+                    dataSource: this.state.data,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState () {
+        return {
+            searchMore: true,
+            data: [],
+            modalData: {},
+            visible: false,
+            delVisible: false,
+            searchTime: [],
+            loading: false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            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: 'id',
+                    key: 'id',
+                }, {
+                    title: '账号',
+                    dataIndex: 'mobile',
+                    key: 'mobile',
+                }, {
+                    title: '认证名称',
+                    dataIndex: 'nickname',
+                    key: 'nickname',
+                }, {
+                    title: '会员类型',
+                    dataIndex: 'gradeName',
+                    key: 'gradeName',
+                }, {
+                    title: '订单状态',
+                    dataIndex: 'orderState',
+                    key: 'orderState',
+                    render: (text) => {
+                        if (text == 1) {
+                            return '已支付'
+                        } else {
+                            return '未支付'
+                        };
+                    }
+                }, {
+                    title: '生成时间',
+                    dataIndex: 'formattedOrderTime',
+                    key: 'formattedOrderTime',
+                }, {
+                    title: '支付时间',
+                    dataIndex: 'formattedPaymentTime',
+                    key: 'formattedPaymentTime',
+                }, {
+                    title: '有效时间',
+                    dataIndex: 'formattedValidTime',
+                    key: 'formattedValidTime',
+                    render: (index, record) => {
+                        if (record.paymentTime && record.validMonth && record.orderState == 1) {
+                            return getTime(record.paymentTime) + ' -- ' + getTime(record.paymentTime, record.validMonth)
+                        }
+                    }
+                }
+            ],
+            dataSource: []
+        };
+    },
+    componentWillMount () {
+        this.loadData();
+    },
+    search () {
+        this.loadData();
+    },
+    reset () {
+        this.state.searchOrderNumber = undefined;
+        this.state.searchAftNumber = undefined;
+        this.state.searchOrderStatus = undefined;
+        this.state.searchName = undefined;
+        this.state.searchTime = [];
+        this.loadData();
+    },
+    submit () {
+        if (this.state.modalData.paymentType == 1 && !this.state.modalData.formattedPaymentTime) {
+            message.warning('状态为已支付时支付时间必填');
+            return
+        }
+        this.setState({ loading: true });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/updateMemberOrder",
+            data: {
+                id: this.state.modalData.id,
+                userId: this.state.modalData.userId,
+                memberRank: this.state.modalData.menberType,
+                validMonth: this.state.modalData.validMonth,
+                paymentValue: this.state.modalData.paymentValue,
+                orderState: this.state.modalData.orderState,
+                paymentTime: this.state.modalData.formattedPaymentTime,
+                paymentType: this.state.modalData.paymentType,
+                paymentId: this.state.modalData.paymentId
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('保存成功!');
+                this.setState({ loading: false, visible: false });
+                this.loadData();
+            } else {
+                message.warning(data.error[0].message);
+            }
+        }.bind(this)).always(function () {
+            this.setState({ loading: false });
+        }.bind(this));
+    },
+    tableRowClick (record, index) {
+        let theObj = {};
+        for (let item in record) {
+            theObj[item] = record[item]
+        }
+        this.state.modalData = theObj;
+        this.setState({ visible: true });
+    },
+    deleteRow () {
+        let deletedId;
+        for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
+            let rowItem = this.state.selectedRows[idx];
+            if (rowItem.orderState !== 0) {
+                message.warning('订单状态不是未支付,无法删除!');
+                this.setState({ delVisible: false });
+                return;
+            }
+            if (rowItem.id) {
+                deletedId = rowItem.id
+            };
+        };
+        this.setState({
+            selectedRowKeys: [],
+            loading: deletedId.length > 0
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/member/delMemberOrder",
+            data: {
+                id: deletedId
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false,
+                delVisible: false
+            });
+            this.loadData();
+        }.bind(this));
+    },
+    render () {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
+        const { RangePicker } = DatePicker;
+        const Option = Select.Option;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>会员订单列表</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="订单编号" value={this.state.searchOrderNumber}
+                        onChange={(e) => { this.setState({ searchOrderNumber: e.target.value }); }} />
+                    <Input placeholder="用户账号" value={this.state.searchAftNumber}
+                        onChange={(e) => { this.setState({ searchAftNumber: e.target.value }); }} />
+                    <Input placeholder="认证名称" value={this.state.searchName}
+                        onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
+                    <Select placeholder="订单状态" value={this.state.searchOrderStatus} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchOrderStatus: e }) }}>
+                        <Option value="0">未付款</Option>
+                        <Option value="1">已付款</Option>
+                    </Select>
+                    <div className="search-div">
+                        <span>订单生成时间:</span>
+                        <RangePicker
+                            allowClear={false}
+                            value={[this.state.searchTime[0] ? moment(this.state.searchTime[0]) : null,
+                            this.state.searchTime[1] ? moment(this.state.searchTime[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ searchTime: dataString }); }} />
+                    </div>
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                        disabled={!hasSelected}
+                        onClick={() => { this.setState({ delVisible: true }) }}>删除<Icon type="minus" /></Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table className="no-all-select"
+                            columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <Modal title="订单详情" width={600} className="activity-modal"
+                    visible={this.state.visible}
+                    maskClosable={false}
+                    footer={null}
+                    afterClose={() => { this.state.modalData = {}; }}
+                    onCancel={() => { this.setState({ visible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="clearfix">
+                            <div className="modal-box">
+                                <span className="modal-box-title">会员等级</span>
+                                <div className="modal-box-detail">
+                                    <Select placeholder="选择会员等级"
+                                        style={{ width: 120 }}
+                                        value={this.state.modalData.menberType ? this.state.modalData.menberType.toString() : undefined}
+                                        onChange={(e) => {
+                                            this.state.modalData.menberType = e;
+                                            this.setState({ modalData: this.state.modalData });
+                                        }}>
+                                        <Select.Option value="1">Lv.1</Select.Option>
+                                        <Select.Option value="2">Lv.2</Select.Option>
+                                        <Select.Option value="3">Lv.3</Select.Option>
+                                        <Select.Option value="4">Lv.4</Select.Option>
+                                        <Select.Option value="5">Lv.5</Select.Option>
+                                    </Select>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">会员时长</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <InputNumber value={this.state.modalData.validMonth} step={1} onChange={(e) => {
+                                        this.state.modalData.validMonth = e;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                    <span> 月</span>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">订单金额</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <span>{this.state.modalData.price}</span>
+                                    <span> 元</span>
+                                </div>
+                                <span className="modal-box-title">实际支付金额</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <InputNumber value={this.state.modalData.paymentValue} step={0.01} onChange={(e) => {
+                                        this.state.modalData.paymentValue = e;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                    <span> 元</span>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付方式</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Input value={this.state.modalData.paymentType} onChange={(e) => {
+                                        this.state.modalData.paymentType = e.target.value;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                </div>
+                                <span className="modal-box-title">流水号</span>
+                                <div className="modal-box-detail" style={{ width: '160px' }}>
+                                    <Input value={this.state.modalData.paymentId} onChange={(e) => {
+                                        this.state.modalData.paymentId = e.target.value;
+                                        this.setState({ modalData: this.state.modalData });
+                                    }} />
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付状态</span>
+                                <div className="modal-box-detail">
+                                    <Radio.Group value={this.state.modalData.orderState}
+                                        onChange={(e) => {
+                                            this.state.modalData.orderState = e.target.value;
+                                            this.setState({ modalData: this.state.modalData });
+                                        }} >
+                                        <Radio value={0}>未支付</Radio>
+                                        <Radio value={1}>已支付</Radio>
+                                    </Radio.Group>
+                                </div>
+                            </div>
+                            <div className="modal-box">
+                                <span className="modal-box-title">支付时间</span>
+                                <div className="modal-box-detail">
+                                    <DatePicker style={{ width: '150px' }}
+                                        showTime
+                                        format="YYYY-MM-DD HH:mm:ss"
+                                        placeholder="选择支付时间"
+                                        value={this.state.modalData.formattedPaymentTime ? moment(this.state.modalData.formattedPaymentTime, "YYYY-MM-DD HH:mm:ss") : undefined}
+                                        onChange={(t, str) => {
+                                            this.state.modalData.formattedPaymentTime = str;
+                                            this.setState({ modalData: this.state.modalData });
+                                        }} />
+                                </div>
+                            </div>
+                        </div>
+                        <div className="modal-box" style={{ marginTop: '100px' }}>
+                            <Button type="primary" onClick={this.submit}>提交</Button>
+                            <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
+                        </div>
+                    </Spin>
+                </Modal>
+                <Modal title="删除确认" width={600} className="activity-modal"
+                    visible={this.state.delVisible}
+                    maskClosable={false}
+                    footer={null}
+                    onCancel={() => { this.setState({ delVisible: false }) }} >
+                    <Spin spinning={this.state.loading}>
+                        <div className="clearfix">
+                            <div className="modal-box">
+                                <span>是否确定删除这条记录?删除后数据不可恢复!</span>
+                            </div>
+                            <div className="modal-box" >
+                                <Button type="primary" onClick={this.deleteRow}>提交</Button>
+                                <Button type="ghost" onClick={() => { this.setState({ delVisible: false }) }}>取消</Button>
+                            </div>
+                        </div>
+                    </Spin>
+                </Modal>
+            </div >
+        );
+    }
+});
+
+export default OrderList;

+ 16 - 16
js/component/sign/account.jsx

@@ -174,6 +174,21 @@ const LoginContent = Form.create()(React.createClass({
             <div className="account-content clearfix">
                 <Spin spinning={this.state.loading} >
                     <Form className="account-left" horizontal onSubmit={this.handleSubmit}>
+                    	 <FormItem
+                            {...formItemLayout}
+                            label="手机号码"
+                            extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
+                            hasFeedback
+                        >
+                            {getFieldDecorator('phone', {
+                                rules: [{ required: true, message: '请输入手机号码!' },
+                                {
+                                    validator: this.checkPhone,
+                                }],
+                            })(
+                                <Input size="large" />
+                                )}
+                        </FormItem>
                         <FormItem
                             {...formItemLayout}
                             label="密码"
@@ -205,22 +220,7 @@ const LoginContent = Form.create()(React.createClass({
                             })(
                                 <Input type="password" />
                                 )}
-                        </FormItem>
-                        <FormItem
-                            {...formItemLayout}
-                            label="手机号码"
-                            extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
-                            hasFeedback
-                        >
-                            {getFieldDecorator('phone', {
-                                rules: [{ required: true, message: '请输入手机号码!' },
-                                {
-                                    validator: this.checkPhone,
-                                }],
-                            })(
-                                <Input size="large" />
-                                )}
-                        </FormItem>
+                        </FormItem>                       
                         <FormItem
                             {...formItemLayout}
                             label="验证码"

+ 2 - 2
js/component/sign/group.less

@@ -1,6 +1,6 @@
 .group {
-    margin: 50px 210px 0;
-    height: 680px;
+    margin: 0px 210px 0;
+    padding-top: 50px;
     .account-left {
         width: 540px;
         .acc-getVcode {

+ 15 - 15
js/component/sign/groupAccount.jsx

@@ -167,6 +167,20 @@ const Group = Form.create()(React.createClass({
             <div className="group clearfix">
                 <Spin spinning={this.state.loading} >
                     <Form className="account-left" horizontal onSubmit={this.handleSubmit}>
+	                     <FormItem
+	                            {...formItemLayout}
+	                            label="手机号码"
+	                            hasFeedback
+	                            extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
+	                        >
+	                            {getFieldDecorator('phone', {
+	                                rules: [{ required: true, message: '请输入手机号码!' }, {
+	                                    validator: this.checkPhone,
+	                                }],
+	                            })(
+	                                <Input size="large" />
+	                                )}
+	                    </FormItem>
                         <FormItem
                             {...formItemLayout}
                             label="密码"
@@ -197,21 +211,7 @@ const Group = Form.create()(React.createClass({
                             })(
                                 <Input type="password" />
                                 )}
-                        </FormItem>
-                        <FormItem
-                            {...formItemLayout}
-                            label="手机号码"
-                            hasFeedback
-                            extra={<span><Icon type="exclamation-circle" /> 请输入正确的手机号码</span>}
-                        >
-                            {getFieldDecorator('phone', {
-                                rules: [{ required: true, message: '请输入手机号码!' }, {
-                                    validator: this.checkPhone,
-                                }],
-                            })(
-                                <Input size="large" />
-                                )}
-                        </FormItem>
+                        </FormItem>                       
                         <FormItem
                             {...formItemLayout}
                             label="验证码"

+ 16 - 10
js/component/subscriberDetail/content.jsx

@@ -22,7 +22,7 @@ import score_ioc from '../../../image/score_ioc.png';
 import demand_sup from '../../../image/demand_sup.png';
 
 const Content = React.createClass({
-    loadData() {
+    loadData () {
         this.setState({
             loading: true
         });
@@ -50,7 +50,7 @@ const Content = React.createClass({
             });
         }.bind(this));
     },
-    achievementLoadData(pageNo) {
+    achievementLoadData (pageNo) {
         this.setState({
             loading: true
         });
@@ -105,7 +105,7 @@ const Content = React.createClass({
             });
         }.bind(this));
     },
-    demandLoadData(pageNo) {
+    demandLoadData (pageNo) {
         this.setState({
             loading: true
         });
@@ -160,7 +160,7 @@ const Content = React.createClass({
             });
         }.bind(this));
     },
-    interestClick() {
+    interestClick () {
         this.setState({
             loading: true
         });
@@ -185,7 +185,10 @@ const Content = React.createClass({
             });
         }.bind(this));;
     },
-    cancelInterestClick() {
+    consultClick () {
+        
+    },
+    cancelInterestClick () {
         this.setState({
             loading: true
         });
@@ -210,7 +213,7 @@ const Content = React.createClass({
             });
         }.bind(this));;
     },
-    getInitialState() {
+    getInitialState () {
         return {
             loading: false,
             theField: [],
@@ -230,7 +233,7 @@ const Content = React.createClass({
             },
         };
     },
-    componentWillMount() {
+    componentWillMount () {
         if (window.location.search) {
             let theObj = getSearchUrl(window.location.search);
             if (theObj.rid && theObj.rid != 'null') {
@@ -242,13 +245,13 @@ const Content = React.createClass({
             };
         };
     },
-    achievementListClick(record, index) {
+    achievementListClick (record, index) {
         window.open(globalConfig.context + '/portal/detail/achievementDetail.html?id=' + record.id + '&type=' + record.ownerType);
     },
-    demandListClick(record, index) {
+    demandListClick (record, index) {
         window.open(globalConfig.context + '/portal/detail/demandDetail.html?id=' + record.id + '&type=' + record.dataCategory);
     },
-    render() {
+    render () {
         const theData = this.state.data;
         return (
             <Spin spinning={this.state.loading} style={{ marginBottom: '80px' }} >
@@ -264,6 +267,9 @@ const Content = React.createClass({
                                 {theData.interestId ? <a onClick={this.cancelInterestClick}><Icon type="heart" /> 不感兴趣</a>
                                     : <a onClick={this.interestClick}><Icon type="heart-o" /> 感兴趣</a>}
                             </div>
+                            <div className="interest">
+                                <a onClick={this.consultClick}><Icon type="message" /> 线下咨询</a>
+                            </div>
                         </Col>
                         <Col span={16} className="avatar-right">
                             <div className="user-name">{this.state.type == 0 ? theData.username : theData.unitName}</div>

+ 14 - 1
js/component/tools.js

@@ -28,7 +28,8 @@ import {
     innovationList,
     orderStatusList,
     activityForm,
-    activityType
+    activityType,
+    boutique
 } from './dataDic.js';
 module.exports = {
     splitUrl: function (string, i, url) {
@@ -624,4 +625,16 @@ module.exports = {
             return theType;
         }
     },
+    //是否精品
+     getboutique: function (e) {
+         if (e) {
+            let theType = '';
+            boutique.map(function (item) {
+                if (item.value == e) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }

File diff suppressed because it is too large
+ 7203 - 0
package-lock.json


+ 2 - 2
package.json

@@ -1,11 +1,11 @@
 {
   "name": "afanti",
-  "version": "1.0.40",
+  "version": "1.0.43",
   "description": "",
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
-    "dlldev": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy dev --env.host 'http://afts.hnzhiming.com'",
+    "dlldev": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy dev --env.host 'http://127.0.0.1'",
     "dlltest": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy test --env.host 'http://afts.hnzhiming.com'",
     "dllstage": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy stage --env.host 'http://aftts.hnzhiming.com'",
     "dllpro": "webpack --progress --colors --config ./webpack-dll.config.js --env.deploy prod --env.host 'http://static.goafanti.com'",

+ 8 - 1
webpack.config.js

@@ -189,7 +189,13 @@ module.exports = (function () {
             template: './template/template.html',
             chunks: ['admin/idea', 'vendors']
         }),
-
+        //admin-userOrder
+        new HtmlWebpackPlugin({
+            title: '管理员-用户订单管理',
+            filename: 'admin/userOrder.html',
+            template: './template/template.html',
+            chunks: ['admin/userOrder', 'vendors']
+        }),
         //portal 门户
         // new HtmlWebpackPlugin({
         //     title: '主页-需求搜索',
@@ -231,6 +237,7 @@ module.exports = (function () {
         }));
     }
     let staticHost = 'http://afts.hnzhiming.com';
+    //let staticHost = 'http://127.0.0.1';    
     switch (argv.env.deploy) {
         case 'stage':
             staticHost = 'http://aftts.hnzhiming.com';

+ 10 - 4
webpack/entry.config.js

@@ -30,11 +30,13 @@ module.exports = {
     //admin/demand
     'admin/demand': './js/admin/demand.js',
     'admin/achievement': './js/admin/achievement.js',
+    //admin/userOrder
+    'admin/userOrder': './js/admin/userOrder.js',
     //portal  门户
-    'portal/search/demand': './js/portal/search/demand.js',
-    'portal/search/achievement': './js/portal/search/achievement.js',
-    'portal/search/subscriberUser': './js/portal/search/subscriberUser.js',
-    'portal/search/subscriberOrg': './js/portal/search/subscriberOrg.js'
+    // 'portal/search/demand': './js/portal/search/demand.js',
+    // 'portal/search/achievement': './js/portal/search/achievement.js',
+    // 'portal/search/subscriberUser': './js/portal/search/subscriberUser.js',
+    // 'portal/search/subscriberOrg': './js/portal/search/subscriberOrg.js'
   },
   watch: {
     'user/index': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
@@ -115,6 +117,10 @@ module.exports = {
       'webpack/hot/only-dev-server',
       './js/admin/idea.js'
     ],
+    'admin/userOrder': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+      'webpack/hot/only-dev-server',
+      './js/admin/userOrder.js'
+    ],
     //admin-servicesManage
     'admin/servicesManage/contract': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',