|
@@ -291,7 +291,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
key: 'rrr',
|
|
|
render: (text, record, index) => {
|
|
|
return <div style={{display:adminData.isSuperAdmin?'inline-block':'none'}}>
|
|
|
- <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record)}} okText="删除" cancelText="不删除">
|
|
|
+ <Popconfirm title="是否删除?" onConfirm={(e)=>{this.intentionDelet(record,index)}} okText="删除" cancelText="不删除">
|
|
|
<Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
|
|
|
</Popconfirm>
|
|
|
</div>
|
|
@@ -580,7 +580,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
render: (text, record, index) => {
|
|
|
return record.shareType=='1'?<div>
|
|
|
<Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
- onClick={(e)=>{this.changeRow(record)}}>领取<Icon /></Button>
|
|
|
+ onClick={(e)=>{ e.stopPropagation(),this.changeRow(record)}}>领取<Icon /></Button>
|
|
|
</div>:<span>无权限</span>
|
|
|
}
|
|
|
}
|
|
@@ -707,13 +707,16 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
|
|
|
//拜访记录删除
|
|
|
visitDelet(e){
|
|
|
+ this.setState({
|
|
|
+ loading:true
|
|
|
+ });
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/customer/deleteCustomer",
|
|
|
+ url: globalConfig.context + "/api/admin/customer/deleteFollow",
|
|
|
data: {
|
|
|
- id: e.followId,//删除的ID
|
|
|
+ followId: e.followId,//删除的ID
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
@@ -934,19 +937,19 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/customer/receiveCustomer",
|
|
|
data: {
|
|
|
- uid: uids.uid,
|
|
|
+ uid: uids.id,
|
|
|
}
|
|
|
- }).done(function (data) {
|
|
|
- if (!data.error.length) {
|
|
|
- message.success('领取成功!');
|
|
|
- this.setState({
|
|
|
- loading: false,
|
|
|
- });
|
|
|
- } else {
|
|
|
- message.warning(data.error[0].message);
|
|
|
- };
|
|
|
- this.loadData();
|
|
|
- }.bind(this));
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('领取成功!');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ this.loadData();
|
|
|
+ }.bind(this));
|
|
|
},
|
|
|
getOrgCodeUrl(e) {
|
|
|
this.setState({ orgCodeUrl: e });
|
|
@@ -1047,7 +1050,15 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
//基本信息提交
|
|
|
newSubmit(e){
|
|
|
- e.preventDefault();
|
|
|
+ e.preventDefault();
|
|
|
+ if(!this.state.industry){
|
|
|
+ message.warning('请选择行业');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if(!this.state.societyTag){
|
|
|
+ message.warning('请选择社会性质');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
if(!this.state.ProvinceCity[1]){
|
|
|
message.warning('请选择地区');
|
|
|
return false;
|
|
@@ -1084,29 +1095,29 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
data: {
|
|
|
id:this.state.InformationId,
|
|
|
uid: this.state.InformationUid,
|
|
|
- societyTag:values.societyTag,
|
|
|
- introduction:values.introduction,
|
|
|
- identifyName:this.state.identifyName,
|
|
|
+ societyTag:this.state.societyTag,
|
|
|
+ introduction:this.state.introduction,
|
|
|
+ unitName:this.state.unitName,
|
|
|
industry:this.state.industry,
|
|
|
locationProvince:(this.state.ProvinceCity)[0],//省-
|
|
|
locationCity:(this.state.ProvinceCity)[1],//市
|
|
|
locationArea:(this.state.ProvinceCity)[2],//区
|
|
|
- postalAddress:values.postalAddress,
|
|
|
- contactsFixedTel:values.contactsFixedTel,
|
|
|
- contactsFax:values.contactsFax,
|
|
|
- registeredCapital:values.registeredCapital,
|
|
|
- enterpriseScale:values.enterpriseScale,
|
|
|
- legalPerson:values.legalPerson,
|
|
|
- legalPersonIdCard:values.legalPersonIdCard,
|
|
|
- legalPersonTel:values.legalPersonTel,
|
|
|
- legalPersonEmail:values.legalPersonEmail,
|
|
|
+ postalAddress:this.state.postalAddress,
|
|
|
+ contactsFixedTel:this.state.contactsFixedTel,
|
|
|
+ contactsFax:this.state.contactsFax,
|
|
|
+ registeredCapital:this.state.registeredCapital,
|
|
|
+ enterpriseScale:this.state.enterpriseScale,
|
|
|
+ legalPerson:this.state.legalPerson,
|
|
|
+ legalPersonIdCard:this.state.legalPersonIdCard,
|
|
|
+ legalPersonTel:this.state.legalPersonTel,
|
|
|
+ legalPersonEmail:this.state.legalPersonEmail,
|
|
|
highTechZone:this.state.highTechZone,
|
|
|
listed:this.state.listed,
|
|
|
- orgCode:values.orgCode,
|
|
|
- businessScope:values.businessScope,
|
|
|
- introduction:values.introduction,
|
|
|
+ orgCode:this.state.orgCode,
|
|
|
+ businessScope:this.state.businessScope,
|
|
|
+ introduction:this.state.introduction,
|
|
|
companyLogoUrl:thecompanyLogoUrl,
|
|
|
- orgCodeUrl:theorgCodeUrl,
|
|
|
+ orgCodeUrl:theorgCodeUrl,
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.setState({
|
|
@@ -1162,6 +1173,20 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
ProvinceCity:ProvinceCityArr,
|
|
|
proviceCityArea:ProvinceS?cityArea:'',
|
|
|
industry:String(thisData.industry)=='null'?undefined:String(thisData.industry),
|
|
|
+
|
|
|
+ societyTag:thisData.societyTag,
|
|
|
+ introduction:thisData.introduction,
|
|
|
+ postalAddress:thisData.postalAddress,
|
|
|
+ contactsFixedTel:thisData.contactsFixedTel,
|
|
|
+ contactsFax:thisData.contactsFax,
|
|
|
+ registeredCapital:thisData.registeredCapital,
|
|
|
+ enterpriseScale:thisData.enterpriseScale,
|
|
|
+ legalPerson:thisData.legalPerson,
|
|
|
+ legalPersonIdCard:thisData.legalPersonIdCard,
|
|
|
+ legalPersonTel:thisData.legalPersonTel,
|
|
|
+ legalPersonEmail:thisData.legalPersonEmail,
|
|
|
+ businessScope:thisData.businessScope,
|
|
|
+ orgCode:thisData.orgCode,
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -1203,7 +1228,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
mobile:thisData.mobile,
|
|
|
nickname:thisData.nickname,
|
|
|
email:thisData.email,
|
|
|
- type:getcustomerTyp(thisData.type),
|
|
|
+ type:getcustomerTyp(String(thisData.type)),
|
|
|
source:sourcecustomer,
|
|
|
isMember:thisData.isMember,
|
|
|
currentMemberStatus:String(thisData.currentMemberStatus),
|
|
@@ -1458,6 +1483,8 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
},
|
|
|
success: function (data) {
|
|
|
if (!data.error.length) {
|
|
|
+ this.addcontactModulOK()
|
|
|
+ this.getNewWoman(this.state.uids)
|
|
|
this.setState({
|
|
|
loading: false,
|
|
|
})
|
|
@@ -1517,34 +1544,40 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
console.log(e)
|
|
|
},
|
|
|
//拜访意向服务列表单个删除
|
|
|
- intentionDelet(e){
|
|
|
-
|
|
|
- let detId=!this.state.keys?this.state.followIds:this.state.uid;
|
|
|
- if(e.id||e.followId){
|
|
|
+ intentionDelet(e,index){
|
|
|
+ if(!this.state.keys){
|
|
|
+ let detId=this.state.followIds;
|
|
|
+ if(e.id){
|
|
|
+ this.setState({
|
|
|
+ selectedRowKeys: [],
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/deleteFollowOneBusiness",
|
|
|
+ data: {
|
|
|
+ ufbId:e.id
|
|
|
+ }
|
|
|
+ }).done(function (data) {
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success('删除成功');
|
|
|
+ this.setState({
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ this.visitModify(detId);
|
|
|
+ }.bind(this));
|
|
|
+ }else{
|
|
|
+ this.visitModify(detId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ let deteluserBusinessList=(this.state.data).splice(index,1)
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
|
});
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/customer/transferToPublic",
|
|
|
- data: {
|
|
|
- id: e.id||e.followId
|
|
|
- }
|
|
|
- }).done(function (data) {
|
|
|
- if (!data.error.length) {
|
|
|
- message.success('删除成功');
|
|
|
- this.setState({
|
|
|
- loading: false,
|
|
|
- });
|
|
|
- } else {
|
|
|
- message.warning(data.error[0].message);
|
|
|
- };
|
|
|
- !this.state.keys?this.visitModify(detId):this.deletelist(detId);
|
|
|
- }.bind(this));
|
|
|
- }else{
|
|
|
- !this.state.keys?this.visitModify(detId):this.deletelist(detId);
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -1828,8 +1861,33 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
|
|
|
|
|
|
//tab2删除
|
|
|
- confirmDelet(e){
|
|
|
- console.log(e)
|
|
|
+ confirmDelet(e){
|
|
|
+ this.setState({
|
|
|
+ loading:true
|
|
|
+ });
|
|
|
+ if(e.id){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/deleteOneContact",
|
|
|
+ data: {
|
|
|
+ ocbId: e.id,//删除的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));
|
|
|
+ }else{
|
|
|
+ this.contactLists(this.state.rowId);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
//tab5业务意向
|
|
@@ -2094,43 +2152,34 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
- label="行业"
|
|
|
- >
|
|
|
- {getFieldDecorator('industry', {
|
|
|
- rules: [{ required: true, message: '此项为必填项!' }],
|
|
|
- initialValue: this.state.industry
|
|
|
- })(
|
|
|
- <Select placeholder="选择行业" >
|
|
|
+ label="行业">
|
|
|
+ <Select placeholder="选择行业" value={this.state.industry}
|
|
|
+ onChange={(e)=>{this.setState({industry:e})}}>
|
|
|
{
|
|
|
industry.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
|
- </Select>
|
|
|
- )}
|
|
|
+ </Select>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="社会属性"
|
|
|
>
|
|
|
- {getFieldDecorator('societyTag', {
|
|
|
- rules: [{ required: true, message: '此项为必填项!' }],
|
|
|
- initialValue: theInformation.societyTag
|
|
|
- })(
|
|
|
- <Select placeholder="客户社会属性(必填项)" >
|
|
|
+ <Select placeholder="客户社会属性(必填项)" value={this.state.societyTag}
|
|
|
+ onChange={(e)=>{this.setState({societyTag:e})}}>
|
|
|
{
|
|
|
socialAttribute.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
|
</Select>
|
|
|
- )}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
- label="省-市-区"
|
|
|
+ label="*省-市-区"
|
|
|
>
|
|
|
<Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市(必填项)"
|
|
|
onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
|
|
@@ -2140,99 +2189,72 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="通信地址"
|
|
|
>
|
|
|
- {getFieldDecorator('postalAddress', {
|
|
|
- initialValue: theInformation.postalAddress
|
|
|
- })(
|
|
|
- <Input placeholder="客户通信地址"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="客户通信地址" value={this.state.postalAddress}
|
|
|
+ onChange={(e)=>{this.setState({postalAddress:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="固定电话"
|
|
|
>
|
|
|
- {getFieldDecorator('contactsFixedTel', {
|
|
|
- initialValue: theInformation.contactsFixedTel
|
|
|
- })(
|
|
|
- <Input placeholder="客户固定电话"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
|
|
|
+ onChange={(e)=>{this.setState({contactsFixedTel:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="客户传真"
|
|
|
>
|
|
|
- {getFieldDecorator('contactsFax', {
|
|
|
- initialValue: theInformation.contactsFax
|
|
|
- })(
|
|
|
- <Input placeholder="客户传真"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="客户传真" value={this.state.contactsFax}
|
|
|
+ onChange={(e)=>{this.setState({contactsFax:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="注册资本"
|
|
|
>
|
|
|
- {getFieldDecorator('registeredCapital', {
|
|
|
- initialValue: theInformation.registeredCapital
|
|
|
- })(
|
|
|
- <Input placeholder="注册资本"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="注册资本" value={this.state.registeredCapital}
|
|
|
+ onChange={(e)=>{this.setState({registeredCapital:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="单位规模"
|
|
|
>
|
|
|
- {getFieldDecorator('enterpriseScale', {
|
|
|
- initialValue: theInformation.enterpriseScale
|
|
|
- })(
|
|
|
- <Input placeholder="单位规模"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="单位规模" value={this.state.enterpriseScale}
|
|
|
+ onChange={(e)=>{this.setState({enterpriseScale:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="法人名称"
|
|
|
>
|
|
|
- {getFieldDecorator('legalPerson', {
|
|
|
- initialValue: theInformation.legalPerson
|
|
|
- })(
|
|
|
- <Input placeholder="法人名称"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="法人名称" value={this.state.legalPerson}
|
|
|
+ onChange={(e)=>{this.setState({legalPerson:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="身份证号码"
|
|
|
>
|
|
|
- {getFieldDecorator('legalPersonIdCard', {
|
|
|
- initialValue: theInformation.legalPersonIdCard
|
|
|
- })(
|
|
|
- <Input placeholder="法人身份证号码"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="法人身份证号码" value={this.state.legalPersonIdCard}
|
|
|
+ onChange={(e)=>{this.setState({legalPersonIdCard:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="法人电话"
|
|
|
- >
|
|
|
- {getFieldDecorator('legalPersonTel', {
|
|
|
- initialValue: theInformation.legalPersonTel
|
|
|
- })(
|
|
|
- <Input placeholder="法人电话"/>
|
|
|
- )}
|
|
|
+ >
|
|
|
+ <Input placeholder="法人电话" value={this.state.legalPersonTel}
|
|
|
+ onChange={(e)=>{this.setState({legalPersonTel:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="电子邮箱"
|
|
|
>
|
|
|
- {getFieldDecorator('legalPersonEmail', {
|
|
|
- initialValue: theInformation.legalPersonEmail
|
|
|
- })(
|
|
|
- <Input placeholder="法人电子邮箱"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
|
|
|
+ onChange={(e)=>{this.setState({legalPersonEmail:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
@@ -2263,11 +2285,8 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="机构代码"
|
|
|
>
|
|
|
- {getFieldDecorator('orgCode', {
|
|
|
- initialValue: theInformation.orgCode
|
|
|
- })(
|
|
|
- <Input placeholder="社会同意机构代码"/>
|
|
|
- )}
|
|
|
+ <Input placeholder="社会同意机构代码" value={this.state.orgCode}
|
|
|
+ onChange={(e)=>{this.setState({orgCode:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<div className="clearfix pictures">
|
|
|
<FormItem
|
|
@@ -2296,21 +2315,15 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
labelCol={{ span: 2 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="业务范围" >
|
|
|
- {getFieldDecorator('businessScope', {
|
|
|
- initialValue: theInformation.businessScope
|
|
|
- })(
|
|
|
- <Input type="textarea" rows={4} />
|
|
|
- )}
|
|
|
+ <Input type="textarea" rows={4} value={this.state.businessScope}
|
|
|
+ onChange={(e)=>{this.setState({businessScope:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
labelCol={{ span: 2 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="单位简介" >
|
|
|
- {getFieldDecorator('introduction', {
|
|
|
- initialValue: theInformation.introduction
|
|
|
- })(
|
|
|
- <Input type="textarea" rows={4} />
|
|
|
- )}
|
|
|
+ <Input type="textarea" rows={4} value={this.state.introduction}
|
|
|
+ onChange={(e)=>{this.setState({introduction:e.target.value})}}/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<Button className="set-submit" type="primary" htmlType="submit" style={{marginLeft:'90px',marginBottom:'30px'}}>保存</Button>
|
|
@@ -2701,7 +2714,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
>
|
|
|
- <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px'}}>添加新联系人</Button>
|
|
|
+ <Button type="primary" onClick={this.newContacts} style={{marginLeft:'100px',display:this.state.keys?'inline-block':'none'}}>添加新联系人</Button>
|
|
|
</FormItem>
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|