dengzhiguo 6 年之前
父節點
當前提交
4635e2e798

+ 100 - 0
js/component/manageCenter/servicesManage/projectOrder/taskManagement/projectManageDetaile.jsx

@@ -12,6 +12,41 @@ const MySettlementDetaile = Form.create()(React.createClass({
 			loading: false,
 			visible: false,
             //派单
+            contractList:[
+            	{
+                    title: '姓名',
+                    dataIndex: 'name',
+                    key: 'name'
+                }, {
+                    title: '部门',
+                    dataIndex: 'depatrment',
+                    key: 'depatrment'
+                },{
+                    title: '联系方式',
+                    dataIndex: 'mobile',
+                    key: 'mobile'
+                },{
+                    title: '是否为主要联系人',
+                    dataIndex: 'major',
+                    key: 'major',
+                    render:(text) => {
+                    	return text?'是':"否"
+                    }
+                }, {
+                    title: '职务',
+                    dataIndex: 'position',
+                    key: 'position'
+                },{
+                    title: '微信',
+                    dataIndex: 'wechat',
+                    key: 'wechat'
+                },{
+                    title: 'QQ',
+                    dataIndex: 'qq',
+                    key: 'qq'
+                },
+                
+            ],
 		};
 	},
 	//查看基本详情基本信息
@@ -36,6 +71,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
 	                this.setState({
 						orderList:thisData,
 						taskId:thisData.taskId,
+						uid:thisData.uid,
 						publishStatus:thisData.publishStatus,
 	                });                  
 	            }.bind(this),
@@ -78,6 +114,47 @@ const MySettlementDetaile = Form.create()(React.createClass({
 				this.loaduser(nextProps.datauser);
 		}
 	},
+	//点击查看联系人
+	seeContract(){
+		this.contract();
+		this.setState({
+			seeState:false,
+			orderVisible:true
+		})
+	},
+	orderCancel(){
+		this.setState({
+			orderVisible:false
+		})
+	},
+	//查看联系人
+	contract(){
+    	$.ajax({
+            method: "get",
+			dataType: "json",
+			crossDomain: false,
+			url: globalConfig.context + '/api/admin/customer/findAllContacts',
+            data: {
+              uid: this.state.uid
+            },
+            success: function (data) {
+                let thisData = data.data;   
+                if (!thisData) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                    thisData = {};
+                };
+                this.setState({
+					contractArr:thisData,
+                });                  
+            }.bind(this),
+       }).always(function () {
+            this.setState({            	
+                loading: false
+            });
+        }.bind(this));  
+    },
 	handleCancel(){
 		this.setState({
 			visible:false
@@ -106,6 +183,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                            label="客户名称" >
 			                    			<span>{orderDetaiel.buyerName}</span>
+			                    			{orderDetaiel.buyerName&&<Button  onClick={this.seeContract} style={{float:'right',fontSize:'12px'}}>查看联系人</Button>}
 			                    	</FormItem>
 									<FormItem className="half-item"
 				                            {...formItemLayout}
@@ -215,6 +293,28 @@ const MySettlementDetaile = Form.create()(React.createClass({
 		                </Spin>
 		            </Form >
 		        </Modal>
+		        <Modal maskClosable={false} visible={this.state.orderVisible}
+                        onOk={this.orderCancel} onCancel={this.orderCancel}
+                        width='800px'
+                        title={this.state.seeState?'查看订单':'查看联系人'}                     
+                        footer=''
+                        className="admin-desc-content">
+			            <Form layout="horizontal"  id="demand-form" style={{paddingBottom:'40px'}} >
+			                <Spin spinning={this.state.loading}>
+			                	 <div className="patent-table" style={{marginTop:'10px'}}>
+				                    <Spin spinning={this.state.loading}>
+				                        {this.state.seeState?
+				                        	<div className="clearfix">
+				                        	</div>:
+				                             <Table columns={this.state.contractList}
+				                            dataSource={this.state.contractArr}
+				                            pagination={false}
+				                             />}
+				                    </Spin>
+				                </div>
+			                </Spin>
+			            </Form>
+			    </Modal>
     	    </div>
 		)
 	}