import React from 'react'; import { Icon, Modal, message, Spin, Button, Input, Radio } from 'antd'; import './comprehensive.less'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; const PatentDesc = React.createClass({ getInitialState() { return { visible: false, loading: false }; }, showModal() { this.setState({ visible: true, }); }, handleOk() { this.setState({ loading: true }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/patent/registerApplicationFee", data: { cid: this.props.data.cid, applicationFee: this.state.applicationFee, // trialFee: this.state.applicationFee, // printingFee: this.state.printingFee, funds: this.state.funds, reimbursement: this.state.reimbursement, paymentState: this.state.paymentState }, success: function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); return; } else { message.success('保存成功!'); this.props.closeDesc(false, true); }; }.bind(this), }).always(function () { this.setState({ loading: false, visible: false, }); }.bind(this)); }, handleConfirm() { this.state.paymentState = 1; this.handleOk(); }, handleCancel(e) { this.setState({ visible: false, }); this.props.closeDesc(false); }, componentWillReceiveProps(nextProps) { this.state.visible = nextProps.showDesc; if (nextProps.data) { this.state.applicationFee = nextProps.data.applicationFee; // this.state.trialFee = nextProps.data.trialFee; // this.state.printingFee = nextProps.data.printingFee; this.state.funds = nextProps.data.funds; this.state.reimbursement = nextProps.data.reimbursement; this.state.paymentState = nextProps.data.paymentState; }; }, render() { if (this.props.data) { return (
保存, , , ]} className="applyFee-desc-content">

专利号 : {this.props.data.patentNumber} 专利名 : {this.props.data.patentName}

申请费: { this.setState({ applicationFee: e.target.value }); }} />

是否申请: { this.setState({ funds: e.target.value }) }}>
是否报销: { this.setState({ reimbursement: e.target.value }) }}>
); } else { return
} }, }); export default PatentDesc; //

// 实审费: // { this.setState({ trialFee: e.target.value }); }} /> //

//

// 文印费: // { this.setState({ printingFee: e.target.value }); }} /> //