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 ?