import React, { Component } from "react"; // import axios from 'axios'; // import store from 'store'; import { // Form, // Input, // Icon, Button, Drawer } from 'antd'; import { // comAccountTradeVoucher, // comAccountPayVoucher, enterpriseCompanyComBaseInfoGetComBaseInfoById, host } from '../../../../services/api'; import '../../financialWallet.less'; export default class BudgetDrawer extends Component { constructor(props, context) { super(props, context); this.state={ payVouchersUrl: '', electronicUrl: '', comId: '' }; } componentDidMount() { enterpriseCompanyComBaseInfoGetComBaseInfoById({}).then(res => { this.setState({ comId: res.data.comId }); }); } _renderInfo() { const { info } = this.props; // if(info) { // axios({ // method: 'get', // url: // `${host}/task/com/wallet/com-account-pay-voucher?comWalletTradeId=${info.flow_no}`, //后台请求地址 // headers: { // access_token: store.get('saas')['access_token'] // } // }).then(data => { // console.log(data, 'data'); // // document.write(data.data); // // if (!data) { // // return; // // } // // let url = data.data.data; // // let link = document.createElement('a'); // // link.style.display = 'none'; // // link.href = url; // // link.setAttribute( // // 'download', // // `瞎咋.xls` // // ); // // document.body.appendChild(link); // // link.click(); // }); // // comAccountPayVoucher({comWalletTradeId: info.flow_no}).then(res => { // // console.log(res, 'resresrtes'); // // }); // } return (
) } render() { console.log(this.props.info, 'info'); return ( { this.props.info? ( this._renderInfo() ): ( '' //
// 数据请求中,请稍后。。。 //
) } {/* 底部按钮 */}
{/* */}
); } }