|
@@ -447,7 +447,15 @@ const IndividualCustomer = Form.create()(React.createClass({
|
|
return <Input value={record.position} placeholder="联系人职务" key={record.id}
|
|
return <Input value={record.position} placeholder="联系人职务" key={record.id}
|
|
onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
|
|
}
|
|
}
|
|
- }, {
|
|
|
|
|
|
+ }, {
|
|
|
|
+ title: '主要联系人',
|
|
|
|
+ dataIndex: 'major',
|
|
|
|
+ width:100,
|
|
|
|
+ key: 'major',
|
|
|
|
+ render:(text) => {
|
|
|
|
+ return text?'是':"否"
|
|
|
|
+ }
|
|
|
|
+ },{
|
|
title: '手机号码',
|
|
title: '手机号码',
|
|
dataIndex: 'mobile',
|
|
dataIndex: 'mobile',
|
|
key: 'mobile',
|
|
key: 'mobile',
|
|
@@ -485,11 +493,13 @@ const IndividualCustomer = Form.create()(React.createClass({
|
|
dataIndex: 'dels',
|
|
dataIndex: 'dels',
|
|
key: 'dels',
|
|
key: 'dels',
|
|
render: (text, record, index) => {
|
|
render: (text, record, index) => {
|
|
- return <div>
|
|
|
|
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
|
- <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
|
- </Popconfirm>
|
|
|
|
- </div>
|
|
|
|
|
|
+ return <div>{adminData.isSuperAdmin ?
|
|
|
|
+ <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
|
+ <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
|
+ </Popconfirm>
|
|
|
|
+ :''}
|
|
|
|
+ {record.name?<Button style={{marginRight:'10px',color:'#ffffff',background:'green',border:'none'}} onClick={(e)=>{e.stopPropagation(),this.mainContact(record)}}>设为主要联系人</Button>:''}
|
|
|
|
+ </div>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
],
|
|
@@ -600,7 +610,32 @@ const IndividualCustomer = Form.create()(React.createClass({
|
|
searchTime: [, ]
|
|
searchTime: [, ]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ //选择主要联系人
|
|
|
|
+ mainContact(record){
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: true
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "get",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + "/api/admin/customer/updateMainContact",
|
|
|
|
+ data: {
|
|
|
|
+ uid:this.state.rowId,
|
|
|
|
+ ocbId: record.id
|
|
|
|
+ }
|
|
|
|
+ }).done(function(data) {
|
|
|
|
+ if(!data.error.length) {
|
|
|
|
+ message.success('设为主要联系人成功!');
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ };
|
|
|
|
+ this.contactLists(this.state.rowId);
|
|
|
|
+ }.bind(this));
|
|
|
|
+ },
|
|
//更多操作
|
|
//更多操作
|
|
ModalOperation() {
|
|
ModalOperation() {
|
|
this.setState({
|
|
this.setState({
|
|
@@ -2263,7 +2298,7 @@ const IndividualCustomer = Form.create()(React.createClass({
|
|
<Modal
|
|
<Modal
|
|
className="customeDetails"
|
|
className="customeDetails"
|
|
title="个人客户详情"
|
|
title="个人客户详情"
|
|
- width='1200px'
|
|
|
|
|
|
+ width='1300px'
|
|
visible={this.state.modal5Visible}
|
|
visible={this.state.modal5Visible}
|
|
onOk={this.detailsModal}
|
|
onOk={this.detailsModal}
|
|
onCancel={this.detailsModal}
|
|
onCancel={this.detailsModal}
|