Browse Source

增加可结算退回到不可结算功能

master
zhouhongjun 5 months ago
parent
commit
06afc357ad
  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 exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`;
const backUrl = `settleaccount/${service}/back-can-settlement`;
const queryMethod = "POST";
const exportMethod = "POST";
@ -105,6 +106,7 @@ export default function (businessType) {
edit: {
exportUrl,
addUrl,
backUrl,
exportMethod,
addMethod,
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",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("back", "title=退回"),
createButton("add", "title=创建发票"), //行级按钮
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 onCommand = async (item, rows) => {
const url = config.edit.addUrl;
const backUrl = config.edit.backUrl;
if (item.path === "add") {
const invbillNum = rows[0].billNum;
await appListRef.value.onClick(
@ -31,6 +32,26 @@ export default {
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 };
},

Loading…
Cancel
Save