import React from "react"; import { Spin, Button, Tabs, Table, message, Modal } from "antd"; import $ from "jquery/src/ajax"; const ResolutionDetail = React.createClass({ getInitialState() { return { visible: false, columns: [ { title: "子项目名称", dataIndex: "taskName", key: "taskName" }, { title: "子项目数量", dataIndex: "commodityQuantity", key: "commodityQuantity" }, { title: "拆分操作人", dataIndex: "splitAname", key: "splitAname" }, { title: "项目负责人", dataIndex: "receiverName", key: "receiverName" }, { title: "拆分时间", dataIndex: "splitTimes", key: "splitTimes" } ] }; }, componentWillReceiveProps(nextProps) { this.setState({ visible: nextProps.visible }); }, componentWillMount() { this.loadData(); }, loadData() { this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/orderProject/splitProjectList", data: { tid: this.props.detail.id }, success: function(data) { let thedata = data.data; let theArr = []; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { this.setState({ dataSource: thedata }); } }.bind(this) }).always( function() { this.setState({ loading: false }); }.bind(this) ); }, render() { return (
当前项目名称:{this.props.detail.commodityName}
当前项目数量: {this.props.detail.commodityQuantity}
拆分项目列表:
); } }); export default ResolutionDetail;