From 5ec8a98125563cab5c43672d84f5f6284de1ddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E5=AD=A6=E4=BC=9A?= Date: Mon, 15 Jun 2026 00:47:28 +0800 Subject: [PATCH] fix: hide internal production ledger integration hints --- .../test-smart-operation-report-toggle.mjs | 5 +-- frontend/src/views/ProductionLedgerView.vue | 35 +------------------ 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/frontend/scripts/test-smart-operation-report-toggle.mjs b/frontend/scripts/test-smart-operation-report-toggle.mjs index 254b7a4..a87158e 100644 --- a/frontend/scripts/test-smart-operation-report-toggle.mjs +++ b/frontend/scripts/test-smart-operation-report-toggle.mjs @@ -17,7 +17,8 @@ assert.match(router, /loadSmartOperationReportConfig/, "router should guard oper assert.match(app, /smartOperationReportEnabled/, "App should track switch state"); assert.match(app, /child\.key\s*===\s*"operation-reports"/, "App should hide operation reports child when disabled"); assert.match(systemExtension, /对接智能报工小程序/, "system extension should show switch"); -assert.match(productionLedger, /工序明细/, "production ledger page should show operation detail wording when enabled"); -assert.match(productionLedger, /当前未对接智能报工小程序/, "production ledger page should explain disabled mode"); +assert.doesNotMatch(productionLedger, /当前未对接智能报工小程序/, "production ledger page should not expose disabled integration wording"); +assert.doesNotMatch(productionLedger, /工序明细隐藏/, "production ledger page should not expose hidden operation detail wording"); +assert.doesNotMatch(productionLedger, /BOM毛重\/净重反推/, "production ledger page should not expose internal calculation wording"); console.log("smart operation report toggle static checks passed"); diff --git a/frontend/src/views/ProductionLedgerView.vue b/frontend/src/views/ProductionLedgerView.vue index 6b80796..890b39b 100644 --- a/frontend/src/views/ProductionLedgerView.vue +++ b/frontend/src/views/ProductionLedgerView.vue @@ -13,15 +13,6 @@ -
- 未对接智能报工小程序 - 生产进度按成品入库数量和BOM毛重/净重反推,工序明细隐藏。 - -
{{ feedbackMessage }}
{{ errorMessage }}
@@ -169,23 +160,6 @@ - -
- 小程序工序明细 - 按材料库存批次号回传,用于辅助判断生产进度。 -
-
- 工序明细隐藏 - 当前未对接智能报工小程序,系统按ERP入库数据反推生产进度。 -
@@ -198,13 +172,11 @@ import { computed, onMounted, ref } from "vue"; import DocumentArchiveActions from "../components/documentForms/DocumentArchiveActions.vue"; import DrawerDataTable from "../components/DrawerDataTable.vue"; -import FieldHint from "../components/FieldHint.vue"; import PaginationBar from "../components/PaginationBar.vue"; import StatusBadge from "../components/StatusBadge.vue"; import TableControls from "../components/TableControls.vue"; import { useBodyScrollLock } from "../composables/useBodyScrollLock"; import { downloadResource, fetchResource, openResource, postResource } from "../services/api"; -import { loadSmartOperationReportConfig } from "../services/systemFeatures"; import { formatDateTime, formatQty, formatWeight } from "../utils/formatters"; import { usePagination } from "../utils/pagination"; import { useTableControls } from "../utils/tableControls"; @@ -216,7 +188,6 @@ const expandedTxnRows = ref([]); const feedbackMessage = ref(""); const errorMessage = ref(""); const lockingLedger = ref(false); -const smartOperationReportEnabled = ref(true); const activeLedger = computed(() => ledgers.value.find((item) => Number(item.production_ledger_id) === Number(selectedLedgerId.value)) || null); const activeLedgerTxns = computed(() => activeLedger.value?.txns || []); @@ -358,12 +329,8 @@ async function regenerateDocumentArchive(typeKey, businessId) { async function loadAll() { errorMessage.value = ""; - const [rows, config] = await Promise.all([ - fetchResource("/production/production-ledger?limit=500", []), - loadSmartOperationReportConfig() - ]); + const rows = await fetchResource("/production/production-ledger?limit=500", []); ledgers.value = Array.isArray(rows) ? rows : []; - smartOperationReportEnabled.value = config.enabled !== false; } onMounted(async () => {