<template>
  <ProcessWorkspace
    eyebrow="采购与库存"
    title="采购与嘉恒仓库工作台"
    description="覆盖采购下单、自家料到货、质检和嘉恒仓库出入库台账。"
    panel-tag="仓库主流程"
    stage-code="04"
    :sections="sections"
  />
</template>

<script setup>
import ProcessWorkspace from "../components/ProcessWorkspace.vue";
import InventoryLedgerView from "./InventoryLedgerView.vue";
import PurchaseOrderView from "./PurchaseOrderView.vue";
import PurchaseReceiptView from "./PurchaseReceiptView.vue";
import QualityInspectionView from "./QualityInspectionView.vue";

const sections = [
  {
    key: "purchase-orders",
    step: "04-1",
    label: "采购订单",
    desc: "把 MRP 缺口直接转成采购单并跟踪执行。",
    permission: "MENU_PURCHASE_ORDER",
    component: PurchaseOrderView
  },
  {
    key: "purchase-receipts",
    step: "04-2",
    label: "到货入库",
    desc: "收货、建批次、准备质检和库存过账。",
    permission: "MENU_PURCHASE_RECEIPT",
    component: PurchaseReceiptView
  },
  {
    key: "quality-inspection",
    step: "04-3",
    label: "质量检验",
    desc: "对来料做放行、拒收和状态控制。",
    permission: "MENU_QUALITY_INSPECTION",
    component: QualityInspectionView
  },
  {
    key: "inventory-ledger",
    step: "04-4",
    label: "嘉恒仓库",
    desc: "统一处理原材料、半成品、成品、辅料的出入库和批次流水。",
    permission: "MENU_INVENTORY_LEDGER",
    component: InventoryLedgerView
  }
];
</script>
