From ba389833f9fbb043c3fa2df5aac8ed00d899e0fb Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 二月 2026 11:44:13 +0800
Subject: [PATCH] 进销存升级app: 1.不需要登录公司

---
 src/pages/index.vue |  256 ++++++++++++++++++++------------------------------
 1 files changed, 103 insertions(+), 153 deletions(-)

diff --git a/src/pages/index.vue b/src/pages/index.vue
index f39559a..80c611c 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -1,20 +1,20 @@
 <template>
   <view class="content">
-    <view class="header-section">
-      <view class="currentFactory">
-        <up-text type="primary"
-                 :text="userStore.currentFactoryName"
-                 @click="show = true"
-                 size="18"
-                 class="factoryName"
-                 suffixIcon="arrow-right"
-                 :iconStyle="iconStyle"></up-text>
-      </view>
-      <up-picker :show="show"
-                 :columns="factoryList"
-                 @confirm="changeFactory"
-                 @cancel="show = false"></up-picker>
-    </view>
+<!--    <view class="header-section">-->
+<!--      <view class="currentFactory">-->
+<!--        <up-text type="primary"-->
+<!--                 :text="userStore.currentFactoryName"-->
+<!--                 @click="show = true"-->
+<!--                 size="18"-->
+<!--                 class="factoryName"-->
+<!--                 suffixIcon="arrow-right"-->
+<!--                 :iconStyle="iconStyle"></up-text>-->
+<!--      </view>-->
+<!--      <up-picker :show="show"-->
+<!--                 :columns="factoryList"-->
+<!--                 @confirm="changeFactory"-->
+<!--                 @cancel="show = false"></up-picker>-->
+<!--    </view>-->
     <view class="hero-section">
       <view class="bg-img">
         <view class="hero-content">
@@ -38,54 +38,54 @@
     <!--			</view>-->
     <!--		</view>-->
     <!-- 钀ラ攢绠$悊妯″潡 -->
-    <!--    <view class="common-module marketing-module">-->
-    <!--      <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 marketingItems"-->
-    <!--                        :key="index"-->
-    <!--                        @click="handleCommonItemClick(item)">-->
-    <!--            <view class="icon-container"-->
-    <!--                  :style="{ background: item.bgColor }">-->
-    <!--              <up-icon :name="item.icon"-->
-    <!--                       :size="58"-->
-    <!--                       color="#ffffff"></up-icon>-->
-    <!--            </view>-->
-    <!--            <text class="item-label">{{item.label}}</text>-->
-    <!--          </up-grid-item>-->
-    <!--        </up-grid>-->
-    <!--      </view>-->
-    <!--    </view>-->
+    <view class="common-module marketing-module">
+      <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 marketingItems"
+                        :key="index"
+                        @click="handleCommonItemClick(item)">
+            <view class="icon-container"
+                  :style="{ background: item.bgColor }">
+              <up-icon :name="item.icon"
+                       :size="58"
+                       color="#ffffff"></up-icon>
+            </view>
+            <text class="item-label">{{item.label}}</text>
+          </up-grid-item>
+        </up-grid>
+      </view>
+    </view>
     <!--    &lt;!&ndash; 閲囪喘绠$悊妯″潡 &ndash;&gt;-->
-    <!--    <view class="common-module purchase-module">-->
-    <!--      <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 purchaseItems"-->
-    <!--                        :key="index"-->
-    <!--                        @click="handleCommonItemClick(item)">-->
-    <!--            <view class="icon-container"-->
-    <!--                  :style="{ background: item.bgColor }">-->
-    <!--              <up-icon :name="item.icon"-->
-    <!--                       :size="58"-->
-    <!--                       color="#ffffff"></up-icon>-->
-    <!--            </view>-->
-    <!--            <text class="item-label">{{item.label}}</text>-->
-    <!--          </up-grid-item>-->
-    <!--        </up-grid>-->
-    <!--      </view>-->
-    <!--    </view>-->
-    <!--    &lt;!&ndash; 鍗忓悓鍔炲叕妯″潡 &ndash;&gt;-->
+    <view class="common-module purchase-module">
+      <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 purchaseItems"
+                        :key="index"
+                        @click="handleCommonItemClick(item)">
+            <view class="icon-container"
+                  :style="{ background: item.bgColor }">
+              <up-icon :name="item.icon"
+                       :size="58"
+                       color="#ffffff"></up-icon>
+            </view>
+            <text class="item-label">{{item.label}}</text>
+          </up-grid-item>
+        </up-grid>
+      </view>
+    </view>
+    <!-- &lt;!&ndash; 鍗忓悓鍔炲叕妯″潡 &ndash;&gt; -->
     <view class="common-module collaboration-module">
       <view class="module-header">
         <view class="module-title-container">
@@ -163,29 +163,29 @@
       </view>
     </view>
     <!-- 璁惧绠$悊妯″潡 -->
-    <!--    <view class="common-module equipment-module">-->
-    <!--      <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 equipmentItems"-->
-    <!--                        :key="index"-->
-    <!--                        @click="handleCommonItemClick(item)">-->
-    <!--            <view class="icon-container"-->
-    <!--                  :style="{ background: item.bgColor }">-->
-    <!--              <up-icon :name="item.icon"-->
-    <!--                       :size="58"-->
-    <!--                       color="#ffffff"></up-icon>-->
-    <!--            </view>-->
-    <!--            <text class="item-label">{{item.label}}</text>-->
-    <!--          </up-grid-item>-->
-    <!--        </up-grid>-->
-    <!--      </view>-->
-    <!--    </view>-->
+    <view class="common-module equipment-module">
+      <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 equipmentItems"
+                        :key="index"
+                        @click="handleCommonItemClick(item)">
+            <view class="icon-container"
+                  :style="{ background: item.bgColor }">
+              <up-icon :name="item.icon"
+                       :size="58"
+                       color="#ffffff"></up-icon>
+            </view>
+            <text class="item-label">{{item.label}}</text>
+          </up-grid-item>
+        </up-grid>
+      </view>
+    </view>
   </view>
 </template>
 
@@ -196,8 +196,7 @@
   import modal from "@/plugins/modal";
   import useUserStore from "@/store/modules/user";
 
-  const userStore = useUserStore();
-  const factoryId = ref("");
+  const userStore = useUserStore();;
   const show = ref(false);
   const factoryList = ref([]);
   const factoryListTem = ref([]);
@@ -278,88 +277,32 @@
 
   // 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
   const collaborationItems = reactive([
-    // {
-    //   icon: "/static/images/icon/gongchuguanli@2x.png",
-    //   label: "鍏嚭绠$悊",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "璇峰亣绠$悊",
-    // },
-    // {
-    //   icon: "/static/images/icon/chuchaiguanli@2x.png",
-    //   label: "鍑哄樊绠$悊",
-    // },
     {
-      icon: "/static/images/icon/chuchaiguanli@2x.png",
+      icon: "/static/images/icon/gongchuguanli@2x.png",
       label: "鑰冨嫟绠$悊",
     },
     {
-      icon: "/static/images/icon/chuchaiguanli@2x.png",
+      icon: "/static/images/icon/baoxiaoguanli.png",
       label: "璐㈠姟绠$悊",
     },
-    // {
-    //   icon: "/static/images/icon/chuchaiguanli@2x.png",
-    //   label: "鎶ラ攢绠$悊",
-    // },
-    // {
-    //   icon: "/static/images/icon/chuchaiguanli@2x.png",
-    //   label: "閲囪喘绠$悊",
-    // },
-    // {
-    //   icon: "/static/images/icon/chuchaiguanli@2x.png",
-    //   label: "鎶ヤ环绠$悊",
-    // },
-    // {
-    //   icon: "/static/images/icon/chuchaiguanli@2x.png",
-    //   label: "鍑哄簱绠$悊",
-    // },
     {
-      icon: "/static/images/icon/chuchaiguanli@2x.png",
+      icon: "/static/images/icon/huiyiliebiao@2x.png",
       label: "浼氳绠$悊",
     },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳璁剧疆",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳鍒楄〃",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳鐢宠",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳瀹℃壒",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳鍙戝竷",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳鎬荤粨",
-    // },
-    // {
-    //   icon: "/static/images/icon/qingjiaguanli@2x.png",
-    //   label: "浼氳鐪嬫澘",
-    // },
     {
-      icon: "/static/images/icon/qingjiaguanli@2x.png",
+      icon: "/static/images/icon/tongzhigonggao@2x.png",
       label: "閫氱煡鍏憡",
     },
     {
-      icon: "/static/images/icon/qingjiaguanli@2x.png",
+      icon: "/static/images/icon/zhishiku@2x.png",
       label: "鐭ヨ瘑搴�",
     },
     {
-      icon: "/static/images/icon/qingjiaguanli@2x.png",
+      icon: "/static/images/icon/yongyinguanli@2x.png",
       label: "鐢ㄥ嵃绠$悊",
     },
     {
-      icon: "/static/images/icon/qingjiaguanli@2x.png",
+      icon: "/static/images/icon/guizhangzhidu@2x.png",
       label: "瑙勭珷鍒跺害",
     },
     // {
@@ -407,6 +350,10 @@
     // 	icon: '/static/images/icon/shebeitaizhang@2x.png',
     // 	label: '璁惧鍙拌处',
     // },
+    {
+      icon: "/static/images/icon/shbeibaoxiu@2x.png",
+      label: "杩愯绠$悊",
+    },
     {
       icon: "/static/images/icon/shbeibaoxiu@2x.png",
       label: "璁惧鎶ヤ慨",
@@ -649,6 +596,11 @@
           url: "/pages/equipmentManagement/ledger/index",
         });
         break;
+      case "杩愯绠$悊":
+        uni.navigateTo({
+          url: "/pages/equipmentManagement/runManagement/index",
+        });
+        break;
       case "璁惧鎶ヤ慨":
         uni.navigateTo({
           url: "/pages/equipmentManagement/repair/index",
@@ -704,8 +656,7 @@
           factoryListTem.value = res.data;
           res.data.forEach(item => {
             factoryList.value[0].push(item.deptName);
-          });
-          factoryId.value = userStore.currentDeptId;
+          })
         } else {
           // 濡傛灉res.data涓嶆槸鏁扮粍锛岃缃负绌烘暟缁�
           factoryList.value = [];
@@ -808,7 +759,6 @@
     const loginForm = {
       username: userStore.name,
       password: uni.getStorageSync("remembered_password"),
-      factoryId: factoryId,
     };
     modal.loading("鍒锋柊涓紝璇疯�愬績绛夊緟...");
     userStore

--
Gitblit v1.9.3