Browse Source

寄售库增加差异导出功能

master
zhouhongjun 7 months ago
parent
commit
6b6c97bdff
  1. 33
      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/vmi/balance.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

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

@ -547,7 +547,8 @@ export default {
}
}
await load();
} else if (item.path === "export") {
}
else if (item.path === "export") {
if (item.meta.pattern === "paged") {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod;
@ -573,7 +574,35 @@ export default {
} else {
console.log(item);
}
} else if (item.path === "import") {
}
else if (item.path === "exportdiff") {
if (item.meta.pattern === "paged") {
const url = config.edit.exportdiffUrl;
const method = config.edit.exportdiffMethod;
const postData = buildQuery();
await onClick(async () => {
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
}, "确认导出?");
} 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;
const method = config.edit.exportMethod ?? "POST";
const postData = {
[item.meta.key]: rows[0][item.meta.key],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else {
console.log(item);
}
}
else if (item.path === "import") {
//import
try {
importModel.value = Object.assign({}, defaultImportModel);

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

@ -196,6 +196,7 @@ const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
const exportUrl = `${baseUrl}/balance-export`;
const exportdiffUrl = `${baseUrl}/balance-export-diff`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
@ -203,6 +204,7 @@ const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
const exportdiffMethod = "POST";
export default function () {
return {
@ -283,12 +285,14 @@ export default function () {
deleteUrl,
importUrl,
exportUrl,
exportdiffUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
exportdiffMethod,
schema: schema,
},
};

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

@ -461,7 +461,7 @@ export default [
children: [
{
...createPage("balance", "title=库存余额查询"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged"),createButton("exportdiff", "title=差异导出&isTop=true&pattern=paged")],
},
{
...createPage("balance-month", "title=库存按月汇总查询"),

Loading…
Cancel
Save