Browse Source

增加QAD撤销功能

master
zhouhongjun 5 months ago
parent
commit
54b6e868cc
  1. 4
      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

4
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}`)); 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"]}`)); window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) { } else if ((item.meta.pattern = "row")) {
const url = config.edit.exportUrl; const url = config.edit.exportUrl;

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

@ -18,7 +18,7 @@ const stateOptions = [
{ value: 6, label: "扣减进行中" }, { value: 6, label: "扣减进行中" },
{ value: 7, label: "撤销扣减进行中" }, { value: 7, label: "撤销扣减进行中" },
{ value: 8, label: "已提交QAD" }, { value: 8, label: "已提交QAD" },
{ value: 9, label: "红冲" }, { value: 9, label: "待撤销" },
{ value: 10, label: "生成发票中" }, { value: 10, label: "生成发票中" },
{ value: 11, label: "扣减单生成中" }, { value: 11, label: "扣减单生成中" },
{ value: 12, label: "发票同步中" }, { value: 12, label: "发票同步中" },
@ -207,7 +207,7 @@ const invState = {
{ value: 6, label: "扣减进行中" }, { value: 6, label: "扣减进行中" },
{ value: 7, label: "撤销扣减进行中" }, { value: 7, label: "撤销扣减进行中" },
{ value: 8, label: "已提交QAD" }, { value: 8, label: "已提交QAD" },
{ value: 9, label: "红冲" }, { value: 9, label: "待撤销" },
{ value: 10, label: "生成发票中" }, { value: 10, label: "生成发票中" },
{ value: 11, label: "扣减单生成中" }, { value: 11, label: "扣减单生成中" },
{ value: 12, 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 reissueUrl = `settleaccount/${service}/reissue-invoice`;
const approvalUrl = `settleaccount/${service}/approval-passed`; const approvalUrl = `settleaccount/${service}/approval-passed`;
const importUrl = `settleaccount/${service}/excel-import`; const importUrl = `settleaccount/${service}/excel-import`;
const revokeUrl = `settleaccount/${service}/cancel-to-qad`;
const queryMethod = "POST"; const queryMethod = "POST";
const exportMethod = "POST"; const exportMethod = "POST";
const updateMethod = "POST"; const updateMethod = "POST";
@ -105,6 +106,7 @@ export default function (businessType, type) {
const reissueMethod = "POST"; const reissueMethod = "POST";
const approvalMethod = "POST"; const approvalMethod = "POST";
const importMethod = "POST"; const importMethod = "POST";
const revokeMethod = "POST";
return { return {
query: { query: {
url: queryUrl, url: queryUrl,
@ -205,6 +207,7 @@ export default function (businessType, type) {
reissueUrl, reissueUrl,
approvalUrl, approvalUrl,
importUrl, importUrl,
revokeUrl,
exportMethod, exportMethod,
updateMethod, updateMethod,
exportGroupMethod, exportGroupMethod,
@ -214,6 +217,7 @@ export default function (businessType, type) {
reissueMethod, reissueMethod,
approvalMethod, approvalMethod,
importMethod, importMethod,
revokeMethod,
schema: schema, schema: schema,
}, },
}; };

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

@ -415,6 +415,11 @@ export default [
"title=导入开票文件&isTop=true", "title=导入开票文件&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 9) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1) (_, 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( createButton(
"approval", "approval",
"title=财务审核通过&isTop=true", "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 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" || item.path === "sync") { if (item.path === "approval" || item.path === "reject" || item.path === "receive" || item.path === "sync"|| item.path === "revoke") {
if (rows.length > 0) { if (rows.length > 0) {
let message = null; let message = null;
let url = null; let url = null;
@ -43,6 +43,10 @@ export default {
message = `确认选中的${rows.length}行数据同步到QAD吗?`; message = `确认选中的${rows.length}行数据同步到QAD吗?`;
url = "settleaccount/invoice_service/submit-to-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); 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") {

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; 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); 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 url = config.edit.exportGroupUrl;
const method = config.edit.exportGroupMethod; const method = config.edit.exportGroupMethod;
const postData = { const postData = {

Loading…
Cancel
Save