From 1d2c1b2f049f1fc5e396d945c773afba0fcf2411 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期日, 24 五月 2026 13:26:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro_河南鹤壁_帮太优选' into dev_pro_河南鹤壁_帮太优选
---
src/views/index.vue | 45 ++++++++++------------
src/views/qualityManagement/processInspection/components/formDia.vue | 14 +++---
src/views/qualityManagement/finalInspection/components/formDia.vue | 14 +++---
src/views/qualityManagement/rawMaterialInspection/components/formDia.vue | 13 +++---
4 files changed, 41 insertions(+), 45 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index e12ded2..c6fa35e 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -214,7 +214,7 @@
<div v-if="visiblePanels.todo" class="cockpit-panel todo-panel">
<div class="panel-title-row">
<div class="panel-title">寰呭姙浜嬮」</div>
- <span class="panel-more">鏇村</span>
+ <span class="panel-more" @click="goToApprovalProcess">鏇村</span>
</div>
<ul class="todo-list" v-if="todoList.length > 0">
<li v-for="item in todoList" :key="item.id" class="todo-item">
@@ -232,7 +232,7 @@
<div v-if="visiblePanels.realtime" class="cockpit-panel realtime-panel">
<div class="panel-title-row">
<div class="panel-title">鐢熶骇瀹炴椂鐪嬫澘</div>
- <span class="panel-more">鏇村</span>
+ <span class="panel-more" @click="goToProductionOrder">鏇村</span>
</div>
<div class="realtime-grid">
<div class="realtime-item" v-for="item in realtimeBoard" :key="item.key">
@@ -278,7 +278,7 @@
<div v-if="visiblePanels.plan" class="cockpit-panel plan-panel">
<div class="panel-title-row">
<div class="panel-title">浠婃棩鐢熶骇璁″垝</div>
- <span class="panel-more">{{ todayPlanTotal }}椤�</span>
+ <span class="panel-more" @click="goToProductionPlan">{{ todayPlanTotal }}椤�</span>
</div>
<ul class="plan-list">
<li v-for="item in todayPlanList" :key="item.orderNo" class="plan-item">
@@ -449,7 +449,6 @@
});
const realtimeBoardData = ref({
- deviceOee: { value: 0, compareYesterday: 0 },
orderAchievementRate: { value: 0, compareYesterday: 0 },
defectRate: { value: 0, compareYesterday: 0 },
});
@@ -883,22 +882,11 @@
};
const realtimeBoard = computed(() => {
- const oee = Number(realtimeBoardData.value.deviceOee?.value || 0);
const orderAchievement = Number(realtimeBoardData.value.orderAchievementRate?.value || 0);
const defectRate = Number(realtimeBoardData.value.defectRate?.value || 0);
- const oeeCompare = Number(realtimeBoardData.value.deviceOee?.compareYesterday || 0);
const orderCompare = Number(realtimeBoardData.value.orderAchievementRate?.compareYesterday || 0);
const defectCompare = Number(realtimeBoardData.value.defectRate?.compareYesterday || 0);
return [
- {
- key: "oee",
- label: "璁惧 OEE",
- percent: clampPercent(oee),
- display: `${oee.toFixed(2)}%`,
- delta: getCompareText(oeeCompare),
- trend: getCompareTrend(oeeCompare),
- color: "#2d8cff",
- },
{
key: "order",
label: "璁㈠崟杈炬垚鐜�",
@@ -906,7 +894,7 @@
display: `${orderAchievement.toFixed(2)}%`,
delta: getCompareText(orderCompare),
trend: getCompareTrend(orderCompare),
- color: "#31d2ff",
+ color: "#2d8cff",
},
{
key: "defect",
@@ -1205,10 +1193,6 @@
const res = await productionRealtimeBoard();
const data = res?.data || {};
realtimeBoardData.value = {
- deviceOee: {
- value: Number(data.deviceOee?.value || 0),
- compareYesterday: Number(data.deviceOee?.compareYesterday || 0),
- },
orderAchievementRate: {
value: Number(data.orderAchievementRate?.value || 0),
compareYesterday: Number(data.orderAchievementRate?.compareYesterday || 0),
@@ -1220,7 +1204,6 @@
};
} catch {
realtimeBoardData.value = {
- deviceOee: { value: 0, compareYesterday: 0 },
orderAchievementRate: { value: 0, compareYesterday: 0 },
defectRate: { value: 0, compareYesterday: 0 },
};
@@ -1396,6 +1379,18 @@
const goToQuick = (path) => {
if (!path) return;
router.push(path).catch(() => {});
+};
+
+const goToProductionOrder = () => {
+ router.push('/productionManagement/productionOrder').catch(() => {});
+};
+
+const goToApprovalProcess = () => {
+ router.push('/collaborativeApproval/approvalProcess').catch(() => {});
+};
+
+const goToProductionPlan = () => {
+ router.push('/productionManagement/productionPlan').catch(() => {});
};
watch(orderFilter, () => {
@@ -2094,7 +2089,7 @@
.realtime-grid {
margin-top: 10px;
display: grid;
- grid-template-columns: repeat(3, minmax(0, 1fr));
+ grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
@@ -2102,12 +2097,12 @@
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 12px;
background: #f8fbff;
- padding: 10px 8px;
+ padding: 16px 12px;
text-align: center;
}
.realtime-value {
- font-size: 26px;
+ font-size: 32px;
color: #0f172a;
font-weight: 700;
}
@@ -2432,7 +2427,7 @@
}
.realtime-grid {
- grid-template-columns: repeat(3, minmax(0, 1fr));
+ grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quality-cards {
diff --git a/src/views/qualityManagement/finalInspection/components/formDia.vue b/src/views/qualityManagement/finalInspection/components/formDia.vue
index b5c9fcf..31ba755 100644
--- a/src/views/qualityManagement/finalInspection/components/formDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -209,11 +209,11 @@
const n = Number(fromApi);
if (!Number.isNaN(n)) return n;
}
- const quantity = Number(form.value.quantity);
- const qualified = Number(form.value.qualifiedQuantity);
- if (!quantity || Number.isNaN(quantity)) return null;
- const qualifiedNum = Number.isNaN(qualified) ? 0 : qualified;
- return (qualifiedNum / quantity) * 100;
+ const qualified = Number(form.value.qualifiedQuantity) || 0;
+ const unqualified = Number(form.value.unqualifiedQuantity) || 0;
+ const total = qualified + unqualified;
+ if (!total || total === 0) return null;
+ return (qualified / total) * 100;
});
const passRateDisplayText = computed(() => {
@@ -296,8 +296,8 @@
if (operationType.value === 'edit' || operationType.value === 'view') {
// 鍏堜繚瀛� testStandardId锛岄伩鍏嶈娓呯┖
const savedTestStandardId = row.testStandardId;
- // 鍏堣缃〃鍗曟暟鎹紝浣嗘殏鏃舵竻绌� testStandardId锛岀瓑閫夐」鍔犺浇瀹屾垚鍚庡啀璁剧疆
- form.value = {...row, testStandardId: ''}
+ const { passRate, ...rowWithoutPassRate } = row;
+ form.value = { ...rowWithoutPassRate, testStandardId: '' };
currentProductId.value = row.productId || 0
// 娓呯┖楠岃瘉鐘舵�侊紝閬垮厤鏁版嵁鍔犺浇杩囩▼涓殑鏍¢獙闂儊
nextTick(() => {
diff --git a/src/views/qualityManagement/processInspection/components/formDia.vue b/src/views/qualityManagement/processInspection/components/formDia.vue
index 770b601..f28cec2 100644
--- a/src/views/qualityManagement/processInspection/components/formDia.vue
+++ b/src/views/qualityManagement/processInspection/components/formDia.vue
@@ -268,11 +268,11 @@
const n = Number(fromApi);
if (!Number.isNaN(n)) return n;
}
- const quantity = Number(form.value.quantity);
- const qualified = Number(form.value.qualifiedQuantity);
- if (!quantity || Number.isNaN(quantity)) return null;
- const qualifiedNum = Number.isNaN(qualified) ? 0 : qualified;
- return (qualifiedNum / quantity) * 100;
+ const qualified = Number(form.value.qualifiedQuantity) || 0;
+ const unqualified = Number(form.value.unqualifiedQuantity) || 0;
+ const total = qualified + unqualified;
+ if (!total || total === 0) return null;
+ return (qualified / total) * 100;
});
const passRateDisplayText = computed(() => {
@@ -367,8 +367,8 @@
if (operationType.value === "edit" || operationType.value === "view") {
// 鍏堜繚瀛� testStandardId锛岄伩鍏嶈娓呯┖
const savedTestStandardId = row.testStandardId;
- // 鍏堣缃〃鍗曟暟鎹紝浣嗘殏鏃舵竻绌� testStandardId锛岀瓑閫夐」鍔犺浇瀹屾垚鍚庡啀璁剧疆
- form.value = { ...row, testStandardId: "" };
+ const { passRate, ...rowWithoutPassRate } = row;
+ form.value = { ...rowWithoutPassRate, testStandardId: "" };
currentProductId.value = row.productId || 0;
// 鍏抽敭锛氱紪杈戞椂鍔犺浇瑙勬牸鍨嬪彿涓嬫媺閫夐」锛屾墠鑳藉弽鏄� productModelId
if (currentProductId.value) {
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index f7a6086..b745e9d 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -249,11 +249,11 @@
const n = Number(fromApi);
if (!Number.isNaN(n)) return n;
}
- const quantity = Number(form.value.quantity);
- const qualified = Number(form.value.qualifiedQuantity);
- if (!quantity || Number.isNaN(quantity)) return null;
- const qualifiedNum = Number.isNaN(qualified) ? 0 : qualified;
- return (qualifiedNum / quantity) * 100;
+ const qualified = Number(form.value.qualifiedQuantity) || 0;
+ const unqualified = Number(form.value.unqualifiedQuantity) || 0;
+ const total = qualified + unqualified;
+ if (!total || total === 0) return null;
+ return (qualified / total) * 100;
});
const passRateDisplayText = computed(() => {
@@ -315,7 +315,8 @@
if (operationType.value === 'edit' || operationType.value === 'view') {
// 鍏堜繚瀛� testStandardId锛岄伩鍏嶈娓呯┖
const savedTestStandardId = row.testStandardId;
- form.value = {...row}
+ const { passRate, ...rowWithoutPassRate } = row;
+ form.value = { ...rowWithoutPassRate, testStandardId: "" };
currentProductId.value = row.productId || 0
// 鍏抽敭锛氱紪杈戞椂鍔犺浇瑙勬牸鍨嬪彿涓嬫媺閫夐」锛屾墠鑳藉弽鏄� productModelId
if (currentProductId.value) {
--
Gitblit v1.9.3