<template>
  <ProcessWorkspace
    eyebrow="基础资料"
    title="lite 主数据工作台"
    description="只保留采购、销售和生产必须使用的基础对象：供应商名录、原材料名录、客户名录、产品需规清单和员工资料。"
    panel-tag="轻量主数据"
    stage-code="02"
    :sections="sections"
  />
</template>

<script setup>
import ProcessWorkspace from "../components/ProcessWorkspace.vue";
import EmployeeManagementView from "./EmployeeManagementView.vue";
import ProductSpecLiteView from "./ProductSpecLiteView.vue";
import SalesPlanningView from "./SalesPlanningView.vue";
import SupplierManagementView from "./SupplierManagementView.vue";
import SupplierMaterialLiteView from "./SupplierMaterialLiteView.vue";

const sections = [
  {
    key: "supplier-management",
    step: "02-1",
    label: "供应商名录",
    desc: "维护供应商名称、联系人、联系电话和地址。",
    permission: "MENU_SUPPLIER_MANAGEMENT",
    component: SupplierManagementView
  },
  {
    key: "supplier-material-lite",
    step: "02-2",
    label: "原材料名录",
    desc: "维护原材料编码、名称、材质、规格、废料单价和状态。",
    permissionsAny: ["MENU_SUPPLIER_MANAGEMENT", "MENU_MATERIAL_MANAGEMENT"],
    component: SupplierMaterialLiteView
  },
  {
    key: "customer-management",
    step: "02-3",
    label: "客户名录",
    desc: "维护客户名称、联系人、联系电话和送货地址。",
    permission: "MENU_SALES_PLANNING",
    component: SalesPlanningView
  },
  {
    key: "product-spec-lite",
    step: "02-4",
    label: "产品需规清单",
    desc: "产品资料、默认用料和小程序报工字段合并成一条生产规格。",
    permissionsAny: ["MENU_PRODUCT_MANAGEMENT", "MENU_BOM_MANAGEMENT", "MENU_ROUTE_MANAGEMENT"],
    component: ProductSpecLiteView
  },
  {
    key: "employee-management",
    step: "02-5",
    label: "员工管理",
    desc: "岗位、班组、账号归属和角色分配。",
    permission: "MENU_EMPLOYEE_MANAGEMENT",
    component: EmployeeManagementView
  }
];
</script>
