Browse Source

新增价格单查看三个页面,通过角色限制

master
zhouhongjun 12 months ago
parent
commit
220cff8f52
  1. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  2. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js

@ -66,6 +66,12 @@ export default [
createButton("disable", "title=停用&disabled=o=>o.isCancel===true"), createButton("disable", "title=停用&disabled=o=>o.isCancel===true"),
], ],
}, },
{
...createPage("bei-jian-show", "title=备件价格单查看"),
children: [
createButton("query", "title=查询&isTop=true")
],
},
{ {
...createPage("yin-du-jian", "title=印度件价格单"), ...createPage("yin-du-jian", "title=印度件价格单"),
children: [ children: [
@ -78,6 +84,12 @@ export default [
createButton("disable", "title=停用&disabled=o=>o.isCancel===true"), createButton("disable", "title=停用&disabled=o=>o.isCancel===true"),
], ],
}, },
{
...createPage("yin-du-jian-show", "title=印度件价格单查看"),
children: [
createButton("query", "title=查询&isTop=true")
],
},
// { // {
// ...createPage("cai-gou", "title=采购价格单"), // ...createPage("cai-gou", "title=采购价格单"),
// children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], // children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
@ -94,6 +106,12 @@ export default [
createButton("disable", "title=停用&disabled=o=>o.isCancel===true"), createButton("disable", "title=停用&disabled=o=>o.isCancel===true"),
], ],
}, },
{
...createPage("xiao-shou-show", "title=销售价格单查看"),
children: [
createButton("query", "title=查询&isTop=true")
],
},
// { // {
// ...createPage("ke-hu", "title=客户库位关系表"), // ...createPage("ke-hu", "title=客户库位关系表"),
// children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], // children: [createButton("query", "title=查询&isTop=true"), createButton("import", "title=导入&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

@ -98,6 +98,10 @@ const refreshRouter = async () => {
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data"); const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data");
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou" && o.path !== "yin-du-jian"); baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian" && o.path !== "xiao-shou" && o.path !== "yin-du-jian");
} }
if (appStore.user.roles.some((o) => o === "admin")) {
const baseDataRoutes = serverRoutes.find((o) => o.path === "base-data");
baseDataRoutes.children = baseDataRoutes.children.filter((o) => o.path !== "bei-jian-show" && o.path !== "xiao-shou-show" && o.path !== "yin-du-jian-show");
}
const setPermission = (list, parent = null) => { const setPermission = (list, parent = null) => {
list.forEach((o) => { list.forEach((o) => {
// full path // full path

Loading…
Cancel
Save