From 0fbf414e141520d744c7c17a1f7abb6359adf0dc Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Tue, 12 Sep 2023 15:36:04 +0800 Subject: [PATCH] update --- .../wwwroot/models/settle/detail.js | 139 +++++++++--------- .../wwwroot/models/settle/unable-bk.js | 113 -------------- .../wwwroot/views/settle/unable.js | 2 + 3 files changed, 71 insertions(+), 183 deletions(-) delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js 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 7a2abe49..485eb189 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 @@ -1,73 +1,73 @@ -const schema = { - title: "通用代码", - type: "object", - disableSelection: true, - properties: { - settleBillNum: { - title: "关联结算单号", - type: "string", - }, - billNum: { - title: "发票分组号", - type: "string", - }, - settleDate: { - title: "下线日期", - type: "string", - input: "datetime", - }, - invBillNum: { - title: "发票号", - type: "string", - }, - lu: { - title: "客户零件号", - type: "string", - }, - partCode: { - title: "厂内零件号", - type: "string", - }, - materialDesc: { - title: "零件描述", - type: "decimal", - }, - pn: { - title: "标识号", - type: "string", - }, - qty: { - title: "结算数量", - type: "number", - }, - price: { - title: "单价", - type: "number", - }, - groupNum: { - title: "结算分组号", - type: "decimal", - }, - site: { - title: "工厂地点", - type: "string", - }, - isReturn: { - title: "是否退货", - type: "boolean", - }, - isMaidan: { - title: "是否买单", - type: "boolean", - }, - contractDocID: { - title: "合同号", - type: "string", +export default function (businessType, type) { + const schema = { + title: "通用代码", + type: "object", + disableSelection: true, + properties: { + settleBillNum: { + title: "关联结算单号", + type: "string", + }, + billNum: { + title: "发票分组号", + type: "string", + }, + settleDate: { + title: "下线日期", + type: "string", + input: "datetime", + }, + invBillNum: { + title: "发票号", + type: "string", + }, + lu: { + title: "客户零件号", + type: "string", + }, + partCode: { + title: "厂内零件号", + type: "string", + }, + materialDesc: { + title: "零件描述", + type: "decimal", + }, + pn: { + title: "标识号", + type: "string", + }, + qty: { + title: "结算数量", + type: "number", + }, + price: { + title: "单价", + type: "number", + }, + groupNum: { + title: "结算分组号", + type: "decimal", + }, + site: { + title: "工厂地点", + type: "string", + }, + isReturn: { + title: "是否退货", + type: "boolean", + }, + isMaidan: { + title: "是否买单", + type: "boolean", + }, + contractDocID: { + title: "合同号", + type: "string", + }, }, - }, -}; + }; -export default function (businessType, type) { let service; if (type === "unable") { if (businessType === "JisBBAC") { @@ -86,6 +86,7 @@ export default function (businessType, type) { service = "pub_can_sa_service"; } } + if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") { schema.properties.pn.title = "生产码"; } else if (businessType === "ZhiGongJianBBAC" || businessType === "ZhiGongJianHBPO" || businessType === "YinDuJian") { @@ -207,5 +208,3 @@ export default function (businessType, type) { }, }; } - -export { schema }; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js deleted file mode 100644 index ee817361..00000000 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable-bk.js +++ /dev/null @@ -1,113 +0,0 @@ -//不可结算明细 -import { version, state } from "../_options.js"; - -const schema = { - title: "可结算单", - type: "object", - properties: { - version, - state, - billNum: { - title: "结算单据", - type: "string", - oneToMany: "/settle/detail", - config: "/models/settle/detail.js", - }, - settleBillNum: { - title: "关联结算单号", - type: "string", - }, - invGroupNum: { - title: "发票分组号", - type: "string", - }, - }, -}; - -export default function (businessType) { - let service; - if (businessType === "JisBBAC") { - service = "bbac_can_sa_service"; - } else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") { - 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`; - - 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/views/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js index 1b3608e6..dbfef566 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 @@ -14,6 +14,8 @@ export default { const route = useRoute(); const businessType = route.meta.businessType; const config = useConfig(businessType, "unable"); + delete config.table.schema.properties["invBillNum"]; + delete config.table.schema.properties["billNum"]; const onCommand = async (item) => { const url = config.edit.addUrl; if (item.path === "add") {