Browse Source

[CI SKIP]

master
wanggang 1 year ago
parent
commit
e504ce49f3
  1. 26
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

26
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

@ -19,16 +19,24 @@ export default {
const businessType = route.meta.businessType; const businessType = route.meta.businessType;
const config = useConfig(businessType, "cai-wu"); const config = useConfig(businessType, "cai-wu");
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
if (item.path === "approval" || item.path === "reject" || item.path === "receive") { if (item.path === "approval" || item.path === "reject" || item.path === "receive" || item.path === "sync") {
if (rows.length > 0) { if (rows.length > 0) {
const message = let message = null;
item.path === "approval" let data = rows.map((o) => o.invbillNum);
? `确认审核通过选中的${rows.length}行数据吗?` if (item.path === "approval") {
: item.path === "reject" message = `确认审核通过选中的${rows.length}行数据吗?`;
? `确认退回选中的${rows.length}行数据吗?` url = config.edit.approvalUrl;
: `确认选中的${rows.length}行数据客户已收票吗?`; } else if (item.path === "reject") {
const data = item.path === "approval" ? rows.map((o) => o.invbillNum) : item.path === "reject" ? rows[0]["invGroupNum"] : rows.map((o) => o.invbillNum); message = `确认退回选中的${rows.length}行数据吗?`;
const url = item.path === "approval" ? config.edit.approvalUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl; data = rows[0]["invGroupNum"];
url = config.edit.rejectUrl;
} else if (item.path === "receive") {
message = `确认选中的${rows.length}行数据客户已收票吗?`;
url = config.edit.receivedUrl;
} else if (item.path === "sync") {
message = `确认选中的${rows.length}行数据同步到QAD吗?`;
url = "settleaccount/invoice_service/submit-to-qad";
}
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true); await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
} }
} else if (item.path === "export-group") { } else if (item.path === "export-group") {

Loading…
Cancel
Save