From 304f9efb86e72eb3ce239fd69b2f4516b4438c6a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 09 四月 2026 15:29:59 +0800
Subject: [PATCH] Merge branch 'dev_new' of http://114.132.189.42:9002/r/product-inventory-APP-before into dev_new
---
src/pages/works.vue | 151 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 145 insertions(+), 6 deletions(-)
diff --git a/src/pages/works.vue b/src/pages/works.vue
index 3d7c2c9..8d37e74 100644
--- a/src/pages/works.vue
+++ b/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">
@@ -242,17 +264,23 @@
</up-grid>
</view>
</view>
+
+ <DownloadProgressMask />
</view>
</template>
<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([]);
@@ -278,6 +306,14 @@
// 钀ラ攢绠$悊鍔熻兘鏁版嵁
const marketingItems = reactive([
{
+ icon: "/static/images/icon/kehudangan.svg",
+ label: "瀹㈡埛妗f",
+ },
+ {
+ icon: "/static/images/icon/xiaoshoubaojia.svg",
+ label: "閿�鍞姤浠�",
+ },
+ {
icon: "/static/images/icon/xiaoshoutaizhang.svg",
label: "閿�鍞彴璐�",
},
@@ -296,6 +332,10 @@
{
icon: "/static/images/icon/gongyingshangwanglai.svg",
label: "渚涘簲鍟嗗線鏉�",
+ },
+ {
+ icon: "/static/images/icon/caigouguanli.svg",
+ label: "閲囪喘閫�璐�",
},
]);
@@ -333,14 +373,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: "鍊熸绠$悊",
+ },
]);
// 妗f绠$悊鍔熻兘鏁版嵁
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([
@@ -455,6 +527,10 @@
icon: "/static/images/icon/shengchanbaogong.svg",
label: "鐢熶骇鎶ュ伐",
},
+ {
+ icon: "/static/images/icon/shengchanbaogong.svg",
+ label: "鐢熶骇宸ュ崟",
+ },
// {
// icon: "/static/images/icon/shengchanhesuan@2x.svg",
// label: "鐢熶骇鏍哥畻",
@@ -489,9 +565,19 @@
const handleCommonItemClick = item => {
// 鏍规嵁涓嶅悓鐨勫姛鑳介」杩涜璺宠浆
switch (item.label) {
+ case "瀹㈡埛妗f":
+ 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 "寮�绁ㄧ櫥璁�":
@@ -544,9 +630,34 @@
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 "渚涘簲鍟嗗線鏉�":
uni.navigateTo({
url: "/pages/procurementManagement/paymentLedger/index",
+ });
+ break;
+ case "閲囪喘閫�璐�":
+ uni.navigateTo({
+ url: "/pages/procurementManagement/purchaseReturnOrder/index",
+ });
+ break;
+ case "渚涘簲鍟嗘。妗�":
+ uni.navigateTo({
+ url: "/pages/basicData/supplierManage/index",
});
break;
case "鍏嚭绠$悊":
@@ -667,6 +778,11 @@
case "宸ュ簭鎺掍骇":
uni.navigateTo({
url: "/pages/productionManagement/processScheduling/index",
+ });
+ break;
+ case "鐢熶骇宸ュ崟":
+ uni.navigateTo({
+ url: "/pages/productionManagement/workOrder/index",
});
break;
case "鐢熶骇鎶ュ伐":
@@ -790,6 +906,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:
@@ -963,6 +1094,7 @@
// 鏀堕泦鎵�鏈夋湁鏉冮檺鐨勮彍鍗曟爣棰橈紙鏍规嵁 meta.title锛�
const allowedMenuTitles = new Set();
+ const alwaysShowTitles = new Set(["閲囪喘閫�璐у崟", "渚涘簲鍟嗙鐞�"]);
const collectMenuTitles = routes => {
if (!Array.isArray(routes)) return;
routes.forEach(route => {
@@ -979,8 +1111,9 @@
// 瀹氫箟鑿滃崟閰嶇疆鏄犲皠
const menuMapping = {
collaboration: { target: collaborationItems, specialMapping: { "瑙勭珷鍒跺害": "瑙勭珷鍒跺害绠$悊" } },
+ archiveManagement: { target: archiveManagementItems, specialMapping: { "渚涘簲鍟嗘。妗�": "渚涘簲鍟嗙鐞�" } },
};
-
+ console.log(allowedMenuTitles)
// 閫氱敤杩囨护鍑芥暟
const filterArray = (targetArray, specialMapping) => {
const filtered = targetArray.filter(item => {
@@ -997,11 +1130,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);
@@ -1011,16 +1144,18 @@
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);
onMounted(() => {
+ triggerVersionCheck("onMounted");
// 姣忔杩涘叆棣栭〉閮藉己鍒跺埛鏂扮敤鎴蜂俊鎭拰璺敱鏉冮檺锛屼笉鍋氭湰鍦扮紦瀛樺垽鏂�
userStore.getInfo().then(() => {
userStore
@@ -1035,6 +1170,10 @@
getUserLoginFacotryList();
// 鍚姩閫氱煡鐘舵�佸畾鏃跺櫒
startStatusTimer();
+ });
+
+ onShow(() => {
+ triggerVersionCheck("onShow");
});
</script>
@@ -1702,4 +1841,4 @@
box-shadow: 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4);
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3