Return invoiceUrl in invoice-payment API.

This commit is contained in:
Gucheng Wang
2022-04-28 15:07:57 +08:00
parent f5590c42f7
commit 9af9ead939
4 changed files with 10 additions and 10 deletions

View File

@ -80,7 +80,8 @@ class PaymentEditPage extends React.Component {
});
if (res.msg === "") {
Setting.showMessage("success", `Successfully invoiced`);
window.location.reload();
Setting.openLinkSafe(res.data);
this.getPayment();
} else {
Setting.showMessage(res.msg.includes("成功") ? "info" : "error", res.msg);
}
@ -364,7 +365,7 @@ class PaymentEditPage extends React.Component {
<Col span={22} >
{
this.state.payment.invoiceUrl === "" ? (
<Button type={"primary"} onClick={() => {
<Button type={"primary"} loading={this.state.isInvoiceLoading} onClick={() => {
const errorText = this.checkError();
if (errorText !== "") {
Setting.showMessage("error", errorText);

View File

@ -17,7 +17,6 @@ import {Button, Descriptions, Spin} from "antd";
import i18next from "i18next";
import * as ProductBackend from "./backend/ProductBackend";
import * as ProviderBackend from "./backend/ProviderBackend";
import * as Provider from "./auth/Provider";
import * as Setting from "./Setting";
class ProductBuyPage extends React.Component {