yee 7 éve%!(EXTRA string=óta)
szülő
commit
0e17638b5a

+ 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')
+)

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

@@ -169,4 +169,11 @@
                 margin-right: 10px;
             }
         }
+    }
+
+    .modal-box {
+        margin-top: 20px;
+        >button {
+            margin-right: 20px;
+        }
     }

+ 5 - 5
js/component/account/index/normal.jsx

@@ -81,15 +81,15 @@ const Content = React.createClass({
                             <img src={(() => {
                                 switch (this.state.level) {
                                     case 1:
-                                        return level1;
+                                        return globalConfig.avatarUploadHost + '/rank/level_1.png';
                                     case 2:
-                                        return level2;
+                                        return globalConfig.avatarUploadHost + '/rank/level_2.png';
                                     case 3:
-                                        return level3;
+                                        return globalConfig.avatarUploadHost + '/rank/level_3.png';
                                     case 4:
-                                        return level4;
+                                        return globalConfig.avatarUploadHost + '/rank/level_4.png';
                                     case 5:
-                                        return level5;
+                                        return globalConfig.avatarUploadHost + '/rank/level_5.png';
                                     default:
                                         return ""
                                 }

+ 54 - 2
js/component/account/index/serviceList.jsx

@@ -70,6 +70,8 @@ const OrderList = React.createClass({
     getInitialState () {
         return {
             searchMore: true,
+            visible: false,
+            deleteId: null,
             data: [],
             searchTime: [],
             loading: false,
@@ -143,14 +145,47 @@ const OrderList = React.createClass({
                         let now = new Date();
                         let endTime = new Date(record.orderTime + 24 * 60 * 60 * 1000 * 15)
                         if (record.orderState == 0 && now < endTime) {
-                            return <Button type="primary" onClick={() => { }}>支付</Button>
-                        } else { return <div></div> }
+                            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();
     },
@@ -204,6 +239,23 @@ const OrderList = React.createClass({
                             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 >
         );
     }

+ 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>

+ 0 - 8
js/component/manageCenter/userManage/content.jsx

@@ -53,14 +53,6 @@ class Content extends Component {
                     });
                 });
                 break;
-            case 'orderList':
-                require.ensure([], () => {
-                    const OrderList = require('./orderList').default;
-                    this.setState({
-                        component: <OrderList />,
-                    });
-                });
-                break;
             case 'customerSearch':
                 require.ensure([], () => {
                     const CustomerSearch = require('./customerSearch').default;

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

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

+ 2 - 3
js/component/manageCenter/userManage/levelSet.jsx

@@ -73,7 +73,6 @@ const ListAdd = React.createClass({
                         <span>会员等级:</span>
                         <Select value={this.state.level} style={{ width: 120 }}
                             onChange={(e) => { this.setState({ level: e }) }}>
-                            <Option value="1">1</Option>
                             <Option value="2">2</Option>
                             <Option value="3">3</Option>
                             <Option value="4">4</Option>
@@ -108,7 +107,7 @@ const ListDelete = React.createClass({
             loading: true
         });
         $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/member/delGrade",
@@ -259,7 +258,7 @@ const SetContent = React.createClass({
             }
         };
         $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context + "/api/admin/member/addBusinessAndCost",

+ 34 - 47
js/component/manageCenter/userManage/orderList.jsx

@@ -2,7 +2,7 @@ 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 './userList.less';
+import './content.less';
 import moment from 'moment';
 import { getTime } from '../../tools';
 
@@ -42,8 +42,7 @@ const OrderList = React.createClass({
                             formattedOrderTime: thisdata.formattedOrderTime,
                             formattedPaymentTime: thisdata.formattedPaymentTime,
                             formattedValidTime: thisdata.formattedValidTime,
-                            gradeName: thisdata.gradeName,
-                            menberType: thisdata.menberType,
+                            expertName: thisdata.expertName,
                             nickname: thisdata.nickname,
                             mobile: thisdata.mobile,
                             orderState: thisdata.orderState,
@@ -106,9 +105,9 @@ const OrderList = React.createClass({
                     dataIndex: 'nickname',
                     key: 'nickname',
                 }, {
-                    title: '会员类型',
-                    dataIndex: 'gradeName',
-                    key: 'gradeName',
+                    title: '专家名称',
+                    dataIndex: 'expertName',
+                    key: 'expertName',
                 }, {
                     title: '订单状态',
                     dataIndex: 'orderState',
@@ -128,15 +127,6 @@ const OrderList = React.createClass({
                     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: []
@@ -175,7 +165,8 @@ const OrderList = React.createClass({
                 paymentValue: this.state.modalData.paymentValue,
                 orderState: this.state.modalData.orderState,
                 paymentTime: this.state.modalData.formattedPaymentTime,
-                paymentType: this.state.modalData.paymentType
+                paymentType: this.state.modalData.paymentType,
+                paymentId: this.state.modalData.paymentId
             }
         }).done(function (data) {
             if (!data.error.length) {
@@ -198,12 +189,22 @@ const OrderList = React.createClass({
         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>
+                    <span>专家咨询订单列表</span>
                 </div>
                 <div className="user-search">
                     <Input placeholder="订单编号" value={this.state.searchOrderNumber}
@@ -212,11 +213,6 @@ const OrderList = React.createClass({
                         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.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>
@@ -232,11 +228,15 @@ const OrderList = React.createClass({
                     </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}
+                        <Table columns={this.state.columns} class="no-all-select"
                             dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
                             pagination={this.state.pagination}
                             onRowClick={this.tableRowClick} />
                     </Spin>
@@ -250,39 +250,17 @@ const OrderList = React.createClass({
                     <Spin spinning={this.state.loading}>
                         <div className="clearfix">
                             <div className="modal-box">
-                                <span className="modal-box-title">会员等级</span>
+                                <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>
+                                    <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' }}>
-                                    <InputNumber value={this.state.modalData.validMonth} step={1} onChange={(e) => {
-                                        this.state.modalData.validMonth = e;
-                                        this.setState({ modalData: this.state.modalData });
-                                    }} />
-                                    <span> 月</span>
-                                </div>
                                 <span className="modal-box-title">订单金额</span>
                                 <div className="modal-box-detail" style={{ width: '160px' }}>
                                     <span>{this.state.modalData.price}</span>
                                     <span> 元</span>
                                 </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.paymentValue} step={0.01} onChange={(e) => {
@@ -291,6 +269,8 @@ const OrderList = React.createClass({
                                     }} />
                                     <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) => {
@@ -298,6 +278,13 @@ const OrderList = React.createClass({
                                         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>

+ 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 - 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>

+ 1 - 1
package.json

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

+ 7 - 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: '主页-需求搜索',

+ 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',