Bladeren bron

v1.0.30 update

yee 7 jaren geleden
bovenliggende
commit
52db713f04

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

@@ -133,7 +133,7 @@ const CompanyDetail = Form.create()(React.createClass({
                     uid: item.uid,
                     type: item.type,
                     name: item.name,
-                    orgCode: item.idNumber,
+                    orgCode: item.orgCode,
                     investment: item.investment
                 });
             });

+ 1 - 0
js/component/account/services/contract/contractDetail.jsx

@@ -374,6 +374,7 @@ const ContractDetailForm = Form.create()(React.createClass({
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id);
             this.loadColumnsData(nextProps.data.id);
+            this.props.form.resetFields();
         };
     },
     tableRowClick(record, index) {

+ 1 - 0
js/component/account/services/copyright/comPatentChange.jsx

@@ -158,6 +158,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
             this.loadData(nextProps.data.id);
             this.state.fileList_copyright_apply = [];
             this.state.fileList_copyright_auth = [];
+            this.props.form.resetFields();
         };
     },
     handleSubmit(e) {

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

@@ -153,6 +153,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             this.loadData(nextProps.data.pid);
             this.getStateData(nextProps.data.pid);
             this.state.fileList = [];
+            this.props.form.resetFields();
         };
     },
     subsidyCheck(e) {

+ 5 - 5
js/component/account/set/hrSituation.jsx

@@ -86,12 +86,11 @@ const HrSituationDescFrom = Form.create()(React.createClass({
                     if (!data.error.length) {
                         message.success('保存成功!');
                         this.props.clickOk();
-                        this.props.spinState(false);
                         this.props.form.resetFields();
                     } else {
                         message.warning(data.error[0].message);
-                        this.props.spinState(false);
-                    }
+                    };
+                    this.props.spinState(false);
                 }.bind(this));
             }
         });
@@ -111,6 +110,8 @@ const HrSituationDescFrom = Form.create()(React.createClass({
             this.props.form.resetFields();
             this.state.fileList_roster = [];
             this.state.fileList_social_security = [];
+            this.state.rosterUrl = null;
+            this.state.socialSecurityUrl = null;
         };
     },
     render() {
@@ -560,8 +561,7 @@ const HrSituationDesc = React.createClass({
                     <Modal maskClosable={false} title="人力资源状况" visible={this.state.visible}
                         onOk={this.handleOk} onCancel={this.handleCancel}
                         width='1200px'
-                        footer=''
-                    >
+                        footer='' >
                         <HrSituationDescFrom data={this.props.data}
                             visible={this.state.visible}
                             spinState={this.spinChange}

+ 2 - 0
js/component/login/adminLogin.less

@@ -25,9 +25,11 @@ body {
     }
     .user-box {
         margin-bottom: 20px;
+        .ant-input {width:268px;}
     }
     .pw-box {
         margin-bottom: 20px;
+        .ant-input {width:268px;}
     }
 }
 

+ 6 - 0
js/component/login/login.less

@@ -92,6 +92,12 @@
                 height: 100%;
                 width: 100%;
             }
+            #phone {
+                width: 268px;
+            }
+            #password {
+                width: 268px;
+            }
         }
         .login-other {
             padding: 0 20px;

+ 2 - 2
js/component/manageCenter/achievement/techAchievement.jsx

@@ -237,8 +237,8 @@ const AchievementList = React.createClass({
             selectedRowKeys: this.state.selectedRowKeys,
             onChange: (selectedRowKeys, selectedRows) => {
                 this.setState({
-                    selectedRows: selectedRows,
-                    selectedRowKeys: selectedRowKeys
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
                 });
             }
         };

+ 7 - 0
js/component/manageCenter/achievement/techAchievement.less

@@ -94,4 +94,11 @@
     .ant-input-number-handler-wrap {
         display: none
     }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
 }

+ 2 - 2
js/component/manageCenter/demand/techDemand.jsx

@@ -366,8 +366,8 @@ const DemandList = React.createClass({
             selectedRowKeys: this.state.selectedRowKeys,
             onChange: (selectedRowKeys, selectedRows) => {
                 this.setState({
-                    selectedRows: selectedRows,
-                    selectedRowKeys: selectedRowKeys
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
                 });
             }
         };

+ 7 - 0
js/component/manageCenter/demand/techDemand.less

@@ -96,4 +96,11 @@
     .ant-input-number-handler-wrap {
         display: none
     }
+}
+.ant-table-thead {
+    .ant-table-selection-column {
+        .ant-checkbox-wrapper {
+            display: none;
+        }
+    }
 }

+ 220 - 2
js/component/manageCenter/index/content.jsx

@@ -1,15 +1,232 @@
 import React from 'react';
-import { Spin, Button, Tabs } from 'antd';
+import { Spin, Button, Tabs, Table } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
 import '../content.less';
+import './content.less';
 import LeftTab from './leftTab.jsx';
 
 
 const TabPane = Tabs.TabPane;
 
-
+const MessageModal = React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadReaded(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            UnreadPagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadUnread(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '编号',
+                    dataIndex: 'key',
+                    key: 'key'
+                }, {
+                    title: '类型',
+                    dataIndex: 'noticeType',
+                    key: 'noticeType',
+                    render: (text, record) => {
+                        switch (text) {
+                            case 1:
+                                return <a href={globalConfig.context + "/admin/servicesManage/patent.html?rid=" + record.rid + "&uid=" + record.uid + "#comprehensive"}> {record.noticeTypeName} </a>;
+                            case 3:
+                                return <a href={globalConfig.context + "/admin/servicesManage/copyright.html?rid=" + record.rid + "&uid=" + record.uid + "#copyright"}> {record.noticeTypeName} </a>;
+                            case 2:
+                                return <a href={globalConfig.context + "/admin/servicesManage/highTech.html?rid=" + record.rid + "&uid=" + record.uid + "&year=" + record.year + "#highTechApply"}> {record.noticeTypeName} </a>;
+                            case 4:
+                                return <a href={globalConfig.context + "/admin/servicesManage/technology.html?rid=" + record.rid + "&uid=" + record.uid + "#applyManage"}> {record.noticeTypeName} </a>;
+                            case 5:
+                                return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=0" + (window.showUserList ? "#userList" : "#customerList")}> {record.noticeTypeName} </a>;
+                            case 6:
+                                return <a href={globalConfig.context + "/admin/userManage.html?id=" + record.uid + "&type=1" + (window.showOrgList ? "#orgList" : "#customerList")}> {record.noticeTypeName} </a >;
+                            case 7:
+                                return <a href={globalConfig.context + "/admin/servicesManage/contract.html?rid=" + record.rid + "&uid=" + record.uid + "#contract"}> {record.noticeTypeName} </a >;
+                            case 8:
+                                return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "#techDemandUser"}> {record.noticeTypeName} </a >;
+                            case 9:
+                                return <a href={globalConfig.context + "/admin/demand.html?rid=" + record.rid + "&uid=" + record.uid + "#techDemandOrg"}> {record.noticeTypeName} </a >;
+                            case 10:
+                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#orgTechAchievement"}> {record.noticeTypeName} </a >;
+                            case 11:
+                                return <a href={globalConfig.context + "/admin/achievement.html?rid=" + record.rid + "#userTechAchievement"}> {record.noticeTypeName} </a >;
+                        }
+                    }
+                }, {
+                    title: '时间',
+                    dataIndex: 'createTimeFormattedDate',
+                    key: 'createTimeFormattedDate'
+                }, {
+                    title: '内容',
+                    dataIndex: 'content',
+                    key: 'content',
+                }, {
+                    title: '公司',
+                    dataIndex: 'unitName',
+                    key: 'unitName',
+                }, {
+                    title: '业务员',
+                    dataIndex: 'principle',
+                    key: 'principle',
+                }
+            ],
+            data: []
+        };
+    },
+    loadReaded(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/notice/readed",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+            }
+        }).done((data) => {
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    return;
+                };
+            };
+            this.state.data = [];
+            for (let i = 0; i < data.data.list.length; i++) {
+                let thisdata = data.data.list[i];
+                this.state.data.push({
+                    key: i + 1,
+                    id: thisdata.id,
+                    rid: thisdata.rid,
+                    uid: thisdata.uid,
+                    aid: thisdata.aid,
+                    noticeType: thisdata.noticeType,
+                    year: thisdata.year,
+                    noticeTypeName: thisdata.noticeTypeName,
+                    content: thisdata.content,
+                    createTime: thisdata.createTime,
+                    createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                    principle: thisdata.principle,
+                    unitName: thisdata.unitName
+                });
+            };
+            this.state.pagination.current = data.data.pageNo;
+            this.state.pagination.total = data.data.totalCount;
+            this.setState({
+                dataSource: this.state.data,
+                pagination: this.state.pagination
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    loadUnread(pageNo) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/notice/unread",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.UnreadPagination.pageSize,
+            }
+        }).done((data) => {
+            if (!data.data) {
+                if (data.error && data.error.length) {
+                    message.warning(data.error[0].message);
+                    return;
+                };
+            };
+            this.state.data = [];
+            for (let i = 0; i < data.data.list.length; i++) {
+                let thisdata = data.data.list[i];
+                this.state.data.push({
+                    key: i + 1,
+                    id: thisdata.id,
+                    rid: thisdata.rid,
+                    uid: thisdata.uid,
+                    aid: thisdata.aid,
+                    noticeType: thisdata.noticeType,
+                    year: thisdata.year,
+                    noticeTypeName: thisdata.noticeTypeName,
+                    content: thisdata.content,
+                    createTime: thisdata.createTime,
+                    createTimeFormattedDate: thisdata.createTimeFormattedDate,
+                    principle: thisdata.principle,
+                    unitName: thisdata.unitName
+                });
+            };
+            this.state.UnreadPagination.current = data.data.pageNo;
+            this.state.UnreadPagination.total = data.data.totalCount;
+            this.setState({
+                unreadData: this.state.data,
+                UnreadPagination: this.state.UnreadPagination
+            });
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadReaded();
+        this.loadUnread();
+    },
+    render() {
+        return (
+            <div className="set-content">
+                <div className="set-title">
+                    <span>管理员中心</span>
+                </div>
+                <Spin spinning={this.state.loading} className='spin-box'>
+                    <Tabs defaultActiveKey="1">
+                        <Tabs.TabPane tab="新信息" key="1">
+                            <Table columns={this.state.columns}
+                                dataSource={this.state.unreadData}
+                                pagination={this.state.UnreadPagination} />
+                        </Tabs.TabPane>
+                        <Tabs.TabPane tab="已读信息" key="2">
+                            <Table columns={this.state.columns}
+                                dataSource={this.state.dataSource}
+                                pagination={this.state.pagination} />
+                        </Tabs.TabPane>
+                    </Tabs>
+                </Spin>
+            </div>
+        );
+    }
+});
 
 const Content = React.createClass({
     getInitialState() {
@@ -24,6 +241,7 @@ const Content = React.createClass({
                 <div className="content-right">
                     <Spin spinning={this.state.loading} className='spin-box'>
                         <div className="index-content">
+                            <MessageModal />
                         </div>
                     </Spin>
                 </div>

+ 14 - 124
js/component/manageCenter/index/content.less

@@ -1,127 +1,17 @@
-    @a-color: #ea0862;
-    .index-content {
-        height: 100%;
-        .acc-title {
-            color: #333;
+.set-content {
+    background: #fff;
+    padding: 20px;
+    .set-title {
+        >span {
             font-size: 16px;
-            margin-bottom: 10px;
-            span {
-                font-size: 12px;
-                color: #999;
-                margin-left: 10px;
-            }
-        }
-        .index-userdata {
-            background: #fff;
-            padding: 20px;
-            .userdata-img {
-                height: 120px;
-                width: 120px;
-                padding-top: 120px;
-                position: relative;
-                overflow: hidden;
-                border-radius: 50%;
-                float: left;
-                background: #eee;
-                img {
-                    height: 120px;
-                    width: 120px;
-                    position: absolute;
-                    top: 0;
-                    left: 0;
-                }
-            }
-            .userdata-content {
-                margin-left: 140px;
-                line-height: 30px;
-                position: relative;
-                a {
-                    color: @a-color;
-                }
-                .userdata-lvl {
-                    span {
-                        color: #fff;
-                        background: @a-color;
-                        border-radius: 2px;
-                        padding: 0 4px;
-                    }
-                }
-                .userdata-relate {
-                    button {
-                        border: none;
-                        border-radius: 4px;
-                        margin-top: 20px;
-                        margin-right: 20px;
-                        img {
-                            height: 20px;
-                            vertical-align: middle;
-                        }
-                        span {
-                            color: #fff;
-                        }
-                    }
-                    .relateweixin {
-                        background: #12d41e;
-                    }
-                    .relateqq {
-                        background: #3073c1;
-                    }
-                    .relateweibo {
-                        background: #cf331d;
-                    }
-                }
-                .userdata-follow {
-                    position: absolute;
-                    top: 0;
-                    right: 10px;
-                }
-            }
-        }
-        .index-record {
-            background: #fff;
-            padding: 20px;
-            margin-top: 1px;
-            .record-list {
-                li {
-                    float: left;
-                    width: 200px;
-                    margin-right: 100px;
-                    line-height: 30px;
-                    a {
-                        color: @a-color;
-                    }
-                }
-            }
+            color: #333;
         }
-        .index-activity {
-            background: #fff;
-            padding: 20px;
-            margin-top: 20px;
-            min-height: 300px;
-            .activity-list {
-                li {
-                    border-bottom: 1px dashed #eee;
-                    padding: 10px 0;
-                    .list-type {
-                        color: #666
-                    }
-                    .list-title {
-                        color: #333;
-                        margin-left: 10px;
-                    }
-                    a {
-                        padding: 0 4px;
-                        background: @a-color;
-                        color: #fff;
-                        border-radius: 2px;
-                        float: right;
-                        margin: 0 10px;
-                    }
-                    .list-time {
-                        color: #666;
-                        float: right;
-                    }
-                }
-            }
+        >button {
+            float: right;
+            margin-right: 20px;
         }
-    }
+    }
+    .member-table {
+        margin-top: 20px;
+    }
+}

+ 1 - 0
js/component/manageCenter/servicesManage/contract/contractDetail.jsx

@@ -480,6 +480,7 @@ const ContractDetailForm = Form.create()(React.createClass({
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
             this.loadData(nextProps.data.id);
+            this.props.form.resetFields();
             this.loadColumnsData(nextProps.data.id);
             this.getContactsList(nextProps.data.uid);
         };

+ 1 - 0
js/component/manageCenter/servicesManage/copyright/comPatentChange.jsx

@@ -155,6 +155,7 @@ const CopyrightDescForm = Form.create()(React.createClass({
             this.loadData(nextProps.data.uid, nextProps.data.id);
             this.state.fileList_copyright_apply = [];
             this.state.fileList_copyright_auth = [];
+            this.props.form.resetFields();
         };
     },
     handleSubmit(e) {

+ 1 - 1
js/component/manageCenter/servicesManage/highTech/fosterDesc/companyDetail.jsx

@@ -142,7 +142,7 @@ const CompanyDetail = Form.create()(React.createClass({
                     uid: item.uid,
                     type: item.type,
                     name: item.name,
-                    orgCode: item.idNumber,
+                    orgCode: item.orgCode,
                     investment: item.investment
                 });
             });

+ 2 - 1
js/component/manageCenter/servicesManage/patent/comprehensive.jsx

@@ -308,6 +308,7 @@ const Patent = React.createClass({
                 <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
             )
         });
+        
         if (window.location.search) {
             let theObj = getSearchUrl(window.location.search);
             if (theObj.rid) {
@@ -317,7 +318,7 @@ const Patent = React.createClass({
                 };
             } else {
                 if (theObj.uid) {
-                    this.state.unitName = theObj.uid;
+                    this.state.unitId = theObj.uid;
                 } else if (theObj.contractId) {
                     this.state.contractId = theObj.contractId;
                 };

+ 1 - 0
js/component/manageCenter/servicesManage/technology/applyChange.jsx

@@ -263,6 +263,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             this.getStateData(nextProps.data.id);
             this.getContactsList(nextProps.data.uid);
             this.getDepartmentList(nextProps.data.uid);
+            this.props.form.resetFields();
         };
     },
     subsidyCheck(e) {

+ 15 - 12
js/component/portal/search/achievementDesc.jsx

@@ -106,6 +106,7 @@ const AchievementDetail = React.createClass({
                 this.setState({
                     dataSource: theArr
                 });
+                console.log(this.state.logsOrderStatus)
             }.bind(this),
         }).always(function () {
             this.setState({
@@ -440,18 +441,20 @@ const AchievementDetail = React.createClass({
                                 dataSource={this.state.dataSource}
                                 columns={this.state.columns} />
                         </div> : <div></div>}
-                        <div>
-                            {theData.achievementOrderId ? <Button type="ghost" loading={this.state.buttonLoading}
-                                disabled={Boolean(theData.orderStatus != "0")}
-                                onClick={this.cancelSubmit}>我要撤销</Button>
-                                : <Button type="primary" onClick={() => {
-                                    if (window.userData.number) {
-                                        this.setState({ orderVisible: true });
-                                    } else {
-                                        message.warning("请先登录!");
-                                    }
-                                }}>我要购买</Button>}
-                        </div>
+                        {this.state.logsOrderStatus == 6 ? <div>
+                            <Button type="ghost" onClick={() => { this.handleCancel() }}>取消</Button>
+                        </div> : <div>
+                                {theData.achievementOrderId ? <Button type="ghost" loading={this.state.buttonLoading}
+                                    disabled={Boolean(theData.orderStatus != "0")}
+                                    onClick={this.cancelSubmit}>我要撤销</Button>
+                                    : <Button type="primary" onClick={() => {
+                                        if (window.userData.number) {
+                                            this.setState({ orderVisible: true });
+                                        } else {
+                                            message.warning("请先登录!");
+                                        }
+                                    }}>我要购买</Button>}
+                            </div>}
                         <Modal maskClosable={false}
                             title="我要购买"
                             width={600}

+ 59 - 56
js/component/portal/search/demandDesc.jsx

@@ -84,7 +84,7 @@ const DemandDetail = React.createClass({
                 demandOrderId: id
             },
             success: function (data) {
-                let thisData = data.data, theArr = [];
+                let thisData = data.data, theArr = [], _me = this;
                 if (!thisData) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
@@ -97,7 +97,8 @@ const DemandDetail = React.createClass({
                             recordTimeFormattedDate: item.recordTimeFormattedDate,
                             status: item.status,
                             comment: item.comment
-                        })
+                        });
+                        _me.state.logsOrderStatus = item.status;
                     });
                 };
                 this.setState({
@@ -345,61 +346,63 @@ const DemandDetail = React.createClass({
                                 dataSource={this.state.dataSource}
                                 columns={this.state.columns} />
                         </div> : <div></div>}
-                        <div>
-                            {theData.demandOrderId ? <Button type="ghost" loading={this.state.buttonLoading}
-                                disabled={Boolean(theData.orderStatus != "0")}
-                                onClick={this.cancelSubmit}>我要撤销</Button>
-                                : <Button type="primary" onClick={() => {
-                                    if (window.userData.number) {
-                                        this.setState({ orderVisible: true });
-                                    } else {
-                                        message.warning("请先登录!");
-                                    }
-                                }}>我要接单</Button>}
-                            <Modal maskClosable={false}
-                                title="我要接单"
-                                width={600}
-                                style={{ 'top': '160px' }}
-                                visible={this.state.orderVisible}
-                                footer={null}
-                                onCancel={() => { this.setState({ orderVisible: false }); }}>
-                                <Row>
-                                    <Col span={2}>附件 : </Col>
-                                    <Col span={8}>
-                                        <Upload action={globalConfig.context + "/api/user/portal/order/demandUpload"}
-                                            data={{ 'sign': 'demand_order_file' }}
-                                            beforeUpload={beforeUploadFile}
-                                            fileList={this.state.fileList}
-                                            onChange={(info) => {
-                                                if (info.file.status !== 'uploading') {
-                                                    console.log(info.file, info.fileList);
-                                                }
-                                                if (info.file.status === 'done') {
-                                                    if (!info.file.response.error.length) {
-                                                        message.success(`${info.file.name} 文件上传成功!`);
-                                                    } else {
-                                                        message.warning(info.file.response.error[0].message);
-                                                        return;
-                                                    };
-                                                    this.state.enclosureUrl = info.file.response.data;
-                                                } else if (info.file.status === 'error') {
-                                                    message.error(`${info.file.name} 文件上传失败。`);
+                        {this.state.logsOrderStatus == 6 ? <div>
+                            <Button type="ghost" onClick={() => { this.handleCancel() }}>取消</Button>
+                        </div> : <div>
+                                {theData.demandOrderId ? <Button type="ghost" loading={this.state.buttonLoading}
+                                    disabled={Boolean(theData.orderStatus != "0")}
+                                    onClick={this.cancelSubmit}>我要撤销</Button>
+                                    : <Button type="primary" onClick={() => {
+                                        if (window.userData.number) {
+                                            this.setState({ orderVisible: true });
+                                        } else {
+                                            message.warning("请先登录!");
+                                        }
+                                    }}>我要接单</Button>}
+                            </div>}
+                        <Modal maskClosable={false}
+                            title="我要接单"
+                            width={600}
+                            style={{ 'top': '160px' }}
+                            visible={this.state.orderVisible}
+                            footer={null}
+                            onCancel={() => { this.setState({ orderVisible: false }); }}>
+                            <Row>
+                                <Col span={2}>附件 : </Col>
+                                <Col span={8}>
+                                    <Upload action={globalConfig.context + "/api/user/portal/order/demandUpload"}
+                                        data={{ 'sign': 'demand_order_file' }}
+                                        beforeUpload={beforeUploadFile}
+                                        fileList={this.state.fileList}
+                                        onChange={(info) => {
+                                            if (info.file.status !== 'uploading') {
+                                                console.log(info.file, info.fileList);
+                                            }
+                                            if (info.file.status === 'done') {
+                                                if (!info.file.response.error.length) {
+                                                    message.success(`${info.file.name} 文件上传成功!`);
+                                                } else {
+                                                    message.warning(info.file.response.error[0].message);
+                                                    return;
                                                 };
-                                                this.setState({ fileList: info.fileList.slice(-1) });
-                                            }} >
-                                            <Button><Icon type="upload" /> 上传相关资质附件 </Button>
-                                        </Upload>
-                                    </Col>
-                                </Row>
-                                <Row style={{ marginTop: '20px' }} >
-                                    <Col span={2}>备注 : </Col>
-                                    <Col span={22}>
-                                        <Input type="textarea" rows={4} onChange={(e) => { this.state.comment = e.target.value }} />
-                                    </Col>
-                                </Row>
-                                <Button loading={this.state.buttonLoading} style={{ marginTop: '20px' }} type="primary" onClick={this.handleSubmit}>提交</Button>
-                            </Modal>
-                        </div>
+                                                this.state.enclosureUrl = info.file.response.data;
+                                            } else if (info.file.status === 'error') {
+                                                message.error(`${info.file.name} 文件上传失败。`);
+                                            };
+                                            this.setState({ fileList: info.fileList.slice(-1) });
+                                        }} >
+                                        <Button><Icon type="upload" /> 上传相关资质附件 </Button>
+                                    </Upload>
+                                </Col>
+                            </Row>
+                            <Row style={{ marginTop: '20px' }} >
+                                <Col span={2}>备注 : </Col>
+                                <Col span={22}>
+                                    <Input type="textarea" rows={4} onChange={(e) => { this.state.comment = e.target.value }} />
+                                </Col>
+                            </Row>
+                            <Button loading={this.state.buttonLoading} style={{ marginTop: '20px' }} type="primary" onClick={this.handleSubmit}>提交</Button>
+                        </Modal>
                     </Spin>
                 </Modal>
             );

+ 1 - 1
js/component/subscriberDetail/content.jsx

@@ -242,7 +242,7 @@ const Content = React.createClass({
     render() {
         const theData = this.state.data;
         return (
-            <Spin spinning={this.state.loading} style={{ marginBottom: '80px' }}>
+            <Spin spinning={this.state.loading} style={{ marginBottom: '80px' }} >
                 <div className="detail-content">
                     <Row>
                         <Col span={8}>

+ 3 - 0
js/component/subscriberDetail/detail.less

@@ -65,6 +65,9 @@
             line-height: 24px;
         }
     }
+    .ant-spin-nested-loading {
+        margin-bottom: 80px;
+    }
     .detail-content {
         width: 600px;
         margin: 20px auto;

+ 1 - 1
package.json

@@ -45,7 +45,7 @@
     "webpack-dev-server": "^2.4.1"
   },
   "dependencies": {
-    "antd": "^2.5.2",
+    "antd": "^2.7.4",
     "echarts": "^3.6.2",
     "echarts-for-react": "^1.4.4",
     "html2canvas": "^0.5.0-beta4",

+ 8 - 1
webpack.config.js

@@ -242,6 +242,13 @@ module.exports = (function () {
         resolve: {
             extensions: ['.js', '.jsx']
         },
-        plugins: plugins
+        plugins: plugins,
+        devServer: {
+            disableHostCheck: true,
+            allowedHosts: ['aft.hnzhiming.com', 'afts.hnzhiming.com'],
+            headers: {
+                "Access-Control-Allow-Origin": "*"
+            }
+        }
     };
 })();