From 99eb0c882e5d9575219ac82b37bdca3c7737973f Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期六, 18 十月 2025 10:12:19 +0800
Subject: [PATCH] 逻辑修改
---
components/mold.vue | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index 2216b17..2ba016d 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -251,7 +251,7 @@
this.toolList = this.toolList.map(t => t.no === this.selectedToolNo ? { ...t, useLimit: v } : t);
this.$showMessage('浣跨敤涓婇檺宸茶缃紙浠呭墠绔樉绀猴級');
},
- // 涓婂垁鏃朵紶閫掑綋鍓嶄笂鍒�璁℃暟
+ // 涓婂垁鏃朵紶閫� sdjs = 褰撳墠 currentCjNum
async handleUpTool() {
if (!this.workOrderNo) { this.$showMessage('宸ュ崟鍙蜂笉鑳戒负绌�'); return; }
if (!this.machineNo) { this.$showMessage('鏈哄彴鍙蜂笉鑳戒负绌�'); return; }
@@ -260,9 +260,9 @@
const useLimit = Number(this.useLimitInput);
if (isNaN(useLimit) || useLimit <= 0) { this.$showMessage('璇疯緭鍏ユ湁鏁堢殑浣跨敤涓婇檺'); return; }
- // 鏌ユ壘褰撳墠鍒�鍏风殑涓婂垁璁℃暟
+ // 鏌ユ壘褰撳墠鍒�鍏风殑 currentCjNum
const currentTool = this.toolRecords.find(r => r.no === this.selectedToolNo);
- const sdjs = currentTool && currentTool.upCount != null ? Number(currentTool.upCount) : null;
+ const sdjs = currentTool && currentTool.currentCjNum != null ? Number(currentTool.currentCjNum) : null;
const payload = {
workOrderNo: this.workOrderNo,
@@ -270,7 +270,7 @@
toolNo: this.selectedToolNo,
type: '涓婂垁',
useLimit,
- sdjs // 涓婂垁璁℃暟
+ sdjs // 涓婂垁璁℃暟锛堝綋鍓嶆暟閲囷級
};
try {
this.submitting = true;
@@ -292,7 +292,7 @@
this.submitting = false;
}
},
- // 涓嬪垁鏃朵紶閫掑綋鍓嶄笅鍒�璁℃暟
+ // 涓嬪垁鏃朵紶閫� xdjs = 褰撳墠 downCount
async handleDownTool() {
if (!this.workOrderNo) { this.$showMessage('宸ュ崟鍙蜂笉鑳戒负绌�'); return; }
if (!this.machineNo) { this.$showMessage('鏈哄彴鍙蜂笉鑳戒负绌�'); return; }
@@ -301,7 +301,7 @@
const useLimit = Number(this.useLimitInput);
if (isNaN(useLimit) || useLimit <= 0) { this.$showMessage('璇疯緭鍏ユ湁鏁堢殑浣跨敤涓婇檺'); return; }
- // 鏌ユ壘褰撳墠鍒�鍏风殑涓嬪垁璁℃暟
+ // 鏌ユ壘褰撳墠鍒�鍏风殑 downCount
const currentTool = this.toolRecords.find(r => r.no === this.selectedToolNo);
const xdjs = currentTool && currentTool.downCount != null ? Number(currentTool.downCount) : null;
@@ -388,6 +388,7 @@
const upTimeRaw = getField(t, 'uP_TIME', 'UP_TIME', 'uPTime', 'UPTIME', 'UpTime');
const downTimeRaw = getField(t, 'dowN_TIME', 'DOWN_TIME', 'downTime', 'DOWNTIME');
const lifeWarnRaw = getField(t, 'lifE_WARN', 'LIFE_WARN', 'lifeWarn', 'LIFEWARN');
+ const currentCjNum = getField(t, 'currentCjNum', 'CURRENTCJNUM', 'currentcjnum'); // 褰撳墠鏁伴噰
// 浣跨敤娆℃暟鍜屼笂闄�
const useCount = getField(t, 'usE_COUNT', 'USE_COUNT', 'useCount');
@@ -438,7 +439,8 @@
useLimit: useLimit ?? '',
lifePercent: percent,
lifeWarn: formatPercent(lifeWarnNum),
- warnStatus
+ warnStatus,
+ currentCjNum // 褰撳墠鏁伴噰
};
});
--
Gitblit v1.9.3