import React from 'react'; import { Row, Col, DatePicker, Input, Select, Modal, message, Spin, Button } from 'antd'; import moment from 'moment'; import { expressArr } from '../../../dataDic.js'; import './comprehensive.less'; import ajax from 'jquery/src/ajax/xhr.js'; import $ from 'jquery/src/ajax'; const ExpressDesc = 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/saveRecieveSend", data: { "rid": this.props.data.rid, "pid": this.props.data.pid, "acceptanceReceiveTime": this.state.acceptanceReceiveTime, "acceptanceIssueTime": this.state.acceptanceIssueTime, "acceptanceTrackingNumber": this.state.acceptanceTrackingNumber, "acceptanceExpressCompany": "顺丰", "authorizationReceiveTime": this.state.authorizationReceiveTime, "authorizationIssueTime": this.state.authorizationIssueTime, "authorizationTrackingNumber": this.state.authorizationTrackingNumber, "authorizationExpressCompany": "顺丰", "certificateRecieveTime": this.state.certificateRecieveTime, "certificateIssueTime": this.state.certificateIssueTime, "certificateTrackingNumber": this.state.certificateTrackingNumber, "certificateExpressCompany": "顺丰" }, success: function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } else { message.success('保存成功!'); this.props.closeDesc(false, true); }; }.bind(this), }).always(function () { this.setState({ loading: false, visible: false, }); }.bind(this)); }, handleCancel(e) { this.setState({ visible: false, }); this.props.closeDesc(false); }, componentWillReceiveProps(nextProps) { this.state.visible = nextProps.showDesc; if (nextProps.data) { this.state.acceptanceReceiveTime = nextProps.data.acceptanceReceiveTime; this.state.acceptanceIssueTime = nextProps.data.acceptanceIssueTime; this.state.acceptanceTrackingNumber = nextProps.data.acceptanceTrackingNumber; this.state.authorizationReceiveTime = nextProps.data.authorizationReceiveTime; this.state.authorizationIssueTime = nextProps.data.authorizationIssueTime; this.state.authorizationTrackingNumber = nextProps.data.authorizationTrackingNumber; this.state.certificateRecieveTime = nextProps.data.certificateRecieveTime; this.state.certificateIssueTime = nextProps.data.certificateIssueTime; this.state.certificateTrackingNumber = nextProps.data.certificateTrackingNumber; }; }, render() { let theData = this.props.data; if (this.props.data) { return (
专利号:{theData.patentNumber}
专利名:{theData.patentName}