zhaoxinyu 5 months ago
parent
commit
89dd4f730d
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js
  2. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  3. 21
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js

@ -36,6 +36,7 @@ export default function (businessType) {
const queryUrl = `settleaccount/${service}/main-query`; const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export`; const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`; const addUrl = `settleaccount/${service}/generate-invoice`;
const backUrl = `settleaccount/${service}/back-can-settlement`;
const queryMethod = "POST"; const queryMethod = "POST";
const exportMethod = "POST"; const exportMethod = "POST";
@ -105,6 +106,7 @@ export default function (businessType) {
edit: { edit: {
exportUrl, exportUrl,
addUrl, addUrl,
backUrl,
exportMethod, exportMethod,
addMethod, addMethod,
schema: schema, schema: schema,

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -110,6 +110,7 @@ function createUsableSettleList(path, business, client, title = "可结算单")
component: "/settle/usable", component: "/settle/usable",
children: [ children: [
createButton("query", "title=查询&isTop=true"), createButton("query", "title=查询&isTop=true"),
createButton("back", "title=退回"),
createButton("add", "title=创建发票"), //行级按钮 createButton("add", "title=创建发票"), //行级按钮
createButton("export", "title=导出&isTop=true&pattern=paged"), createButton("export", "title=导出&isTop=true&pattern=paged"),
], ],

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

@ -15,6 +15,7 @@ export default {
const config = useConfig(businessType); const config = useConfig(businessType);
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
const url = config.edit.addUrl; const url = config.edit.addUrl;
const backUrl = config.edit.backUrl;
if (item.path === "add") { if (item.path === "add") {
const invbillNum = rows[0].billNum; const invbillNum = rows[0].billNum;
await appListRef.value.onClick( await appListRef.value.onClick(
@ -31,6 +32,26 @@ export default {
true true
); );
} }
if (item.path === "back") {
const data = appListRef.value.buildQuery();
await appListRef.value.onClick(
async () => {
const result = await request(backUrl, data, { method: "POST" }, true);
if (result.errors) {
if (result.data.code === 400 && result.data.fileName) {
ElMessage({
type: "warnning",
message: "操作失败",
});
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
}
console.log(result);
}
},
`确认是否退回到不可结算单?`,
true
);
}
}; };
return { appListRef, config, onCommand }; return { appListRef, config, onCommand };
}, },

Loading…
Cancel
Save