fix: hide internal production ledger integration hints

This commit is contained in:
汤学会 2026-06-15 00:47:28 +08:00
parent df9a4b485d
commit 5ec8a98125
2 changed files with 4 additions and 36 deletions

View File

@ -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");

View File

@ -13,15 +13,6 @@
</div>
</div>
<div
v-if="!smartOperationReportEnabled"
class="production-compact-tip production-mode-tip"
title="当前未对接智能报工小程序生产进度按成品入库数量和BOM毛重/净重反推;工序明细在此模式下隐藏。"
>
<strong>未对接智能报工小程序</strong>
<span>生产进度按成品入库数量和BOM毛重/净重反推工序明细隐藏</span>
<FieldHint text="当前未对接智能报工小程序生产进度按成品入库数量和BOM毛重/净重反推;工序明细在此模式下隐藏。" />
</div>
<div v-if="feedbackMessage" class="feedback-banner">{{ feedbackMessage }}</div>
<div v-if="errorMessage" class="feedback-banner error-banner">{{ errorMessage }}</div>
@ -169,23 +160,6 @@
</div>
</template>
</DrawerDataTable>
<div
v-if="smartOperationReportEnabled"
class="production-compact-tip production-drawer-tip"
title="工序明细由智能报工小程序按材料库存批次号回传,并在生产台账中用于辅助判断生产进度。"
>
<strong>小程序工序明细</strong>
<span>按材料库存批次号回传用于辅助判断生产进度</span>
</div>
<div
v-else
class="production-compact-tip production-drawer-tip"
title="当前未对接智能报工小程序工序明细隐藏系统按ERP入库数据反推生产进度。"
>
<strong>工序明细隐藏</strong>
<span>当前未对接智能报工小程序系统按ERP入库数据反推生产进度</span>
</div>
</aside>
</div>
</div>
@ -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 () => {