import React,{Component} from "react"; import {Button, message, Modal, Popconfirm, Spin, Table} from "antd"; import $ from "jquery"; class PatentCheck extends Component{ constructor(props) { super(props); this.state={ loading:false, columns:[ { title: '操作人', dataIndex: 'aname', key: 'aname', }, { title: '状态', dataIndex: 'statusName', key: 'statusName', }, { title: '操作时间', dataIndex: 'createTimes', key: 'createTimes', }, { title: '备注', dataIndex: 'remarks', key: 'remarks', }, ], dataSource:[], addProjectCheckLoading:false, } this.addProjectCheck = this.addProjectCheck.bind(this); this.getProjectCheckLog = this.getProjectCheckLog.bind(this); } addProjectCheck(){ this.setState({ addProjectCheckLoading: true, }) $.ajax({ method: 'POST', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/orderProject/addProjectCheck', data: { tid:this.props.id }, }).done( function (data) { this.setState({ addProjectCheckLoading: false, }) if (!data.error.length) { message.success('发起成功!'); this.props.onRefresh && this.props.onRefresh(); } else { message.warning(data.error[0].message) } }.bind(this) ) } getProjectCheckLog(){ this.setState({ loading: true, }) $.ajax({ method: 'get', dataType: 'json', crossDomain: false, url: globalConfig.context + '/api/admin/orderProject/projectCheckLog', data: { tid:this.props.id }, }).done( function (data) { this.setState({ loading: false, }) if (data.error.length === 0) { this.setState({ dataSource:data.data }) } else { message.warning(data.error[0].message) } }.bind(this) ) } render() { return ( this.props.projectType === 1 && this.props.startType === 1 ?
{/*startType 1供应商 0外包*/} {/*patentTypeName 官费类型名称*/} {/*projectType 项目类型 0正常 1专利 2软著 3审计 */} {/*patentType 专利类型 0专利申请 1专利买卖*/} {/*orderTaskOfficialCost 1含官费 0不含官费*/} {/*orderTaskCostReduction: 1有费减 0无费减*/} 官费类型:{this.props.patentTypeName} { this.props.orderTaskOfficialCost === 1? '有官费' : '不含官费' } {this.props.patentTypeId === 0 || this.props.patentTypeId === 2 ? { this.props.orderTaskCostReduction === 1? '有费减' : '无费减' } : null}
{this.props.patentType === 0 ?
{/*checkStatus 核对状态 0未发起 1核对中 2核对完成 3已申请付款*/} { this.props.checkStatus === 1 ? '营销员核对中' : this.props.checkStatus === 2 ? '核对已完成' : this.props.checkStatus === 3 ? '已申请付款' : '' } { (this.props.checkStatus === 0 || this.props.checkStatus === 2) && !this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? { this.addProjectCheck(); }} okText="发起" cancelText="取消" > : null } {!this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? : null}
: null} {this.state.visible ? { this.setState({ visible:false }) }} width={800} footer={null} > : null} {!this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? : null} : null ) } } export default PatentCheck;