liting2017 7 years ago
parent
commit
0e0cde6ddc

+ 17 - 8
js/component/manageCenter/customer/customerManagement/organizationManages.jsx

@@ -442,7 +442,14 @@ const PublicCustomer = Form.create()(React.createClass({
 						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>
 					}
-				}, {
+				},{
+                    title: '主要联系人',
+                    dataIndex: 'major',
+                    key: 'major',
+                    render:(text) => {
+                    	return text?'是':"否"
+                    }
+                }, {
 					title: '手机号码',
 					dataIndex: 'mobile',
 					key: 'mobile',
@@ -480,12 +487,13 @@ const PublicCustomer = Form.create()(React.createClass({
 					dataIndex: 'dels',
 					key: 'dels',
 					render: (text, record, index) => {
-						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>
-							{record.name?<Button style={{marginRight:'10px',color:'#ffffff',background:'green',border:'none'}} onClick={(e)=>{e.stopPropagation(),this.mainContact(record)}}>设为主要联系人</Button>:''}
-                        </div> : <span>无权限</span>
+						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>
 					}
 				}
 			],
@@ -631,6 +639,7 @@ const PublicCustomer = Form.create()(React.createClass({
 							wechat: thisdata.wechat,
 							depatrment: thisdata.depatrment,
 							position: thisdata.position,
+							major:thisdata.major
 						});
 					};
 
@@ -2104,7 +2113,7 @@ const PublicCustomer = Form.create()(React.createClass({
                 <Modal	
 				      className="customeDetails"				      
 			          title="单位客户详情"
-			          width='1200px'
+			          width='1300px'
 			          visible={this.state.modal5Visible}
 			          onOk={this.detailsModal}
 			          onCancel={this.detailsModal}

+ 24 - 7
js/component/manageCenter/customer/customerManagement/personalManages.jsx

@@ -431,6 +431,7 @@ const QueryCustomer = Form.create()(React.createClass({
 			ContactsLists: [{
 					title: '姓名',
 					dataIndex: 'name',
+					width:100,
 					key: 'name',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.name} placeholder="姓名" key={record.id}
@@ -440,6 +441,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				}, {
 					title: '联系人部门',
 					dataIndex: 'depatrment',
+					width:100,
 					key: 'depatrment',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
@@ -448,14 +450,24 @@ const QueryCustomer = Form.create()(React.createClass({
 				}, {
 					title: '联系人职务',
 					dataIndex: 'position',
+					width:100,
 					key: 'position',
 					render: (text, record, index) => {
 						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>
 					}
 				}, {
+                    title: '主要联系人',
+                    dataIndex: 'major',
+                    width:100,
+                    key: 'major',
+                    render:(text) => {
+                    	return text?'是':"否"
+                    }
+                },{
 					title: '手机号码',
 					dataIndex: 'mobile',
+					width:100,
 					key: 'mobile',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.mobile} placeholder="手机号码" key={record.id}
@@ -464,6 +476,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				}, {
 					title: '微信',
 					dataIndex: 'wechat',
+					width:100,
 					key: 'wechat',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.wechat} placeholder="微信" key={record.id}
@@ -472,6 +485,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				}, {
 					title: '联系人QQ',
 					dataIndex: 'qq',
+					width:100,
 					key: 'qq',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.qq} placeholder="联系人QQ" key={record.id}
@@ -480,6 +494,7 @@ const QueryCustomer = Form.create()(React.createClass({
 				}, {
 					title: '电子邮箱',
 					dataIndex: 'email',
+					width:"100",
 					key: 'email',
 					render: (text, record, index) => {
 						return adminData.isSuperAdmin ? <Input value={record.email} placeholder="电子邮箱" key={record.id}
@@ -491,12 +506,13 @@ const QueryCustomer = Form.create()(React.createClass({
 					dataIndex: 'dels',
 					key: 'dels',
 					render: (text, record, index) => {
-						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>
-							{record.name?<Button style={{marginRight:'10px',color:'#ffffff',background:'green',border:'none'}} onClick={(e)=>{e.stopPropagation(),this.mainContact(record)}}>设为主要联系人</Button>:''}
-                        </div> : <span>无权限</span>
+						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>
 					}
 				}
 			],
@@ -665,6 +681,7 @@ const QueryCustomer = Form.create()(React.createClass({
 							wechat: thisdata.wechat,
 							depatrment: thisdata.depatrment,
 							position: thisdata.position,
+							major:thisdata.major
 						});
 					};
 
@@ -2100,7 +2117,7 @@ const QueryCustomer = Form.create()(React.createClass({
                 <Modal	
 				      className="customeDetails"				      
 			          title="个人客户详情"
-			          width='1200px'
+			          width='1300px'
 			          visible={this.state.modal5Visible}
 			          onOk={this.detailsModal}
 			          onCancel={this.detailsModal}