From 15518963925a3c485d52de0f0ddfc32de867a942 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Wed, 16 Aug 2023 17:02:31 +0800
Subject: [PATCH] update
---
.../wwwroot/components/form/form-input.js | 2 +-
.../wwwroot/components/list/index.js | 13 +-
.../wwwroot/models/compare/compare.js | 162 +++++++++++++++++-
.../wwwroot/models/compare/fa-yun.js | 127 --------------
.../wwwroot/models/input/edi.js | 8 +-
.../wwwroot/models/input/fa-yun.js | 14 +-
.../wwwroot/models/input/jie-suan.js | 14 +-
.../wwwroot/models/settle/detail.js | 8 +-
.../wwwroot/models/settle/unable.js | 105 ------------
.../wwwroot/models/settle/usable.js | 10 +-
.../wwwroot/router/business.js | 28 +--
.../wwwroot/views/compare/_compare.js | 83 +++++++++
.../wwwroot/views/compare/fa-yun.js | 99 +----------
.../wwwroot/views/compare/jie-suan.js | 107 +-----------
.../wwwroot/views/input/edi.js | 7 +-
.../wwwroot/views/input/fa-yun.js | 9 +-
.../wwwroot/views/input/jie-suan.js | 9 +-
.../wwwroot/views/settle/commerce.js | 0
.../wwwroot/views/settle/detail.js | 15 --
.../wwwroot/views/settle/finance.js | 0
.../wwwroot/views/settle/unable.js | 12 +-
.../wwwroot/views/settle/usable.js | 10 +-
22 files changed, 330 insertions(+), 512 deletions(-)
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
index 95673dc6..31f75c58 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
@@ -14,7 +14,7 @@ export default {
{{dayjs(model[prop]).format('YYYY-MM-DD')}}
{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}
******
- {{options.find(o=>o.value===model[prop])?.label}}
+ {{options.find(o=>o.value==model[prop])?.label??model[prop]}}
{{model[prop]}}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
index 12e3b810..0354ee57 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
@@ -813,8 +813,19 @@ export default {
queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
//
const postData = JSON.parse(JSON.stringify(queryModel.value));
- Object.assign(postData, subListQuery.value.query);
+ //Object.assign(postData, subListQuery.value.query);//注释掉子表DTO查询
postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
+ if (subListQuery.value.query) {
+ Object.keys(subListQuery.value.query).forEach((o) => {
+ postData.filters.push({
+ logic: "and",
+ column: o,
+ action: "equal",
+ value: subListQuery.value.query[o],
+ });
+ });
+ }
+ //添加子表filter查询
if (route.meta.businessType) {
postData.filters.push({
logic: "and",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
index a9829efb..0cb3427a 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
@@ -2,7 +2,8 @@ import defaultVersion from "../version.js";
const version = Object.assign({}, defaultVersion);
-export default {
+const compareSchema = {
+ title: "数据比对",
properties: {
version: Object.assign(version, { rules: [{ required: true }] }),
seDateTime: {
@@ -30,3 +31,162 @@ export default {
},
},
};
+
+const stateName = {
+ title: "状态",
+ type: "string",
+ input: "select",
+ clearable: true,
+ options: [
+ { label: "执行完成(任务成功)", value: "Succeeded" },
+ { label: "执行完成(任务失败)", value: "Failed" },
+ { label: "执行中", value: "Processing" },
+ { label: "等待执行", value: "Enqueued" },
+ ],
+};
+
+const schema = {
+ title: "数据对比",
+ type: "object",
+ properties: {
+ type: {
+ title: "版本号",
+ type: "string",
+ },
+ taskId: {
+ title: "单据流水号",
+ type: "string",
+ },
+ email: {
+ title: "创建人",
+ type: "string",
+ },
+ createdAt: {
+ title: "创建时间",
+ type: "DateTime",
+ },
+ remark: {
+ title: "说明",
+ type: "string",
+ },
+ stateName,
+ },
+};
+
+const nameList = {
+ JisBBAC: "JisBBAC结算与发运数据对比",
+ JisHBPO: "JisHBPO结算与发运数据对比",
+ ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比",
+ ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比",
+ MaiDanJianBBAC: "买单件BBAC结算与发运数据对比",
+ MaiDanJianHBPO: "买单件HBPO结算与发运数据对比",
+ BeiJian: "备件结算与发运数据对比",
+ YinDuJian: "印度件结算与发运数据对比",
+};
+
+export default function (businessType, type) {
+ let compareService = null;
+ let title = null;
+ let name = null;
+ if (type === "fa-yun") {
+ if (businessType === "JisBBAC") {
+ compareService = "edi-se-compare/bbacedi-se-compare";
+ name = "JisBBACEDI与发运数据对比";
+ } else if (businessType === "JisHBPO") {
+ compareService = "edi-se-compare/hbpoedi-se-compare";
+ name = "JisHBPOEDI与发运数据对比";
+ }
+ } else {
+ if (businessType === "JisBBAC") {
+ compareService = "edi-se-compare/bbacedi-se-compare";
+ } else if (businessType === "JisHBPO") {
+ compareService = "edi-se-compare/hbpoedi-se-compare";
+ } else {
+ compareService = "pub_sa_detail_service/pub-sa-se-compare";
+ }
+ name = nameList[businessType];
+ }
+ const queryUrl = "settleaccount/Job/list";
+ const deleteUrl = "settleaccount/Job/delete";
+ const exportUrl = "settleaccount/pub_sa_detail_service/export";
+ const compareUrl = `settleaccount/${compareService}`;
+ const queryMethod = "POST";
+ const deleteMethod = "POST";
+ const exportMethod = "POST";
+ const compareMethod = "POST";
+
+ return {
+ title,
+ name,
+ query: {
+ url: queryUrl,
+ method: queryMethod,
+ autoSubmit: true,
+ disableQueryOnLoad: false,
+ schema: {
+ title: "数据对比",
+ type: "object",
+ properties: {
+ type: Object.assign({ defaultSelected: false }, version),
+ name: {
+ type: "string",
+ hidden: true,
+ },
+ stateName,
+ businessType: {
+ type: "string",
+ hidden: true,
+ },
+ filters: {
+ type: "array",
+ hidden: true,
+ items: {
+ type: "object",
+ properties: {
+ logic: {
+ type: "int",
+ },
+ column: {
+ type: "string",
+ },
+ action: {
+ type: "int",
+ },
+ value: {
+ type: "string",
+ },
+ },
+ },
+ default: [],
+ },
+ skipCount: {
+ hidden: true,
+ default: 0,
+ },
+ maxResultCount: {
+ hidden: true,
+ default: 10,
+ },
+ sorting: {
+ hidden: true,
+ },
+ },
+ },
+ },
+ table: {
+ schema: schema,
+ },
+ edit: {
+ deleteUrl,
+ exportUrl,
+ compareUrl,
+ deleteMethod,
+ exportMethod,
+ compareMethod,
+ schema: schema,
+ },
+ compare: {
+ schema: compareSchema,
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
deleted file mode 100644
index 2bf81a49..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
+++ /dev/null
@@ -1,127 +0,0 @@
-import version from "../version.js";
-import compareSchema from "./compare.js";
-
-const stateName = {
- title: "状态",
- type: "string",
- input: "select",
- clearable: true,
- options: [
- { label: "执行完成(任务成功)", value: "Succeeded" },
- { label: "执行完成(任务失败)", value: "Failed" },
- { label: "执行中", value: "Processing" },
- { label: "等待执行", value: "Enqueued" },
- ],
-};
-
-const schema = {
- title: "数据对比",
- type: "object",
- properties: {
- type: {
- title: "版本号",
- type: "string",
- },
- taskId: {
- title: "单据流水号",
- type: "string",
- },
- email: {
- title: "创建人",
- type: "string",
- },
- createdAt: {
- title: "创建时间",
- type: "DateTime",
- },
- remark: {
- title: "说明",
- type: "string",
- },
- stateName,
- },
-};
-
-export default function (compareService) {
- const queryUrl = "settleaccount/Job/list";
- const deleteUrl = "settleaccount/Job/delete";
- const exportUrl = "settleaccount/pub_sa_detail_service/export";
- const compareUrl = `settleaccount/${compareService}`;
- const queryMethod = "POST";
- const deleteMethod = "POST";
- const exportMethod = "POST";
- const compareMethod = "POST";
-
- return {
- query: {
- url: queryUrl,
- method: queryMethod,
- autoSubmit: true,
- disableQueryOnLoad: false,
- schema: {
- title: "数据对比",
- type: "object",
- properties: {
- type: Object.assign({ defaultSelected: false }, version),
- name: {
- type: "string",
- hidden: true,
- },
- stateName,
- businessType: {
- type: "string",
- hidden: true,
- },
- filters: {
- type: "array",
- hidden: true,
- items: {
- type: "object",
- properties: {
- logic: {
- type: "int",
- },
- column: {
- type: "string",
- },
- action: {
- type: "int",
- },
- value: {
- type: "string",
- },
- },
- },
- default: [],
- },
- skipCount: {
- hidden: true,
- default: 0,
- },
- maxResultCount: {
- hidden: true,
- default: 10,
- },
- sorting: {
- hidden: true,
- },
- },
- },
- },
- table: {
- schema: schema,
- },
- edit: {
- deleteUrl,
- exportUrl,
- compareUrl,
- deleteMethod,
- exportMethod,
- compareMethod,
- schema: schema,
- },
- compare: {
- schema: compareSchema,
- },
- };
-}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
index 78330f28..698fadf2 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
@@ -46,7 +46,13 @@ const schema = {
},
};
-export default function (service) {
+export default function (businessType) {
+ let service = null;
+ if (businessType === "JisBBAC") {
+ service = "bbac_se_edi_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_se_edi_service";
+ }
const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`;
const queryMethod = "POST";
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
index f3dc5745..dca0e093 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
@@ -110,7 +110,19 @@ const schema = {
},
};
-export default function (service, syncService) {
+export default function (businessType) {
+ let service = null;
+ let syncService = null;
+ if (businessType === "JisBBAC") {
+ service = "bbac_se_detail_service";
+ syncService = "bbacse-sync/invoke";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_se_detail_service";
+ syncService = "hbpose-sync/invoke";
+ } else {
+ service = "pub_se_detail_service";
+ syncService = "hand-se-sync/sync";
+ }
const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`;
const syncUrl = `settleaccount/${syncService}`;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
index f55dec6d..f1bbf68f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
@@ -18,7 +18,19 @@ const schema = {
},
};
-export default function (service, detailService) {
+export default function (businessType) {
+ let service = null;
+ let detailService = null;
+ if (businessType === "JisBBAC") {
+ service = "bbac_sa_service";
+ detailService = "bbac_sa_detail_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_sa_service";
+ detailService = "hbpo_sa_detail_service";
+ } else {
+ service = "pub_sa_service";
+ detailService = "pub_sa_detail_service";
+ }
const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
index 23fa5277..4e53617c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
@@ -77,8 +77,12 @@ export default function (businessType) {
} else {
service = "pub_can_sa_service";
}
- if (businessType === "JisBBAC" || businessType === "JisHBPO") {
+ if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
+ } else if (businessType === "ZhiGongJianBBAC" || businessType === "ZhiGongJianHBPO" || businessType === "YinDuJian") {
+ schema.properties.pn.title = "发货单号";
+ } else if (businessType === "BeiJian") {
+ schema.properties.pn.title = "交付识别号";
}
if (businessType !== "JisBBAC") {
delete schema.properties["isReturn"];
@@ -167,3 +171,5 @@ export default function (businessType) {
},
};
}
+
+export { schema };
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
deleted file mode 100644
index 7700a75c..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js
+++ /dev/null
@@ -1,105 +0,0 @@
-import version from "../version.js";
-import state from "../state.js";
-
-const schema = {
- title: "不可结算明细",
- type: "object",
- properties: {
- version,
- state,
- billNum: {
- title: "结算单据",
- type: "string",
- },
- settleBillNum: {
- title: "关联结算单号",
- type: "string",
- },
- invGroupNum: {
- title: "发票分组号",
- type: "string",
- oneToMany: "/settle/detail",
- config: "/models/settle/detail.js",
- },
- },
-};
-
-export default function (service) {
- const queryUrl = `settleaccount/${service}/detail-query`;
- const exportUrl = `settleaccount/${service}/export`;
- const addUrl = `settleaccount/${service}/generate-settlement-order`;
-
- const queryMethod = "POST";
- const exportMethod = "POST";
- const addMethod = "POST";
-
- return {
- query: {
- url: queryUrl,
- method: queryMethod,
- hasFilter: true,
- schema: {
- title: "发票分组号",
- type: "object",
- properties: {
- filters: {
- title: "项目",
- type: "array",
- hidden: true,
- items: {
- type: "object",
- properties: {
- logic: {
- type: "int",
- },
- column: {
- type: "string",
- },
- action: {
- type: "int",
- },
- value: {
- type: "string",
- },
- },
- },
- default: [
- {
- logic: "and",
- column: "version",
- action: "equal",
- value: null,
- readOnly: true,
- },
- ],
- },
- skipCount: {
- hidden: true,
- default: 0,
- },
- maxResultCount: {
- hidden: true,
- default: 10,
- },
- sorting: {
- hidden: true,
- },
- businessType: {
- hidden: true,
- default: 0,
- },
- },
- },
- },
- table: {
- schema: schema,
- },
- edit: {
- exportUrl,
- addUrl,
- exportMethod,
- addMethod,
- schema: schema,
- },
- };
-}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js
index 0f7999e2..eca017a1 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js
@@ -24,7 +24,15 @@ const schema = {
},
};
-export default function (service) {
+export default function (businessType) {
+ let service;
+ if (businessType === "JisBBAC") {
+ service = "bbac_can_sa_service";
+ } else if (businessType === "JisHBPO") {
+ service = "hbpo_can_sa_service";
+ } else {
+ service = "pub_can_sa_service";
+ }
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export`;
const addUrl = `settleaccount/${service}/generate-invoice`;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
index 5690051b..c1317488 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
@@ -151,8 +151,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac"),
- createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac"),
+ createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac", "JIS-BBAC 可结算单"),
+ createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac", "JIS-BBAC 不可结算明细"),
{
path: "bbac_ba_service",
meta: {
@@ -340,8 +340,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo"),
- createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo"),
+ createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 可结算单"),
+ createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 不可结算明细"),
{
path: "hbpo_ba_service",
meta: {
@@ -533,8 +533,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac"),
- createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac"),
+ createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 可结算单"),
+ createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 不可结算明细"),
{
path: "bbac_jit_pub_ba_service",
meta: {
@@ -718,8 +718,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianBBAC", "hbpo"),
- createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianBBAC", "hbpo"),
+ createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianBBAC", "hbpo", "直供件-HBPO 可结算单"),
+ createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianBBAC", "hbpo", "直供件-HBPO 不可结算明细"),
{
path: "hbpo_jit_pub_ba_service",
meta: {
@@ -939,8 +939,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo"),
- createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo"),
+ createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 可结算单"),
+ createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 不可结算明细"),
{
path: "hbpo_md_pub_ba_service",
meta: {
@@ -1126,8 +1126,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac"),
- createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac"),
+ createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac", "备件-BBAC 可结算单"),
+ createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac", "备件-BBAC 不可结算明细"),
{
path: "bj_pub_ba_service",
meta: {
@@ -1311,8 +1311,8 @@ export default [
{
...createRoute("settlement", "title=结算开票"),
children: [
- createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac"),
- createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac"),
+ createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac", "印度件-BBAC 可结算单"),
+ createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac", "印度件-BBAC 不可结算明细"),
{
path: "in_pub_ba_service",
meta: {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
new file mode 100644
index 00000000..b4755aa9
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js
@@ -0,0 +1,83 @@
+import AppList from "../../components/list/index.js";
+import AppForm from "../../components/form/index.js";
+import html from "html";
+import { useRoute } from "vue-router";
+import useConfig from "../../models/compare/compare.js";
+import { ref, onMounted, onUnmounted } from "vue";
+import { schemaToModel } from "../../utils/index.js";
+import request from "../../request/index.js";
+
+export default function (type) {
+ return {
+ components: { AppList, AppForm },
+ template: html`
+
+ EDI与发运对比
+
+
+
+
+
+
+ `,
+ styles: html``,
+ setup() {
+ const route = useRoute();
+ const businessType = route.meta.businessType;
+ const dialogVisable = ref(false);
+ const loading = ref(false);
+ const config = useConfig(businessType, type);
+ const schema = config.compare.schema;
+ const defaultModel = schemaToModel(schema);
+ const model = ref(null);
+ const formRef = ref(null);
+ const onCommand = async (item, rows) => {
+ console.log(item.path, item, rows);
+ if (item.path === "compare") {
+ model.value = Object.assign({}, defaultModel);
+ dialogVisable.value = true;
+ }
+ };
+ const submit = async () => {
+ try {
+ const valid = await formRef.value.validate();
+ if (valid) {
+ loading.value = true;
+ }
+ const url = config.edit.compareUrl;
+ const data = Object.assign({ businessType, name: config.name }, model.value);
+ if (data.seDateTime?.length === 2) {
+ data.seStartDateTime = data.seDateTime[0];
+ data.seEndDateTime = data.seDateTime[1];
+ }
+ if (data.downLineDateTime?.length === 2) {
+ data.downLineStartDateTime = data.downLineDateTime[0];
+ data.downLineEndDateTime = data.downLineDateTime[1];
+ }
+ if (businessType) delete data["seDateTime"];
+ delete data["downLineDateTime"];
+ const result = await request(url, data, { method: "POST" }, true);
+ if (!result.errors) {
+ dialogVisable.value = false;
+ }
+ } catch (error) {
+ console.log(error);
+ } finally {
+ loading.value = false;
+ }
+ };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
index 1492e452..201b0423 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
@@ -1,98 +1,3 @@
-import AppList from "../../components/list/index.js";
-import AppForm from "../../components/form/index.js";
-import html from "html";
-import { useRoute } from "vue-router";
-import useConfig from "../../models/compare/fa-yun.js";
-import { ref, onMounted, onUnmounted } from "vue";
-import { schemaToModel } from "../../utils/index.js";
-import request from "../../request/index.js";
+import useCompare from "./_compare.js"
-export default {
- components: { AppList, AppForm },
- template: html`
-
- EDI与发运对比
-
-
-
-
-
-
- `,
- styles: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const dialogVisable = ref(false);
- const loading = ref(false);
- let config = null;
- let name = null;
- if (businessType === "JisBBAC") {
- config = useConfig("edi-se-compare/bbacedi-se-compare");
- name = "JisBBACEDI与发运数据对比";
- } else if (businessType === "JisHBPO") {
- config = useConfig("edi-se-compare/hbpoedi-se-compare");
- name = "JisHBPOEDI与发运数据对比";
- }
- config.query.schema.properties.name.default = name;
- const schema = config.compare.schema;
- const defaultModel = schemaToModel(schema);
- const model = ref(null);
- const formRef = ref(null);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- if (item.path === "compare") {
- model.value = Object.assign({}, defaultModel);
- dialogVisable.value = true;
- }
- };
- const submit = async () => {
- try {
- const valid = await formRef.value.validate();
- if (valid) {
- loading.value = true;
- }
- const url = config.edit.compareUrl;
- const data = Object.assign({ businessType, name }, model.value);
- if (data.seDateTime?.length === 2) {
- data.seStartDateTime = data.seDateTime[0];
- data.seEndDateTime = data.seDateTime[1];
- }
- if (data.downLineDateTime?.length === 2) {
- data.downLineStartDateTime = data.downLineDateTime[0];
- data.downLineEndDateTime = data.downLineDateTime[1];
- }
- if (businessType) delete data["seDateTime"];
- delete data["downLineDateTime"];
- const result = await request(url, data, { method: "POST" }, true);
- if (!result.errors) {
- dialogVisable.value = false;
- }
- } catch (error) {
- console.log(error);
- } finally {
- loading.value = false;
- }
- };
- //
- const appListRef = ref(null);
- const event = "SaSeCompare";
- onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
- onUnmounted(() => PubSub.unsubscribe(event));
- return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
- },
-};
+export default useCompare("fa-yun");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
index f726592c..85a3670b 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
@@ -1,106 +1,3 @@
-import AppList from "../../components/list/index.js";
-import AppForm from "../../components/form/index.js";
-import html from "html";
-import { useRoute } from "vue-router";
-import useConfig from "../../models/compare/fa-yun.js";
-import { ref, onMounted, onUnmounted } from "vue";
-import { schemaToModel } from "../../utils/index.js";
-import request from "../../request/index.js";
+import useCompare from "./_compare.js";
-export default {
- components: { AppList, AppForm },
- template: html`
-
- EDI、发运与发运对比
-
-
-
-
-
-
- `,
- styles: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const dialogVisable = ref(false);
- const loading = ref(false);
- const nameList = {
- JisBBAC: "JisBBAC结算与发运数据对比",
- JisHBPO: "JisHBPO结算与发运数据对比",
- ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比",
- ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比",
- MaiDanJianBBAC: "买单件BBAC结算与发运数据对比",
- MaiDanJianHBPO: "买单件HBPO结算与发运数据对比",
- BeiJian: "备件结算与发运数据对比",
- YinDuJian: "印度件结算与发运数据对比",
- };
- let config = null;
- let name = null;
- if (businessType === "JisBBAC") {
- config = useConfig("edi-se-compare/bbacedi-se-compare");
- } else if (businessType === "JisHBPO") {
- config = useConfig("edi-se-compare/hbpoedi-se-compare");
- } else {
- config = useConfig("pub_sa_detail_service/pub-sa-se-compare");
- name = nameList[businessType];
- }
- config.query.schema.properties.businessType.default = businessType;
- config.query.schema.properties.name.default = name;
- const schema = config.compare.schema;
- const defaultModel = schemaToModel(schema);
- const model = ref(null);
- const formRef = ref(null);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- if (item.path === "compare") {
- model.value = Object.assign({}, defaultModel);
- dialogVisable.value = true;
- }
- };
- const submit = async () => {
- try {
- const valid = await formRef.value.validate();
- if (valid) {
- loading.value = true;
- }
- const url = config.edit.compareUrl;
- const data = Object.assign({}, model.value);
- data.seStartDateTime = data.seDateTime[0];
- data.seEndDateTime = data.seDateTime[1];
- data.downLineStartDateTime = data.downLineDateTime[0];
- data.downLineEndDateTime = data.downLineDateTime[1];
- delete data["seDateTime"];
- delete data["downLineDateTime"];
- const result = await request(url, data, { method: "POST" }, true);
- if (!result.errors) {
- dialogVisable.value = false;
- }
- } catch (error) {
- console.log(error);
- } finally {
- loading.value = false;
- }
- };
- //
- const appListRef = ref(null);
- const event = "SaSeCompare";
- onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
- onUnmounted(() => PubSub.unsubscribe(event));
- return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
- },
-};
+export default useCompare("jie-suan");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
index 60a68cbc..03d7615c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
@@ -7,14 +7,9 @@ export default {
components: { AppList },
template: html``,
setup() {
- let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
- if (businessType === "JisBBAC") {
- config = useConfig("bbac_se_edi_service");
- } else if (businessType === "JisHBPO") {
- config = useConfig("hbpo_se_edi_service");
- }
+ const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
index 95b4cd3a..72f4cc63 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
@@ -8,16 +8,9 @@ export default {
components: { AppList },
template: html``,
setup() {
- let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
- if (businessType === "JisBBAC") {
- config = useConfig("bbac_se_detail_service", "bbacse-sync/invoke");
- } else if (businessType === "JisHBPO") {
- config = useConfig("hbpo_se_detail_service", "hbpose-sync/invoke");
- } else {
- config = useConfig("pub_se_detail_service", "hand-se-sync/sync");
- }
+ const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "sync") {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
index bedbce70..af2b7692 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
@@ -7,16 +7,9 @@ export default {
components: { AppList },
template: html``,
setup() {
- let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
- if (businessType === "JisBBAC") {
- config = useConfig("bbac_sa_service", "bbac_sa_detail_service");
- } else if (businessType === "JisHBPO") {
- config = useConfig("hbpo_sa_service", "hbpo_sa_detail_service");
- } else {
- config = useConfig("pub_sa_service", "pub_sa_detail_service");
- }
+ const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/commerce.js
new file mode 100644
index 00000000..e69de29b
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js
deleted file mode 100644
index 8e8ef40d..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/settle/detail.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- config = useConfig("pub_can_sa_service");
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/finance.js
new file mode 100644
index 00000000..e69de29b
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
index 720089ca..e3b3f985 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
@@ -1,8 +1,7 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
-import useConfig from "../../models/settle/unable.js";
-import request from "../../request/index.js";
+import useConfig from "../../models/settle/detail.js";
export default {
components: { AppList },
@@ -10,14 +9,7 @@ export default {
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
- let config = null;
- if (businessType === "JisBBAC") {
- config = useConfig("bbac_not_sa_service");
- } else if (businessType === "JisHBPO") {
- config = useConfig("hbpo_not_sa_service");
- } else {
- config = useConfig("pub_not_sa_service");
- }
+ const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
index 2d8e983e..e129a9a8 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
@@ -2,7 +2,6 @@ import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/settle/usable.js";
-import request from "../../request/index.js";
export default {
components: { AppList },
@@ -10,14 +9,7 @@ export default {
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
- let config = null;
- if (businessType === "JisBBAC") {
- config = useConfig("bbac_can_sa_service");
- } else if (businessType === "JisHBPO") {
- config = useConfig("hbpo_can_sa_service");
- } else {
- config = useConfig("pub_can_sa_service");
- }
+ const config = useConfig(businessType);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};