|
@@ -6,7 +6,7 @@ import moment from 'moment';
|
|
|
import { citySelect, provinceList } from '@/NewDicProvinceList';
|
|
|
import AddIntention from './addIntention.jsx';
|
|
|
import { socialAttribute, industry, auditStatusL, lvl, currentMember } from '@/dataDic.js';
|
|
|
-import { getSocialAttribute, beforeUploadFile } from '@/tools.js';
|
|
|
+import { getSocialAttribute, beforeUploadFile ,getLevel} from '@/tools.js';
|
|
|
import FollowDetail from './followDetail.jsx'
|
|
|
import IntentionDetail from './intentionDetail/intentionDetail.jsx'
|
|
|
import './customer.less';
|
|
@@ -27,6 +27,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
+ level:this.state.level?this.state.level:undefined,
|
|
|
name: this.state.nameSearch,
|
|
|
province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
|
|
|
city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
|
|
@@ -57,6 +58,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
surplusFollowTime:thisdata.surplusFollowTime&&thisdata.surplusFollowTime.split(' ')[0],
|
|
|
surplusSignTime:thisdata.surplusSignTime&&thisdata.surplusSignTime.split(' ')[0],
|
|
|
locationProvince: diqu,
|
|
|
+ level:thisdata.level,
|
|
|
});
|
|
|
};
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
@@ -183,9 +185,14 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
title: '剩余签单天数',
|
|
|
dataIndex: 'surplusSignTime',
|
|
|
key: 'surplusSignTime'
|
|
|
+ },{
|
|
|
+ title: '客户等级',
|
|
|
+ dataIndex: 'level',
|
|
|
+ key: 'level',
|
|
|
+ render:text => { return getLevel(text) }
|
|
|
},
|
|
|
{
|
|
|
- title: '操作',
|
|
|
+ title: '跟进操作',
|
|
|
dataIndex: 'abc',
|
|
|
key: 'abc',
|
|
|
render: (text, record, index) => {
|
|
@@ -203,7 +210,35 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
};
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+ rankO(rank){
|
|
|
+ let deletedIds;
|
|
|
+ for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
|
|
|
+ let rowItem = this.state.selectedRows[idx];
|
|
|
+ if(rowItem.id) {
|
|
|
+ deletedIds = rowItem.id;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/updateUserLevel",
|
|
|
+ data: {
|
|
|
+ id: deletedIds, //客户的ID
|
|
|
+ level:rank
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('操作成功!');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ this.loadData(this.state.ispage);
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
|
|
|
//进入新增拜访记录
|
|
|
visit(e) {
|
|
@@ -306,6 +341,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
reset() {
|
|
|
this.state.nameSearch = '';
|
|
|
+ this.state.level = undefined;
|
|
|
this.state.addressSearch = [];
|
|
|
this.state.provinceSearch = undefined;
|
|
|
this.state.citySearch = undefined;
|
|
@@ -486,11 +522,23 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
<Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
|
|
|
onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
|
|
|
</span>
|
|
|
+ <Select
|
|
|
+ style={{ width: 120 }}
|
|
|
+ value={this.state.level}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ level: e });
|
|
|
+ }}
|
|
|
+ placeholder="请选择客户等级"
|
|
|
+ >
|
|
|
+ <Select.Option value="0">一般客户</Select.Option>
|
|
|
+ <Select.Option value="1">意向客户</Select.Option>
|
|
|
+ <Select.Option value="2">重点客户</Select.Option>
|
|
|
+ </Select>
|
|
|
<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 }); }} />
|
|
|
- <Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
+ <Button type="primary" style={{marginLeft:"10px"}} onClick={this.search}>搜索</Button>
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
{/*<Button onClick={() => { window.open(globalConfig.context + '/api/admin/customer/downloadTemplate?type=1') }}>下载批量导入模板</Button>
|
|
|
<Upload
|
|
@@ -542,11 +590,11 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
<Input />
|
|
|
</AutoComplete>
|
|
|
<Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
|
|
|
- <span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch checked={!this.state.searchMore} onChange={this.searchSwitch} /></span>
|
|
|
<Button type="primary" className="addButton" onClick={this.addClick}>新增客户<Icon type="plus" /></Button>
|
|
|
<div className='clearfix' style={{marginTop:'5px'}}>
|
|
|
- <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
|
|
|
- </div>
|
|
|
+ <Button onClick={(e) =>{ e.stopPropagation(), this.rankO(0)}} type="primary" style={{marginRight:"10px"}} disabled={!hasSelected}>一般客户</Button>
|
|
|
+ <Button onClick={(e) =>{ e.stopPropagation(), this.rankO(1)}} type="primary" style={{marginRight:"10px"}} disabled={!hasSelected}>意向客户</Button>
|
|
|
+ <Button onClick={(e) =>{ e.stopPropagation(), this.rankO(2)}} type="primary" disabled={!hasSelected}>重点客户</Button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className="patent-table">
|