Browse Source

增加QAD撤销功能

master
zhouhongjun 5 months ago
parent
commit
54b6e868cc
  1. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
  3. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  4. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  5. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js
  6. 13
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
  7. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -559,7 +559,9 @@ export default {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
}, "确认导出?");
} else if (item.meta.pattern === "file") {
}
else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) {
const url = config.edit.exportUrl;
@ -601,7 +603,7 @@ export default {
} else {
console.log(item);
}
}
}
else if (item.path === "import") {
//import
try {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js

@ -18,7 +18,7 @@ const stateOptions = [
{ value: 6, label: "扣减进行中" },
{ value: 7, label: "撤销扣减进行中" },
{ value: 8, label: "已提交QAD" },
{ value: 9, label: "红冲" },
{ value: 9, label: "待撤销" },
{ value: 10, label: "生成发票中" },
{ value: 11, label: "扣减单生成中" },
{ value: 12, label: "发票同步中" },
@ -207,7 +207,7 @@ const invState = {
{ value: 6, label: "扣减进行中" },
{ value: 7, label: "撤销扣减进行中" },
{ value: 8, label: "已提交QAD" },
{ value: 9, label: "红冲" },
{ value: 9, label: "待撤销" },
{ value: 10, label: "生成发票中" },
{ value: 11, label: "扣减单生成中" },
{ value: 12, label: "发票同步中" },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js

@ -95,6 +95,7 @@ export default function (businessType, type) {
const reissueUrl = `settleaccount/${service}/reissue-invoice`;
const approvalUrl = `settleaccount/${service}/approval-passed`;
const importUrl = `settleaccount/${service}/excel-import`;
const revokeUrl = `settleaccount/${service}/cancel-to-qad`;
const queryMethod = "POST";
const exportMethod = "POST";
const updateMethod = "POST";
@ -105,6 +106,7 @@ export default function (businessType, type) {
const reissueMethod = "POST";
const approvalMethod = "POST";
const importMethod = "POST";
const revokeMethod = "POST";
return {
query: {
url: queryUrl,
@ -205,6 +207,7 @@ export default function (businessType, type) {
reissueUrl,
approvalUrl,
importUrl,
revokeUrl,
exportMethod,
updateMethod,
exportGroupMethod,
@ -214,6 +217,7 @@ export default function (businessType, type) {
reissueMethod,
approvalMethod,
importMethod,
revokeMethod,
schema: schema,
},
};

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

@ -415,6 +415,11 @@ export default [
"title=导入开票文件&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 9) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"revoke",
"title=撤销QAD&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 9) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"approval",
"title=财务审核通过&isTop=true",

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/finance/check.js

@ -24,7 +24,7 @@ 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" || item.path === "sync") {
if (item.path === "approval" || item.path === "reject" || item.path === "receive" || item.path === "sync"|| item.path === "revoke") {
if (rows.length > 0) {
let message = null;
let url = null;
@ -43,6 +43,10 @@ export default {
message = `确认选中的${rows.length}行数据同步到QAD吗?`;
url = "settleaccount/invoice_service/submit-to-qad";
}
else if (item.path === "revoke") {
message = `确认选中的${rows.length}行数据撤销到QAD吗?`;
url = "settleaccount/invoice_service/cancel-to-qad";
}
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
}
} else if (item.path === "export-group") {

13
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js

@ -31,7 +31,18 @@ export default {
const url = item.path === "approval" ? config.edit.invoiceUrl : item.path === "reject" ? config.edit.rejectUrl : config.edit.receivedUrl;
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
}
} else if (item.path === "export-group") {
}
else if (item.path === "revoke") {
if (rows.length > 0) {
const message =`确认撤销选中的${rows.length}行数据吗?`;
const data = rows.map((o) => o.invbillNum);
const url = config.edit.revokeUrl;
await appListRef.value.onClick(async () => await request(url, data, { method: "POST" }), message, true);
}
}
else if (item.path === "export-group") {
const url = config.edit.exportGroupUrl;
const method = config.edit.exportGroupMethod;
const postData = {

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

@ -37,7 +37,7 @@ export default {
} 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