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

+ 277 - 0
js/component/account/index/consultList.jsx

@@ -0,0 +1,277 @@
+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/consultorder/list",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                number: this.state.searchNumber,
+                toNumber: this.state.searchToNumber,
+                id: this.state.searchId,
+                paymentId: this.state.searchPaymentId,
+                state: this.state.searchState
+            },
+            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,
+                            price: thisdata.price,
+                            orderState: thisdata.orderState,
+                            orderTime: thisdata.orderTime,
+                            orderTimeFormatted: thisdata.orderTimeFormatted,
+                            userId: thisdata.userId,
+                            toUserId: thisdata.toUserId,
+                            nickname: thisdata.nickname,
+                            number: thisdata.number,
+                            toNickname: thisdata.toUsername || thisdata.toNickname,
+                            toNumber: thisdata.toNumber,
+                            paymentTime: thisdata.paymentTime,
+                            paymentTimeFormatted: thisdata.paymentTimeFormatted,
+                            paymentValue: thisdata.paymentValue,
+                            paymentType: thisdata.paymentType,
+                            paymentId: thisdata.paymentId,
+                        });
+                    };
+                    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: 'toNumber',
+                    key: 'toNumber',
+                }, {
+                    title: '专家名称',
+                    dataIndex: 'toNickname',
+                    key: 'toNickname'
+                }, {
+                    title: '订单状态',
+                    dataIndex: 'orderState',
+                    key: 'orderState',
+                    render: (text, record) => {
+                        if (text == 1) {
+                            return '已支付'
+                        } else if (text == 9) {
+                            return '已取消'
+                        } else if (text == 2) {
+                            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: 'orderTimeFormatted',
+                    key: 'orderTimeFormatted',
+                }, {
+                    title: '支付金额',
+                    dataIndex: 'price',
+                    key: 'price',
+                    render: (index, record) => {
+                        if (record.paymentValue && record.paymentValue != 0) {
+                            return record.paymentValue
+                        } else {
+                            return index
+                        }
+                    }
+                }, {
+                    title: '支付时间',
+                    dataIndex: 'paymentTimeFormatted',
+                    key: 'paymentTimeFormatted',
+                }, {
+                    title: '支付流水',
+                    dataIndex: 'paymentId',
+                    key: 'paymentId'
+                }, {
+                    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/consultorder/del",
+            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.searchNumber = undefined;
+        this.state.searchToNumber = undefined;
+        this.state.searchId = undefined;
+        this.state.searchPaymentId = undefined;
+        this.state.searchState = 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">
+                    <Input placeholder="会员编号" value={this.state.searchNumber}
+                        onChange={(e) => { this.setState({ searchNumber: e.target.value }); }} />
+                    <Input placeholder="专家编号" value={this.state.searchToNumber}
+                        onChange={(e) => { this.setState({ searchToNumber: e.target.value }); }} />
+                    <Input placeholder="订单编号" value={this.state.searchId}
+                        onChange={(e) => { this.setState({ searchId: e.target.value }); }} />
+                    <Select placeholder="订单状态" value={this.state.searchState} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchState: e }) }}>
+                        <Option value="0">未付款</Option>
+                        <Option value="1">已付款</Option>
+                        <Option value="9">已取消</Option>
+                        <Option value="10">已失效</Option>
+                    </Select>
+                    <Input placeholder="支付流水" value={this.state.searchPaymentId}
+                        onChange={(e) => { this.setState({ searchPaymentId: e.target.value }); }} />
+                    <div className="search-div" style={{ display: 'none' }}>
+                        <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;

+ 8 - 0
js/component/account/index/content.jsx

@@ -51,6 +51,14 @@ class Content extends Component {
                     });
                 });
                 break;
+            case 'consultList':
+                require.ensure([], () => {
+                    const ConsultList = require('./consultList').default;
+                    this.setState({
+                        component: ConsultList
+                    });
+                });
+                break;
         };
         window.location.hash = key;
     }

+ 7 - 4
js/component/account/index/leftTab.jsx

@@ -6,23 +6,23 @@ const MenuItemGroup = Menu.ItemGroup;
 
 
 const LeftTab = React.createClass({
-    getInitialState() {
+    getInitialState () {
         return {
             current: 'normal'
         };
     },
-    handleClick(e) {
+    handleClick (e) {
         this.props.handlekey(e.key);
         this.setState({
             current: e.key,
         });
     },
-    componentWillMount() {
+    componentWillMount () {
         if (window.location.hash) {
             this.state.current = window.location.hash.substr(1);
         };
     },
-    render() {
+    render () {
         return (
             <Menu onClick={this.handleClick}
                 selectedKeys={[this.state.current]}
@@ -40,6 +40,9 @@ const LeftTab = React.createClass({
                 <Menu.Item key="serviceList">
                     服务订单
                 </Menu.Item>
+                <Menu.Item key="consultList">
+                    咨询订单
+                </Menu.Item>
             </Menu>
         );
     },

+ 4 - 2
js/component/account/index/normal.jsx

@@ -95,8 +95,10 @@ const Content = React.createClass({
                                 }
                             })()} alt="" />
                             {(() => {
-                                if (this.state.level < 2) {
-                                    return <span><a href={globalConfig.context + '/portal/membership.html'}>升级高级会员</a>获取更多会员权益</span>;
+                                if (this.state.level > 1 && this.state.level < 2) {
+                                    return <span style={{ fontSize: '14px', color: '#333' }}>
+                                        <a href={globalConfig.context + '/portal/membership.html'}>升级高级会员</a> ,获取更多会员权益
+                                        </span>;
                                 }
                             })()}
                         </p>

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

@@ -204,7 +204,7 @@ const PfsFrom = Form.create()(React.createClass({
                     label="从业工龄"
                 >
                     {getFieldDecorator('gongling', {
-                        initialValue: this.state.gongling
+                        initialValue: this.state.gongling || 0
                     })(
                         <InputNumber />
                         )}

+ 142 - 61
js/component/manageCenter/userOrder/consultOrderList.jsx

@@ -17,16 +17,15 @@ const OrderList = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/member/selectMemberOrderBa",
+            url: globalConfig.context + "/api/admin/consultorder/list",
             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]
+                number: this.state.searchNumber,
+                toNumber: this.state.searchToNumber,
+                id: this.state.searchId,
+                paymentId: this.state.searchPaymentId,
+                state: this.state.searchState
             },
             success: function (data) {
                 if (!data.data || !data.data.list) {
@@ -39,22 +38,21 @@ const OrderList = React.createClass({
                         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,
+                            price: thisdata.price,
                             orderState: thisdata.orderState,
                             orderTime: thisdata.orderTime,
-                            paymentId: thisdata.paymentId,
+                            orderTimeFormatted: thisdata.orderTimeFormatted,
+                            userId: thisdata.userId,
+                            toUserId: thisdata.toUserId,
+                            nickname: thisdata.nickname,
+                            number: thisdata.number,
+                            toNickname: thisdata.toUsername || thisdata.toNickname,
+                            toNumber: thisdata.toNumber,
                             paymentTime: thisdata.paymentTime,
-                            paymentType: thisdata.paymentType,
+                            paymentTimeFormatted: thisdata.paymentTimeFormatted,
                             paymentValue: thisdata.paymentValue,
-                            price: thisdata.price,
-                            userId: thisdata.userId,
-                            validMonth: thisdata.validMonth,
-                            validTime: thisdata.validTime,
+                            paymentType: thisdata.paymentType,
+                            paymentId: thisdata.paymentId,
                         });
                     };
                     this.state.pagination.current = data.data.pNo;
@@ -74,9 +72,12 @@ const OrderList = React.createClass({
     getInitialState () {
         return {
             searchMore: true,
+            selectedRows: [],
+            selectedRowKeys: [],
             data: [],
             modalData: {},
             visible: false,
+            delVisible: false,
             searchTime: [],
             loading: false,
             pagination: {
@@ -97,36 +98,65 @@ const OrderList = React.createClass({
                     dataIndex: 'id',
                     key: 'id',
                 }, {
-                    title: '号',
-                    dataIndex: 'mobile',
-                    key: 'mobile',
+                    title: '用户编号',
+                    dataIndex: 'number',
+                    key: 'number',
                 }, {
-                    title: '认证名称',
+                    title: '用户名称',
                     dataIndex: 'nickname',
-                    key: 'nickname',
+                    key: 'nickname'
+                }, {
+                    title: '专家编号',
+                    dataIndex: 'toNumber',
+                    key: 'toNumber',
                 }, {
                     title: '专家名称',
-                    dataIndex: 'expertName',
-                    key: 'expertName',
+                    dataIndex: 'toNickname',
+                    key: 'toNickname'
                 }, {
                     title: '订单状态',
                     dataIndex: 'orderState',
                     key: 'orderState',
-                    render: (text) => {
+                    render: (text, record) => {
                         if (text == 1) {
                             return '已支付'
+                        } else if (text == 9) {
+                            return '已取消'
+                        } else if (text == 2) {
+                            return '支付中'
                         } else {
-                            return '未支付'
-                        };
+                            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',
+                    dataIndex: 'orderTimeFormatted',
+                    key: 'orderTimeFormatted',
+                }, {
+                    title: '支付金额',
+                    dataIndex: 'price',
+                    key: 'price',
+                    render: (index, record) => {
+                        if (record.paymentValue && record.paymentValue != 0) {
+                            return record.paymentValue
+                        } else {
+                            return index
+                        }
+                    }
                 }, {
                     title: '支付时间',
-                    dataIndex: 'formattedPaymentTime',
-                    key: 'formattedPaymentTime',
+                    dataIndex: 'paymentTimeFormatted',
+                    key: 'paymentTimeFormatted',
+                }, {
+                    title: '支付流水',
+                    dataIndex: 'paymentId',
+                    key: 'paymentId'
                 }
             ],
             dataSource: []
@@ -139,15 +169,16 @@ const OrderList = React.createClass({
         this.loadData();
     },
     reset () {
-        this.state.searchOrderNumber = undefined;
-        this.state.searchAftNumber = undefined;
-        this.state.searchOrderStatus = undefined;
-        this.state.searchName = undefined;
+        this.state.searchNumber = undefined;
+        this.state.searchToNumber = undefined;
+        this.state.searchId = undefined;
+        this.state.searchPaymentId = undefined;
+        this.state.searchState = undefined;
         this.state.searchTime = [];
         this.loadData();
     },
     submit () {
-        if (this.state.modalData.paymentType == 1 && !this.state.modalData.formattedPaymentTime) {
+        if (this.state.modalData.paymentType == 1 && !this.state.modalData.paymentTimeFormatted) {
             message.warning('状态为已支付时支付时间必填');
             return
         }
@@ -156,15 +187,12 @@ const OrderList = React.createClass({
             method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/member/updateMemberOrder",
+            url: globalConfig.context + "/api/admin/consultorder/update",
             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,
+                paymentTime: this.state.modalData.paymentTimeFormatted,
                 paymentType: this.state.modalData.paymentType,
                 paymentId: this.state.modalData.paymentId
             }
@@ -188,6 +216,44 @@ const OrderList = React.createClass({
         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/consultorder/del",
+            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,
@@ -207,18 +273,22 @@ const OrderList = React.createClass({
                     <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 }) }}>
+                    <Input placeholder="会员编号" value={this.state.searchNumber}
+                        onChange={(e) => { this.setState({ searchNumber: e.target.value }); }} />
+                    <Input placeholder="专家编号" value={this.state.searchToNumber}
+                        onChange={(e) => { this.setState({ searchToNumber: e.target.value }); }} />
+                    <Input placeholder="订单编号" value={this.state.searchId}
+                        onChange={(e) => { this.setState({ searchId: e.target.value }); }} />
+                    <Select placeholder="订单状态" value={this.state.searchState} style={{ width: 120 }}
+                        onChange={(e) => { this.setState({ searchState: e }) }}>
                         <Option value="0">未付款</Option>
                         <Option value="1">已付款</Option>
+                        <Option value="9">已取消</Option>
+                        <Option value="10">已失效</Option>
                     </Select>
-                    <div className="search-div">
+                    <Input placeholder="支付流水" value={this.state.searchPaymentId}
+                        onChange={(e) => { this.setState({ searchPaymentId: e.target.value }); }} />
+                    <div className="search-div" style={{ display: "none" }}>
                         <span>订单生成时间:</span>
                         <RangePicker
                             allowClear={false}
@@ -230,7 +300,7 @@ const OrderList = React.createClass({
                     <Button onClick={this.reset}>重置</Button>
                     <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
                         disabled={!hasSelected}
-                        onClick={this.delectRow}>删除<Icon type="minus" /></Button>
+                        onClick={() => { this.setState({ delVisible: true }) }}>删除<Icon type="minus" /></Button>
                 </div>
                 <div className="patent-table">
                     <Spin spinning={this.state.loading}>
@@ -250,12 +320,6 @@ const OrderList = React.createClass({
                     <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>
@@ -306,9 +370,9 @@ const OrderList = React.createClass({
                                         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}
+                                        value={this.state.modalData.paymentTimeFormatted ? moment(this.state.modalData.paymentTimeFormatted, "YYYY-MM-DD HH:mm:ss") : undefined}
                                         onChange={(t, str) => {
-                                            this.state.modalData.formattedPaymentTime = str;
+                                            this.state.modalData.paymentTimeFormatted = str;
                                             this.setState({ modalData: this.state.modalData });
                                         }} />
                                 </div>
@@ -320,6 +384,23 @@ const OrderList = React.createClass({
                         </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 >
         );
     }

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

@@ -37,6 +37,26 @@ class Content extends Component {
                     });
                 });
                 break;
+            case 'userAchievementOrder':
+                require.ensure([], () => {
+                    const AchievementOrder = require('../achievement/achievementOrder').default;
+                    this.setState({
+                        component: <AchievementOrder
+                            data-listApiUrl='/api/admin/portal/order/userAchievementOrderList'
+                            data-detailApiUrl='/api/admin/achievement/userDetail' />
+                    });
+                });
+                break;
+            case 'orgAchievementOrder':
+                require.ensure([], () => {
+                    const AchievementOrder = require('../achievement/achievementOrder').default;
+                    this.setState({
+                        component: <AchievementOrder
+                            data-listApiUrl='/api/admin/portal/order/orgAchievementOrderList'
+                            data-detailApiUrl='/api/admin/achievement/orgDetail' />
+                    });
+                });
+                break;
         };
         window.location.hash = key;
     }

+ 5 - 2
js/component/manageCenter/userOrder/leftTab.jsx

@@ -34,8 +34,11 @@ const LeftTab = React.createClass({
                 <Menu.Item key="consult">
                     专家咨询订单
                 </Menu.Item>
-                <Menu.Item key="technology">
-                    科技服务订单
+                <Menu.Item key="orgAchievementOrder">
+                    组织成果订单
+                </Menu.Item>
+                <Menu.Item key="userAchievementOrder">
+                    个人成果订单
                 </Menu.Item>
             </Menu>
         );

+ 1 - 1
js/component/portal/portal.less

@@ -47,7 +47,7 @@
                     position: relative;
                     >li {
                         float: left;
-                        width: 10%;
+                        width: 9%;
                         font-size: 13px;
                         height: @headerNavDetaulHeight;
                         padding: 0;

+ 7 - 4
js/component/portal/top.jsx

@@ -5,7 +5,7 @@ import './portal.less';
 import $ from 'jquery';
 import logoImg from '../../../image/logo-2.png';
 
-function navHover() {
+function navHover () {
     $('.header_nav_detail .nav_content>li').hover(function () {
         $(this).siblings('.active').addClass('hideSub');
     }, function () {
@@ -14,7 +14,7 @@ function navHover() {
 }
 
 const LoginTop = React.createClass({
-    logOut() {
+    logOut () {
         $.ajax({
             method: "get",
             dataType: "json",
@@ -27,10 +27,10 @@ const LoginTop = React.createClass({
             };
         });
     },
-    componentDidMount() {
+    componentDidMount () {
         navHover();
     },
-    render() {
+    render () {
         return (
             <div className="portal-header">
                 <div className="portal-top">
@@ -137,6 +137,9 @@ const LoginTop = React.createClass({
                                         <li ><a href={globalConfig.context + '/portal/financial/financialIndex.html'}>金融街</a></li>
                                     </ul>
                                 </li>
+                                <li>
+                                    <a href={globalConfig.context + '/portal/residentIntegration/index.html'}>军民融合</a>
+                                </li>
                             </ul>
                         </div>
                     </div>

+ 61 - 3
js/component/subscriberDetail/content.jsx

@@ -1,5 +1,5 @@
 import React from 'react';
-import { Icon, message, Row, Col, Spin, Tag, Pagination } from 'antd';
+import { Icon, message, Row, Col, Spin, Tag, Pagination, Modal, Button } from 'antd';
 import './detail.less';
 import { getSearchUrl, getAchievementCategory, getDemandType, getTransferMode, getMaturity } from '../tools';
 import { getProvince } from '../NewDicProvinceList';
@@ -185,8 +185,47 @@ const Content = React.createClass({
             });
         }.bind(this));;
     },
+    addConsultorder () {
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/user/consultorder/add',
+            data: {
+                toUserId: this.state.uid
+            },
+            success: function (data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                } else {
+                    this.loadData();
+                };
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                visible: false,
+                loading: false
+            });
+        }.bind(this));;
+    },
     consultClick () {
-        
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            url: globalConfig.context + "/api/user/consultorder/price"
+        }).done(function (data) {
+            if (data.error && data.error.length) {
+                message.warning(data.error[0].message);
+            } else {
+                this.state.consultPrice = data.data || 0;
+            }
+            this.setState({
+                visible: true
+            });
+        }.bind(this));
     },
     cancelInterestClick () {
         this.setState({
@@ -216,6 +255,8 @@ const Content = React.createClass({
     getInitialState () {
         return {
             loading: false,
+            visible: false,
+            consultPrice: 0,
             theField: [],
             data: {},
             theImgsrc: [],
@@ -268,7 +309,7 @@ const Content = React.createClass({
                                     : <a onClick={this.interestClick}><Icon type="heart-o" /> 感兴趣</a>}
                             </div>
                             <div className="interest">
-                                <a onClick={this.consultClick}><Icon type="message" /> 线下咨询</a>
+                                <a onClick={() => { this.consultClick() }}><Icon type="message" /> 线下咨询</a>
                             </div>
                         </Col>
                         <Col span={16} className="avatar-right">
@@ -451,6 +492,23 @@ const Content = React.createClass({
                         current={this.state.demandPagination.pageNo}
                         pageSize={this.state.demandPagination.pageSize} />
                 </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 className="modal-box">
+                                <span>{"预约 " + (this.state.type == 0 ? theData.username : theData.unitName) + " 的线下咨询需要支付 " + this.state.consultPrice + " 元,是否确认预约?"}</span>
+                            </div>
+                            <div className="modal-box" style={{ marginTop: '20px' }}>
+                                <Button style={{ marginRight: '20px' }} type="primary" onClick={this.addConsultorder}>提交</Button>
+                                <Button type="ghost" onClick={() => { this.setState({ visible: false }) }}>取消</Button>
+                            </div>
+                        </div>
+                    </Spin>
+                </Modal>
             </Spin>
         )
     }

+ 1 - 1
package.json

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