gaoluyang
2 天以前 54d8c97f9aee6bb4bd55ee576041ec90f1d2dd5a
src/pages/works.vue
@@ -66,6 +66,28 @@
        </up-grid>
      </view>
    </view>
    <!-- 仓储物流模块 -->
    <view class="common-module warehouse-logistics-module"
          v-if="hasWarehouseLogisticsItems">
      <view class="module-header">
        <view class="module-title-container">
          <text class="module-title">仓储物流</text>
        </view>
      </view>
      <view class="module-content">
        <up-grid :border="false"
                 col="4">
          <up-grid-item v-for="(item, index) in warehouseLogisticsItems"
                        :key="index"
                        @click="handleCommonItemClick(item)">
            <view class="icon-container">
              <image :src="item.icon" class="item-icon"></image>
            </view>
            <text class="item-label">{{item.label}}</text>
          </up-grid-item>
        </up-grid>
      </view>
    </view>
    <!-- 人力资源模块 -->
    <view class="common-module collaboration-module"
          v-if="hasHumanResourcesItems">
@@ -278,6 +300,14 @@
  // 营销管理功能数据
  const marketingItems = reactive([
    {
      icon: "/static/images/icon/kehudangan.svg",
      label: "客户档案",
    },
    {
      icon: "/static/images/icon/xiaoshoubaojia.svg",
      label: "销售报价",
    },
    {
      icon: "/static/images/icon/xiaoshoutaizhang.svg",
      label: "销售台账",
    },
@@ -300,10 +330,6 @@
    {
      icon: "/static/images/icon/caigouguanli.svg",
      label: "采购退货",
    },
    {
      icon: "/static/images/icon/gongchuguanli.svg",
      label: "供应商档案",
    },
  ]);
@@ -341,14 +367,46 @@
      icon: "/static/images/icon/fukuanliushui.svg",
      label: "付款流水",
    },
    {
      icon: "/static/images/icon/shouruguanli.svg",
      label: "收入管理",
    },
    {
      icon: "/static/images/icon/zhichuguanli.svg",
      label: "支出管理",
    },
    {
      icon: "/static/images/icon/jiekuanguanli.svg",
      label: "借款管理",
    },
  ]);
  // 档案管理功能数据
  const archiveManagementItems = reactive([
    {
      icon: "/static/images/icon/gongyingshangdangan.svg",
      label: "供应商档案",
    },
  ]);
  // 售后服务功能数据
  const afterSalesServiceItems = reactive([
    {
      icon: "/static/images/icon/fankuidengji.svg",
      label: "反馈登记",
    },
    {
      icon: "/static/images/icon/shouhouchuli.svg",
      label: "售后处理",
    },
  ]);
  // 仓储物流功能数据
  const warehouseLogisticsItems = reactive([
    {
      icon: "/static/images/icon/xiaoshoutaizhang.svg",
      label: "库存管理",
    },
  ]);
  const humanResourcesItems = reactive([
@@ -463,6 +521,10 @@
      icon: "/static/images/icon/shengchanbaogong.svg",
      label: "生产报工",
    },
    {
      icon: "/static/images/icon/shengchanbaogong.svg",
      label: "生产工单",
    },
    // {
    //   icon: "/static/images/icon/shengchanhesuan@2x.svg",
    //   label: "生产核算",
@@ -497,9 +559,19 @@
  const handleCommonItemClick = item => {
    // 根据不同的功能项进行跳转
    switch (item.label) {
      case "客户档案":
        uni.navigateTo({
          url: "/pages/basicData/customerFile/index",
        });
        break;
      case "销售台账":
        uni.navigateTo({
          url: "/pages/sales/salesAccount/index",
        });
        break;
      case "销售报价":
        uni.navigateTo({
          url: "/pages/sales/salesQuotation/index",
        });
        break;
      case "开票登记":
@@ -550,6 +622,21 @@
      case "付款流水":
        uni.navigateTo({
          url: "/pages/procurementManagement/receiptPaymentHistory/index",
        });
        break;
      case "收入管理":
        uni.navigateTo({
          url: "/pages/financialManagement/revenueManagement/index",
        });
        break;
      case "支出管理":
        uni.navigateTo({
          url: "/pages/financialManagement/expenseManagement/index",
        });
        break;
      case "借款管理":
        uni.navigateTo({
          url: "/pages/financialManagement/loanManagement/index",
        });
        break;
      case "供应商往来":
@@ -687,6 +774,11 @@
          url: "/pages/productionManagement/processScheduling/index",
        });
        break;
      case "生产工单":
        uni.navigateTo({
          url: "/pages/productionManagement/workOrder/index",
        });
        break;
      case "生产报工":
        getcode();
        break;
@@ -808,6 +900,21 @@
      case "出厂检验":
        uni.navigateTo({
          url: "/pages/qualityManagement/finalInspection/index",
        });
        break;
      case "库存管理":
        uni.navigateTo({
          url: "/pages/inventoryManagement/stockManagement/index",
        });
        break;
      case "反馈登记":
        uni.navigateTo({
          url: "/pages/customerService/feedbackRegistration/index",
        });
        break;
      case "售后处理":
        uni.navigateTo({
          url: "/pages/customerService/afterSalesHandling/index",
        });
        break;
      default:
@@ -998,6 +1105,7 @@
    // 定义菜单配置映射
    const menuMapping = {
      collaboration: { target: collaborationItems, specialMapping: { "规章制度": "规章制度管理" } },
      archiveManagement: { target: archiveManagementItems, specialMapping: { "供应商档案": "供应商管理" } },
    };
    console.log(allowedMenuTitles)
    // 通用过滤函数
@@ -1016,11 +1124,11 @@
    filterArray(marketingItems);
    filterArray(purchaseItems);
    filterArray(financeManagementItems);
    filterArray(archiveManagementItems);
    filterArray(afterSalesServiceItems);
    filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping);
    filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
    filterArray(safetyItems);
    filterArray(humanResourcesItems);
    filterArray(warehouseLogisticsItems);
    filterArray(qualityItems);
    filterArray(productionItems);
    filterArray(equipmentItems);
@@ -1030,12 +1138,13 @@
  const hasMarketingItems = computed(() => marketingItems.length > 0);
  const hasPurchaseItems = computed(() => purchaseItems.length > 0);
  const hasFinanceManagementItems = computed(() => financeManagementItems.length > 0);
  const hasArchiveManagementItems = computed(() => true);
  const hasAfterSalesServiceItems = computed(() => true);
  const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0);
  const hasAfterSalesServiceItems = computed(() => afterSalesServiceItems.length > 0);
  const hasCollaborationItems = computed(() => collaborationItems.length > 0);
  const hasSafetyItems = computed(() => safetyItems.length > 0);
  const hasQualityItems = computed(() => qualityItems.length > 0);
  const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0);
  const hasWarehouseLogisticsItems = computed(() => warehouseLogisticsItems.length > 0);
  const hasProductionItems = computed(() => productionItems.length > 0);
  const hasEquipmentItems = computed(() => equipmentItems.length > 0);