|
@@ -413,7 +413,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}
|
|
|
+ return adminData.name=="管理员"?<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>
|
|
|
}
|
|
@@ -438,7 +438,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}
|
|
|
+ return adminData.name=="管理员"?<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>
|
|
|
}
|
|
|
},{
|
|
@@ -495,30 +495,22 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
}, {
|
|
|
- title: '客户类型',
|
|
|
- dataIndex: 'type',
|
|
|
- key: 'type',
|
|
|
- render: text => { return getcustomerTyp(text) }
|
|
|
-
|
|
|
- }, {
|
|
|
title: '地区',
|
|
|
dataIndex: 'locationProvince',
|
|
|
key: 'locationProvince',
|
|
|
- }, {
|
|
|
- title: '联系人',
|
|
|
- dataIndex: 'contacts',
|
|
|
- key: 'contacts',
|
|
|
},
|
|
|
- {
|
|
|
- title: '联系电话',
|
|
|
- dataIndex: 'contactMobile',
|
|
|
- key:'contactMobile',
|
|
|
- },
|
|
|
{
|
|
|
title: '行业',
|
|
|
dataIndex: 'industry',
|
|
|
key: 'industry',
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '公共客户',
|
|
|
+ dataIndex: 'type',
|
|
|
+ key: 'type',
|
|
|
+ render: text => { return getWhether(text) }
|
|
|
+
|
|
|
+ },
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'createTime',
|
|
@@ -566,6 +558,17 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
key: 'currentMemberStatus',
|
|
|
render:text => {return getCurrentMember(text)}
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'abc',
|
|
|
+ key: 'abc',
|
|
|
+ render: (text, record, index) => {
|
|
|
+ return record.publics?<div>
|
|
|
+ <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
+ onClick={(e)=>{this.changeRow(record)}}>领取<Icon /></Button>
|
|
|
+ </div>:<span>无权限</span>
|
|
|
+ }
|
|
|
+ }
|
|
|
],
|
|
|
data:[],
|
|
|
dataman:[],
|
|
@@ -903,21 +906,11 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
this.loadData();
|
|
|
}.bind(this));
|
|
|
},
|
|
|
-
|
|
|
- //转为公共客户
|
|
|
- changeRow() {
|
|
|
- let deletedIds;
|
|
|
- let adminName;
|
|
|
- for (let idx = 0; idx < this.state.selectedRows.length; idx++) {
|
|
|
- let rowItem = this.state.selectedRows[idx];
|
|
|
- if (rowItem.id) {
|
|
|
- deletedIds=rowItem.id;
|
|
|
- adminName=rowItem.adminName;
|
|
|
- };
|
|
|
- };
|
|
|
+ //领取
|
|
|
+ changeRow(uids) {
|
|
|
this.setState({
|
|
|
- selectedRowKeys: [],
|
|
|
-
|
|
|
+ loading: true,
|
|
|
+ selectedRowKeys: [],
|
|
|
});
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -925,12 +918,12 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/customer/transferToPublic",
|
|
|
data: {
|
|
|
- id: deletedIds,
|
|
|
- beforeAdminName:adminName,
|
|
|
+ id: uids.uid,
|
|
|
+ AdminName:uids.adminName,
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
if (!data.error.length) {
|
|
|
- message.success('已转为公共客户!');
|
|
|
+ message.success('领取成功!');
|
|
|
this.setState({
|
|
|
loading: false,
|
|
|
});
|
|
@@ -1045,6 +1038,10 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
//基本信息提交
|
|
|
newSubmit(e){
|
|
|
e.preventDefault();
|
|
|
+ if(!this.state.ProvinceCity[1]){
|
|
|
+ message.warning('请选择地区');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
this.state.data=[];
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
@@ -1242,6 +1239,12 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
//拜访保存函数
|
|
|
visitSubmit(e){
|
|
|
e.preventDefault();
|
|
|
+ let GlossoryId;
|
|
|
+ this.state.data.map(function(item){
|
|
|
+ if(!item.businessGlossoryId){
|
|
|
+ GlossoryId=true
|
|
|
+ }
|
|
|
+ })
|
|
|
if(this.state.contactType==undefined){
|
|
|
message.warning('请选择拜访方式')
|
|
|
return false;
|
|
@@ -1252,6 +1255,10 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
+ if(GlossoryId){
|
|
|
+ message.warning("请选择业务名称!")
|
|
|
+ return false;
|
|
|
+ };
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
|
});
|
|
@@ -1739,6 +1746,10 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
//账户信息保存
|
|
|
accountSave(e){
|
|
|
e.preventDefault();
|
|
|
+ if(!this.state.mobile){
|
|
|
+ message.warning('手机号码不能为空!')
|
|
|
+ return false;
|
|
|
+ }
|
|
|
this.state.data=[];
|
|
|
this.setState({
|
|
|
selectedRowKeys: [],
|
|
@@ -1912,12 +1923,8 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<Button onClick={this.reset}>重置</Button>
|
|
|
<Button style={{ background: "#ea0862", border: "none", color: "#fff",marginRight:'10px' ,marginLeft:'10px',display:adminData.name=="管理员"?'inline-block':'none'}}
|
|
|
disabled={!hasSelected}
|
|
|
-
|
|
|
onClick={this.delectRow}>删除<Icon type="minus" />
|
|
|
- </Button>
|
|
|
- <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
|
|
|
- disabled={!hasSelected}
|
|
|
- onClick={this.changeRow}>领取<Icon /></Button>
|
|
|
+ </Button>
|
|
|
<span style={{marginLeft:'10px',marginRight:'20px'}}>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
|
|
|
<div className='clearfix' style={{marginTop:'5px'}}>
|
|
|
<div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
|
|
@@ -2025,20 +2032,24 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
<span>{theInformation.unitName}</span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- <div className="clearfix" style={{paddingLeft:'60px'}}>
|
|
|
+ <div className="clearfix" style={{paddingLeft:'60px'}}>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="行业"
|
|
|
>
|
|
|
- <Select placeholder="选择行业" value={this.state.industry} onChange={(e) => {
|
|
|
- this.setState({industry:e})}}>
|
|
|
+ {getFieldDecorator('industry', {
|
|
|
+ rules: [{ required: true, message: '此项为必填项!' }],
|
|
|
+ initialValue: this.state.industry
|
|
|
+ })(
|
|
|
+ <Select placeholder="选择行业" >
|
|
|
{
|
|
|
industryList.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
})
|
|
|
}
|
|
|
</Select>
|
|
|
+ )}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
labelCol={{ span: 4 }}
|
|
@@ -2046,9 +2057,10 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
label="社会属性"
|
|
|
>
|
|
|
{getFieldDecorator('societyTag', {
|
|
|
+ rules: [{ required: true, message: '此项为必填项!' }],
|
|
|
initialValue: theInformation.societyTag
|
|
|
})(
|
|
|
- <Select placeholder="客户社会属性" >
|
|
|
+ <Select placeholder="客户社会属性(必填项)" >
|
|
|
{
|
|
|
socialAttribute.map(function (item) {
|
|
|
return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
@@ -2062,7 +2074,7 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label="省-市-区"
|
|
|
>
|
|
|
- <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市"
|
|
|
+ <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市(必填项)"
|
|
|
onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
@@ -2364,7 +2376,52 @@ const PublicCustomer = Form.create()(React.createClass({
|
|
|
>
|
|
|
<span>{theInformation.orgCode}</span>
|
|
|
</FormItem>
|
|
|
-
|
|
|
+ <div className="clearfix pictures">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="机构证(PIC)" >
|
|
|
+ <div className="clearfix">
|
|
|
+ <Upload className="demandDetailShow-upload"
|
|
|
+ listType="picture-card"
|
|
|
+ fileList={this.state.orgCodeUrl}
|
|
|
+ onPreview={(file) => {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ }} >
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} footer={null}
|
|
|
+ visible={this.state.previewVisible}
|
|
|
+ onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
+ <img alt="" style={{ width: '100%' }} src={this.state.orgCodeUrl || ''} />
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="单位logo" >
|
|
|
+ <div className="clearfix">
|
|
|
+ <Upload className="demandDetailShow-upload"
|
|
|
+ listType="picture-card"
|
|
|
+ fileList={this.state.companyLogoUrl}
|
|
|
+ onPreview={(file) => {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ }} >
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} footer={null}
|
|
|
+ visible={this.state.previewVisible}
|
|
|
+ onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
+ <img alt="" style={{ width: '100%' }} src={this.state.companyLogoUrl || ''} />
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
<div className="clearfix">
|
|
|
<FormItem
|
|
|
labelCol={{ span: 2 }}
|