|
@@ -177,11 +177,13 @@ const CustomerList = React.createClass({
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
+ type: this.state.type,
|
|
|
mobile: this.state.searchLoginId, //登录名
|
|
|
email: this.state.searchEmail,
|
|
|
- createTime: this.state.searchTime,
|
|
|
+ startCreateTime: this.state.searchTime[0],
|
|
|
+ endCreateTime: this.state.searchTime[1],
|
|
|
number: this.state.searchAftId, //阿凡提号
|
|
|
- unitName: this.state.searchUnitName,
|
|
|
+ auditName: this.state.searchName,
|
|
|
auditStatus: this.state.searchAuditStatus
|
|
|
},
|
|
|
success: function (data) {
|
|
@@ -189,24 +191,24 @@ const CustomerList = React.createClass({
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
|
- return;
|
|
|
- };
|
|
|
- for (let i = 0; i < data.data.length; i++) {
|
|
|
- let thisdata = data.data[i];
|
|
|
- this.state.data.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
- type: thisdata.type,
|
|
|
- mobile: thisdata.mobile,
|
|
|
- email: thisdata.email,
|
|
|
- createTime: thisdata.createTime,
|
|
|
- aftUsername: thisdata.aftUsername,
|
|
|
- number: thisdata.number,
|
|
|
- auditStatus: thisdata.type == 0 ? thisdata.userAuditStatus : thisdata.orgAuditStatus,
|
|
|
- createTimeFormattedDate: thisdata.createTimeFormattedDate,
|
|
|
- adminName: thisdata.adminName,
|
|
|
- theName: thisdata.type == 0 ? thisdata.username : thisdata.unitName
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ this.state.data.push({
|
|
|
+ key: i,
|
|
|
+ id: thisdata.id,
|
|
|
+ type: thisdata.type,
|
|
|
+ mobile: thisdata.mobile,
|
|
|
+ email: thisdata.email,
|
|
|
+ createTime: thisdata.createTime,
|
|
|
+ aftUsername: thisdata.aftUsername,
|
|
|
+ number: thisdata.number,
|
|
|
+ auditStatus: thisdata.type == 0 ? thisdata.userAuditStatus : thisdata.orgAuditStatus,
|
|
|
+ createTimeFormattedDate: thisdata.createTimeFormattedDate,
|
|
|
+ adminName: thisdata.adminName,
|
|
|
+ theName: thisdata.type == 0 ? thisdata.username : thisdata.unitName
|
|
|
+ });
|
|
|
+ };
|
|
|
};
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
|
this.state.pagination.total = data.data.totalCount;
|
|
@@ -226,7 +228,8 @@ const CustomerList = React.createClass({
|
|
|
searchMore: true,
|
|
|
data: [],
|
|
|
loading: false,
|
|
|
- searchTime: [,],
|
|
|
+ type: "1",
|
|
|
+ searchTime: [],
|
|
|
pagination: {
|
|
|
defaultCurrent: 1,
|
|
|
defaultPageSize: 10,
|
|
@@ -250,8 +253,8 @@ const CustomerList = React.createClass({
|
|
|
key: 'mobile',
|
|
|
}, {
|
|
|
title: '用户名称',
|
|
|
- dataIndex: 'theName',
|
|
|
- key: 'theName',
|
|
|
+ dataIndex: 'aftUsername',
|
|
|
+ key: 'aftUsername',
|
|
|
}, {
|
|
|
title: '认证状态',
|
|
|
dataIndex: 'auditStatus',
|
|
@@ -263,8 +266,8 @@ const CustomerList = React.createClass({
|
|
|
key: 'createTimeFormattedDate',
|
|
|
}, {
|
|
|
title: '认证名称',
|
|
|
- dataIndex: 'aftUsername',
|
|
|
- key: 'aftUsername',
|
|
|
+ dataIndex: 'theName',
|
|
|
+ key: 'theName',
|
|
|
}, {
|
|
|
title: '联系方式',
|
|
|
dataIndex: 'email',
|
|
@@ -321,7 +324,7 @@ const CustomerList = React.createClass({
|
|
|
this.state.searchAftId = undefined;
|
|
|
this.state.searchLoginId = undefined;
|
|
|
this.state.searchAuditStatus = undefined;
|
|
|
- this.state.searchUnitName = undefined;
|
|
|
+ this.state.searchName = undefined;
|
|
|
this.state.searchEmail = undefined;
|
|
|
this.state.searchTime = [];
|
|
|
this.loadData();
|
|
@@ -344,6 +347,12 @@ const CustomerList = React.createClass({
|
|
|
<UserAdd closeDesc={this.closeDesc} />
|
|
|
</div>
|
|
|
<div className="user-search">
|
|
|
+ <Select placeholder="选择用户类型" style={{ width: 100 }}
|
|
|
+ value={this.state.type}
|
|
|
+ onChange={(e) => { this.setState({ type: e }) }}>
|
|
|
+ <Select.Option value="1" >组织用户</Select.Option>
|
|
|
+ <Select.Option value="0" >个人用户</Select.Option>
|
|
|
+ </Select>
|
|
|
<Input placeholder="阿凡提号" value={this.state.searchAftId}
|
|
|
onChange={(e) => { this.setState({ searchAftId: e.target.value }); }} />
|
|
|
<Input placeholder="登录号" value={this.state.searchLoginId}
|
|
@@ -357,8 +366,8 @@ const CustomerList = React.createClass({
|
|
|
})
|
|
|
}
|
|
|
</Select>
|
|
|
- <Input placeholder="公司名称" value={this.state.searchUnitName}
|
|
|
- onChange={(e) => { this.setState({ searchUnitName: e.target.value }); }} />
|
|
|
+ <Input placeholder="客户名称" value={this.state.searchName}
|
|
|
+ onChange={(e) => { this.setState({ searchName: e.target.value }); }} />
|
|
|
<Input placeholder="联系方式" value={this.state.searchEmail}
|
|
|
onChange={(e) => { this.setState({ searchEmail: e.target.value }); }} />
|
|
|
<Button type="primary" onClick={this.search}>搜索</Button>
|