import React,{Component} from "react"; import { Modal, Form, Row, Col, Table, Spin, message, Button, Input, Select, DatePicker, Popconfirm, Tooltip } from "antd"; import $ from "jquery/src/ajax"; import moment from 'moment'; import ReminderLog from "../../customer/NEW/crm/reminderLog"; import {getPatentType} from "@/tools.js"; import { patentTypeList} from '@/dataDic.js'; const FormItem = Form.Item; const formItemLayout = { labelCol: { span: 10 }, wrapperCol: { span: 14 }, }; class PatentDetails extends Component{ constructor(props) { super(props); this.state={ columns:[ { title: "序号", dataIndex: "key", key: "key", width:'50px' }, { title: "费用种类", dataIndex: "years", key: "years", width:'150px', render:(text)=>( {getPatentType(this.props.detailsInfor.type)} 第 {text} 年年费 ) }, { title: "金额", dataIndex: "patentAmount", key: "patentAmount", width:'100px' }, { title: "缴费日", dataIndex: "endDate", key: "endDate", width:'100px', render:(text)=>( moment(text).format('YYYY-MM-DD') ) }, ], dataSource:[], loading:false, detailsInfor:{}, } this.payLoadData = this.payLoadData.bind(this); this.onChange = this.onChange.bind(this); } componentDidMount() { this.payLoadData(); const {detailsInfor, readOnly} = this.props; if (!readOnly) { this.setState({ patentNo: detailsInfor.patentNo, tid: detailsInfor.tid, email:detailsInfor.email, name: detailsInfor.name, type: detailsInfor.type, holders: detailsInfor.holders, inventor: detailsInfor.inventor, applyDates: detailsInfor.applyDates, authorizationDates: detailsInfor.authorizationDates, annualFeeStatus: detailsInfor.annualFeeStatus, delayingAmount: detailsInfor.delayingAmount, recoveryAmount: detailsInfor.recoveryAmount, }) } } payLoadData() { this.setState({ loading: true, }); const {detailsInfor} = this.props; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/patentNew/patentPaymentDetails", data: { id:detailsInfor.id }, success: function (data) { if(data.error.length === 0){ for(let i =0;i
{ readOnly ? detailsInfor.patentNo : { this.setState({ patentNo:e.target.value }) }} /> } { readOnly ? detailsInfor.name : { this.setState({ name:e.target.value }) }} /> } { readOnly ? getPatentType(detailsInfor.type) : } { readOnly ? detailsInfor.applyDates: { this.setState({ applyDates:date ? moment(date).format('YYYY-MM-DD') : '', }) }} /> } { readOnly ? detailsInfor.tid : { this.setState({ tid:e.target.value }) }} /> } { readOnly ? detailsInfor.authorizationDates: { this.setState({ authorizationDates:date ? moment(date).format('YYYY-MM-DD') : '', }) }} /> } { readOnly ?
{detailsInfor.email}
: { this.setState({ email:e.target.value }) }} /> }
{ readOnly ? detailsInfor.delayingAmount : { this.setState({ delayingAmount:e.target.value }) }} /> } { readOnly ? detailsInfor.recoveryAmount : { this.setState({ recoveryAmount:e.target.value }) }} /> } { readOnly ? ( detailsInfor.annualFeeStatus === 0 ? '待缴费' : detailsInfor.annualFeeStatus === 1 ? '已缴费' : '' ) : } { readOnly ?
{detailsInfor.holders}
: { this.setState({ holders:e.target.value }) }} /> }
{ readOnly ?
{detailsInfor.inventor}
: { this.setState({ inventor:e.target.value }) }} /> }
{detailsInfor.patentAmount} {detailsInfor.tid ? (detailsInfor.costReduction === 1 ? '有费减' : detailsInfor.costReduction === 0 ? '无费减' : '') : '无'}
{ detailsInfor.salesmanRemind === 0 ? '未通知' : detailsInfor.salesmanRemind === 1 ? '已通知' : '' }
{!readOnly ?
{ e.stopPropagation(); this.onChange(); }} okText="确定" cancelText="取消">
: null}
{this.state.visible ? { this.setState({ visible:false, id:undefined }) }} /> : null} ) } } export default PatentDetails;