You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

435 lines
19 KiB

import createRoute, { createPage, createButton } from "./utils.js";
2 years ago
// #region 数据输入
function createInputJieSuanShuju(path, business, client, title = "结算数据") {
2 years ago
const routes = {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/jie-suan",
children: [
createButton("query", "title=查询&isTop=true"),
2 years ago
//createButton("import", "title=导入&isTop=true"),
createButton("export", "title=导出&pattern=row&key=billNum"),
2 years ago
//createButton("delete", "title=删除&isTop=true"),
],
};
2 years ago
if (business !== "MaiDanJianBBAC") {
2 years ago
routes.children.push(createButton("import", "title=导入&isTop=true"));
routes.children.push(createButton("delete", "title=删除&isTop=true"));
}
return routes;
}
function createInputFaYunShuJu(path, business, client, title = "发运数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/fa-yun",
2 years ago
children: [createButton("query", "title=查询&isTop=true"), createButton("sync", "title=手动同步&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
function createInputEdiShuJu(path, business, client, title = "EDI数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/edi",
2 years ago
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
2 years ago
// #endregion
2 years ago
// #region 数据比对
function createCompareFaYun(path, business, client, title = "EDI与发运对比") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/compare/fa-yun",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=生成比对&isTop=true"),
createButton("delete", "title=删除&isTop=true"),
createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
],
};
}
function createCompareJieSuan(path, business, client, title = "EDI、发运与结算比对") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/compare/jie-suan",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=生成比对&isTop=true"),
createButton("delete", "title=删除&isTop=true"),
createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
//createButton("export", "title=更新结算数据状态&isTop=true"),
],
};
}
2 years ago
// #endregion
// #region 结算开票
function createUsableSettleList(path, business, client, title = "可结算单") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/usable",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("add", "title=创建发票"), //行级按钮
createButton("export", "title=导出&isTop=true&pattern=paged"),
],
};
}
function createUnableSettleList(path, business, client, title = "不可结算明细") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/unable",
2 years ago
children: [createButton("query", "title=查询&isTop=true"), createButton("add", "title=生成可结算单&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
2 years ago
};
}
2 years ago
function createCommerceCheckList(path, business, client, title = "商务审批") {
2 years ago
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
2 years ago
component: "/settle/commerce",
2 years ago
children: [
createButton("query", "title=查询&isTop=true"),
2 years ago
createButton("export", "title=导出&isTop=true&pattern=paged"),
2 years ago
createButton(
"approval",
"title=商务审核通过&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 1) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton(
"reject",
"title=退回",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 1) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
2 years ago
createButton("export-group", "title=导出发票分组&pattern=paged"),
2 years ago
createButton(
"receive",
"title=客户已收票&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 3) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
2 years ago
// createButton(
// "bao-fei",
// "title=报废&isTop=true",
// (_, q) => q.filters.some((o) => o.column === "state" && (o.value === 3 || o.value === 4)) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
// ),
2 years ago
],
};
}
2 years ago
function createVmiOutCheckList(path, business, client, title = "寄售库库存扣减审批") {
2 years ago
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
2 years ago
component: "/settle/inventory",
2 years ago
children: [
createButton("query", "title=查询&isTop=true"),
2 years ago
createButton("approval", "title=扣减审核通过&isTop=true"),
2 years ago
createButton("export", "title=导出&isTop=true&pattern=paged"),
2 years ago
],
};
}
2 years ago
// #endregion
2 years ago
export default [
{
2 years ago
...createPage("input/jie-suan/detail", "title=数据输入结算数据明细&isHidden=true"),
children: [createButton("query", "title=查询&isTop=true")],
},
{
...createPage("settle/detail", "title=结算单结算数据明细&isHidden=true"),
children: [createButton("query", "title=查询&isTop=true")],
},
2 years ago
{
2 years ago
...createPage("settle/inventory-detail", "title=寄售库库存扣减审批明细&isHidden=true"),
2 years ago
children: [createButton("query", "title=查询&isTop=true")],
},
{
...createRoute("jis-bbac", "title=JIS-BBAC"),
2 years ago
children: [
{
...createRoute("input", "title=数据输入"),
2 years ago
children: [
2 years ago
createInputJieSuanShuju("bbac_sa_service", "JisBBAC", "bbac-1040", "JIS-BBAC 结算数据"),
2 years ago
createInputJieSuanShuju("bbac_sa_service2", "JisBBAC", "bbac-1046", "JIS-BBAC顺义 结算数据"),
2 years ago
createInputFaYunShuJu("bbac_se_detail_service", "JisBBAC", "bbac", "JIS-BBAC 发运数据"),
createInputEdiShuJu("bbac_se_edi_service", "JisBBAC", "bbac", "JIS-BBAC EDI数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
children: [
2 years ago
createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI与发运对比"),
2 years ago
createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI、发运与结算对比"),
],
},
{
2 years ago
...createRoute("settlement", "title=结算开票"),
children: [
2 years ago
createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac", "JIS-BBAC 可结算单"),
createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac", "JIS-BBAC 不可结算明细"),
2 years ago
createCommerceCheckList("bbac_ba_service", "JisBBAC", "bbac", "JIS-BBAC 商务审批"),
createVmiOutCheckList("bbac_pd_service", "JisBBAC", "bbac", "JIS-BBAC 寄售库库存扣减审批"),
],
},
],
},
{
2 years ago
...createRoute("jis-hbpo", "title=JIS-HBPO"),
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
children: [
2 years ago
createInputJieSuanShuju("hbpo_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 结算数据"),
createInputFaYunShuJu("hbpo_se_detail_service", "JisHBPO", "hbpo", "JIS-HBPO 发运数据"),
createInputEdiShuJu("hbpo_se_edi_service", "JisHBPO", "hbpo", "JIS-HBPO EDI数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
children: [
2 years ago
createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI与发运对比"),
2 years ago
createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI、发运与结算对比"),
],
},
{
2 years ago
...createRoute("settlement", "title=结算开票"),
children: [
2 years ago
createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 可结算单"),
createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 不可结算明细"),
2 years ago
createCommerceCheckList("hbpo_ba_service", "JisHBPO", "hbpo", "JIS-HBPO 商务审批"),
createVmiOutCheckList("hbpo_pd_service", "JisHBPO", "hbpo", "JIS-HBPO 寄售库库存扣减审批"),
],
},
2 years ago
],
},
{
2 years ago
...createRoute("jit", "title=直供件"),
children: [
{
2 years ago
...createRoute("jit-bbac", "title=BBAC"),
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
2 years ago
children: [
2 years ago
createInputJieSuanShuju("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac-1040", "直供件-BBAC 结算数据"),
2 years ago
createInputJieSuanShuju("bbac_jit_pub_sa_service2", "ZhiGongJianBBAC", "bbac-1046", "直供件-BBAC顺义 结算数据"),
2 years ago
createInputFaYunShuJu("bbac_jit_pub_se_detail_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 发运数据"),
2 years ago
],
},
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 发运与结算对比")],
},
{
2 years ago
...createRoute("settlement", "title=结算开票"),
children: [
2 years ago
createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 可结算单"),
createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 不可结算明细"),
2 years ago
createCommerceCheckList("bbac_jit_pub_ba_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 商务审批"),
createVmiOutCheckList("bbac_jit_pub_pd_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 寄售库库存扣减审批"),
2 years ago
],
},
],
},
{
2 years ago
...createRoute("jit-hbpo", "title=HBPO"),
children: [
2 years ago
{
2 years ago
...createRoute("input", "title=数据输入"),
children: [
2 years ago
createInputJieSuanShuju("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 结算数据"),
2 years ago
createInputFaYunShuJu("hbpo_jit_pub_se_detail_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 发运数据"),
],
},
2 years ago
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 发运与结算对比")],
2 years ago
},
{
...createRoute("settlement", "title=结算开票"),
children: [
2 years ago
createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 可结算单"),
createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 不可结算明细"),
createCommerceCheckList("hbpo_jit_pub_ba_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 商务审批"),
createVmiOutCheckList("hbpo_jit_pub_pd_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 寄售库库存扣减审批"),
2 years ago
],
},
],
},
],
},
{
2 years ago
...createRoute("md", "title=买单件"),
children: [
{
2 years ago
...createRoute("md-bbac", "title=BBAC"),
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
children: [
2 years ago
createInputJieSuanShuju("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac", "买单件-BBAC 结算数据"),
createInputFaYunShuJu("bbac_md_pub_se_detail_service", "MaiDanJianBBAC", "bbac", "买单件-BBAC 发运数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac", "买单件-BBAC 发运与结算对比")],
},
],
},
{
2 years ago
...createRoute("md-hbpo", "title=HBPO"),
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
children: [
2 years ago
createInputJieSuanShuju("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 结算数据"),
createInputFaYunShuJu("hbpo_md_pub_se_detail_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 发运数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 发运与结算对比")],
},
2 years ago
{
2 years ago
...createRoute("settlement", "title=结算开票"),
2 years ago
children: [
2 years ago
createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 可结算单"),
createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 不可结算明细"),
2 years ago
createCommerceCheckList("hbpo_md_pub_ba_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 商务审批"),
createVmiOutCheckList("hbpo_md_pub_pd_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 寄售库库存扣减审批"),
2 years ago
],
},
2 years ago
],
},
],
},
{
2 years ago
...createRoute("bj", "title=备件"),
2 years ago
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
2 years ago
children: [
2 years ago
createInputJieSuanShuju("bj_pub_sa_service", "BeiJian", "bbac", "备件-BBAC 结算数据"),
createInputFaYunShuJu("bj_pub_se_detail_service", "BeiJian", "bbac", "备件-BBAC 发运数据"),
2 years ago
],
},
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac", "备件-BBAC 发运与结算对比")],
2 years ago
},
{
2 years ago
...createRoute("settlement", "title=结算开票"),
2 years ago
children: [
2 years ago
createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac", "备件-BBAC 可结算单"),
createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac", "备件-BBAC 不可结算明细"),
2 years ago
createCommerceCheckList("bj_pub_ba_service", "BeiJian", "bbac", "备件-BBAC 商务审批"),
createVmiOutCheckList("bj_pub_pd_service", "BeiJian", "bbac", "备件-BBAC 寄售库库存扣减审批"),
],
},
],
},
{
2 years ago
...createRoute("in", "title=印度件"),
children: [
{
2 years ago
...createRoute("input", "title=数据输入"),
children: [
2 years ago
createInputJieSuanShuju("in_pub_sa_service", "YinDuJian", "bbac", "印度件-BBAC 结算数据"),
createInputFaYunShuJu("in_pub_se_detail_service", "YinDuJian", "bbac", "印度件-BBAC 发运数据"),
],
},
{
...createRoute("contrast", "title=数据比对"),
2 years ago
children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac", "印度件-BBAC 发运与结算对比")],
},
{
2 years ago
...createRoute("settlement", "title=结算开票"),
children: [
2 years ago
createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac", "印度件-BBAC 可结算单"),
createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac", "印度件-BBAC 不可结算明细"),
2 years ago
createCommerceCheckList("in_pub_ba_service", "YinDuJian", "bbac", "印度件-BBAC 商务审批"),
createVmiOutCheckList("in_pub_pd_service", "YinDuJian", "bbac", "印度件-BBAC 寄售库库存扣减审批"),
],
},
],
},
{
2 years ago
...createRoute("invoice", "title=财务审核"),
children: [
{
2 years ago
...createPage("finance", `title=财务审核`),
2 years ago
component: "/settle/finance",
children: [
2 years ago
createButton("query", "title=查询&isTop=true"),
2 years ago
createButton("export", "title=导出&isTop=true&pattern=paged"),
2 years ago
createButton(
"import",
"title=导入开票文件&isTop=true",
2 years ago
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
2 years ago
),
createButton(
"approval",
"title=财务审核通过&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
2 years ago
createButton("export-group", "title=导出发票分组&pattern=paged"),
2 years ago
//createButton("approval", "title=发票重开"),
2 years ago
createButton(
"reject",
"title=退回&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
2 years ago
createButton(
"sync",
"title=同步到QAD&isTop=true",
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 4) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
2 years ago
],
},
2 years ago
],
},
{
2 years ago
...createRoute("cost", "title=实际采购成本&isHidden=true"),
2 years ago
children: [
{
2 years ago
...createPage("cost", "title=实际采购成本", "/settle/cost"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&pattern=paged"), createButton("add", "title=生成&pattern=paged")],
},
],
},
{
2 years ago
...createRoute("vmi", "title=寄售库"),
children: [
{
2 years ago
...createPage("balance", "title=库存余额查询"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
{
...createPage("sum", "title=库存余额汇总"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
{
2 years ago
...createPage("backup", "title=时点库存余额查询"),
children: [
2 years ago
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
2 years ago
createButton("invoke", "title=手动备份&isTop=true"),
],
},
{
2 years ago
...createPage("log", "title=库存事务查询"),
path: "log",
children: [
2 years ago
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
2 years ago
createButton("export-replenishment", "title=补货数据导出&isTop=true&pattern=paged"),
],
},
{
2 years ago
...createPage("adjust", "title=寄售库存调整"),
children: [createButton("query", "title=查询&isTop=true"), createButton("create", "title=新建&isTop=true"), createButton("import", "title=导入&isTop=true")],
},
],
},
2 years ago
];