From b904c6cf33ea022dfc84544501d965f4c30f4887 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 20 五月 2026 16:49:18 +0800
Subject: [PATCH] 天津宝东app 1.部署修改

---
 src/pages/works.vue |  378 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 244 insertions(+), 134 deletions(-)

diff --git a/src/pages/works.vue b/src/pages/works.vue
index 88a7c66..1a908d9 100644
--- a/src/pages/works.vue
+++ b/src/pages/works.vue
@@ -15,7 +15,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -37,7 +38,31 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <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 design-module"
+          v-if="hasDesignItems">
+      <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 designItems"
+                        :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>
@@ -59,7 +84,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -81,7 +107,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -89,27 +116,27 @@
       </view>
     </view>
     <!-- 浜哄姏璧勬簮妯″潡 -->
-    <view class="common-module collaboration-module"
-          v-if="hasHumanResourcesItems">
-      <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 humanResourcesItems"
-                        :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">-->
+<!--      <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 humanResourcesItems"-->
+<!--                        :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 equipment-module"
           v-if="hasProductionItems">
@@ -125,7 +152,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -147,29 +175,8 @@
                         :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>
-    <!-- 妗f绠$悊妯″潡 -->
-    <view class="common-module archive-module"
-          v-if="hasArchiveManagementItems">
-      <view class="module-header">
-        <view class="module-title-container">
-          <text class="module-title">妗f绠$悊</text>
-        </view>
-      </view>
-      <view class="module-content">
-        <up-grid :border="false"
-                 col="4">
-          <up-grid-item v-for="(item, index) in archiveManagementItems"
-                        :key="index"
-                        @click="handleCommonItemClick(item)">
-            <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -177,27 +184,27 @@
       </view>
     </view>
     <!-- 鍞悗鏈嶅姟妯″潡 -->
-    <view class="common-module after-sales-module"
-          v-if="hasAfterSalesServiceItems">
-      <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 afterSalesServiceItems"
-                        :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 after-sales-module"-->
+<!--          v-if="hasAfterSalesServiceItems">-->
+<!--      <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 afterSalesServiceItems"-->
+<!--                        :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="hasQualityItems">
@@ -213,7 +220,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -235,7 +243,8 @@
                         :key="index"
                         @click="handleCommonItemClick(item)">
             <view class="icon-container">
-              <image :src="item.icon" class="item-icon"></image>
+              <image :src="item.icon"
+                     class="item-icon"></image>
             </view>
             <text class="item-label">{{item.label}}</text>
           </up-grid-item>
@@ -243,27 +252,29 @@
       </view>
     </view>
     <!-- 瀹夊叏鐢熶骇妯″潡 -->
-    <view class="common-module collaboration-module"
-          v-if="hasSafetyItems">
-      <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 safetyItems"
-                        :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="hasSafetyItems">-->
+<!--      <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 safetyItems"-->
+<!--                        :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>-->
+
+    <DownloadProgressMask />
   </view>
 </template>
 
@@ -271,6 +282,7 @@
   import { ref, onMounted, nextTick, reactive, computed } from "vue";
   import { userLoginFacotryList } from "@/api/login";
   import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting";
+  import DownloadProgressMask from "@/components/DownloadProgressMask.vue";
   import modal from "@/plugins/modal";
   import useUserStore from "@/store/modules/user";
 
@@ -296,6 +308,25 @@
       currentStatus.value = statusList[statusIndex];
     }, 3000);
   };
+  // 宸ヨ壓璁捐鍔熻兘鏁版嵁
+  const designItems = reactive([
+    {
+      icon: "/static/images/icon/jichucanshu.svg",
+      label: "鍩虹鍙傛暟",
+    },
+    {
+      icon: "/static/images/icon/gongxuguanli.svg",
+      label: "宸ュ簭绠$悊",
+    },
+    {
+      icon: "/static/images/icon/bom.svg",
+      label: "BOM",
+    },
+    {
+      icon: "/static/images/icon/gongyiluxian.svg",
+      label: "宸ヨ壓璺嚎",
+    },
+  ]);
 
   // 钀ラ攢绠$悊鍔熻兘鏁版嵁
   const marketingItems = reactive([
@@ -330,6 +361,10 @@
     {
       icon: "/static/images/icon/caigouguanli.svg",
       label: "閲囪喘閫�璐�",
+    },
+    {
+      icon: "/static/images/icon/gongyingshangdangan.svg",
+      label: "渚涘簲鍟嗘。妗�",
     },
   ]);
 
@@ -384,8 +419,12 @@
   // 妗f绠$悊鍔熻兘鏁版嵁
   const archiveManagementItems = reactive([
     {
-      icon: "/static/images/icon/gongyingshangdangan.svg",
-      label: "渚涘簲鍟嗘。妗�",
+      icon: "/static/images/icon/jieyuedengji.svg",
+      label: "鍊熼槄鐧昏",
+    },
+    {
+      icon: "/static/images/icon/guihuandengji.svg",
+      label: "褰掕繕鐧昏",
     },
   ]);
 
@@ -404,7 +443,7 @@
   // 浠撳偍鐗╂祦鍔熻兘鏁版嵁
   const warehouseLogisticsItems = reactive([
     {
-      icon: "/static/images/icon/xiaoshoutaizhang.svg",
+      icon: "/static/images/icon/kucunguanli.svg",
       label: "搴撳瓨绠$悊",
     },
   ]);
@@ -505,30 +544,39 @@
 
   // 鐢熶骇绠℃帶鍔熻兘鏁版嵁
   const productionItems = reactive([
-    // {
-    //   icon: "/static/images/icon/shengchandingdan@2x.svg",
-    //   label: "鐢熶骇璁㈠崟",
-    // },
-    // {
-    //   icon: "/static/images/icon/shengchanpaigong@2x.svg",
-    //   label: "鐢熶骇娲惧伐",
-    // },
-    // {
-    //   icon: "/static/images/icon/shengchanpaichan@2x.svg",
-    //   label: "宸ュ簭鎺掍骇",
-    // },
+    {
+      icon: "/static/images/icon/shengchanjihua.svg",
+      label: "涓荤敓浜ц鍒�",
+    },
+    {
+      icon: "/static/images/icon/shengchandingdan.svg",
+      label: "鐢熶骇璁㈠崟",
+    },
+    {
+      icon: "/static/images/icon/shengchanzhuisu.svg",
+      label: "鐢熶骇杩芥函",
+    },
+    {
+      icon: "/static/images/icon/shengchanshikuang.svg",
+      label: "宸ュ簭鐢熶骇瀹炲喌",
+    },
+    {
+      icon: "/static/images/icon/shengchanpaichan.svg",
+      label: "鐢熶骇鎺掍骇",
+    },
+
     {
       icon: "/static/images/icon/shengchanbaogong.svg",
       label: "鐢熶骇鎶ュ伐",
     },
     {
-      icon: "/static/images/icon/shengchanbaogong.svg",
-      label: "鐢熶骇宸ュ崟",
+      icon: "/static/images/icon/baogongtaizhang.svg",
+      label: "鎶ュ伐鍙拌处",
     },
-    // {
-    //   icon: "/static/images/icon/shengchanhesuan@2x.svg",
-    //   label: "鐢熶骇鏍哥畻",
-    // },
+    {
+      icon: "/static/images/icon/shengchanhesuan.svg",
+      label: "鐢熶骇鏍哥畻",
+    },
   ]);
 
   // 璁惧绠$悊鍔熻兘鏁版嵁
@@ -769,9 +817,9 @@
           url: "/pages/productionManagement/productionDispatching/index",
         });
         break;
-      case "宸ュ簭鎺掍骇":
+      case "宸ヨ壓璺嚎":
         uni.navigateTo({
-          url: "/pages/productionManagement/processScheduling/index",
+          url: "/pages/productionManagement/processRoute/index",
         });
         break;
       case "鐢熶骇宸ュ崟":
@@ -779,12 +827,37 @@
           url: "/pages/productionManagement/workOrder/index",
         });
         break;
+      case "涓荤敓浜ц鍒�":
+        uni.navigateTo({
+          url: "/pages/productionManagement/mainProductionPlan/index",
+        });
+        break;
+      case "鐢熶骇鎺掍骇":
+        uni.navigateTo({
+          url: "/pages/productionManagement/productionScheduling/index",
+        });
+        break;
       case "鐢熶骇鎶ュ伐":
         getcode();
+        break;
+      case "鎶ュ伐鍙拌处":
+        uni.navigateTo({
+          url: "/pages/productionManagement/productionReporting/ledger",
+        });
         break;
       case "鐢熶骇鏍哥畻":
         uni.navigateTo({
           url: "/pages/productionManagement/productionAccounting/index",
+        });
+        break;
+      case "鐢熶骇杩芥函":
+        uni.navigateTo({
+          url: "/pages/productionManagement/productionTraceability/index",
+        });
+        break;
+      case "宸ュ簭鐢熶骇瀹炲喌":
+        uni.navigateTo({
+          url: "/pages/productionManagement/processStatistics/index",
         });
         break;
       case "璁惧鍙拌处":
@@ -917,6 +990,31 @@
           url: "/pages/customerService/afterSalesHandling/index",
         });
         break;
+      case "鍊熼槄鐧昏":
+        uni.navigateTo({
+          url: "/pages/fileManagement/borrow/index",
+        });
+        break;
+      case "褰掕繕鐧昏":
+        uni.navigateTo({
+          url: "/pages/fileManagement/return/index",
+        });
+        break;
+      case "鍩虹鍙傛暟":
+        uni.navigateTo({
+          url: "/pages/productionDesign/basicParameters/index",
+        });
+        break;
+      case "宸ュ簭绠$悊":
+        uni.navigateTo({
+          url: "/pages/productionDesign/processManagement/index",
+        });
+        break;
+      case "BOM":
+        uni.navigateTo({
+          url: "/pages/productionDesign/bom/index",
+        });
+        break;
       default:
         uni.showToast({
           title: `鐐瑰嚮浜�${item.label}`,
@@ -948,7 +1046,7 @@
         factoryList.value = [];
       });
   }
-  const getcode = () => {
+  const getcode = async () => {
     uni.scanCode({
       success: async res => {
         // 瑙f瀽浜岀淮鐮佸唴瀹�
@@ -973,14 +1071,12 @@
               const workData = workRes.data;
               console.log("宸ュ崟鏁版嵁:", workData);
 
-              orderRow = JSON.stringify({
-                id: workData.id || workOrderId,
-                planQuantity: workData.planQuantity - workData.completeQuantity,
-                productProcessRouteItemId:
-                  workData.productProcessRouteItemId ||
-                  workData.浜у搧宸ヨ壓璺嚎椤笽D ||
-                  "",
-              });
+              if (workData.endOrder === true) {
+                modal.msgError("璇ヨ鍗曞凡缁撴潫锛屾棤娉曟姤宸�");
+                return;
+              }
+
+              orderRow = JSON.stringify(workData);
 
               console.log("鏋勯�犵殑orderRow:", orderRow);
             } else {
@@ -1104,10 +1200,13 @@
 
     // 瀹氫箟鑿滃崟閰嶇疆鏄犲皠
     const menuMapping = {
-      collaboration: { target: collaborationItems, specialMapping: { "瑙勭珷鍒跺害": "瑙勭珷鍒跺害绠$悊" } },
-      archiveManagement: { target: archiveManagementItems, specialMapping: { "渚涘簲鍟嗘。妗�": "渚涘簲鍟嗙鐞�" } },
+      collaboration: {
+        target: collaborationItems,
+        specialMapping: { 瑙勭珷鍒跺害: "瑙勭珷鍒跺害绠$悊" },
+      },
+      purchase: { specialMapping: { 渚涘簲鍟嗘。妗�: "渚涘簲鍟嗙鐞�" } },
     };
-    console.log(allowedMenuTitles)
+    console.log(allowedMenuTitles);
     // 閫氱敤杩囨护鍑芥暟
     const filterArray = (targetArray, specialMapping) => {
       const filtered = targetArray.filter(item => {
@@ -1122,9 +1221,9 @@
 
     // 杩囨护鍚勪釜妯″潡
     filterArray(marketingItems);
-    filterArray(purchaseItems);
+    filterArray(designItems);
+    filterArray(purchaseItems, menuMapping.purchase.specialMapping);
     filterArray(financeManagementItems);
-    filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping);
     filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
     filterArray(safetyItems);
     filterArray(humanResourcesItems);
@@ -1132,21 +1231,32 @@
     filterArray(qualityItems);
     filterArray(productionItems);
     filterArray(equipmentItems);
+    filterArray(archiveManagementItems);
+    filterArray(afterSalesServiceItems);
   };
 
   // 妫�鏌ユā鍧楁槸鍚︽湁鑿滃崟椤归渶瑕佹樉绀�
   const hasMarketingItems = computed(() => marketingItems.length > 0);
+  const hasDesignItems = computed(() => designItems.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 hasFinanceManagementItems = computed(
+    () => financeManagementItems.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 hasWarehouseLogisticsItems = computed(
+    () => warehouseLogisticsItems.length > 0
+  );
   const hasProductionItems = computed(() => productionItems.length > 0);
   const hasEquipmentItems = computed(() => equipmentItems.length > 0);
+  const hasArchiveManagementItems = computed(
+    () => archiveManagementItems.length > 0
+  );
 
   onMounted(() => {
     // 姣忔杩涘叆棣栭〉閮藉己鍒跺埛鏂扮敤鎴蜂俊鎭拰璺敱鏉冮檺锛屼笉鍋氭湰鍦扮紦瀛樺垽鏂�

--
Gitblit v1.9.3