import React from 'react'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import { Form, Spin, message, Modal } from 'antd'; import {getTaskStatus,getProjectStatus,getLiquidationStatus,getJsyPaymentType,getBonusState} from '@/tools.js'; const BonusDetail=React.createClass({ getInitialState() { return { loading: false, visible:false, showDesc:false, }; }, onCancel(){ this.setState({ visible:false }) this.props.closeDesc(false,false); }, onShow() { this.setState({ visible: false, }); this.props.closeDesc(false, true); }, componentWillMount() { }, componentWillReceiveProps(nextProps) { if(nextProps.data.orderNo){ this.setState({data:nextProps.data}); } this.state.visible=nextProps.showDesc; }, render() { const theData = this.state.data || {}; const FormItem = Form.Item; const formItemLayout = { labelCol: { span: 10 }, wrapperCol: { span: 12 }, }; return (
{this.handleSubmit(e,0)}} >
{theData.tid} {theData.orderNo} {theData.commodityName} {theData.targetName} {getTaskStatus(theData.taskStatus)} {theData.commodityQuantity} {getProjectStatus(theData.projectStatus)} {theData.acceptTime} {theData.reviewTime} {theData.licenceTime} {getLiquidationStatus(theData.liquidationStatus)} {getJsyPaymentType(theData.bonusSubject)} {getBonusState(theData.grantStatus)}
); } }); export default Form.create()(BonusDetail);