From 0333d66e4b397c161c6a44ce1e2a121c2cc41082 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 28 五月 2026 09:20:20 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' into dev_天津_中兴实强
---
src/pages/works.vue | 303 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 220 insertions(+), 83 deletions(-)
diff --git a/src/pages/works.vue b/src/pages/works.vue
index d049f52..41d6798 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>
@@ -103,7 +130,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>
@@ -125,7 +153,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,7 +176,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>
@@ -169,7 +199,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>
@@ -213,7 +244,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>
@@ -221,27 +253,28 @@
</view>
</view>
<!-- 璁惧绠$悊妯″潡 -->
-<!-- <view class="common-module equipment-module"-->
-<!-- v-if="hasEquipmentItems">-->
-<!-- <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">-->
-<!-- <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="hasEquipmentItems">
+ <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">
+ <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">-->
@@ -271,16 +304,14 @@
<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 { OA_WORKBENCH_ITEMS } from "@/config/oaWorkbench.js";
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([]);
@@ -302,6 +333,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([
@@ -333,10 +383,14 @@
icon: "/static/images/icon/gongyingshangwanglai.svg",
label: "渚涘簲鍟嗗線鏉�",
},
- // {
- // icon: "/static/images/icon/caigouguanli.svg",
- // label: "閲囪喘閫�璐�",
- // },
+ {
+ icon: "/static/images/icon/caigouguanli.svg",
+ label: "閲囪喘閫�璐�",
+ },
+ {
+ icon: "/static/images/icon/gongyingshangdangan.svg",
+ label: "渚涘簲鍟嗘。妗�",
+ },
]);
// 璐㈠姟绠$悊鍔熻兘鏁版嵁
@@ -390,8 +444,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: "褰掕繕鐧昏",
},
]);
@@ -410,7 +468,7 @@
// 浠撳偍鐗╂祦鍔熻兘鏁版嵁
const warehouseLogisticsItems = reactive([
{
- icon: "/static/images/icon/xiaoshoutaizhang.svg",
+ icon: "/static/images/icon/kucunguanli.svg",
label: "搴撳瓨绠$悊",
},
]);
@@ -511,30 +569,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: "鐢熶骇鏍哥畻",
+ },
]);
// 璁惧绠$悊鍔熻兘鏁版嵁
@@ -563,6 +630,10 @@
// 澶勭悊甯哥敤鍔熻兘鐐瑰嚮
const handleCommonItemClick = item => {
+ if (item.path) {
+ uni.navigateTo({ url: item.path });
+ return;
+ }
// 鏍规嵁涓嶅悓鐨勫姛鑳介」杩涜璺宠浆
switch (item.label) {
case "瀹㈡埛妗f":
@@ -775,9 +846,9 @@
url: "/pages/productionManagement/productionDispatching/index",
});
break;
- case "宸ュ簭鎺掍骇":
+ case "宸ヨ壓璺嚎":
uni.navigateTo({
- url: "/pages/productionManagement/processScheduling/index",
+ url: "/pages/productionManagement/processRoute/index",
});
break;
case "鐢熶骇宸ュ崟":
@@ -785,12 +856,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 "璁惧鍙拌处":
@@ -923,6 +1019,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}`,
@@ -954,7 +1075,7 @@
factoryList.value = [];
});
}
- const getcode = () => {
+ const getcode = async () => {
uni.scanCode({
success: async res => {
// 瑙f瀽浜岀淮鐮佸唴瀹�
@@ -979,14 +1100,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 {
@@ -1110,10 +1229,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 => {
@@ -1128,9 +1250,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);
@@ -1138,24 +1260,35 @@
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 hasOaItems = computed(() => oaItems.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(() => {
- triggerVersionCheck("onMounted");
// 姣忔杩涘叆棣栭〉閮藉己鍒跺埛鏂扮敤鎴蜂俊鎭拰璺敱鏉冮檺锛屼笉鍋氭湰鍦扮紦瀛樺垽鏂�
userStore.getInfo().then(() => {
userStore
@@ -1170,10 +1303,6 @@
getUserLoginFacotryList();
// 鍚姩閫氱煡鐘舵�佸畾鏃跺櫒
startStatusTimer();
- });
-
- onShow(() => {
- triggerVersionCheck("onShow");
});
</script>
@@ -1524,6 +1653,10 @@
--module-color: #4caf50;
}
+ .oa-module {
+ --module-color: #673ab7;
+ }
+
.production-module {
--module-color: #ff9800;
}
@@ -1766,6 +1899,10 @@
--module-color: #4caf50;
}
+ .oa-module {
+ --module-color: #673ab7;
+ }
+
.production-module {
--module-color: #ff9800;
}
--
Gitblit v1.9.3