liting2017 7 년 전
부모
커밋
4a0e93ca0e
1개의 변경된 파일96개의 추가작업 그리고 1개의 파일을 삭제
  1. 96 1
      js/component/manageCenter/servicesManage/projectOrder/orderOrder/projectOrderDetaile.jsx

+ 96 - 1
js/component/manageCenter/servicesManage/projectOrder/orderOrder/projectOrderDetaile.jsx

@@ -184,9 +184,83 @@ const MySettlementDetaile = Form.create()(React.createClass({
                     dataIndex: 'confirmTime',
                     key: 'confirmTime',
                 }
-			]
+			],
+			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'
+                },
+                
+            ],
 		};
 	},
+	seeContract(){
+		this.contract();
+		this.setState({
+			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.buyerId
+            },
+            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));  
+    },
 	//查看基本详情基本信息
     loaduser(record){
     	if(record){
@@ -209,6 +283,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
                 };
                 this.setState({
 					id:thisData.id,
+					buyerId:thisData.buyerId,
 					orderList:thisData,
 					orderAmount:thisData.orderAmount,
 					firstPayment:thisData.firstPayment,
@@ -496,6 +571,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
 				                            {...formItemLayout}
 				                            label="客户名称" >  
 				                            <span>{orderDetaiel.buyerName}</span>
+				                            <Button  onClick={this.seeContract} style={{float:'right',fontSize:'12px'}}>查看联系人</Button>
 			                    		</FormItem>
 			                    		<FormItem className="half-item"
 				                            {...formItemLayout}
@@ -729,6 +805,25 @@ 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='查看联系人'                    
+                        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}>
+				                   	    <Table columns={this.state.contractList}
+				                            dataSource={this.state.contractArr}
+				                            pagination={false}
+				                             />
+				                     </Spin>
+				                </div>
+			                </Spin>
+			            </Form>
+			    </Modal>
     	    </div>
 		)
 	}