fix: hide internal production ledger integration hints
This commit is contained in:
parent
df9a4b485d
commit
5ec8a98125
@ -17,7 +17,8 @@ assert.match(router, /loadSmartOperationReportConfig/, "router should guard oper
|
|||||||
assert.match(app, /smartOperationReportEnabled/, "App should track switch state");
|
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(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(systemExtension, /对接智能报工小程序/, "system extension should show switch");
|
||||||
assert.match(productionLedger, /工序明细/, "production ledger page should show operation detail wording when enabled");
|
assert.doesNotMatch(productionLedger, /当前未对接智能报工小程序/, "production ledger page should not expose disabled integration wording");
|
||||||
assert.match(productionLedger, /当前未对接智能报工小程序/, "production ledger page should explain disabled mode");
|
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");
|
console.log("smart operation report toggle static checks passed");
|
||||||
|
|||||||
@ -13,15 +13,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</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="feedbackMessage" class="feedback-banner">{{ feedbackMessage }}</div>
|
||||||
<div v-if="errorMessage" class="feedback-banner error-banner">{{ errorMessage }}</div>
|
<div v-if="errorMessage" class="feedback-banner error-banner">{{ errorMessage }}</div>
|
||||||
|
|
||||||
@ -169,23 +160,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</DrawerDataTable>
|
</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>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -198,13 +172,11 @@ import { computed, onMounted, ref } from "vue";
|
|||||||
|
|
||||||
import DocumentArchiveActions from "../components/documentForms/DocumentArchiveActions.vue";
|
import DocumentArchiveActions from "../components/documentForms/DocumentArchiveActions.vue";
|
||||||
import DrawerDataTable from "../components/DrawerDataTable.vue";
|
import DrawerDataTable from "../components/DrawerDataTable.vue";
|
||||||
import FieldHint from "../components/FieldHint.vue";
|
|
||||||
import PaginationBar from "../components/PaginationBar.vue";
|
import PaginationBar from "../components/PaginationBar.vue";
|
||||||
import StatusBadge from "../components/StatusBadge.vue";
|
import StatusBadge from "../components/StatusBadge.vue";
|
||||||
import TableControls from "../components/TableControls.vue";
|
import TableControls from "../components/TableControls.vue";
|
||||||
import { useBodyScrollLock } from "../composables/useBodyScrollLock";
|
import { useBodyScrollLock } from "../composables/useBodyScrollLock";
|
||||||
import { downloadResource, fetchResource, openResource, postResource } from "../services/api";
|
import { downloadResource, fetchResource, openResource, postResource } from "../services/api";
|
||||||
import { loadSmartOperationReportConfig } from "../services/systemFeatures";
|
|
||||||
import { formatDateTime, formatQty, formatWeight } from "../utils/formatters";
|
import { formatDateTime, formatQty, formatWeight } from "../utils/formatters";
|
||||||
import { usePagination } from "../utils/pagination";
|
import { usePagination } from "../utils/pagination";
|
||||||
import { useTableControls } from "../utils/tableControls";
|
import { useTableControls } from "../utils/tableControls";
|
||||||
@ -216,7 +188,6 @@ const expandedTxnRows = ref([]);
|
|||||||
const feedbackMessage = ref("");
|
const feedbackMessage = ref("");
|
||||||
const errorMessage = ref("");
|
const errorMessage = ref("");
|
||||||
const lockingLedger = ref(false);
|
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 activeLedger = computed(() => ledgers.value.find((item) => Number(item.production_ledger_id) === Number(selectedLedgerId.value)) || null);
|
||||||
const activeLedgerTxns = computed(() => activeLedger.value?.txns || []);
|
const activeLedgerTxns = computed(() => activeLedger.value?.txns || []);
|
||||||
@ -358,12 +329,8 @@ async function regenerateDocumentArchive(typeKey, businessId) {
|
|||||||
|
|
||||||
async function loadAll() {
|
async function loadAll() {
|
||||||
errorMessage.value = "";
|
errorMessage.value = "";
|
||||||
const [rows, config] = await Promise.all([
|
const rows = await fetchResource("/production/production-ledger?limit=500", []);
|
||||||
fetchResource("/production/production-ledger?limit=500", []),
|
|
||||||
loadSmartOperationReportConfig()
|
|
||||||
]);
|
|
||||||
ledgers.value = Array.isArray(rows) ? rows : [];
|
ledgers.value = Array.isArray(rows) ? rows : [];
|
||||||
smartOperationReportEnabled.value = config.enabled !== false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user