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 config = useConfig(businessType, "cai-wu");
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) {
const message =
item.path === "approval"
? `确认审核通过选中的${rows.length}行数据吗?`
: item.path === "reject"
? `确认退回选中的${rows.length}行数据吗?`
: `确认选中的${rows.length}行数据客户已收票吗?`;
const data = item.path === "approval" ? rows.map((o) => o.invbillNum) : item.path === "reject" ? rows[0]["invGroupNum"] : rows.map((o) => o.invbillNum);
const url = item.path === "approval" ? config.edit.approvalUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl;
let message = null;
let data = rows.map((o) => o.invbillNum);
if (item.path === "approval") {
message = `确认审核通过选中的${rows.length}行数据吗?`;
url = config.edit.approvalUrl;
} else if (item.path === "reject") {
message = `确认退回选中的${rows.length}行数据吗?`;
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);
}
} else if (item.path === "export-group") {

Loading…
Cancel
Save