|
@@ -4,7 +4,7 @@ import ReactDom from 'react-dom';
|
|
|
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 ManagementDetaile from "../../order/settlementOrder/settlementManage/managementDetaile.2.jsx";
|
|
|
+// import ManagementDetaile from "../../order/settlementOrder/settlementManage/managementDetaile.2.jsx";
|
|
|
import moment from 'moment';
|
|
|
import '../../order/userMangagement.less';
|
|
|
import { orderState, orderChannel, orderType } from '../../../dataDic.js';
|
|
@@ -24,21 +24,11 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
- buyerName: this.state.buyerNameSearch,
|
|
|
depId: this.state.departmenttSearch, //部门
|
|
|
- salesmanName: this.state.salesmanNameSearch, //负责人
|
|
|
startTime: this.state.releaseDate[0],
|
|
|
endTime: this.state.releaseDate[1],
|
|
|
- liquidationStatus: this.state.liquidationStatusSearch, //结算
|
|
|
- orderStatus: this.state.orderStatusSearch,
|
|
|
- orderChannel: this.state.orderChannelSearch,
|
|
|
- financeName: this.state.financeNameSearchs,
|
|
|
- orderType: this.state.orderTypeSearch,
|
|
|
- orderNo: this.state.orderNoSearch,
|
|
|
- isDistributionFinance: this.state.isDistributionFinance
|
|
|
},
|
|
|
success: function(data) {
|
|
|
- console.log(data);
|
|
|
let theArr = [];
|
|
|
if(!data.data) {
|
|
|
if(data.error && data.error.length) {
|
|
@@ -141,11 +131,19 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
return '共' + total + '条数据';
|
|
|
}
|
|
|
},
|
|
|
+ paginationX: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 10,
|
|
|
+ onChange: function(page) {
|
|
|
+ this.xiangmu(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function(total) {
|
|
|
+ return '共' + total + '条数据';
|
|
|
+ }
|
|
|
+ },
|
|
|
columns: [{
|
|
|
- title: 'id',
|
|
|
- dataIndex: 'aid',
|
|
|
- key: 'aid'
|
|
|
- },{
|
|
|
title: '编号',
|
|
|
dataIndex: 'key',
|
|
|
key: 'key'
|
|
@@ -167,6 +165,7 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
key: 'timeCount'
|
|
|
}],
|
|
|
dataSource: [],
|
|
|
+ dataSourceX: [],
|
|
|
columnsX: [{
|
|
|
title: '客户ID',
|
|
|
dataIndex: 'id',
|
|
@@ -195,8 +194,8 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
title: '跟进时间',
|
|
|
dataIndex: 'followTime',
|
|
|
key: 'followTime',
|
|
|
- }],
|
|
|
- dataSourceX: [],
|
|
|
+ }]
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
//操作分配
|
|
@@ -295,13 +294,15 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
this.loadData();
|
|
|
},
|
|
|
tableRowClick(record, index) {
|
|
|
- this.state.RowData = record;
|
|
|
this.setState({
|
|
|
visible: true,
|
|
|
});
|
|
|
this.xiangmu(record.aid);
|
|
|
},
|
|
|
- xiangmu(aids) {
|
|
|
+ xiangmu(pageNo,aids) {
|
|
|
+ this.setState({
|
|
|
+ loading:true
|
|
|
+ })
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
@@ -311,31 +312,40 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
aid:aids,
|
|
|
},
|
|
|
success: function(data) {
|
|
|
+ console.log(data);
|
|
|
let theArr = [];
|
|
|
-
|
|
|
if(data.error.length || data.data.list == "") {
|
|
|
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];
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
theArr.push({
|
|
|
key: i,
|
|
|
id:thisdata.id,
|
|
|
- name:thisdata.name,//订单编号
|
|
|
- sourceName:thisdata.sourceName,//项目ID
|
|
|
- contacts:thisdata.contacts,//项目名称
|
|
|
- contactMobile:thisdata.contactMobile,//项目类别
|
|
|
- createTime:thisdata.createTime,//项目价格
|
|
|
- followTime:thisdata.followTime,//项目数量
|
|
|
- source:thisdata.source
|
|
|
+ name:thisdata.name,
|
|
|
+ sourceName:thisdata.sourceName,
|
|
|
+ contacts:thisdata.contacts,
|
|
|
+ contactMobile:thisdata.contactMobile,
|
|
|
+ createTime:thisdata.createTime,
|
|
|
+ followTime:thisdata.followTime,
|
|
|
});
|
|
|
};
|
|
|
+ this.state.paginationX.current = data.data.pageNo;
|
|
|
+ this.state.paginationX.total = data.data.totalCount;
|
|
|
};
|
|
|
+ if(!data.data.list.length) {
|
|
|
+ this.state.paginationX.current = 0
|
|
|
+ this.state.paginationX.total = 0
|
|
|
+ }
|
|
|
this.setState({
|
|
|
- dataSourceX: theArr,
|
|
|
- });
|
|
|
+ pageNo: pageNo,
|
|
|
+ dataSourceX: theArr,
|
|
|
+ paginationX: this.state.paginationX,
|
|
|
+ selectedRowKeys: [],
|
|
|
+ signBillVisible: false
|
|
|
+ });
|
|
|
}.bind(this),
|
|
|
}).always(function() {
|
|
|
this.setState({
|
|
@@ -380,19 +390,10 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
})
|
|
|
},
|
|
|
reset() {
|
|
|
- this.state.buyerNameSearch = '';
|
|
|
- this.state.financeNameSearchs = '';
|
|
|
- this.state.orderNoSearch = '';
|
|
|
this.state.releaseDate[0] = undefined;
|
|
|
this.state.releaseDate[1] = undefined;
|
|
|
- this.state.orderChannelSearch = undefined;
|
|
|
- this.state.liquidationStatusSearch = undefined;
|
|
|
- this.state.orderStatusSearch = undefined;
|
|
|
- this.state.salesmanNameSearch = undefined;
|
|
|
this.state.departmenttSearch = undefined;
|
|
|
this.state.approved = undefined;
|
|
|
- this.state.orderChannelSearch = undefined;
|
|
|
- this.state.orderTypeSearch = undefined;
|
|
|
this.state.isDistributionFinance = undefined;
|
|
|
this.loadData();
|
|
|
},
|
|
@@ -457,13 +458,14 @@ const AdminCustomerStatistics = Form.create()(React.createClass({
|
|
|
<Modal maskClosable={false} visible={this.state.visible}
|
|
|
onOk={this.visitOk} onCancel={this.visitCancel}
|
|
|
width='1000px'
|
|
|
- title='订单详情'
|
|
|
+ title='订单详情'
|
|
|
footer=''
|
|
|
className="admin-desc-content">
|
|
|
<div className="patent-table">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Table columns={this.state.columnsX}
|
|
|
- dataSource={this.state.dataSourceX} />
|
|
|
+ dataSource={this.state.dataSourceX}
|
|
|
+ pagination={this.state.paginationX} />
|
|
|
</Spin>
|
|
|
</div>
|
|
|
</Modal>
|