Browse Source

财务及订单统计完成

liting2017 6 years ago
parent
commit
b43e92dbf9
25 changed files with 3095 additions and 244 deletions
  1. 16 0
      js/admin/statistics.js
  2. 29 3
      js/component/dataDic.js
  3. 110 0
      js/component/manageCenter/financialManage/bonus/bonusDetail.jsx
  4. 391 11
      js/component/manageCenter/financialManage/bonus/jsBonus.jsx
  5. 98 0
      js/component/manageCenter/financialManage/bonus/jsBonusDetail.jsx
  6. 416 10
      js/component/manageCenter/financialManage/bonus/yxBonus.jsx
  7. 8 0
      js/component/manageCenter/financialManage/content.jsx
  8. 53 63
      js/component/manageCenter/financialManage/distribute/examine.jsx
  9. 22 22
      js/component/manageCenter/financialManage/distribute/paiDan.jsx
  10. 28 44
      js/component/manageCenter/financialManage/distribute/receivable.jsx
  11. 25 29
      js/component/manageCenter/financialManage/distribute/shouKuang.jsx
  12. 3 8
      js/component/manageCenter/financialManage/distribute/tuiDan.jsx
  13. 288 11
      js/component/manageCenter/financialManage/flowWater/departWater.jsx
  14. 213 10
      js/component/manageCenter/financialManage/flowWater/myWater.jsx
  15. 131 0
      js/component/manageCenter/financialManage/flowWater/waterDetail.jsx
  16. 8 28
      js/component/manageCenter/publicComponent/assign.jsx
  17. 116 0
      js/component/manageCenter/publicComponent/exportExec.jsx
  18. 64 0
      js/component/manageCenter/statistics/content.jsx
  19. 119 0
      js/component/manageCenter/statistics/content.less
  20. 274 0
      js/component/manageCenter/statistics/order/index.jsx
  21. 29 3
      js/component/tools.js
  22. 640 0
      package-lock.json
  23. 2 1
      package.json
  24. 7 1
      webpack.config.js
  25. 5 0
      webpack/entry.config.js

+ 16 - 0
js/admin/statistics.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/statistics/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'statistics'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 29 - 3
js/component/dataDic.js

@@ -1849,7 +1849,8 @@ module.exports = {
 			{value:'科技服务项目',key:'services'},
 			{value:'科技成果管理',key:'achievement'},
 			{value:'科技需求管理',key:'demand'},
-			{value:'财务管理',key:'idea'},
+            {value:'财务管理',key:'idea'},
+            {value:'数据统计',key:'statistics'},
 			{value:'用户订单管理',key:'userOrder'},
 			{value:'系统设置',key:'system'},
 			{value:'订单管理',key:'order'},
@@ -2523,6 +2524,31 @@ module.exports = {
             value: "1",
             key: "科技项目"
         }
-   ]
-
+   ],
+   //营销员发款类型
+   paymentType:[
+    {
+        value: "0",
+        key: "首款"
+    }, {
+        value: "1",
+        key: "尾款"
+    }, {
+        value: "2",
+        key: "退款"
+    }
+    ],
+    //技术员发款类型
+    jsyPaymentType:[
+        {
+            value: "0",
+            key: "申报奖"
+        }, {
+            value: "1",
+            key: "认证奖"
+        }, {
+            value: "2",
+            key: "结项奖"
+        }
+    ]
 };

+ 110 - 0
js/component/manageCenter/financialManage/bonus/bonusDetail.jsx

@@ -0,0 +1,110 @@
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { Form, Spin, message, Modal } from 'antd';
+import {getProjectStatus,getNewOrderStatus,getPaymentType} from '@/tools.js';
+
+const BonusDetail=React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            visible:false,
+            showDesc:false,
+        };
+    },
+    onCancel(){
+    	this.setState({
+    		visible:false
+        })
+        this.props.closeDesc(false,false);
+    },
+    onShow() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	},
+    componentWillMount() {
+    },
+    componentWillReceiveProps(nextProps) {
+        if(nextProps.data.orderNo){
+            this.setState({data:nextProps.data});
+        }
+        this.state.visible=nextProps.showDesc;
+    },
+    render() {
+        const theData = this.state.data || {};
+        const FormItem = Form.Item;
+        const formItemLayout = {
+            labelCol: { span: 10 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+            <div className="user-content" >
+	            <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.onShow} onCancel={this.onCancel}
+                        width='800px'
+                        title='订单详情'                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} >
+			                <Spin spinning={this.state.loading}>
+                                <div className="clearfix">
+                                    <FormItem className="half-item" {...formItemLayout} label="订单编号">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="签单时间">
+							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单负责人">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="客户名称">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="签单金额">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="首付款">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="已收">
+                                        <span>{theData.liquidationStatus}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="已退">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单状态">
+                                        <span>{getNewOrderStatus(theData.orderStatus)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="项目状态">
+                                        <span>{getProjectStatus(theData.projectStatus)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="发放类型">
+                                        <span>{getPaymentType(theData.orderNo)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="校对后单量">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="当月认证项目数量">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="当月科技项目数量">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="年度认证项目数量">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="年度科技项目数量">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                </div>
+			                </Spin>
+			            </Form>
+			    </Modal>
+            </div>
+        );
+    }
+});
+
+export default Form.create()(BonusDetail);

+ 391 - 11
js/component/manageCenter/financialManage/bonus/jsBonus.jsx

@@ -1,15 +1,395 @@
-import {Component} from 'react';
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../distribute/public.less';
+import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker,Modal ,Form } from 'antd';
+import {getProjectStatus,getPaymentType} from '@/tools';
+import JsBonuseDetail from './jsBonusDetail';
+const FormItem= Form.Item;
 
-class JsBounus extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {  }
-    }
+const JsBonus = React.createClass({
+    departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/listOrganizationManagement",
+			data: {
+                pageNo:1,
+                pageSize:999,
+                type:1
+            },
+			success: function(data) {
+                let thedata = data.data.list;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize:this.state.pagination.pageSize,
+                ownerName: this.state.nameSearch,//客户名称
+                departmentId:this.state.departmenttList,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                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];
+                        theArr.push({
+                            key: i,
+		                    orderNo: thisdata.orderNo,
+		                    orderType:thisdata.orderType,
+		                    orderStatus:thisdata.orderStatus,
+		                    processStatus:thisdata.processStatus,
+		                    projectStage:thisdata.projectStage,
+		                    approval:thisdata.approval,
+		                    creater:thisdata.creater,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            releaseDate: [],
+            RowData:{},
+            execState:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            proofData:{},
+            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: 'createTime',
+                    key: 'createTime',
+                }, 
+                {
+                    title: '任务负责人',
+                    dataIndex: 'orderNo',
+                    key: 'orderNo',
+                },
+                {
+                    title: '任务状态',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render:text=>{
+                        return text&&text>8?text.substr(0,8)+'...':text
+                    }
+                },
+                {
+                    title: '任务数量',
+                    dataIndex: 'orderStatus',
+                    key: 'orderStatus'
+                },
+                {
+                    title: '流水科目',
+                    dataIndex: 'creater',
+                    key: 'creater'
+                },
+                {
+                    title: '项目状态',
+                    dataIndex: 'creater1112',
+                    key: 'creater1112',
+                    render:(text)=>{
+                        return getProjectStatus(text)
+                    }
+                },
+                 {
+                    title: '受理日期',
+                    dataIndex: 'creater11',
+                    key: 'creater11'
+                },
+                {
+                    title: '评审日期',
+                    dataIndex: 'creater11t',
+                    key: 'creater11t',
+                    render:text=>{
+                        return getPaymentType(text)
+                    }
+                },
+                {
+                    title: '下证日期',
+                    dataIndex: 'creater225',
+                    key: 'creater225'
+                },{
+                    title: '订单结算状态',
+                    dataIndex: 'creater335',
+                    key: 'creater335'
+                },
+                {
+                    title: '发放类型',
+                    dataIndex: 'creater22',
+                    key: 'creater22'
+                },{
+                    title: '发放状态',
+                    dataIndex: 'creater33',
+                    key: 'creater33'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'state11',
+                    key: 'state11',
+                    render:(text,recard)=>{
+                        return <div>
+                            <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard)}}>发放</Button>
+                        </div>
+                    }
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+    proofread(recard,index){
+        this.setState({
+            proofreadState:index,
+            boHuiVisible:true,
+            proofData: recard,
+        })
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+        });
+    },
+    closeDesc(e, s) {
+        this.state.RowData={};
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+        this.departmentList();
+    },
+    search() {
+        this.loadData();
+    },
+    boHuiOk(){
+        this.setState({
+            boHuiVisible:false
+        })
+        this.loadData(this.state.page);
+    },
+    boHuiCancel(e){
+        this.setState({
+            boHuiVisible:false
+        })
+    },
+    //导出
+    exportExec(){
+        window.open(globalConfig.context + '/api/user/achievement/downloadTemplate?sign=achievement_template')
+    },
+    //保存发放状态
+    boHuiSubmit(e){
+        e.preventDefault();
+        this.setState({
+            loading:true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/achievement/delete",
+            data: {
+                id: this.state.proofData.id,
+                result:this.state.result            //校对结果
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功!');
+                this.boHuiOk();
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    reset() {
+        this.state.orderRefundSearch='';
+        this.state.releaseDate = [];
+        this.state.departmenttList=undefined;
+        this.state.orderNoSearch='';
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     render() { 
-        return (<div className="admin-content">
-           DepartWater 
-        </div> );
+        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;
+        let departmentArr = this.state.departmentArr || [];
+        return ( <div className="user-content">
+            <div className="content-title">
+                <span>技术员奖金</span>
+                </div>
+                <div className="user-search">
+                    <Select placeholder="订单部门"
+                        style={{ width: 150 ,marginRight:10}}
+                        value={this.state.departmenttList}
+                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
+                        {
+                            departmentArr.map(function (item) {
+                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Input placeholder="订单负责人"
+                        value={this.state.orderRefundSearch}
+                        onChange={(e) => { this.setState({ orderRefundSearch: e.target.value }); }} /> 
+                    <Input placeholder="项目负责人"
+                        value={this.state.projectMenSearch}
+                        onChange={(e) => { this.setState({ projectMenSearch: e.target.value }); }} /> 
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <div style={{float:'right'}}>
+                       <Button onClick={this.exportExec}>导出</Button>
+                    </div>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <span>签单时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table" id="table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick}
+                             />
+                    </Spin>
+                </div>
+                <JsBonuseDetail 
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc.bind(this)}
+               />
+                <Modal visible={this.state.boHuiVisible} 
+                        width="400px" 
+                        title={this.state.proofreadState?"校对":'发放'}
+                        footer=''
+                        onOk={this.boHuiOk} 
+                        onCancel={this.boHuiCancel}
+                >
+                    <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
+			                <Spin spinning={this.state.loading}>
+                                <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='应收人'>
+                                    <span>{this.state.proofData.name}</span>
+                                </FormItem>
+                                <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放人'>
+                                    <span>{this.state.proofData.name}</span>
+                                </FormItem>
+                                <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放日期'>
+                                    <span>{this.state.proofData.time}</span>
+                                </FormItem>
+                                <FormItem wrapperCol={{ span: 12, offset:8 }}>  
+                                    <Button type="primary" htmlType="submit"  style={{marginRight:20}}>保存</Button>
+                                    <Button type="default" onClick={()=>{this.boHuiCancel()}}>取消</Button>
+                                </FormItem>
+                            </Spin>
+                        </Form>
+                </Modal>
+        </div> )
     }
-}
+})
  
-export default JsBounus;
+export default JsBonus;

+ 98 - 0
js/component/manageCenter/financialManage/bonus/jsBonusDetail.jsx

@@ -0,0 +1,98 @@
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { Form, Spin, message, Modal } from 'antd';
+import {getTaskStatus,getProjectStatus,getLiquidationStatus,getJsyPaymentType} from '@/tools.js';
+
+const BonusDetail=React.createClass({
+    getInitialState() {
+        return {
+            loading: false,
+            visible:false,
+            showDesc:false,
+        };
+    },
+    onCancel(){
+    	this.setState({
+    		visible:false
+        })
+        this.props.closeDesc(false,false);
+    },
+    onShow() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	},
+    componentWillMount() {
+    },
+    componentWillReceiveProps(nextProps) {
+        if(nextProps.data.orderNo){
+            this.setState({data:nextProps.data});
+        }
+        this.state.visible=nextProps.showDesc;
+    },
+    render() {
+        const theData = this.state.data || {};
+        const FormItem = Form.Item;
+        const formItemLayout = {
+            labelCol: { span: 10 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+            <div className="user-content" >
+	            <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.onShow} onCancel={this.onCancel}
+                        width='800px'
+                        title='任务详情'                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} >
+			                <Spin spinning={this.state.loading}>
+                                <div className="clearfix">
+                                    <FormItem className="half-item" {...formItemLayout} label="任务编号">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单编号">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单负责人">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="任务状态">
+                                        <span>{getTaskStatus(theData.name)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="任务数量">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="项目状态">
+                                        <span>{getProjectStatus(theData.name)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="受理日期">
+							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="评审日期">
+							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="下证日期">
+							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单结算状态">
+                                        <span>{getLiquidationStatus(theData.liquidationStatus)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="发放类型">
+                                        <span>{getJsyPaymentType(theData.orderNo)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="发放状态">
+                                        <span>{theData.orderStatus}</span>
+                                    </FormItem>
+                                </div>
+			                </Spin>
+			            </Form>
+			    </Modal>
+            </div>
+        );
+    }
+});
+
+export default Form.create()(BonusDetail);

+ 416 - 10
js/component/manageCenter/financialManage/bonus/yxBonus.jsx

@@ -1,14 +1,420 @@
-import React,{Component} from 'react';
-class YxBonus extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {  }
-    }
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../distribute/public.less';
+import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker,Modal ,Form } from 'antd';
+import {getNewOrderStatus,getProjectStatus,getPaymentType} from '@/tools';
+import BonuseDetail from './bonusDetail';
+const FormItem= Form.Item;
+
+const YxBonus = React.createClass({
+    departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/listOrganizationManagement",
+			data: {
+                pageNo:1,
+                pageSize:999,
+                type:1
+            },
+			success: function(data) {
+                let thedata = data.data.list;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize:this.state.pagination.pageSize,
+                ownerName: this.state.nameSearch,//客户名称
+                departmentId:this.state.departmenttList,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                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];
+                        theArr.push({
+                            key: i,
+		                    orderNo: thisdata.orderNo,
+		                    orderType:thisdata.orderType,
+		                    orderStatus:thisdata.orderStatus,
+		                    processStatus:thisdata.processStatus,
+		                    projectStage:thisdata.projectStage,
+		                    approval:thisdata.approval,
+		                    creater:thisdata.creater,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            releaseDate: [],
+            RowData:{},
+            execState:false,
+            selectedRowKeys: [],
+            selectedRows: [],
+            proofData:{},
+            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: 'createTime',
+                    key: 'createTime',
+                }, 
+                {
+                    title: '签单日期',
+                    dataIndex: 'orderNo',
+                    key: 'orderNo',
+                },
+                {
+                    title: '客户名称',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render:text=>{
+                        return text&&text>8?text.substr(0,8)+'...':text
+                    }
+                },
+                {
+                    title: '订单金额',
+                    dataIndex: 'orderStatus',
+                    key: 'orderStatus'
+                },
+                {
+                    title: '流水科目',
+                    dataIndex: 'creater',
+                    key: 'creater'
+                },
+                {
+                    title: '订单状态',
+                    dataIndex: 'creater111',
+                    key: 'creater111',
+                    render:(text)=>{
+                        return getNewOrderStatus(text)
+                    }
+                },
+                {
+                    title: '项目状态',
+                    dataIndex: 'creater1112',
+                    key: 'creater1112',
+                    render:(text)=>{
+                        return getProjectStatus(text)
+                    }
+                },
+                 {
+                    title: '发放状态',
+                    dataIndex: 'creater11',
+                    key: 'creater11'
+                },
+                {
+                    title: '发放类型',
+                    dataIndex: 'creater11t',
+                    key: 'creater11t',
+                    render:text=>{
+                        return getPaymentType(text)
+                    }
+                },
+                {
+                    title: '已收',
+                    dataIndex: 'creater22',
+                    key: 'creater22'
+                },{
+                    title: '已退',
+                    dataIndex: 'creater33',
+                    key: 'creater33'
+                },
+                {
+                    title: '发放状态',
+                    dataIndex: 'creater333',
+                    key: 'creater333'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'state11',
+                    key: 'state11',
+                    render:(text,recard)=>{
+                        return <div>
+                            <Button type="primary" style={{margin:'0 10px'}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard,0)}}>发放</Button>
+                            <Button type="primary" onClick={(e)=>{e.stopPropagation(),this.proofread(recard,1)}}>校对</Button>
+                        </div>
+                    }
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+    proofread(recard,index){
+        this.setState({
+            proofreadState:index,
+            boHuiVisible:true,
+            proofData: recard,
+            result:''
+        })
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+        });
+    },
+    closeDesc(e, s) {
+        this.state.RowData={};
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    componentWillMount() {
+        this.loadData();
+        this.departmentList();
+    },
+    search() {
+        this.loadData();
+    },
+    boHuiOk(){
+        this.setState({
+            boHuiVisible:false
+        })
+        this.loadData(this.state.page);
+    },
+    boHuiCancel(e){
+        this.setState({
+            boHuiVisible:false
+        })
+    },
+    //导出
+    exportExec(){
+        window.open(globalConfig.context + '/api/user/achievement/downloadTemplate?sign=achievement_template')
+    },
+    //保存发放状态
+    boHuiSubmit(e){
+        e.preventDefault();
+        if(this.state.proofreadState&&!this.state.result){
+            message.warning('请填写校对结果');
+            return false;
+        }
+        this.setState({
+            loading:true
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/user/achievement/delete",
+            data: {
+                id: this.state.proofData.id,
+                index:this.state.proofreadState,    //0-发放   1-校对
+                result:this.state.result            //校对结果
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('操作成功!');
+                this.boHuiOk()
+            } else {
+                message.warning(data.error[0].message);
+            };
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    reset() {
+        this.state.orderRefundSearch='';
+        this.state.releaseDate = [];
+        this.state.departmenttList=undefined;
+        this.state.orderNoSearch='';
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     render() { 
-        return (<div className="admin-content">
-            YxBonus
-        </div> );
+        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;
+        let departmentArr = this.state.departmentArr || [];
+        return ( <div className="user-content">
+            <div className="content-title">
+                <span>营销员奖金</span>
+                </div>
+                <div className="user-search">
+                    <Select placeholder="订单部门"
+                        style={{ width: 150 ,marginRight:10}}
+                        value={this.state.departmenttList}
+                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
+                        {
+                            departmentArr.map(function (item) {
+                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Input placeholder="订单负责人"
+                        value={this.state.orderRefundSearch}
+                        onChange={(e) => { this.setState({ orderRefundSearch: e.target.value }); }} /> 
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <div style={{float:'right'}}>
+                       <Button onClick={this.exportExec}>导出</Button>
+                    </div>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <span>签单时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table" id="table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick}
+                             />
+                    </Spin>
+                </div>
+                <BonuseDetail 
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc.bind(this)}
+               />
+                <Modal visible={this.state.boHuiVisible} 
+                        width="400px" 
+                        title={this.state.proofreadState?"校对":'发放'}
+                        footer=''
+                        onOk={this.boHuiOk} 
+                        onCancel={this.boHuiCancel}
+                >
+                    <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
+			                <Spin spinning={this.state.loading}>
+                                {this.state.proofreadState?<div>
+                                    <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label={<span><strong style={{color:'#f00'}}>*</strong>单量校对结果</span>}>
+                                        <Input
+                                            placeholder="请输入单量校对结果"
+                                            value={this.state.result}
+                                            onChange={(e) => {
+                                                this.setState({ result: e.target.value });
+                                            }}
+                                        />
+                                    </FormItem>   
+                                    <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='校对人'>
+                                        <span>{this.state.proofData.name}</span>
+                                    </FormItem>
+                                </div>:
+                                <div>
+                                    <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='应收人'>
+                                        <span>{this.state.proofData.name}</span>
+                                    </FormItem>
+                                    <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放人'>
+                                        <span>{this.state.proofData.name}</span>
+                                    </FormItem>
+                                    <FormItem labelCol={{ span: 8 }} wrapperCol={{ span: 10 }} label='发放日期'>
+                                        <span>{this.state.proofData.time}</span>
+                                    </FormItem>
+                                </div>
+                            }
+                            <FormItem wrapperCol={{ span: 12, offset:8 }}>  
+                                <Button type="primary" htmlType="submit"  style={{marginRight:20}}>保存</Button>
+                                <Button type="default" onClick={()=>{this.boHuiCancel()}}>取消</Button>
+                            </FormItem>
+                            </Spin>
+                        </Form>
+                </Modal>
+        </div> )
     }
-}
+})
  
 export default YxBonus;

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

@@ -87,6 +87,14 @@ class Content extends Component {
                     });
                 });
                 break;          
+            case 'order': //技术员奖金
+                require.ensure([], () => {
+                    let Module = require('../statistics/order/index').default;
+                    this.setState({
+                        component: <Module />,
+                    });
+                });
+                break;          
             default:
             require.ensure([], () => {
                 let Module = require('../module').default;

+ 53 - 63
js/component/manageCenter/financialManage/distribute/examine.jsx

@@ -1,10 +1,8 @@
 import React from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch,InputNumber, message, DatePicker, Modal, Upload ,Popconfirm} from 'antd';
-import {transactionProject,transactionChannel} from '@/dataDic.js';
-import {getOrderState,getOrderChannel,getPaymentState,getOrderType,getNewOrderStatus,getLiquidationStatus} from '@/tools.js';
-import Picture from '@/manageCenter/publicComponent/picture';
+import { Form,Button, Input, Spin, message, Modal, Upload } from 'antd';
+import {getNewOrderStatus,getLiquidationStatus,splitUrl} from '@/tools.js';
 
 const Examine=React.createClass({
     loadData(record) {
@@ -34,9 +32,8 @@ const Examine=React.createClass({
                              id:thisdata.id,
                              data:thisdata,
                              orderNo:thisdata.orderNo,
-                             commodityName:thisdata.commodityName,
-                             commodityType:thisdata.commodityType,
-                             commodityMode:thisdata.commodityMode,
+                            orgCodeUrl: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                            orgCodeUrlNo: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
                         });
                     };
                    }
@@ -49,27 +46,16 @@ const Examine=React.createClass({
     },
     getInitialState() {
         return {
-        	datauser:{},
             loading: false,
             visible:false,
             showDesc:false,
-            pictureUrls:[],
-            pictureUrl:[]
         };
     },
     //保存
-    handleSubmit(e){
+    handleSubmit(e,index){
         e.preventDefault();
-        if(!this.state.settlementAmount){
-                message.warning('请填写金额');
-                return false;
-        }
-        if(!this.state.transactionProject){
-            message.warning('请选择流水科目');
-            return false;
-        }
-        if(!this.state.transactionChannel){
-            message.warning('请选择交易渠道');
+        if(index&&!this.state.remark){
+            message.warning('请填写拒绝退单的原因');
             return false;
         }
         this.setState({
@@ -82,10 +68,9 @@ const Examine=React.createClass({
             url:  globalConfig.context + '/api/user/demand/apply',
             data: {
                 id: this.props.data.id,
-                settlementAmount: this.state.settlementAmount,
-                transactionProject: this.state.transactionProject,
-                transactionChannel: this.state.transactionChannel,
-                remarks:this.state.remarks
+                states:index,
+                orderNo:this.state.orderNo,
+                remarks:index?this.state.remarks:''
             }
         }).done(function (data) {
             this.setState({
@@ -112,21 +97,16 @@ const Examine=React.createClass({
 		this.props.closeDesc(false, true);
 	},
     componentWillMount() {
-        this.loadData();
         this.setState({
-            pictureUrl:[],
-            pictureUrls:[],
-            remark:'',
             remarks:''
         })
     },
     componentWillReceiveProps(nextProps) {
-        this.loadData(nextProps.data);
+        if(nextProps.data.orderNo){
+            this.loadData(nextProps.data);
+        }
         this.state.visible=nextProps.showDesc;
         this.setState({
-            pictureUrl:[],
-            pictureUrls:[],
-            remark:'',
             remarks:''
         })
     },
@@ -143,10 +123,10 @@ const Examine=React.createClass({
 	            <Modal maskClosable={false} visible={this.state.visible}
                         onOk={this.onShow} onCancel={this.onCancel}
                         width='800px'
-                        title='审核'                     
+                        title='退单审核'                     
                         footer=''
                         className="admin-desc-content">
-			            <Form layout="horizontal" onSubmit={this.handleSubmit} >
+			            <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} >
 			                <Spin spinning={this.state.loading}>
                                 <div className="clearfix">
                                     <FormItem className="half-item" {...formItemLayout} label="退单编号">
@@ -170,7 +150,6 @@ const Examine=React.createClass({
                                     <FormItem className="half-item" {...formItemLayout} label="收款方">
                                         <span>{theData.name}</span>
                                     </FormItem>
-                                    
                                     <FormItem className="half-item" {...formItemLayout} label="订单编号">
                                         <span>{theData.orderNo}</span>
                                     </FormItem>
@@ -178,41 +157,51 @@ const Examine=React.createClass({
                                         <span>{theData.orderNo}</span>
                                     </FormItem>
                                     <div className="clearfix">
-                                        <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 18 }} label="终止合同">
-                                            <Picture
-                                                fileList={(e)=>{this.setState({pictureUrl:e})}}
-                                                pictureUrl={this.state.pictureUrl}
-                                                visible={this.props.visible}
-                                                data={{'sign':'achievement_cover_picture',url:'/api/admin/achievement/uploadPicture',number:3}}
-                                            />
+                                        <FormItem labelCol={{ span:5 }} wrapperCol={{ span: 17 }} label="终止合同">
+                                            <Upload className="demandDetailShow-upload"
+                                                listType="picture-card"
+                                                fileList={this.state.orgCodeUrl}                               
+                                                onPreview={(file) => {
+                                                    this.setState({
+                                                        previewImage: file.url || file.thumbUrl,
+                                                        previewVisible: true,
+                                                    });
+                                                }} >
+                                            </Upload>
+                                            <Modal maskClosable={false} footer={null}
+                                                visible={this.state.previewVisible}
+                                                onCancel={() => { this.setState({ previewVisible: false }) }}>
+                                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+                                            </Modal>
                                         </FormItem>
                                     </div>
                                     <div className="clearfix">
-                                        <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 18 }} label="终止合同">
-                                            <Picture
-                                                fileList={(e)=>{this.setState({pictureUrls:e})}}
-                                                pictureUrl={this.state.pictureUrls}
-                                                visible={this.props.visible}
-                                                data={{'sign':'achievement_cover_picture',url:'/api/admin/achievement/uploadPicture',number:3}}
-                                            />
-                                        </FormItem>   
+                                        <FormItem labelCol={{ span:5 }} wrapperCol={{ span: 17 }} label="退单申请表">
+                                            <Upload className="demandDetailShow-upload"
+                                                listType="picture-card"
+                                                fileList={this.state.orgCodeUrlNo}                               
+                                                onPreview={(file) => {
+                                                    this.setState({
+                                                        previewImage: file.url || file.thumbUrl,
+                                                        previewVisible: true,
+                                                    });
+                                                }} >
+                                            </Upload>
+                                            <Modal maskClosable={false} footer={null}
+                                                visible={this.state.previewVisible}
+                                                onCancel={() => { this.setState({ previewVisible: false }) }}>
+                                                <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+                                            </Modal>
+                                        </FormItem>  
                                     </div>
                                     <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} label="退单原因">
-                                        <Input
-                                            type="textarea"
-                                            rows={4}
-                                            placeholder="请输入退单原因"
-                                            value={this.state.remark}
-                                            onChange={(e) => {
-                                                this.setState({ remark: e.target.value });
-                                            }}
-                                        />
+                                        <span>{theData.name}</span>
                                     </FormItem>
-                                    <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} label="审批意见">
+                                    <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} label="拒绝原因">
                                         <Input
                                             type="textarea"
                                             rows={4}
-                                            placeholder="请输入审批意见"
+                                            placeholder="若拒绝,请输入拒绝退单原因"
                                             value={this.state.remarks}
                                             onChange={(e) => {
                                                 this.setState({ remarks: e.target.value });
@@ -220,7 +209,8 @@ const Examine=React.createClass({
                                         />
                                     </FormItem>
                                     <FormItem wrapperCol={{ span: 12, offset:5 }}>  
-                                        <Button type="primary" htmlType="submit"  style={{marginRight:20}}>确认</Button>
+                                        <Button type="primary" htmlType="submit"  style={{marginRight:20}}>同意退单</Button>
+                                        <Button type="primary" onClick={(e)=>{this.handleSubmit(e,1)}}  style={{marginRight:20}}>拒绝退单</Button>
                                         <Button type="default" onClick={()=>{this.onCancel()}}>取消</Button>
                                     </FormItem>  
                                 </div>

+ 22 - 22
js/component/manageCenter/financialManage/distribute/paiDan.jsx

@@ -17,17 +17,17 @@ const PaiDan = React.createClass({
             loading: true
         });
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            url: globalConfig.context + "/api/admin/financial/allUnassignedOrder",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                ownerName: this.state.nameSearch,//客户名称
+                buyerName: this.state.nameSearch,//客户名称
                 orderNo:this.state.orderNoSearch,
-                startDate: this.state.releaseDate[0],
-                endDate: this.state.releaseDate[1],
+                startTime: this.state.releaseDate[0],
+                endTime: this.state.releaseDate[1],
             },
             success: function (data) {
                 let theArr = [];
@@ -40,13 +40,13 @@ const PaiDan = React.createClass({
                         let thisdata = data.data.list[i];
                         theArr.push({
                             key: i,
-		                    orderNo: thisdata.orderNo,
+                            orderNo: thisdata.orderNo,
+                            approval:thisdata.approval,
 		                    orderType:thisdata.orderType,
-		                    orderStatus:thisdata.orderStatus,
 		                    processStatus:thisdata.processStatus,
-		                    projectStage:thisdata.projectStage,
-		                    approval:thisdata.approval,
-		                    creater:thisdata.creater,
+                            signTotalAmount:thisdata.signTotalAmount,
+                            buyerName:thisdata.buyerName,
+                            sellerName:thisdata.sellerName,
                             createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
                             signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
                         });
@@ -106,8 +106,8 @@ const PaiDan = React.createClass({
                 },
                 {
                     title: '签单客户',
-                    dataIndex: 'category',
-                    key: 'category',
+                    dataIndex: 'buyerName',
+                    key: 'buyerName',
                 },
                 {
                     title: '流程状态',
@@ -117,8 +117,8 @@ const PaiDan = React.createClass({
                 },
                 {
                     title: '订单总金额(万)',
-                    dataIndex: 'totalAmount',
-                    key: 'totalAmount'
+                    dataIndex: 'signTotalAmount',
+                    key: 'signTotalAmount'
                 },
                 {
                     title: '是否特批',
@@ -128,8 +128,8 @@ const PaiDan = React.createClass({
                 },
                 {
                     title: '订单负责人',
-                    dataIndex: 'creater',
-                    key: 'creater'
+                    dataIndex: 'sellerName',
+                    key: 'sellerName'
                 },
                 {
                     title:'操作',
@@ -217,17 +217,14 @@ const PaiDan = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/user/achievement/delete",
+            url: globalConfig.context + "/api/admin/financial/reject",
             data: {
-                id: this.state.bohuiData.id,
+                orderNo: this.state.bohuiData.orderNo,
                 reason:this.state.content
             }
         }).done(function (data) {
             if (!data.error.length) {
                 message.success('驳回成功!');
-                this.setState({
-                    loading: false
-                });
                 if((this.state.total)%10==1){
                     this.loadData((this.state.page)-1);
                 }else{
@@ -236,6 +233,9 @@ const PaiDan = React.createClass({
             } else {
                 message.warning(data.error[0].message);
             };
+            this.setState({
+                loading: false
+            });
         }.bind(this));
     },
     searchSwitch() {
@@ -293,7 +293,7 @@ const PaiDan = React.createClass({
                     closeDesc={this.closeDesc.bind(this)}
                 />
                 <Assign
-                    selApi="/api/admin/order/appointSalesman"
+                    selApi="/api/admin/financial/distributionFinance"
                     data={this.state.assignData}
                     showDesc={this.state.assignVisible}
                     closeDesc={this.closeAssign.bind(this)}

+ 28 - 44
js/component/manageCenter/financialManage/distribute/receivable.jsx

@@ -1,12 +1,12 @@
 import React from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch,InputNumber, message, DatePicker, Modal, Upload ,Popconfirm} from 'antd';
+import { Form, Button, Input, Select, Spin,InputNumber, message, Modal } from 'antd';
 import {transactionProject,transactionChannel} from '@/dataDic.js';
-import {getOrderState,getOrderChannel,getPaymentState,getOrderType} from '@/tools.js';
+
 const Receivable=React.createClass({
     loadData(record) {
-        this.state.data = [];
+        this.state.data = {};
         this.setState({
             loading: true
         });
@@ -19,35 +19,18 @@ const Receivable=React.createClass({
             	orderNo:record?record.orderNo:this.props.data.orderNo
             },
             success: function (data) {
-                let theArr = [];
-                if (!data.data) {
+                let thisData = data.data;
+                if (!thisData) {
                     if (data.error && data.error.length) {
                         message.warning(data.error[0].message);
                     };
-                } else {
-                    for (let i = 0; i < data.data.length; i++) {
-                        let thisdata = data.data[i];
-                        theArr.push({
-                             key: i,
-                             id:thisdata.id,
-                             orderNo:thisdata.orderNo,
-                             commodityName:thisdata.commodityName,
-                             commodityType:thisdata.commodityType,
-                             commodityMode:thisdata.commodityMode,
-                             commodityQuantity:thisdata.commodityQuantity,
-                             commodityPrice:thisdata.commodityPrice,
-                             discountPrice:thisdata.discountPrice,
-                             commodityFirstPayment:thisdata.commodityFirstPayment,
-                             createTimes:thisdata.createTimes,
-                             discountFirstPayment:thisdata.discountFirstPayment,
-                             remarks:thisdata.remarks,
-                             commodityId:thisdata.commodityId,
-                        });
-                    };
-                   }
+                    thisData = {};
+                };
                 this.setState({
-                    dataSource: theArr,
-                    pagination: false,
+                    orderNo:thisData.orderNo,
+                    payeeId:thisData.payeeId,
+                    payerId:thisData.payerId,
+                    data: thisData,
                 });
             }.bind(this),
         }).always(function () {
@@ -58,7 +41,6 @@ const Receivable=React.createClass({
     },
     getInitialState() {
         return {
-        	datauser:{},
             loading: false,
             visible:false,
             showDesc:false,
@@ -88,10 +70,13 @@ const Receivable=React.createClass({
             async:true,
             url:  globalConfig.context + '/api/user/demand/apply',
             data: {
-                id: this.props.data.id,
-                settlementAmount: this.state.settlementAmount,
-                transactionProject: this.state.transactionProject,
+                orderNo: this.props.data.orderNo,
+                payeeId:this.state.payeeId,
+                payerId:this.state.payerId,
+                transactionAmount: this.state.settlementAmount,
+                transactionSubject: this.state.transactionProject,
                 transactionChannel: this.state.transactionChannel,
+                financialPayNo:this.state.financialPayNo,
                 remarks:this.state.remarks
             }
         }).done(function (data) {
@@ -119,16 +104,18 @@ const Receivable=React.createClass({
 		this.props.closeDesc(false, true);
 	},
     componentWillMount() {
-        this.loadData();
         this.setState({
             transactionProject:undefined,
             settlementAmount:undefined,
             transactionChannel:undefined,
+            financialPayNo:'',
             remarks:''
         })
     },
     componentWillReceiveProps(nextProps) {
-        this.loadData(nextProps.data);
+        if(nextProps.data.orderNo){
+            this.loadData(nextProps.data);
+        }
         this.state.visible=nextProps.showDesc;
         this.setState({
             transactionProject:undefined,
@@ -156,11 +143,11 @@ const Receivable=React.createClass({
 			            <Form layout="horizontal" onSubmit={this.handleSubmit} >
 			                <Spin spinning={this.state.loading}>
                                 <div className="clearfix">
-                                    <FormItem className="half-item" {...formItemLayout} label="平台流水编号">
+                                    <FormItem className="half-item" {...formItemLayout} label="付款方">
                                         <span>{theData.name}</span>
                                     </FormItem>
-                                    <FormItem className="half-item" {...formItemLayout} label="平台流水时间">
-							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    <FormItem className="half-item" {...formItemLayout} label="收款方">
+                                        <span>{theData.name}</span>
                                     </FormItem>
                                     <FormItem className="half-item" {...formItemLayout} label={<span><strong style={{color:'#f00'}}>*</strong>金额</span>}>
                                         <InputNumber min={0} max={9999} placeholder="金额" 
@@ -181,12 +168,6 @@ const Receivable=React.createClass({
                                             }
                                         </Select>
                                     </FormItem>
-                                    <FormItem className="half-item" {...formItemLayout} label="付款方">
-                                        <span>{theData.name}</span>
-                                    </FormItem>
-                                    <FormItem className="half-item" {...formItemLayout} label="收款方">
-                                        <span>{theData.name}</span>
-                                    </FormItem>
                                     <FormItem className="half-item" {...formItemLayout} label={<span><strong style={{color:'#f00'}}>*</strong>交易渠道</span>}>
                                         <Select placeholder="交易渠道" 
                                             value={this.state.transactionChannel}
@@ -203,7 +184,10 @@ const Receivable=React.createClass({
                                         <span>{theData.orderNo}</span>
                                     </FormItem>
                                     <FormItem className="half-item" {...formItemLayout} label="财务流水编号">
-                                        <span>{theData.orderNo}</span>
+                                        <Input placeholder="财务流水编号"
+                                            value={this.state.financialPayNo}
+                                            onChange={(e) => { this.setState({ financialPayNo: e.target.value }); }} />  
+                                                        
                                     </FormItem>
                                     <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} label="备注">
                                         <Input

+ 25 - 29
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -3,10 +3,9 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './public.less';
-import { Icon, Button,Form, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
+import { Button,Form, Input, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
 import OrderDesc from '../orderDetail/orderDesc'
 import Receivable from './receivable';
-
 import {getLiquidationStatus,getNewOrderStatus} from '@/tools';
 const FormItem = Form.Item;
 
@@ -18,17 +17,17 @@ const ShouKuang = React.createClass({
             loading: true
         });
         $.ajax({
-            method: "post",
+            method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            url: globalConfig.context + "/api/admin/financial/financeList",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                ownerName: this.state.nameSearch,//客户名称
+                buyerName: this.state.nameSearch,//客户名称
                 orderNo:this.state.orderNoSearch,
-                startDate: this.state.releaseDate[0],
-                endDate: this.state.releaseDate[1],
+                startTime: this.state.releaseDate[0],
+                endTime: this.state.releaseDate[1],
             },
             success: function (data) {
                 let theArr = [];
@@ -44,11 +43,11 @@ const ShouKuang = React.createClass({
 		                    orderNo: thisdata.orderNo,
 		                    orderType:thisdata.orderType,
 		                    orderStatus:thisdata.orderStatus,
-		                    processStatus:thisdata.processStatus,
-		                    projectStage:thisdata.projectStage,
+		                    sellerName:thisdata.processStatus,
+		                    liquidationStatus:thisdata.liquidationStatus,
 		                    approval:thisdata.approval,
-		                    creater:thisdata.creater,
-                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+		                    buyerName:thisdata.buyerName,
+                            actuallyTotalAmount:thisdata.actuallyTotalAmount,
                             signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
                         });
                     };
@@ -94,24 +93,24 @@ const ShouKuang = React.createClass({
             },
             columns: [
                 {
-                    title: '退单编号',
-                    dataIndex: 'id',
-                    key: 'id',   
-                },
-                {
-                    title: '退单时间',
-                    dataIndex: 'createTime',
-                    key: 'createTime',
-                }, 
-                {
                     title: '订单编号',
                     dataIndex: 'orderNo',
                     key: 'orderNo',
                 },
                 {
+                    title: '订单日期',
+                    dataIndex: 'signTime',
+                    key: 'signTime',
+                },
+                {
+                    title: '已收款',
+                    dataIndex: 'actuallyTotalAmount',
+                    key: 'actuallyTotalAmount',
+                },
+                {
                     title: '客户名称',
-                    dataIndex: 'category',
-                    key: 'category',
+                    dataIndex: 'buyerName',
+                    key: 'buyerName',
                 },
                 {
                     title: '订单状态',
@@ -121,8 +120,8 @@ const ShouKuang = React.createClass({
                 },
                 {
                     title: '订单负责人',
-                    dataIndex: 'creater',
-                    key: 'creater'
+                    dataIndex: 'sellerName',
+                    key: 'sellerName'
                 },
                 {
                     title: '结算状态',
@@ -188,6 +187,7 @@ const ShouKuang = React.createClass({
         };
     },
     closeAssign(e, s) {
+        this.state.assignData={};
         this.state.assignVisible = e;
         if (s) {
             this.loadData(this.state.page);
@@ -198,7 +198,6 @@ const ShouKuang = React.createClass({
     },
     reset() {
         this.state.nameSearch = '';
-        this.state.orderRefundSearch='';
         this.state.releaseDate = [];
         this.state.orderNoSearch='';
         this.loadData();
@@ -261,9 +260,6 @@ const ShouKuang = React.createClass({
                     <span>收款结算</span>
                 </div>
                 <div className="user-search">
-                    <Input placeholder="退单编号"
-                        value={this.state.orderRefundSearch}
-                        onChange={(e) => { this.setState({ orderRefundSearch: e.target.value }); }} /> 
                     <Input placeholder="订单编号"
                         value={this.state.orderNoSearch}
                         onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />  

+ 3 - 8
js/component/manageCenter/financialManage/distribute/tuiDan.jsx

@@ -3,12 +3,10 @@ import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './public.less';
-import { Icon, Button,Form, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
-import OrderDesc from '../orderDetail/orderDesc'
+import {  Button,Form, Input,  Spin, Table, Switch, message, DatePicker } from 'antd';
 import Receivable from './receivable';
 import Examine from './examine';
 import {getLiquidationStatus,getNewOrderStatus} from '@/tools';
-const FormItem = Form.Item;
 
 const TuiDan = React.createClass({
     loadData(pageNo) {
@@ -171,6 +169,7 @@ const TuiDan = React.createClass({
         });
     },
     closeExamine(e, s) {
+        this.state.examineData={};
         this.state.examineVisible = e;
         if (s) {
             this.loadData(this.state.page);
@@ -183,6 +182,7 @@ const TuiDan = React.createClass({
         };
     },
     closeAssign(e, s) {
+        this.state.assignData={};
         this.state.assignVisible = e;
         if (s) {
             this.loadData(this.state.page);
@@ -285,11 +285,6 @@ const TuiDan = React.createClass({
                              />
                     </Spin>
                 </div>
-                {/* <OrderDesc
-                    data={this.state.RowData}
-                    showDesc={this.state.showDesc}
-                    closeDesc={this.closeDesc.bind(this)}
-                /> */}
                 <Receivable
                     data={this.state.assignData}
                     showDesc={this.state.assignVisible}

+ 288 - 11
js/component/manageCenter/financialManage/flowWater/departWater.jsx

@@ -1,14 +1,291 @@
-import {Component} from 'react';
-class DepartWater extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {  }
-    }
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../distribute/public.less';
+import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker } from 'antd';
+import {getLiquidationStatus} from '@/tools';
+import WaterDesc from './waterDetail';
+
+const MyWater = React.createClass({
+    departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/listOrganizationManagement",
+			data: {
+                pageNo:1,
+                pageSize:999,
+                type:1
+            },
+			success: function(data) {
+                let thedata = data.data.list;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                ownerName: this.state.nameSearch,//客户名称
+                departmentId:this.state.departmenttList,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                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];
+                        theArr.push({
+                            key: i,
+		                    orderNo: thisdata.orderNo,
+		                    orderType:thisdata.orderType,
+		                    orderStatus:thisdata.orderStatus,
+		                    processStatus:thisdata.processStatus,
+		                    projectStage:thisdata.projectStage,
+		                    approval:thisdata.approval,
+		                    creater:thisdata.creater,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            releaseDate: [],
+            RowData:{},
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '平台流水号',
+                    dataIndex: 'id',
+                    key: 'id',   
+                },
+                {
+                    title: '平台流水时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                }, 
+                {
+                    title: '金额',
+                    dataIndex: 'orderNo',
+                    key: 'orderNo',
+                },
+                {
+                    title: '付款方',
+                    dataIndex: 'category',
+                    key: 'category',
+                    render:text=>{
+                        return text&&text>8?text.substr(0,8)+'...':text
+                    }
+                },
+                {
+                    title: '收款方',
+                    dataIndex: 'orderStatus',
+                    key: 'orderStatus',
+                    render:text=>{
+                        return text&&text>8?text.substr(0,8)+'...':text
+                    }
+                },
+                {
+                    title: '流水科目',
+                    dataIndex: 'creater',
+                    key: 'creater'
+                },
+                {
+                    title: '交易渠道',
+                    dataIndex: 'liquidationStatus',
+                    key: 'liquidationStatus',
+                    render: text => { return getLiquidationStatus(text)}
+                },{
+                    title: '交易时间',
+                    dataIndex: 'liquidationStatus1',
+                    key: 'liquidationStatus1',
+                }, {
+                    title: '财务流水号',
+                    dataIndex: 'creater1',
+                    key: 'creater1'
+                },
+                {
+                    title: '订单编号',
+                    dataIndex: 'creater2',
+                    key: 'creater2'
+                },{
+                    title: '订单负责人',
+                    dataIndex: 'creater3',
+                    key: 'creater3'
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+    componentWillMount() {
+        this.loadData();
+        this.departmentList();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.orderRefundSearch='';
+        this.state.releaseDate = [];
+        this.state.departmenttList=undefined;
+        this.state.orderNoSearch='';
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     render() { 
-        return (<div className="admin-content">
-           DepartWater 
-        </div> );
+        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;
+        let departmentArr = this.state.departmentArr || [];
+        return ( <div className="user-content">
+            <div className="content-title">
+                <span>部门流水订单</span>
+                </div>
+                <div className="user-search">
+                    <Select placeholder="订单部门"
+                        style={{ width: 150 ,marginRight:10}}
+                        value={this.state.departmenttList}
+                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
+                        {
+                            departmentArr.map(function (item) {
+                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Input placeholder="收款方"
+                        value={this.state.orderRefundSearch}
+                        onChange={(e) => { this.setState({ orderRefundSearch: e.target.value }); }} /> 
+                    <Input placeholder="付款方"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />  
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <span>订单时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick}
+                             />
+                    </Spin>
+                </div>
+                <WaterDesc
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc.bind(this)}
+                />
+        </div> )
     }
-}
+})
  
-export default DepartWater;
+export default MyWater;

+ 213 - 10
js/component/manageCenter/financialManage/flowWater/myWater.jsx

@@ -1,15 +1,218 @@
-import {Component} from 'react';
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '../distribute/public.less';
+import {  Button, Input, Spin, Table, Switch, message, DatePicker } from 'antd';
+import {getTransactionChannel,getTransactionProject} from '@/tools';
+import WaterDesc from './waterDetail';
 
-class MyWater extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {  }
-    }
+const MyWater = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                ownerName: this.state.nameSearch,//客户名称
+                orderNo:this.state.orderNoSearch,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                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];
+                        theArr.push({
+                            key: i,
+		                    orderNo: thisdata.orderNo,
+		                    orderType:thisdata.orderType,
+		                    orderStatus:thisdata.orderStatus,
+		                    processStatus:thisdata.processStatus,
+		                    projectStage:thisdata.projectStage,
+		                    approval:thisdata.approval,
+		                    creater:thisdata.creater,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            signTime:thisdata.releaseDate?(new Date(thisdata.releaseDate)).toLocaleString():''
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            releaseDate: [],
+            RowData:{},
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '平台流水号',
+                    dataIndex: 'id',
+                    key: 'id',   
+                },
+                {
+                    title: '平台流水时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime',
+                }, 
+                {
+                    title: '金额',
+                    dataIndex: 'orderNo1',
+                    key: 'orderNo1',
+                },
+                {
+                    title: '流水科目',
+                    dataIndex: 'creater',
+                    key: 'creater',
+                    render: text => { return getTransactionProject(text)}
+                },
+                {
+                    title: '交易时间',
+                    dataIndex: 'liquidationStatus1',
+                    key: 'liquidationStatus1',
+                }, {
+                    title: '财务流水号',
+                    dataIndex: 'creater1',
+                    key: 'creater1'
+                },
+                {
+                    title: '订单编号',
+                    dataIndex: 'orderNo',
+                    key: 'orderNo'
+                },{
+                    title: '订单负责人',
+                    dataIndex: 'creater3',
+                    key: 'creater3'
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true,
+        });
+    },
+    closeDesc(e, s) {
+        this.state.RowData={};
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.orderRefundSearch='';
+        this.state.releaseDate = [];
+        this.state.orderNoSearch='';
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
     render() { 
-        return ( <div className="admin-content">
-            MyWater
-        </div> );
+        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;
+        return ( <div className="user-content">
+            <div className="content-title">
+                <span>我的流水订单</span>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="收款方"
+                        value={this.state.orderRefundSearch}
+                        onChange={(e) => { this.setState({ orderRefundSearch: e.target.value }); }} /> 
+                    <Input placeholder="付款方"
+                        value={this.state.orderNoSearch}
+                        onChange={(e) => { this.setState({ orderNoSearch: e.target.value }); }} />  
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <span>流水时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick}
+                             />
+                    </Spin>
+                </div>
+                <WaterDesc
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc.bind(this)}
+                />
+        </div> )
     }
-}
+})
  
 export default MyWater;

+ 131 - 0
js/component/manageCenter/financialManage/flowWater/waterDetail.jsx

@@ -0,0 +1,131 @@
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import { Form,Button, Input, Spin, message, Modal, Upload } from 'antd';
+import {getTransactionChannel,getTransactionProject,splitUrl} from '@/tools.js';
+
+const WaterDetail=React.createClass({
+    loadData(record) {
+        this.state.data = [];
+        this.setState({
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/order/getOrderCommodity',
+            data: {
+            	orderNo:record?record.orderNo:this.props.data.orderNo
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.length; i++) {
+                        let thisdata = data.data[i];
+                        theArr.push({
+                             key: i,
+                             id:thisdata.id,
+                             data:thisdata,
+                             orderNo:thisdata.orderNo,
+                             orgCodeUrl: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                             orgCodeUrlNo: thisdata.contractPictureUrl ? splitUrl(thisdata.contractPictureUrl, ',', globalConfig.avatarHost + '/upload') : [],
+                        });
+                    };
+                   }
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            loading: false,
+            visible:false,
+            showDesc:false,
+        };
+    },
+    onCancel(){
+    	this.setState({
+    		visible:false
+        })
+        this.props.closeDesc(false,false);
+    },
+    onShow() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	},
+    componentWillMount() {
+    },
+    componentWillReceiveProps(nextProps) {
+        if(nextProps.data.orderNo){
+            this.loadData(nextProps.data);
+        }
+        this.state.visible=nextProps.showDesc;
+    },
+    render() {
+        const theData = this.state.data || {};
+        const FormItem = Form.Item;
+        const formItemLayout = {
+            labelCol: { span: 10 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+            <div className="user-content" >
+	            <Modal maskClosable={false} visible={this.state.visible}
+                        onOk={this.onShow} onCancel={this.onCancel}
+                        width='800px'
+                        title='流水详情'                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} >
+			                <Spin spinning={this.state.loading}>
+                                <div className="clearfix">
+                                    <FormItem className="half-item" {...formItemLayout} label="平台流水编号">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="平台流水时间">
+							            <span>{theData.releaseDate?(new Date(theData.releaseDate)).toLocaleString():''}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="金额">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="流水科目">
+                                        <span>{getTransactionProject(theData.orderState)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="付款方">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="收款方">
+                                        <span>{theData.name}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="交易渠道">
+                                        <span>{getTransactionChannel(theData.liquidationStatus)}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="订单编号">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem className="half-item" {...formItemLayout} label="财务流水编号">
+                                        <span>{theData.orderNo}</span>
+                                    </FormItem>
+                                    <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} label="备注">
+                                        <span>{theData.remark}</span>
+                                    </FormItem>
+                                </div>
+			                </Spin>
+			            </Form>
+			    </Modal>
+            </div>
+        );
+    }
+});
+
+export default Form.create()(WaterDetail);

+ 8 - 28
js/component/manageCenter/publicComponent/assign.jsx

@@ -1,9 +1,8 @@
 import React from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
-import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload ,Popconfirm} from 'antd';
-import {orderState,orderChannel,orderType} from '@/dataDic.js';
-import {getOrderState,getOrderChannel,getPaymentState,getOrderType} from '@/tools.js';
+import { Form,Radio, Button, Input, Select, Spin, Table, message, Modal ,Popconfirm} from 'antd';
+
 const Assign=React.createClass({
     departmentList() {
 		this.setState({
@@ -46,14 +45,10 @@ const Assign=React.createClass({
 	},
     getInitialState() {
         return {
-        	datauser:{},
-            selectedRowKeys: [],
-            releaseDate: [],
             contact:0,
             selectedRows: [],
             searchMore: true,
             loading: false,
-            distributionVisible:false,
             visible:false,
             showDesc:false,
             pagination: {
@@ -168,26 +163,26 @@ const Assign=React.createClass({
     	this.setState({
             loading: true
         });
-        console.log(this.props.data)
         $.ajax({
-            method: "get",
+            method: "post",
             dataType: "json",
             crossDomain: false,
             url: globalConfig.context +this.props.selApi,
             data: {
             	orderNo:this.props.data.orderNo,
-            	salesmanId:record.id
+                financeId:record.id,    //财务专员id
+                approval:this.props.data.approval   //是否特批
             }
         }).done(function (data) {
             if (!data.error.length) {
                 message.success('派单成功');
                 this.onShow();
-                this.setState({
-                    loading: false,
-                });
             } else {
                 message.warning(data.error[0].message);
             };
+            this.setState({
+                loading: false,
+            });
         }.bind(this));
     },
     searchOrder(){
@@ -210,22 +205,7 @@ const Assign=React.createClass({
         })
     },
     render() {
-        const rowSelection = {
-            selectedRowKeys: this.state.selectedRowKeys,
-            onChange: (selectedRowKeys, selectedRows) => {
-	                this.setState({
-	                    selectedRows: selectedRows.slice(-1),
-	                    selectedRowKeys: selectedRowKeys.slice(-1)
-	                }); 
-            },
-            onSelectAll: (selected, selectedRows, changeRows) => {
-			   this.setState({
-			   		selectedRowKeys:[]
-			   })
-			},
-        };
         let departmentArr = this.state.departmentArr || [];
-        const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
             <div className="user-content" >
 	            <Modal maskClosable={false} visible={this.state.visible}

+ 116 - 0
js/component/manageCenter/publicComponent/exportExec.jsx

@@ -0,0 +1,116 @@
+import React ,{Component} from 'react';
+import {Button} from 'antd';
+
+class ExportExec extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {  }
+    }
+    //判断浏览器类型
+	getExplorer() {
+		var explorer = window.navigator.userAgent;
+		//ie 
+		if(explorer.indexOf("MSIE") >= 0) {
+			return 'ie';
+		}
+		//firefox 
+		else if(explorer.indexOf("Firefox") >= 0) {
+			return 'Firefox';
+		}
+		//Chrome
+		else if(explorer.indexOf("Chrome") >= 0) {
+			return 'Chrome';
+		}
+		//Opera
+		else if(explorer.indexOf("Opera") >= 0) {
+			return 'Opera';
+		}
+		//Safari
+		else if(explorer.indexOf("Safari") >= 0) {
+			return 'Safari';
+		}
+	}
+    //导出为exel表格
+	tabExel() {
+        this.props.callback(true);
+    }
+    tabaleClick(tabel){
+        var table = tabel;
+        var idTmr;
+		//debugger;
+		//整个表格拷贝到EXCEL中
+		if(this.getExplorer() == 'ie') {
+			var curTbl = document.getElementById(tableid);
+			var oXL = new ActiveXObject("Excel.Application");
+			//创建AX对象excel 
+			var oWB = oXL.Workbooks.Add();
+			//获取workbook对象 
+			var xlsheet = oWB.Worksheets(1);
+			//激活当前sheet 
+			var sel = document.body.createTextRange();
+			sel.moveToElementText(curTbl);
+			//把表格中的内容移到TextRange中 
+			sel.select();
+			//全选TextRange中内容 
+			sel.execCommand("Copy");
+			//复制TextRange中内容  
+			xlsheet.Paste();
+			//粘贴到活动的EXCEL中       
+			oXL.Visible = true;
+			//设置excel可见属性
+			try {
+				var fname = oXL.Application.GetSaveAsFilename("Excel.xls", "Excel Spreadsheets (*.xls), *.xls");
+			} catch(e) {
+				print("Nested catch caught " + e);
+			} finally {
+				oWB.SaveAs(fname);
+
+				oWB.Close(savechanges = false);
+				//xls.visible = false;
+				oXL.Quit();
+				oXL = null;
+				//结束excel进程,退出完成
+				//window.setInterval("Cleanup();",1);
+				idTmr = window.setInterval("Cleanup();", 1);
+			}
+		} else {
+			this.tableToExcel(table,this.getExplorer());
+		}
+		function Cleanup() {
+			window.clearInterval(idTmr);
+			CollectGarbage();
+		}
+		this.props.callback(false);
+    }
+	tableToExcel(table,name) {
+		var uri = 'data:application/vnd.ms-excel;base64,',
+			template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
+			base64 = function(s) {
+				return window.btoa(unescape(encodeURIComponent(s)))
+			},
+			format = function(s, c) {
+				return s.replace(/{(\w+)}/g,
+					function(m, p) {
+						return c[p];
+					})
+			}
+			if(!table.nodeType) table = document.getElementById(table);
+			var ctx = {
+				worksheet: name || 'Worksheet',
+				table: table.innerHTML
+			};
+			window.location.href = uri + base64(format(template, ctx))
+    }
+    componentWillReceiveProps(nextProps){
+        if(nextProps.data){
+            this.tabaleClick(nextProps.data)
+        }
+    }
+    render() { 
+        return ( 
+                <Button onClick={this.tabExel.bind(this)}>导出到表格</Button>
+            );
+    }
+}
+ 
+export default ExportExec;

+ 64 - 0
js/component/manageCenter/statistics/content.jsx

@@ -0,0 +1,64 @@
+import React, { Component } from 'react';
+import '../content.less';
+import './content.less';
+import LeftTab from '../leftTab';
+import {getMenu} from '../publicMenu.js'
+
+class Content extends Component {
+    constructor() {
+        super();
+        this.state = {
+            loading: false,
+            component: <div></div>,
+        };
+    }
+    componentWillMount() {
+    	var ids=window.location.href.indexOf('rid=');
+        var idk=window.location.href.substr(ids+4);
+        var rid=idk.split('#');
+        let menu=getMenu(rid);
+        let curry;
+        if(menu[0].subMenus.length>0){
+        	curry=menu[0].subMenus[0].url.split('#');
+        }else{
+        	curry=menu[0].url.split('#');
+        };
+        if (window.location.hash) {
+            this.getKey(window.location.hash.substr(1));
+        } else {
+         this.getKey(curry[1]);
+        };
+    }
+    getKey(key) {
+        switch (key) {
+            case 'order': //派单管理
+                require.ensure([], () => {
+                    let Module = require('./order/index').default;
+                    this.setState({
+                        component: <Module />,
+                    });
+                });
+                break;
+            default:
+            require.ensure([], () => {
+                let Module = require('../module').default;
+                this.setState({
+                    component:<Module />	    
+                	});
+               });  
+        };
+        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;

+ 119 - 0
js/component/manageCenter/statistics/content.less

@@ -0,0 +1,119 @@
+.admin-content {
+    background: #fff;
+    padding: 20px;
+    color: #666;
+    .admin-content-title {
+        font-size: 16px;
+    }
+    .admin-content-warp {
+        padding: 10px;
+        .admin-content-header {
+            margin-bottom: 10px;
+            line-height: 28px;
+            >span {
+                font-size: 14px
+            }
+            >button {
+                float: right;
+                margin-right: 20px;
+            }
+        }
+        .admin-content-search {
+            margin-bottom: 10px;
+            >* {
+                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;
+        }
+    }
+}
+
+.news-modal {
+    .quill {
+        margin-top:10px;
+        margin-bottom: 40px;
+        .ql-editor {
+            min-height: 400px;
+        }
+    }
+    .ant-modal-body {
+        padding-bottom: 50px;
+        .modal-box {
+            float: left;
+        }
+        .news-box {
+            float: left;
+            width: 280px;
+            .modal-box-detail {
+                width: 160px;
+            }
+        }
+    }
+}
+
+.avatar-uploader,
+.avatar-uploader-trigger,
+.avatar {
+    width: 150px;
+    height: 150px;
+}
+
+.avatar-uploader {
+    display: block;
+    padding: 1px;
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    img {
+        position: absolute;
+        top: -1px;
+        left: -1px;
+        height: 150px;
+    } //
+    float: left;
+    margin-right: 20px;
+}
+
+.avatar-uploader-trigger {
+    display: table-cell;
+    vertical-align: middle;
+    font-size: 28px;
+    color: #999;
+}
+.jmrhFlag{margin-right: 15px;}
+.provin{width: 100px;height: 28px;line-height: 28px;border-radius: 4px;border-color: #d9d9d9;padding:4px 0px;transition: all .5s;}
+.provin:focus{outline: none;box-shadow: 0px 0px 6px #80b9ff;border-color: #80b9ff;}
+

+ 274 - 0
js/component/manageCenter/statistics/order/index.jsx

@@ -0,0 +1,274 @@
+import React from 'react';
+import ajax from 'jquery/src/ajax/xhr.js';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import '@/manageCenter/financialManage/distribute/public.less';
+import {  Button, Input, Spin, Table,Select, Switch, message, DatePicker,Upload} from 'antd';
+import {getNewOrderType,beforeUploadFile} from '@/tools';
+import {newOrderType} from '@/dataDic';
+import { exportExcel } from 'xlsx-oc';
+
+const Order = React.createClass({
+    departmentList() {
+		this.setState({
+			loading: true
+		});
+		$.ajax({
+			method: "post",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + "/api/admin/organization/listOrganizationManagement",
+			data: {
+                pageNo:1,
+                pageSize:999,
+                type:1
+            },
+			success: function(data) {
+                let thedata = data.data.list;
+				let theArr=[];
+				if(!thedata) {
+					if(data.error && data.error.length) {
+						message.warning(data.error[0].message);
+					};
+					thedata = {};
+				}else{
+					thedata.map(function(item,index){
+						theArr.push({
+							key:index,
+							name:item.name,
+							id:item.id,
+						})
+					})
+				}
+				this.setState({
+					departmentArr:theArr,
+				})
+			}.bind(this),
+			}).always(function() {
+				this.setState({
+					loading: false
+				});
+			}.bind(this));
+	},
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "post",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/order/listAllSettlement",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize:999,
+                signName: this.state.signName,//客户名称
+                departmentId:this.state.departmenttList,
+                orderType:this.state.orderType,
+                startDate: this.state.releaseDate[0],
+                endDate: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                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];
+                        theArr.push({
+                            key: i+1,
+		                    orderNo: thisdata.orderNo,
+                            department:thisdata.department,
+                            orderType:thisdata.orderType,
+                            signName:thisdata.signName,  
+                            signNumber:thisdata.signNumber,
+                            signTotalAmount:thisdata.signTotalAmount
+                        });
+                    };
+                }
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0
+					this.state.pagination.total=0
+				}
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            releaseDate: [],
+            RowData:{},
+            selectedRowKeys: [],
+            selectedRows: [],
+            proofData:{},
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                {
+                    title: '序号',
+                    dataIndex: 'key',
+                    key: 'key',   
+                },
+                {
+                    title: '订单部门',
+                    dataIndex: 'department',
+                    key: 'department',
+                }, 
+                {
+                    title: '订单类型',
+                    dataIndex: 'orderType',
+                    key: 'orderType',
+                    render:text=>{
+                        return getNewOrderType(text)
+                    }
+                },
+                {
+                    title: '签单人员',
+                    dataIndex: 'signName',
+                    key: 'signName',
+                },
+                {
+                    title: '签单数量',
+                    dataIndex: 'signNumber',
+                    key: 'signNumber'
+                },
+                {
+                    title: '累计签单金额(万)',
+                    dataIndex: 'signTotalAmount',
+                    key: 'signTotalAmount'
+                },
+            ],
+            dataSource: [],
+            searchTime: [,]
+        }
+    },
+    componentWillMount() {
+        this.loadData();
+        this.departmentList();
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.signName='';
+        this.state.releaseDate = [];
+        this.state.departmenttList=undefined;
+        this.state.orderType='';
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    //导出exec
+    exec(){
+        var _headers = [{ k: 'key', v: '序号' }, { k: 'department', v: '订单部门' },
+            { k: 'orderType', v: '订单类型' }, { k: 'signName', v: '签单人员' },{k:'signNumber',v:'签单数量'},{k:'signTotalAmount',v:'累计签单金额'}]
+        exportExcel(_headers,this.state.dataSource);
+    },
+    render() { 
+        const { RangePicker } = DatePicker;
+        let departmentArr = this.state.departmentArr || [];
+        return ( <div className="user-content">
+            <div className="content-title">
+                <span>订单统计报表</span>
+                </div>
+                <div className="user-search">
+                    <Select placeholder="部门机构"
+                        style={{ width: 150 ,marginRight:10}}
+                        value={this.state.departmenttList}
+                        onChange={(e) => { this.setState({ departmenttList: e }) }}>
+                        {
+                            departmentArr.map(function (item) {
+                                    return <Select.Option key={item.id} >{item.name}</Select.Option>
+                            })
+                        }
+                    </Select>
+                    <Input placeholder="签单人员"
+                        value={this.state.signName}
+                        onChange={(e) => { this.setState({ signName: e.target.value }); }} /> 
+                    <Select placeholder="订单类型"
+                        style={{ width: 150 ,marginRight:10}}
+                        value={this.state.orderType}
+                        onChange={(e) => { this.setState({ orderType: e }) }}>
+                        {
+                            newOrderType.map(function (item) {
+                                    return <Select.Option key={item.value} >{item.key}</Select.Option>
+                            })
+                        }
+                    </Select>   
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                    <div style={{float:'right'}}>
+                    <Upload
+                            action={globalConfig.context + "/api/admin/achievement/uploadTemplate"}
+                            data={{ 'sign': 'achievement_template' }}
+                            beforeUpload={beforeUploadFile}
+                            showUploadList={false}
+                            onChange={(info) => {
+                                if (info.file.status !== 'uploading') {
+                                    
+                                }
+                                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;
+                                    };
+                                } else if (info.file.status === 'error') {
+                                    message.error(`${info.file.name} 文件上传失败。`);
+                                };
+                            }} >
+                            <Button>导入年度销售数据</Button>
+                        </Upload>
+                        <Button type="primary" onClick={this.exec} style={{margin:'0 10px'}}>导出到exec</Button>
+                    </div>
+                    <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
+                    <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
+                        <span>起止时间 :</span>
+                        <RangePicker
+                            value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                            this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                            onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    </div>
+                </div>
+                <div className="patent-table" id="table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={false}
+                            />
+                    </Spin>
+                </div>
+        </div> )
+    }
+})
+ 
+export default Order;

+ 29 - 3
js/component/tools.js

@@ -78,8 +78,8 @@ import {
     dataGrade,
     level,
     xiangmoState,
-    newOrderStatus,refundStatus,approval,projectStatus,processStatus,liquidationStatus,newOrderType
-
+    newOrderStatus,refundStatus,approval,projectStatus,processStatus,liquidationStatus,newOrderType,paymentType
+    ,jsyPaymentType
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -1556,5 +1556,31 @@ module.exports = {
             });
             return theType;
         }
-    },//newOrderType
+    },
+    //营销员发款类型  
+	getPaymentType:function(e){
+        if (e||e==0) {
+            let str=e.toString()
+         let theType = '';
+         paymentType.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
+    //技术员发款类型  
+	getJsyPaymentType:function(e){
+        if (e||e==0) {
+            let str=e.toString()
+         let theType = '';
+         jsyPaymentType.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+    },
 }

+ 640 - 0
package-lock.json

@@ -37,6 +37,15 @@
         "object-assign": "4.1.1"
       }
     },
+    "adler-32": {
+      "version": "1.2.0",
+      "resolved": "http://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz",
+      "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
+      "requires": {
+        "exit-on-epipe": "1.0.1",
+        "printj": "1.1.2"
+      }
+    },
     "adler32cs": {
       "version": "github:chick307/adler32cs.js#c6576b4ed91b4216973bf85d8478a49970934515"
     },
@@ -1443,6 +1452,22 @@
       "resolved": "http://registry.npm.taobao.org/cf-blob.js/download/cf-blob.js-0.0.1.tgz",
       "integrity": "sha1-9at+EueYyvCMz4KMaaug8GPYP5k="
     },
+    "cfb": {
+      "version": "1.0.8",
+      "resolved": "http://registry.npm.taobao.org/cfb/download/cfb-1.0.8.tgz",
+      "integrity": "sha1-d/ITST1pfXVP2cD1UR6rWtctAs8=",
+      "requires": {
+        "commander": "2.19.0",
+        "printj": "1.1.2"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.19.0",
+          "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz",
+          "integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So="
+        }
+      }
+    },
     "chalk": {
       "version": "1.1.3",
       "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz",
@@ -1464,6 +1489,7 @@
       "requires": {
         "anymatch": "1.3.2",
         "async-each": "1.0.1",
+        "fsevents": "1.2.4",
         "glob-parent": "2.0.0",
         "inherits": "2.0.3",
         "is-binary-path": "1.0.1",
@@ -1634,6 +1660,22 @@
       "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
       "dev": true
     },
+    "codepage": {
+      "version": "1.14.0",
+      "resolved": "http://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz",
+      "integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
+      "requires": {
+        "commander": "2.14.1",
+        "exit-on-epipe": "1.0.1"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.14.1",
+          "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz",
+          "integrity": "sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
+        }
+      }
+    },
     "collection-visit": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -2028,6 +2070,15 @@
       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
       "dev": true
     },
+    "crc-32": {
+      "version": "1.2.0",
+      "resolved": "http://registry.npm.taobao.org/crc-32/download/crc-32-1.2.0.tgz",
+      "integrity": "sha1-yy224puIUI4y2d0OwWk+e0Ghggg=",
+      "requires": {
+        "exit-on-epipe": "1.0.1",
+        "printj": "1.1.2"
+      }
+    },
     "create-ecdh": {
       "version": "4.0.0",
       "resolved": "http://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.0.tgz",
@@ -2836,6 +2887,11 @@
         "create-hash": "1.1.3"
       }
     },
+    "exit-on-epipe": {
+      "version": "1.0.1",
+      "resolved": "http://registry.npm.taobao.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz",
+      "integrity": "sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
+    },
     "expand-brackets": {
       "version": "0.1.5",
       "resolved": "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz",
@@ -3206,6 +3262,11 @@
       "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
       "dev": true
     },
+    "frac": {
+      "version": "1.1.2",
+      "resolved": "http://registry.npm.taobao.org/frac/download/frac-1.1.2.tgz",
+      "integrity": "sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
+    },
     "fragment-cache": {
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
@@ -3281,6 +3342,535 @@
       "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
       "dev": true
     },
+    "fsevents": {
+      "version": "1.2.4",
+      "resolved": "http://registry.npm.taobao.org/fsevents/download/fsevents-1.2.4.tgz",
+      "integrity": "sha1-9B3LGvJYKvNpLaNvxVy9jhBBxCY=",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "nan": "2.11.1",
+        "node-pre-gyp": "0.10.0"
+      },
+      "dependencies": {
+        "abbrev": {
+          "version": "1.1.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "ansi-regex": {
+          "version": "2.1.1",
+          "bundled": true,
+          "dev": true
+        },
+        "aproba": {
+          "version": "1.2.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "are-we-there-yet": {
+          "version": "1.1.4",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "delegates": "1.0.0",
+            "readable-stream": "2.3.6"
+          }
+        },
+        "balanced-match": {
+          "version": "1.0.0",
+          "bundled": true,
+          "dev": true
+        },
+        "brace-expansion": {
+          "version": "1.1.11",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "balanced-match": "1.0.0",
+            "concat-map": "0.0.1"
+          }
+        },
+        "chownr": {
+          "version": "1.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "code-point-at": {
+          "version": "1.1.0",
+          "bundled": true,
+          "dev": true
+        },
+        "concat-map": {
+          "version": "0.0.1",
+          "bundled": true,
+          "dev": true
+        },
+        "console-control-strings": {
+          "version": "1.1.0",
+          "bundled": true,
+          "dev": true
+        },
+        "core-util-is": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "debug": {
+          "version": "2.6.9",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "deep-extend": {
+          "version": "0.5.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "delegates": {
+          "version": "1.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "detect-libc": {
+          "version": "1.0.3",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "fs-minipass": {
+          "version": "1.2.5",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "minipass": "2.2.4"
+          }
+        },
+        "fs.realpath": {
+          "version": "1.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "gauge": {
+          "version": "2.7.4",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "aproba": "1.2.0",
+            "console-control-strings": "1.1.0",
+            "has-unicode": "2.0.1",
+            "object-assign": "4.1.1",
+            "signal-exit": "3.0.2",
+            "string-width": "1.0.2",
+            "strip-ansi": "3.0.1",
+            "wide-align": "1.1.2"
+          }
+        },
+        "glob": {
+          "version": "7.1.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "fs.realpath": "1.0.0",
+            "inflight": "1.0.6",
+            "inherits": "2.0.3",
+            "minimatch": "3.0.4",
+            "once": "1.4.0",
+            "path-is-absolute": "1.0.1"
+          }
+        },
+        "has-unicode": {
+          "version": "2.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "iconv-lite": {
+          "version": "0.4.21",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "safer-buffer": "2.1.2"
+          }
+        },
+        "ignore-walk": {
+          "version": "3.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "minimatch": "3.0.4"
+          }
+        },
+        "inflight": {
+          "version": "1.0.6",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "once": "1.4.0",
+            "wrappy": "1.0.2"
+          }
+        },
+        "inherits": {
+          "version": "2.0.3",
+          "bundled": true,
+          "dev": true
+        },
+        "ini": {
+          "version": "1.3.5",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "1.0.0",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "number-is-nan": "1.0.1"
+          }
+        },
+        "isarray": {
+          "version": "1.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "minimatch": {
+          "version": "3.0.4",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "brace-expansion": "1.1.11"
+          }
+        },
+        "minimist": {
+          "version": "0.0.8",
+          "bundled": true,
+          "dev": true
+        },
+        "minipass": {
+          "version": "2.2.4",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "safe-buffer": "5.1.1",
+            "yallist": "3.0.2"
+          }
+        },
+        "minizlib": {
+          "version": "1.1.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "minipass": "2.2.4"
+          }
+        },
+        "mkdirp": {
+          "version": "0.5.1",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "minimist": "0.0.8"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "needle": {
+          "version": "2.2.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "debug": "2.6.9",
+            "iconv-lite": "0.4.21",
+            "sax": "1.2.4"
+          }
+        },
+        "node-pre-gyp": {
+          "version": "0.10.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "detect-libc": "1.0.3",
+            "mkdirp": "0.5.1",
+            "needle": "2.2.0",
+            "nopt": "4.0.1",
+            "npm-packlist": "1.1.10",
+            "npmlog": "4.1.2",
+            "rc": "1.2.7",
+            "rimraf": "2.6.2",
+            "semver": "5.5.0",
+            "tar": "4.4.1"
+          }
+        },
+        "nopt": {
+          "version": "4.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "abbrev": "1.1.1",
+            "osenv": "0.1.5"
+          }
+        },
+        "npm-bundled": {
+          "version": "1.0.3",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "npm-packlist": {
+          "version": "1.1.10",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ignore-walk": "3.0.1",
+            "npm-bundled": "1.0.3"
+          }
+        },
+        "npmlog": {
+          "version": "4.1.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "are-we-there-yet": "1.1.4",
+            "console-control-strings": "1.1.0",
+            "gauge": "2.7.4",
+            "set-blocking": "2.0.0"
+          }
+        },
+        "number-is-nan": {
+          "version": "1.0.1",
+          "bundled": true,
+          "dev": true
+        },
+        "object-assign": {
+          "version": "4.1.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "once": {
+          "version": "1.4.0",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "wrappy": "1.0.2"
+          }
+        },
+        "os-homedir": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "os-tmpdir": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "osenv": {
+          "version": "0.1.5",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "os-homedir": "1.0.2",
+            "os-tmpdir": "1.0.2"
+          }
+        },
+        "path-is-absolute": {
+          "version": "1.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "process-nextick-args": {
+          "version": "2.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "rc": {
+          "version": "1.2.7",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "deep-extend": "0.5.1",
+            "ini": "1.3.5",
+            "minimist": "1.2.0",
+            "strip-json-comments": "2.0.1"
+          },
+          "dependencies": {
+            "minimist": {
+              "version": "1.2.0",
+              "bundled": true,
+              "dev": true,
+              "optional": true
+            }
+          }
+        },
+        "readable-stream": {
+          "version": "2.3.6",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "core-util-is": "1.0.2",
+            "inherits": "2.0.3",
+            "isarray": "1.0.0",
+            "process-nextick-args": "2.0.0",
+            "safe-buffer": "5.1.1",
+            "string_decoder": "1.1.1",
+            "util-deprecate": "1.0.2"
+          }
+        },
+        "rimraf": {
+          "version": "2.6.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "glob": "7.1.2"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.1",
+          "bundled": true,
+          "dev": true
+        },
+        "safer-buffer": {
+          "version": "2.1.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "sax": {
+          "version": "1.2.4",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "semver": {
+          "version": "5.5.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "set-blocking": {
+          "version": "2.0.0",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "signal-exit": {
+          "version": "3.0.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "string-width": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "code-point-at": "1.1.0",
+            "is-fullwidth-code-point": "1.0.0",
+            "strip-ansi": "3.0.1"
+          }
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "safe-buffer": "5.1.1"
+          }
+        },
+        "strip-ansi": {
+          "version": "3.0.1",
+          "bundled": true,
+          "dev": true,
+          "requires": {
+            "ansi-regex": "2.1.1"
+          }
+        },
+        "strip-json-comments": {
+          "version": "2.0.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "tar": {
+          "version": "4.4.1",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chownr": "1.0.1",
+            "fs-minipass": "1.2.5",
+            "minipass": "2.2.4",
+            "minizlib": "1.1.0",
+            "mkdirp": "0.5.1",
+            "safe-buffer": "5.1.1",
+            "yallist": "3.0.2"
+          }
+        },
+        "util-deprecate": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true
+        },
+        "wide-align": {
+          "version": "1.1.2",
+          "bundled": true,
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "string-width": "1.0.2"
+          }
+        },
+        "wrappy": {
+          "version": "1.0.2",
+          "bundled": true,
+          "dev": true
+        },
+        "yallist": {
+          "version": "3.0.2",
+          "bundled": true,
+          "dev": true
+        }
+      }
+    },
     "function-bind": {
       "version": "1.1.0",
       "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.0.tgz",
@@ -5012,6 +5602,13 @@
       "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=",
       "dev": true
     },
+    "nan": {
+      "version": "2.11.1",
+      "resolved": "http://registry.npm.taobao.org/nan/download/nan-2.11.1.tgz",
+      "integrity": "sha1-kOIrzLjKV+pM03zIPTgZtS7qZ2Y=",
+      "dev": true,
+      "optional": true
+    },
     "nanomatch": {
       "version": "1.2.7",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.7.tgz",
@@ -6282,6 +6879,11 @@
         "utila": "0.4.0"
       }
     },
+    "printj": {
+      "version": "1.1.2",
+      "resolved": "http://registry.npm.taobao.org/printj/download/printj-1.1.2.tgz",
+      "integrity": "sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
+    },
     "private": {
       "version": "0.1.7",
       "resolved": "http://registry.npm.taobao.org/private/download/private-0.1.7.tgz",
@@ -7993,6 +8595,14 @@
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
       "dev": true
     },
+    "ssf": {
+      "version": "0.10.2",
+      "resolved": "http://registry.npm.taobao.org/ssf/download/ssf-0.10.2.tgz",
+      "integrity": "sha1-ZbK0/N/ZZ7yOg4OkE0kAmJMRWXY=",
+      "requires": {
+        "frac": "1.1.2"
+      }
+    },
     "sshpk": {
       "version": "1.13.1",
       "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.13.1.tgz",
@@ -9215,6 +9825,7 @@
             "anymatch": "2.0.0",
             "async-each": "1.0.1",
             "braces": "2.3.0",
+            "fsevents": "1.2.4",
             "glob-parent": "3.1.0",
             "inherits": "2.0.3",
             "is-binary-path": "1.0.1",
@@ -9596,6 +10207,35 @@
       "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
       "dev": true
     },
+    "xlsx": {
+      "version": "0.13.5",
+      "resolved": "http://registry.npm.taobao.org/xlsx/download/xlsx-0.13.5.tgz",
+      "integrity": "sha1-ZYJroZRMb01sAjt+tsiea24Ncbc=",
+      "requires": {
+        "adler-32": "1.2.0",
+        "cfb": "1.0.8",
+        "codepage": "1.14.0",
+        "commander": "2.15.1",
+        "crc-32": "1.2.0",
+        "exit-on-epipe": "1.0.1",
+        "ssf": "0.10.2"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.15.1",
+          "resolved": "http://registry.npm.taobao.org/commander/download/commander-2.15.1.tgz",
+          "integrity": "sha1-30boZ9D8Kuxmo0ZitAapzK//Ww8="
+        }
+      }
+    },
+    "xlsx-oc": {
+      "version": "1.0.2",
+      "resolved": "http://registry.npm.taobao.org/xlsx-oc/download/xlsx-oc-1.0.2.tgz",
+      "integrity": "sha1-KH4xymWL8jDkgXbfC185R5EjOfw=",
+      "requires": {
+        "xlsx": "0.13.5"
+      }
+    },
     "xml-char-classes": {
       "version": "1.0.0",
       "resolved": "http://registry.npm.taobao.org/xml-char-classes/download/xml-char-classes-1.0.0.tgz",

+ 2 - 1
package.json

@@ -58,6 +58,7 @@
     "react-dom": "^15.4.1",
     "react-pdf": "^1.6.1",
     "react-quill": "^1.0.0",
-    "viewer": "^0.10.11"
+    "viewer": "^0.10.11",
+    "xlsx-oc": "^1.0.2"
   }
 }

+ 7 - 1
webpack.config.js

@@ -226,7 +226,7 @@ module.exports = (function () {
         }),
         //admin-idea
         new HtmlWebpackPlugin({
-            title: '管理员-科技思想管理',
+            title: '管理员-财务管理',
             filename: 'admin/idea.html',
             template: './template/template.html',
             chunks: ['admin/idea', 'vendors']
@@ -249,6 +249,12 @@ module.exports = (function () {
             filename: 'admin/operate.html',
             template: './template/template.html',
             chunks: ['admin/operate', 'vendors']
+        }),//statistics
+        new HtmlWebpackPlugin({
+            title: '管理员-数据统计',
+            filename: 'admin/statistics.html',
+            template: './template/template.html',
+            chunks: ['admin/statistics', 'vendors']
         }),
         //portal 门户
         // new HtmlWebpackPlugin({

+ 5 - 0
webpack/entry.config.js

@@ -36,6 +36,7 @@ module.exports = {
     'admin/userOrder': './js/admin/userOrder.js',
     'admin/order': './js/admin/order.js',
     'admin/operate': './js/admin/operate.js',
+    'admin/statistics': './js/admin/statistics.js',
     //portal  门户
     // 'portal/search/demand': './js/portal/search/demand.js',
     // 'portal/search/achievement': './js/portal/search/achievement.js',
@@ -166,6 +167,10 @@ module.exports = {
       'webpack/hot/only-dev-server',
       './js/admin/servicesManage/projectOrder.js'
     ],
+    'admin/statistics': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
+    'webpack/hot/only-dev-server',
+    './js/admin/statistics.js'
+    ],
     //portal  门户
     // 'portal/search/demand': ['webpack-dev-server/client?http://127.0.0.1:80', // WebpackDevServer host and port
     //   'webpack/hot/only-dev-server',