Browse Source

update

master
wanggang 1 year ago
parent
commit
d3eecb1f4c
  1. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

@ -3,7 +3,7 @@ import html from "html";
import { ref } from "vue";
import { useRoute } from "vue-router";
import useConfig from "../../models/settle/usable.js";
import request from "../../request/index.js";
import request, { getUrl } from "../../request/index.js";
export default {
components: { AppList },
@ -17,7 +17,19 @@ export default {
const url = config.edit.addUrl;
if (item.path === "add") {
const invbillNum = rows[0].billNum;
await appListRef.value.onClick(async () => await request(url, invbillNum, { method: "POST" }, true), `确认为${invbillNum}创建发票?`, true);
await appListRef.value.onClick(
async () => {
const result = await request(url, invbillNum, { method: "POST" }, true);
if (result.errors) {
if (result.data.code === 400 && result.data.fileName) {
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
}
console.log(result);
}
},
`确认为${invbillNum}创建发票?`,
true
);
}
};
return { appListRef, config, onCommand };

Loading…
Cancel
Save