From a9d97b150701e634bdb751eab277696abd136cca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 16 六月 2026 14:39:47 +0800
Subject: [PATCH] 君歌app 1.依照web端功能修改
---
src/pages/works.vue | 244 +++++++++++++++++++++++++-----------------------
1 files changed, 126 insertions(+), 118 deletions(-)
diff --git a/src/pages/works.vue b/src/pages/works.vue
index 2759b3e..1b77038 100644
--- a/src/pages/works.vue
+++ b/src/pages/works.vue
@@ -306,7 +306,6 @@
<script setup>
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";
@@ -336,19 +335,19 @@
// 宸ヨ壓璁捐鍔熻兘鏁版嵁
const designItems = reactive([
{
- icon: "/static/images/icon/xiaoshoubaojia.svg",
+ icon: "/static/images/icon/jichucanshu.svg",
label: "鍩虹鍙傛暟",
},
{
- icon: "/static/images/icon/xiaoshoubaojia.svg",
+ icon: "/static/images/icon/gongxuguanli.svg",
label: "宸ュ簭绠$悊",
},
+ // {
+ // icon: "/static/images/icon/bom.svg",
+ // label: "BOM",
+ // },
{
- icon: "/static/images/icon/xiaoshoubaojia.svg",
- label: "BOM",
- },
- {
- icon: "/static/images/icon/xiaoshoubaojia.svg",
+ icon: "/static/images/icon/gongyiluxian.svg",
label: "宸ヨ壓璺嚎",
},
]);
@@ -359,10 +358,10 @@
icon: "/static/images/icon/kehudangan.svg",
label: "瀹㈡埛妗f",
},
- {
- icon: "/static/images/icon/xiaoshoubaojia.svg",
- label: "閿�鍞姤浠�",
- },
+ // {
+ // icon: "/static/images/icon/xiaoshoubaojia.svg",
+ // label: "閿�鍞姤浠�",
+ // },
{
icon: "/static/images/icon/xiaoshoutaizhang.svg",
label: "閿�鍞彴璐�",
@@ -444,11 +443,11 @@
// 妗f绠$悊鍔熻兘鏁版嵁
const archiveManagementItems = reactive([
{
- icon: "/static/images/icon/gongyingshangdangan.svg",
+ icon: "/static/images/icon/jieyuedengji.svg",
label: "鍊熼槄鐧昏",
},
{
- icon: "/static/images/icon/hetongguanli.svg",
+ icon: "/static/images/icon/guihuandengji.svg",
label: "褰掕繕鐧昏",
},
]);
@@ -468,7 +467,7 @@
// 浠撳偍鐗╂祦鍔熻兘鏁版嵁
const warehouseLogisticsItems = reactive([
{
- icon: "/static/images/icon/xiaoshoutaizhang.svg",
+ icon: "/static/images/icon/kucunguanli.svg",
label: "搴撳瓨绠$悊",
},
]);
@@ -485,6 +484,21 @@
{
icon: "/static/images/icon/hetongguanli.svg",
label: "鍚堝悓绠$悊",
+ },
+ {
+ icon: "/static/images/icon/hetongguanli.svg",
+ label: "杞鐢宠",
+ path: "/pages/oa/HrManage/regular-apply/index",
+ },
+ {
+ icon: "/static/images/icon/renyuanxinzi.svg",
+ label: "璋冨姩鐢宠",
+ path: "/pages/oa/HrManage/transfer-apply/index",
+ },
+ {
+ icon: "/static/images/icon/gongchuguanli.svg",
+ label: "宸ヤ綔浜ゆ帴",
+ path: "/pages/oa/HrManage/work-handover/index",
},
]);
const qualityItems = reactive([
@@ -537,10 +551,20 @@
]);
// 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
const collaborationItems = reactive([
- {
- icon: "/static/images/icon/xietongshenpi.svg",
- label: "鍗忓悓瀹℃壒",
- },
+ // {
+ // icon: "/static/images/icon/xietongshenpi.svg",
+ // label: "鍗忓悓瀹℃壒",
+ // },
+ {
+ icon: "/static/images/icon/guizhangzhidu.svg",
+ label: "瀹℃壒绠$悊",
+ path: "/pages/oa/ApproveManage/approve-template/index",
+ },
+ {
+ icon: "/static/images/icon/xietongshenpi.svg",
+ label: "鍗忓悓瀹℃壒",
+ path: "/pages/oa/ApproveManage/approve-list/index",
+ },
{
icon: "/static/images/icon/huiyiguanli.svg",
label: "浼氳绠$悊",
@@ -565,38 +589,63 @@
icon: "/static/images/icon/kehubaifang.svg",
label: "瀹㈡埛鎷滆",
},
+ {
+ icon: "/static/images/icon/qingjiaguanli.svg",
+ label: "璇峰亣鐢宠",
+ path: "/pages/oa/AttendManage/leave-apply/index",
+ },
+ {
+ icon: "/static/images/icon/dakaqiandao.svg",
+ label: "鍔犵彮鐢宠",
+ path: "/pages/oa/AttendManage/overtime-apply/index",
+ },
+ {
+ icon: "/static/images/icon/chuchaiguanli.svg",
+ label: "宸梾鎶ラ攢",
+ path: "/pages/oa/ReimburseManage/travel-reimburse/index",
+ },
+ {
+ icon: "/static/images/icon/baoxiaoguanli.svg",
+ label: "璐圭敤鎶ラ攢",
+ path: "/pages/oa/ReimburseManage/cost-reimburse/index",
+ },
]);
// 鐢熶骇绠℃帶鍔熻兘鏁版嵁
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/shengchanbaogong.svg",
+ 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: "鐢熶骇鏍哥畻",
+ },
]);
// 璁惧绠$悊鍔熻兘鏁版嵁
@@ -625,6 +674,10 @@
// 澶勭悊甯哥敤鍔熻兘鐐瑰嚮
const handleCommonItemClick = item => {
+ if (item.path) {
+ uni.navigateTo({ url: item.path });
+ return;
+ }
// 鏍规嵁涓嶅悓鐨勫姛鑳介」杩涜璺宠浆
switch (item.label) {
case "瀹㈡埛妗f":
@@ -837,9 +890,9 @@
url: "/pages/productionManagement/productionDispatching/index",
});
break;
- case "宸ュ簭鎺掍骇":
+ case "宸ヨ壓璺嚎":
uni.navigateTo({
- url: "/pages/productionManagement/processScheduling/index",
+ url: "/pages/productionManagement/processRoute/index",
});
break;
case "鐢熶骇宸ュ崟":
@@ -852,12 +905,34 @@
url: "/pages/productionManagement/mainProductionPlan/index",
});
break;
+ case "鐢熶骇鎺掍骇":
+ uni.navigateTo({
+ url: "/pages/productionManagement/productionScheduling/index",
+ });
+ break;
case "鐢熶骇鎶ュ伐":
- getcode();
+ uni.navigateTo({
+ url: "/pages/productionManagement/workOrder/index",
+ });
+ 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 "璁惧鍙拌处":
@@ -1046,83 +1121,6 @@
factoryList.value = [];
});
}
- const getcode = () => {
- uni.scanCode({
- success: async res => {
- // 瑙f瀽浜岀淮鐮佸唴瀹�
- const scanResult = res.result;
- let orderRow = "";
-
- // 鍒ゆ柇鎵弿缁撴灉鏄惁涓虹函鏁板瓧锛坕d锛�
- const isNumericId = /^\d+$/.test(scanResult.trim());
-
- if (isNumericId) {
- // 濡傛灉鏄函鏁板瓧锛屾牴鎹� id 鑾峰彇宸ュ崟鏁版嵁
- const workOrderId = scanResult.trim();
- modal.loading("姝e湪鑾峰彇宸ュ崟淇℃伅...");
- try {
- const workRes = await getProductWorkOrderById({ id: workOrderId });
- modal.closeLoading();
-
- console.log("宸ュ崟鏌ヨ缁撴灉:", workRes);
-
- if (workRes.code === 200 && workRes.data) {
- // 鏂版帴鍙h繑鍥炵殑鏄崟涓璞★紝涓嶆槸鏁扮粍
- const workData = workRes.data;
- console.log("宸ュ崟鏁版嵁:", workData);
-
- orderRow = JSON.stringify(workData);
-
- console.log("鏋勯�犵殑orderRow:", orderRow);
- } else {
- modal.msgError("鏈壘鍒板搴旂殑宸ュ崟淇℃伅");
- return;
- }
- } catch (error) {
- modal.closeLoading();
- console.error("鑾峰彇宸ュ崟淇℃伅澶辫触:", error);
- modal.msgError("鑾峰彇宸ュ崟淇℃伅澶辫触: " + (error.message || "鏈煡閿欒"));
- return;
- }
- } else {
- // 濡傛灉涓嶆槸绾暟瀛楋紝灏濊瘯浠庢壂鐮佺粨鏋滀腑鎻愬彇orderRow鍙傛暟
- try {
- // 澶勭悊娣峰悎鏍煎紡: http://...?orderRow={...}
- const orderRowStart = scanResult.indexOf("orderRow={");
- if (orderRowStart !== -1) {
- // 鎻愬彇浠巓rderRow={寮�濮嬬殑JSON鍐呭
- const jsonPart = scanResult.substring(orderRowStart + 9); // 9鏄�"orderRow=".length
- orderRow = jsonPart;
- } else {
- // 濡傛灉鐩存帴鏄疛SON瀛楃涓诧紝灏濊瘯瑙f瀽
- orderRow = scanResult;
- }
- } catch (e) {
- console.error(e, "瑙f瀽澶辫触====????=====");
- orderRow = "";
- }
-
- // 楠岃瘉鏄惁涓烘湁鏁堢殑JSON
- try {
- JSON.parse(orderRow);
- } catch (error) {
- modal.msgError("璁㈠崟瑙f瀽澶辫触锛岃妫�鏌ヤ簩缁寸爜鏍煎紡");
- return;
- }
- }
- // 鎵爜鎴愬姛鍚庤烦杞埌鐢熶骇鎶ュ伐椤甸潰锛屽苟浼犻�抩rderRow鍙傛暟
- uni.navigateTo({
- url: `/pages/productionManagement/productionReport/index?orderRow=${orderRow}`,
- });
- },
- fail: err => {
- uni.showToast({
- title: "鎵爜澶辫触",
- icon: "none",
- });
- },
- });
- };
const changeFactory = async arr => {
show.value = false;
const factoryId = factoryListTem.value[arr.indexs[0]].deptId;
@@ -1216,6 +1214,7 @@
// 杩囨护鍚勪釜妯″潡
filterArray(marketingItems);
+ filterArray(designItems);
filterArray(purchaseItems, menuMapping.purchase.specialMapping);
filterArray(financeManagementItems);
filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
@@ -1226,6 +1225,7 @@
filterArray(productionItems);
filterArray(equipmentItems);
filterArray(archiveManagementItems);
+ filterArray(afterSalesServiceItems);
};
// 妫�鏌ユā鍧楁槸鍚︽湁鑿滃崟椤归渶瑕佹樉绀�
@@ -1616,6 +1616,10 @@
--module-color: #4caf50;
}
+ .oa-module {
+ --module-color: #673ab7;
+ }
+
.production-module {
--module-color: #ff9800;
}
@@ -1858,6 +1862,10 @@
--module-color: #4caf50;
}
+ .oa-module {
+ --module-color: #673ab7;
+ }
+
.production-module {
--module-color: #ff9800;
}
--
Gitblit v1.9.3