import React from 'react'; import { Icon, Table, Modal, message, Spin, Input, Select, Button, Form ,Upload,Popconfirm,AutoComplete} from 'antd'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import '../userMangagement.less'; import {orderType,publishStatus } from '../../../../dataDic.js'; import {getOrderType,getProjectState,getTaskStatus,getPublishStatus} from '../../../../tools.js'; const MySettlementDetaile = Form.create()(React.createClass({ getInitialState() { return { 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' }, ], }; }, //查看基本详情基本信息 loaduser(record){ if(record){ $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/techproject/getProjectTaskDetail', data: { taskId: record.taskId }, success: function (data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thisData = {}; }; this.setState({ orderList:thisData, taskId:thisData.taskId, uid:thisData.uid, publishStatus:thisData.publishStatus, }); }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); } }, //修改公示状态 changePublishStatus(){ $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/techproject/updatePublishStatus', data: { taskId:this.state.taskId, publishStatus:this.state.publishStatus, }, success: function (data) { let thisData = data.data; if (!thisData) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; thisData = {}; } message.success('修改成功'); }.bind(this), }) }, componentWillMount() { }, componentWillReceiveProps(nextProps) { //props改变时触发 this.state.visible = nextProps.showDesc; if(nextProps.showDesc) { 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 }) this.props.closeShow(false) }, render() { const FormItem = Form.Item const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 }, }; const orderDetaiel=this.state.orderList || []; return(