import React from 'react'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; import { Form,Button, Input, Spin, message, Modal, Upload } from 'antd'; import {getTransactionChannel,getTransactionProject,splitUrl} from '@/tools.js'; const WaterDetail=React.createClass({ loadData(record) { this.state.data = []; this.setState({ loading: true }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/financial/selectOneRefundFlow', data: { billNo:record?record.billNo:this.props.data.billNo }, success: function (data) { let theArr = []; if (!data.data) { if (data.error && data.error.length) { message.warning(data.error[0].message); }; } else { this.setState({ data:data.data, }) } }.bind(this), }).always(function () { this.setState({ loading: false }); }.bind(this)); }, 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.billNo){ this.loadData(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.billNo} {theData.financialPayTimes ? theData.financialPayTimes.slice(0,theData.financialPayTimes.length - 2) : ''} {theData.transactionAmount} {getTransactionProject(theData.transactionSubject)} {theData.payerName} {theData.payeeName} {getTransactionChannel(theData.transactionChannel)} {theData.orderNo} {theData.financialPayNo} {theData.remarks}
); } }); export default Form.create()(WaterDetail);