|
@@ -8,8 +8,8 @@ import { citySelect,provinceList,areaSelect} from '../../../NewDicProvinceList';
|
|
|
const { Column, ColumnGroup } = Table;
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
import CustomerDetail from './myClientDesc.jsx';
|
|
|
-import {socialAttribute,industryList,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
|
|
|
-import {getIndustryType,getSocialAttribute,getCompanyIntention,getContactType,getStatuslist,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
+import {socialAttribute,industry,newFollow,lvl,currentMember,cityArr, statuslist,customerStatus,intentionalService,sex} from '../../../dataDic.js';
|
|
|
+import {getIndustry,getSocialAttribute,getCompanyIntention,getContactType,getStatuslist,getfllowSituation,beforeUploadFile,getWhether,getcityArr,getcustomerStatue,getfllowSituationOn,getCertification,getcustomerTyp,getLvl,getCurrentMember,getprovince} from '../../../tools.js';
|
|
|
|
|
|
//图片组件
|
|
|
const PicturesWall = React.createClass({
|
|
@@ -65,36 +65,41 @@ const PicturesWall = React.createClass({
|
|
|
});
|
|
|
|
|
|
const PublicCustomer = Form.create()(React.createClass({
|
|
|
- loadData(pageNo, apiUrl) {
|
|
|
+ loadData(pageNo) {
|
|
|
this.state.data = [];
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
- });
|
|
|
+ });
|
|
|
$.ajax({
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
|
- crossDomain: false,
|
|
|
- url:globalConfig.context + '/api/admin/customer/listPrivateOrganizationCustomer',
|
|
|
+ crossDomain: false,
|
|
|
+ url:globalConfig.context + '/api/admin/customer/listAllOrganizationCustomer',
|
|
|
data: {
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: this.state.pagination.pageSize,
|
|
|
type: this.state.typeSearch, //名称1
|
|
|
name:this.state.nameSearch,
|
|
|
- province:this.state.addressSearch?this.state.addressSearch[0]:this.state.provinceSearch,
|
|
|
- city: this.state.addressSearch?this.state.addressSearch[1]:'',
|
|
|
+ shareType:this.state.shareTypeSearch,
|
|
|
+ province:(this.state.addressSearch).length?this.state.addressSearch[0]:this.state.provinceSearch,
|
|
|
+ city: (this.state.addressSearch).length?this.state.addressSearch[1]:'',
|
|
|
//area: this.state.addressSearch?this.state.addressSearch[2].value:'',
|
|
|
status:this.state.statusSearch,
|
|
|
industry:this.state.industrySearch,
|
|
|
serviceCertification:this.state.serviceCertificationSearch,
|
|
|
userCertification: this.state.userCertificationSearch,
|
|
|
currentMemberStatus:this.state.currentMemberStatusSearch,
|
|
|
+ international:this.state.internationalSearch,
|
|
|
lvl:this.state.lvlSearch,
|
|
|
+ international:this.state.internationalSearch,
|
|
|
+ societyTag:this.state.societyTagSearch,
|
|
|
listed:this.state.listedSearch, //是否上市
|
|
|
highTechZone:this.state.highTechZoneSearch, //是否高新
|
|
|
startDate: this.state.releaseDate[0],
|
|
|
endDate: this.state.releaseDate[1],
|
|
|
},
|
|
|
- success: function (data) {
|
|
|
+ success: function (data) {
|
|
|
+ console.log(data)
|
|
|
let theArr = [];
|
|
|
if (data.error.length || data.data.list=="") {
|
|
|
if (data.error && data.error.length) {
|
|
@@ -116,6 +121,9 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
serviceCertification:thisdata.serviceCertification,
|
|
|
userCertification:thisdata.userCertification,
|
|
|
lvl:thisdata.lvl,
|
|
|
+
|
|
|
+ shareType:thisdata.shareType,
|
|
|
+ societyTag:thisdata.societyTag,
|
|
|
currentMemberStatus:thisdata.currentMemberStatus,
|
|
|
international:thisdata.international,
|
|
|
listed:thisdata.listed,
|
|
@@ -123,9 +131,9 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
locationProvince:thisdata.province?thisdata.province+'-'+thisdata.city||''+'-'+thisdata.area :'--'
|
|
|
});
|
|
|
};
|
|
|
- this.state.pagination.current = data.data.pageNo;
|
|
|
- this.state.pagination.total = data.data.totalCount;
|
|
|
- };
|
|
|
+ };
|
|
|
+ this.state.pagination.current = data.data.pageNo;
|
|
|
+ this.state.pagination.total = data.data.totalCount;
|
|
|
this.setState({
|
|
|
dataSource: theArr,
|
|
|
pagination: this.state.pagination
|
|
@@ -167,6 +175,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
getInitialState() {
|
|
|
return {
|
|
|
+ addressSearch:[],
|
|
|
orgCodeUrl:[],
|
|
|
companyLogoUrl:[],
|
|
|
visible: false ,
|
|
@@ -232,7 +241,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'businessGlossoryId',
|
|
|
key: 'businessGlossoryId',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return adminData.isSuperAdmin?<Select placeholder="选择业务名称" disabled={record.id?true:false} value={record.businessGlossoryId} onChange={(e) => { record.businessGlossoryId = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
intentionalService.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -246,7 +255,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'followSituation',
|
|
|
key: 'followSituation',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return adminData.isSuperAdmin?<Select placeholder="选择最新进度" value={record.followSituation} onChange={(e) => { record.followSituation = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
newFollow.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -259,7 +268,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'customerStatus',
|
|
|
key: 'customerStatus',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
|
|
|
+ return adminData.isSuperAdmin?<Select value={record.customerStatus} placeholder="选择最新状态" onChange={(e) => { record.customerStatus = e; this.setState({ data: this.state.data }); }}>
|
|
|
{
|
|
|
customerStatus.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -272,7 +281,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'remarks',
|
|
|
key: 'remarks',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.remarks} placeholder="跟进说明"
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.remarks} placeholder="跟进说明"
|
|
|
onChange={(e) => { record.remarks = e.target.value; this.setState({ data: this.state.data }); }}
|
|
|
style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
@@ -281,7 +290,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'rrr',
|
|
|
key: 'rrr',
|
|
|
render: (text, record, index) => {
|
|
|
- return <div style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
|
|
|
+ return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
|
|
|
<Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
</Popconfirm>
|
|
@@ -370,8 +379,8 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
key: 'followTime'
|
|
|
},{
|
|
|
title: '客户名称',
|
|
|
- dataIndex: 'identityName',
|
|
|
- key: 'identityName'
|
|
|
+ dataIndex: 'identifyName',
|
|
|
+ key: 'identifyName'
|
|
|
},{
|
|
|
title: '拜访方式',
|
|
|
dataIndex: 'contactType',
|
|
@@ -399,7 +408,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'ttt',
|
|
|
key: 'ttt',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<div>
|
|
|
+ return adminData.isSuperAdmin?<div>
|
|
|
<Popconfirm title="是否删除?" onConfirm={(e)=>{this.visitDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}} onClick={(e)=>{e.stopPropagation()}}>删除</Button>
|
|
|
</Popconfirm>
|
|
@@ -413,7 +422,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.name} placeholder="姓名" key={record.id} required="required"
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.name} placeholder="姓名" key={record.id} required="required"
|
|
|
onChange={(e) => { record.name = e.target.value;
|
|
|
this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
@@ -422,7 +431,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'depatrment',
|
|
|
key: 'depatrment',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.depatrment} placeholder="联系人部门" key={record.id}
|
|
|
onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},{
|
|
@@ -430,7 +439,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'position',
|
|
|
key: 'position',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.position} placeholder="联系人职务" key={record.id}
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.position} placeholder="联系人职务" key={record.id}
|
|
|
onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},{
|
|
@@ -438,7 +447,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'mobile',
|
|
|
key: 'mobile',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.mobile} placeholder="手机号码" key={record.id} required="required"
|
|
|
onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},{
|
|
@@ -446,7 +455,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'wechat',
|
|
|
key: 'wechat',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.wechat} placeholder="微信" key={record.id}
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.wechat} placeholder="微信" key={record.id}
|
|
|
onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},{
|
|
@@ -454,7 +463,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'qq',
|
|
|
key: 'qq',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.qq} placeholder="联系人QQ" key={record.id}
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.qq} placeholder="联系人QQ" key={record.id}
|
|
|
onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},{
|
|
@@ -462,7 +471,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'email',
|
|
|
key: 'email',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<Input value={record.email} placeholder="电子邮箱" key={record.id}
|
|
|
+ return adminData.isSuperAdmin?<Input value={record.email} placeholder="电子邮箱" key={record.id}
|
|
|
onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>:<span>{text}</span>
|
|
|
}
|
|
|
},
|
|
@@ -471,7 +480,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'dels',
|
|
|
key: 'dels',
|
|
|
render: (text, record, index) => {
|
|
|
- return adminData.name=="管理员"?<div>
|
|
|
+ return adminData.isSuperAdmin?<div>
|
|
|
<Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
</Popconfirm>
|
|
@@ -505,10 +514,16 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
key: 'industry',
|
|
|
},
|
|
|
{
|
|
|
+ title: '社会性质',
|
|
|
+ dataIndex: 'societyTag',
|
|
|
+ key: 'societyTag',
|
|
|
+ render: text => { return getSocialAttribute(text) }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '公共客户',
|
|
|
- dataIndex: 'type',
|
|
|
- key: 'type',
|
|
|
- render: text => { return getWhether(text) }
|
|
|
+ dataIndex: 'shareType',
|
|
|
+ key: 'shareType',
|
|
|
+ render: (text ,record)=> { return record.shareType=='1'?<span>公共客户</span>:<span>个人客户</span> }
|
|
|
|
|
|
},
|
|
|
{
|
|
@@ -563,7 +578,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'abc',
|
|
|
key: 'abc',
|
|
|
render: (text, record, index) => {
|
|
|
- return record.publics?<div>
|
|
|
+ return record.shareType=='1'?<div>
|
|
|
<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
onClick={(e)=>{this.changeRow(record)}}>领取<Icon /></Button>
|
|
|
</div>:<span>无权限</span>
|
|
@@ -661,7 +676,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
contacts:thedata.contacts,
|
|
|
uid:thedata.uid,
|
|
|
data:listArr,
|
|
|
- identityName:thedata.identityName,
|
|
|
+ identifyName:thedata.identifyName,
|
|
|
followTime:thedata.followTime,
|
|
|
businessGlossoryId:thedata.businessGlossoryId,
|
|
|
followSituation:thedata.followSituation,
|
|
@@ -753,7 +768,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
nub:thedata.contactMobile,
|
|
|
result:thedata.result,
|
|
|
contactType:parseInt(thedata.contactType),
|
|
|
- identityName:thedata.identityName,
|
|
|
+ identifyName:thedata.identifyName,
|
|
|
followTime:thedata.followTime,
|
|
|
businessGlossoryId:thedata.businessGlossoryId,
|
|
|
followSituation:thedata.followSituation,
|
|
@@ -770,14 +785,15 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
|
|
|
//列表删除功能
|
|
|
delectRow() {
|
|
|
- let deletedIds;
|
|
|
+ let deletedIds;
|
|
|
for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
|
|
|
let rowItem = this.state.selectedRows[idx];
|
|
|
if (rowItem.id) {
|
|
|
deletedIds=rowItem.id;
|
|
|
};
|
|
|
- };
|
|
|
- this.setState({
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ loading:true,
|
|
|
selectedRowKeys: [],
|
|
|
});
|
|
|
$.ajax({
|
|
@@ -786,7 +802,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/customer/deleteCustomer",
|
|
|
data: {
|
|
|
- id: deletedIds,//删除的ID
|
|
|
+ uid: deletedIds,//删除的ID
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -916,10 +932,9 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/customer/transferToPublic",
|
|
|
+ url: globalConfig.context + "/api/admin/customer/receiveCustomer",
|
|
|
data: {
|
|
|
- id: uids.uid,
|
|
|
- AdminName:uids.adminName,
|
|
|
+ uid: uids.uid,
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -950,11 +965,11 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
});
|
|
|
//行业
|
|
|
let intentionalArr = [];
|
|
|
- industryList.map(function (item) {
|
|
|
+ industry.map(function (item) {
|
|
|
intentionalArr.push(
|
|
|
<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
)
|
|
|
- });
|
|
|
+ });
|
|
|
//会员等级
|
|
|
let lvlArr = [];
|
|
|
lvl.map(function (item) {
|
|
@@ -969,24 +984,18 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
)
|
|
|
});
|
|
|
- //客户状态
|
|
|
- let customerStatusArr = [];
|
|
|
- customerStatus.map(function (item) {
|
|
|
- customerStatusArr.push(
|
|
|
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
- )
|
|
|
- });
|
|
|
this.state.Provinces = Province;
|
|
|
this.state.intentionalOption = intentionalArr;
|
|
|
this.state.lvlArrOption = lvlArr;
|
|
|
this.state.currentMemberArrOption = currentMemberArr;
|
|
|
- this.state.customerStatusArrOption = customerStatusArr;
|
|
|
this.loadData();
|
|
|
},
|
|
|
search() {
|
|
|
this.loadData();
|
|
|
},
|
|
|
reset() {
|
|
|
+ this.state.internationalSearch=undefined;
|
|
|
+ this.state.shareTypeSearch=undefined;
|
|
|
this.state.typeSearch=undefined; //名称1
|
|
|
this.state.nameSearch='';
|
|
|
this.state.addressSearch=[];
|
|
@@ -1001,6 +1010,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
this.state.currentMemberStatusSearch=undefined;
|
|
|
this.state.lvlSearch=undefined;
|
|
|
this.state.listedSearch=undefined;
|
|
|
+ this.state.societyTagSearch=undefined;
|
|
|
this.state.highTechZoneSearch=undefined;
|
|
|
this.state.releaseDate[0]=undefined;
|
|
|
this.state.releaseDate[1]=undefined;
|
|
@@ -1076,7 +1086,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
uid: this.state.InformationUid,
|
|
|
societyTag:values.societyTag,
|
|
|
introduction:values.introduction,
|
|
|
- unitName:this.state.unitName,
|
|
|
+ identifyName:this.state.identifyName,
|
|
|
industry:this.state.industry,
|
|
|
locationProvince:(this.state.ProvinceCity)[0],//省-
|
|
|
locationCity:(this.state.ProvinceCity)[1],//市
|
|
@@ -1143,7 +1153,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
this.setState({
|
|
|
InformationId:thisData.id,
|
|
|
InformationUid:thisData.uid,
|
|
|
- unitName:thisData.unitName,
|
|
|
+ identifyName:thisData.identifyName,
|
|
|
listed:thisData.listed,
|
|
|
highTechZone:thisData.highTechZone,
|
|
|
orgCodeUrl: thisData.orgCodeUrl ? splitUrl(thisData.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
@@ -1420,13 +1430,42 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
//点击新增详情
|
|
|
newContacts(){
|
|
|
- this.setState({
|
|
|
+ this.setState({
|
|
|
+ uids:this.state.uid,
|
|
|
addcontactModul:true
|
|
|
- });
|
|
|
+ });
|
|
|
},
|
|
|
//新增联系人保存函数
|
|
|
- submitcontactman(e){
|
|
|
- e.preventDafault();
|
|
|
+ submitcontactman(){
|
|
|
+ this.setState({
|
|
|
+ loading:true
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/addOneContact",
|
|
|
+ data:{
|
|
|
+ uid:this.state.uids,
|
|
|
+ name:this.state.newname,
|
|
|
+ mobile:this.state.newmobile,
|
|
|
+ email:this.state.newemail,
|
|
|
+ wechat:this.state.newwechat,
|
|
|
+ depatrment:this.state.newdepatrment,
|
|
|
+ position:this.state.newposition,
|
|
|
+ sex:this.state.newsex,
|
|
|
+ qq:this.state.newqq
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
},
|
|
|
//获取联系人下拉框
|
|
|
getNewWoman(ids) {
|
|
@@ -1580,7 +1619,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
theArr.push({
|
|
|
followId:thisdata.followId,
|
|
|
followTime:thisdata.followTime,
|
|
|
- identityName:thisdata.identityName,
|
|
|
+ identifyName:thisdata.identifyName,
|
|
|
contacts:thisdata.contacts,
|
|
|
contactMobile:thisdata.contactMobile,
|
|
|
result:thisdata.result,
|
|
@@ -1633,7 +1672,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
theArr.push({
|
|
|
followId:thisdata.followId,
|
|
|
followTime:thisdata.followTime,
|
|
|
- identityName:thisdata.identityName,
|
|
|
+ identifyName:thisdata.identifyName,
|
|
|
contacts:thisdata.contacts,
|
|
|
contactMobile:thisdata.contactMobile,
|
|
|
result:thisdata.result,
|
|
@@ -1850,6 +1889,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
this.state.data = {};
|
|
|
this.state.companyLogoUrl = [];
|
|
|
this.state.orgCodeUrl = [];
|
|
|
+ this.loadData(null);
|
|
|
|
|
|
};
|
|
|
},
|
|
@@ -1906,7 +1946,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<span>我的客户</span>
|
|
|
</div>
|
|
|
<div className="user-search">
|
|
|
- <Input placeholder="公司名称"
|
|
|
+ <Input placeholder="客户名称"
|
|
|
value={this.state.nameSearch}
|
|
|
onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
|
|
|
<Select placeholder="省"
|
|
@@ -1919,9 +1959,17 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
|
|
|
onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
|
|
|
</span>
|
|
|
+ <span style={{marginRight:'10px'}}>客户类型:</span>
|
|
|
+ <Select placeholder="选择客户类型"
|
|
|
+ style={{ width: 100 }}
|
|
|
+ value={this.state.shareTypeSearch}
|
|
|
+ onChange={(e) => { this.setState({ shareTypeSearch: e }) }}>
|
|
|
+ <Select.Option value="" >所有客户</Select.Option>
|
|
|
+ <Select.Option value="1" >公共客户</Select.Option>
|
|
|
+ </Select>
|
|
|
<Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
- <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.name=="管理员"?'inline-block':'none'}}
|
|
|
+ <Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.isSuperAdmin?'inline-block':'none'}}
|
|
|
disabled={!hasSelected}
|
|
|
onClick={this.delectRow}>删除<Icon type="minus" />
|
|
|
</Button>
|
|
@@ -1932,11 +1980,12 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
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 }); }} />
|
|
|
- <Select placeholder="客户状态"
|
|
|
+ <Select placeholder="账户状态"
|
|
|
style={{ width: 100 }}
|
|
|
value={this.state.statusSearch}
|
|
|
onChange={(e) => { this.setState({ statusSearch: e }) }}>
|
|
|
- {this.state.customerStatusArrOption}
|
|
|
+ <Select.Option value="0" >正常</Select.Option>
|
|
|
+ <Select.Option value="2" >锁定</Select.Option>
|
|
|
</Select>
|
|
|
<Select placeholder="行业"
|
|
|
style={{ width: 100 }}
|
|
@@ -1989,14 +2038,23 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
value={this.state.lvlSearch}
|
|
|
onChange={(e) => { this.setState({ lvlSearch: e }) }}>
|
|
|
{this.state.lvlArrOption}
|
|
|
- </Select>
|
|
|
-
|
|
|
+ </Select>
|
|
|
<Select placeholder="会员状态"
|
|
|
style={{ width: 100 }}
|
|
|
value={this.state.currentMemberStatusSearch}
|
|
|
onChange={(e) => { this.setState({ currentMemberStatusSearch: e }) }}>
|
|
|
{this.state.currentMemberArrOption}
|
|
|
</Select>
|
|
|
+ <Select placeholder="社会性质"
|
|
|
+ style={{ width: 100 }}
|
|
|
+ value={this.state.societyTagSearch}
|
|
|
+ onChange={(e) => { this.setState({ societyTagSearch: e }) }}>
|
|
|
+ {
|
|
|
+ socialAttribute.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -2021,7 +2079,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
>
|
|
|
<Tabs defaultActiveKey="1" onChange={this.callback}>
|
|
|
<TabPane tab="基本信息" key="1">
|
|
|
- {adminData.name=="管理员"?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
|
|
|
+ {adminData.isSuperAdmin?<Form horizontal onSubmit={this.newSubmit} id="demand-form">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div className="clearfix" style={{paddingLeft:'60px'}}>
|
|
|
<FormItem className="half-item"
|
|
@@ -2029,7 +2087,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="客户名称"
|
|
|
>
|
|
|
- <span>{theInformation.unitName}</span>
|
|
|
+ <span>{theInformation.identifyName}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix" style={{paddingLeft:'60px'}}>
|
|
@@ -2044,7 +2102,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
})(
|
|
|
<Select placeholder="选择行业" >
|
|
|
{
|
|
|
- industryList.map(function (item) {
|
|
|
+ industry.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
@@ -2267,7 +2325,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="客户名称"
|
|
|
>
|
|
|
- <span>{theInformation.unitName}</span>
|
|
|
+ <span>{theInformation.identifyName}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix" style={{paddingLeft:'60px'}}>
|
|
@@ -2276,7 +2334,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="行业"
|
|
|
>
|
|
|
- <span>{getIndustryType(String(theInformation.industry))}</span>
|
|
|
+ <span>{getIndustry(String(theInformation.industry))}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
@@ -2442,7 +2500,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
</TabPane>
|
|
|
<TabPane tab="联系人信息" key="2">
|
|
|
<div className="clearfix" >
|
|
|
- <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.name=="管理员"?'inline-block':'none'}}>新增</Button>
|
|
|
+ <Button className="ContactsList" type="primary" onClick={this.addcontact} style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>新增</Button>
|
|
|
</div>
|
|
|
<div className="clearfix">
|
|
|
<Spin spinning={this.state.loading}>
|
|
@@ -2452,7 +2510,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
columns={this.state.ContactsLists}
|
|
|
dataSource={this.state.contactList}
|
|
|
/>
|
|
|
- <div className="clearfix" style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
|
|
|
+ <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
|
|
|
<Button type="primary" htmlType="submit" style={{fontSize:'16px',margin:'20px 25px 40px 120px'}}>保存</Button>
|
|
|
<Button type="ghost" onClick={this.detailsModal} style={{fontSize:'18px'}}>取消</Button>
|
|
|
</div>
|
|
@@ -2468,19 +2526,19 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="注册手机号" >
|
|
|
- {adminData.name=="管理员"?<div><Input value={this.state.mobile} onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
|
|
|
+ {adminData.isSuperAdmin?<div><Input value={this.state.mobile} onChange={(e) => { this.setState({ mobile: e.target.value }); }} style={{width:'200px',marginRight:'50px'}}/>
|
|
|
<Button onClick={this.modifyPassworld}>修改密码</Button></div>:<span>{this.state.mobile}</span>}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="注册用户名" >
|
|
|
- {adminData.name=="管理员"?<Input value={this.state.nickname}
|
|
|
+ {adminData.isSuperAdmin?<Input value={this.state.nickname}
|
|
|
onChange={(e) => { this.setState({ nickname: e.target.value }); }} />:<span>{this.state.nickname}</span>}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="注册邮箱" >
|
|
|
- {adminData.name=="管理员"?<Input value={this.state.email}
|
|
|
+ {adminData.isSuperAdmin?<Input value={this.state.email}
|
|
|
onChange={(e) => { this.setState({ email: e.target.value }); }} />:<span>{this.state.nickname}</span>}
|
|
|
</FormItem>
|
|
|
</div>
|
|
@@ -2503,7 +2561,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="账户状态"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
|
|
|
+ {adminData.isSuperAdmin?<Select placeholder="账户状态" value={this.state.status} onChange={(e) => { this.setState({ status: e }); }} >
|
|
|
{
|
|
|
statuslist.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -2516,7 +2574,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="会员"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Radio.Group value={this.state.isMember} onChange={(e) => {
|
|
|
+ {adminData.isSuperAdmin?<Radio.Group value={this.state.isMember} onChange={(e) => {
|
|
|
this.setState({ isMember: e.target.value })
|
|
|
}}>
|
|
|
<Radio value={0}>否</Radio>
|
|
@@ -2527,7 +2585,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="会员等级"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
|
|
|
+ {adminData.isSuperAdmin?<Select placeholder="客户状态" value={this.state.lvl} onChange={(e) => { this.setState({ lvl: e }); }} >
|
|
|
{
|
|
|
lvl.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -2539,7 +2597,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="会员状态"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
|
|
|
+ {adminData.isSuperAdmin?<Select placeholder="会员状态" value={this.state.currentMemberStatus} onChange={(e) => { this.setState({ currentMemberStatus: e }); }} >
|
|
|
{
|
|
|
currentMember.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -2552,7 +2610,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="业务认证"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Radio.Group value={this.state.serviceCertification} onChange={(e) => {
|
|
|
+ {adminData.isSuperAdmin?<Radio.Group value={this.state.serviceCertification} onChange={(e) => {
|
|
|
this.setState({ serviceCertification: e.target.value })
|
|
|
}}>
|
|
|
<Radio value={0}>未认证</Radio>
|
|
@@ -2563,14 +2621,14 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="实名认证"
|
|
|
>
|
|
|
- {adminData.name=="管理员"?<Radio.Group value={this.state.userCertification} onChange={(e) => {
|
|
|
+ {adminData.isSuperAdmin?<Radio.Group value={this.state.userCertification} onChange={(e) => {
|
|
|
this.setState({ userCertification: e.target.value })
|
|
|
}}>
|
|
|
<Radio value={0}>未认证</Radio>
|
|
|
<Radio value={1}>已认证</Radio>
|
|
|
</Radio.Group>:<span>{this.state.isMember?'是':'否'}</span>}
|
|
|
</FormItem>
|
|
|
- <div className="clearfix" style={{display:adminData.name=="管理员"?'inline-block':'none'}}>
|
|
|
+ <div className="clearfix" style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
|
|
|
<Button className='saveBtn' type="primary" htmlType="submit">保存</Button>
|
|
|
<Button type="ghost" onClick={this.detailsModal}>取消</Button>
|
|
|
</div>
|
|
@@ -2625,7 +2683,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
onCancel={this.visitCancel}
|
|
|
>
|
|
|
<Form horizontal id="demand-form" onSubmit={this.visitSubmit}>
|
|
|
- {adminData.name=="管理员"?<Spin spinning={this.state.loading}>
|
|
|
+ {adminData.isSuperAdmin?<Spin spinning={this.state.loading}>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -2650,7 +2708,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="客户名称"
|
|
|
>
|
|
|
- <span>{this.state.identityName}</span>
|
|
|
+ <span>{this.state.identifyName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -2726,7 +2784,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="客户名称"
|
|
|
>
|
|
|
- <span>{this.state.identityName}</span>
|
|
|
+ <span>{this.state.identifyName}</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -2826,76 +2884,60 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<Form horizontal onSubmit={this.submitcontactman} id="demand-form">
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Row>
|
|
|
- <FormItem
|
|
|
- labelCol={{ span: 4 }}
|
|
|
- wrapperCol={{ span: 14 }}
|
|
|
- label="是否是主要联系人:" style={{marginRight:'10px'}}>
|
|
|
- <Radio.Group value={this.state.hotst} onChange={(e) => {
|
|
|
- this.setState({ hotst: e.target.value })
|
|
|
- }}>
|
|
|
- <Radio value={0}>是</Radio>
|
|
|
- <Radio value={1}>否</Radio>
|
|
|
- </Radio.Group>
|
|
|
- </FormItem>
|
|
|
<FormItem
|
|
|
- labelCol={{ span: 4 }}
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
wrapperCol={{ span: 14 }}
|
|
|
label="性别:" style={{marginRight:'10px',marginTop: '-15px'}}>
|
|
|
- <Radio.Group value={this.state.hott} onChange={(e) => {
|
|
|
- this.setState({ hott: e.target.value })
|
|
|
+ <Radio.Group value={this.state.newsex} onChange={(e) => {
|
|
|
+ this.setState({ newsex: e.target.value })
|
|
|
}}>
|
|
|
- <Radio value={0}>男</Radio>
|
|
|
- <Radio value={1}>女</Radio>
|
|
|
+ <Radio value='男'>男</Radio>
|
|
|
+ <Radio value='女'>女</Radio>
|
|
|
</Radio.Group>
|
|
|
</FormItem>
|
|
|
</Row>
|
|
|
<Row style={{ paddingLeft:'50px' }}>
|
|
|
- <Col span={2}>姓名:</Col>
|
|
|
+ <Col span={2}><span style={{color:'red'}}>*</span>姓名:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.paymentIdt} required="required"
|
|
|
- onChange={(e) => { this.setState({ paymentIdt: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newname} required="required"
|
|
|
+ onChange={(e) => { this.setState({ newname: e.target.value }) }} />
|
|
|
</Col>
|
|
|
- <Col span={2} style={{ marginLeft: '50px' }}>QQ号:</Col>
|
|
|
+ <Col span={2} style={{ marginLeft: '50px' }}><span style={{color:'red'}}>*</span>手机:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.entIdt}
|
|
|
- onChange={(e) => { this.setState({ entIdt: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newmobile} required="required"
|
|
|
+ onChange={(e) => { this.setState({ newmobile: e.target.value }) }} />
|
|
|
</Col>
|
|
|
+
|
|
|
</Row>
|
|
|
<Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
|
|
|
- <Col span={2}>手机号:</Col>
|
|
|
- <Col span={8}>
|
|
|
- <Input value={this.state.payt} required="required"
|
|
|
- onChange={(e) => { this.setState({ payt: e.target.value }) }} />
|
|
|
+ <Col span={2}>微信:</Col>
|
|
|
+ <Col span={8}>
|
|
|
+ <Input value={this.state.newwechat}
|
|
|
+ onChange={(e) => { this.setState({ newwechat: e.target.value }) }} />
|
|
|
</Col>
|
|
|
- <Col span={2} style={{ marginLeft: '50px' }}>座机号:</Col>
|
|
|
+ <Col span={2} style={{ marginLeft: '50px' }}>Q Q:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.paymt}
|
|
|
- onChange={(e) => { this.setState({ paymt: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newqq}
|
|
|
+ onChange={(e) => { this.setState({ newqq: e.target.value }) }} />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
-
|
|
|
<Row style={{ marginTop: '20px' ,paddingLeft:'50px'}}>
|
|
|
<Col span={2}>部门:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.paytIdtt}
|
|
|
- onChange={(e) => { this.setState({ paytIdtt: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newdepatrment}
|
|
|
+ onChange={(e) => { this.setState({ newdepatrment: e.target.value }) }} />
|
|
|
</Col>
|
|
|
<Col span={2} style={{ marginLeft: '50px' }}>职位:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.paentIdt}
|
|
|
- onChange={(e) => { this.setState({ paentIdt: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newposition}
|
|
|
+ onChange={(e) => { this.setState({ newposition: e.target.value }) }} />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row style={{ marginTop: '20px',paddingLeft:'50px' }}>
|
|
|
- <Col span={2}>微信号:</Col>
|
|
|
- <Col span={8}>
|
|
|
- <Input value={this.state.payIdt}
|
|
|
- onChange={(e) => { this.setState({ payIdt: e.target.value }) }} />
|
|
|
- </Col>
|
|
|
- <Col span={2} style={{ marginLeft: '50px' }}>邮箱:</Col>
|
|
|
+ <Col span={2}>邮箱:</Col>
|
|
|
<Col span={8}>
|
|
|
- <Input value={this.state.emailst}
|
|
|
- onChange={(e) => { this.setState({ emailst: e.target.value }) }} />
|
|
|
+ <Input value={this.state.newemail}
|
|
|
+ onChange={(e) => { this.setState({ newemail: e.target.value }) }} />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row style={{ marginTop: '20px',paddingLeft:'50px' ,marginBottom:'50px'}}>
|