From 2082dea4977d47618c8d7ad4dd9bb847f5cf1b17 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 28 四月 2026 09:47:14 +0800
Subject: [PATCH] 升级apppro 1.迁移档案管理功能

---
 src/pages/works.vue |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/pages/works.vue b/src/pages/works.vue
index 8d37e74..b4400c7 100644
--- a/src/pages/works.vue
+++ b/src/pages/works.vue
@@ -271,16 +271,13 @@
 
 <script setup>
   import { ref, onMounted, nextTick, reactive, computed } from "vue";
-  import { onShow } from "@dcloudio/uni-app";
   import { userLoginFacotryList } from "@/api/login";
   import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting";
-  import { createVersionUpgradeChecker } from "@/utils/versionUpgrade";
   import DownloadProgressMask from "@/components/DownloadProgressMask.vue";
   import modal from "@/plugins/modal";
   import useUserStore from "@/store/modules/user";
 
   const userStore = useUserStore();
-  const { triggerVersionCheck } = createVersionUpgradeChecker({ logPrefix: "[version-works]" });
   const show = ref(false);
   const factoryList = ref([]);
   const factoryListTem = ref([]);
@@ -337,6 +334,10 @@
       icon: "/static/images/icon/caigouguanli.svg",
       label: "閲囪喘閫�璐�",
     },
+    {
+      icon: "/static/images/icon/gongyingshangdangan.svg",
+      label: "渚涘簲鍟嗘。妗�",
+    },
   ]);
 
   // 璐㈠姟绠$悊鍔熻兘鏁版嵁
@@ -391,9 +392,13 @@
   const archiveManagementItems = reactive([
     {
       icon: "/static/images/icon/gongyingshangdangan.svg",
-      label: "渚涘簲鍟嗘。妗�",
+      label: "鍊熼槄鐧昏",
     },
-  ]);
+    {
+      icon: "/static/images/icon/hetongguanli.svg",
+      label: "褰掕繕鐧昏",
+    }
+  ])
 
   // 鍞悗鏈嶅姟鍔熻兘鏁版嵁
   const afterSalesServiceItems = reactive([
@@ -923,6 +928,16 @@
           url: "/pages/customerService/afterSalesHandling/index",
         });
         break;
+      case "鍊熼槄鐧昏":
+        uni.navigateTo({
+          url: "/pages/fileManagement/borrow/index",
+        });
+        break;
+      case "褰掕繕鐧昏":
+        uni.navigateTo({
+          url: "/pages/fileManagement/return/index",
+        });
+        break;
       default:
         uni.showToast({
           title: `鐐瑰嚮浜�${item.label}`,
@@ -1111,7 +1126,7 @@
     // 瀹氫箟鑿滃崟閰嶇疆鏄犲皠
     const menuMapping = {
       collaboration: { target: collaborationItems, specialMapping: { "瑙勭珷鍒跺害": "瑙勭珷鍒跺害绠$悊" } },
-      archiveManagement: { target: archiveManagementItems, specialMapping: { "渚涘簲鍟嗘。妗�": "渚涘簲鍟嗙鐞�" } },
+      purchase: { specialMapping: { "渚涘簲鍟嗘。妗�": "渚涘簲鍟嗙鐞�" } },
     };
     console.log(allowedMenuTitles)
     // 閫氱敤杩囨护鍑芥暟
@@ -1128,9 +1143,8 @@
 
     // 杩囨护鍚勪釜妯″潡
     filterArray(marketingItems);
-    filterArray(purchaseItems);
+    filterArray(purchaseItems, menuMapping.purchase.specialMapping);
     filterArray(financeManagementItems);
-    filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping);
     filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
     filterArray(safetyItems);
     filterArray(humanResourcesItems);
@@ -1138,13 +1152,13 @@
     filterArray(qualityItems);
     filterArray(productionItems);
     filterArray(equipmentItems);
+    filterArray(archiveManagementItems);
   };
 
   // 妫�鏌ユā鍧楁槸鍚︽湁鑿滃崟椤归渶瑕佹樉绀�
   const hasMarketingItems = computed(() => marketingItems.length > 0);
   const hasPurchaseItems = computed(() => purchaseItems.length > 0);
   const hasFinanceManagementItems = computed(() => financeManagementItems.length > 0);
-  const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0);
   const hasAfterSalesServiceItems = computed(() => afterSalesServiceItems.length > 0);
   const hasCollaborationItems = computed(() => collaborationItems.length > 0);
   const hasSafetyItems = computed(() => safetyItems.length > 0);
@@ -1153,9 +1167,9 @@
   const hasWarehouseLogisticsItems = computed(() => warehouseLogisticsItems.length > 0);
   const hasProductionItems = computed(() => productionItems.length > 0);
   const hasEquipmentItems = computed(() => equipmentItems.length > 0);
+  const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0);
 
   onMounted(() => {
-    triggerVersionCheck("onMounted");
     // 姣忔杩涘叆棣栭〉閮藉己鍒跺埛鏂扮敤鎴蜂俊鎭拰璺敱鏉冮檺锛屼笉鍋氭湰鍦扮紦瀛樺垽鏂�
     userStore.getInfo().then(() => {
       userStore
@@ -1170,10 +1184,6 @@
     getUserLoginFacotryList();
     // 鍚姩閫氱煡鐘舵�佸畾鏃跺櫒
     startStatusTimer();
-  });
-
-  onShow(() => {
-    triggerVersionCheck("onShow");
   });
 </script>
 

--
Gitblit v1.9.3