From 03827dae7ae73961ab49f7e0c1d32f197098d23d Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期六, 11 十月 2025 15:11:31 +0800
Subject: [PATCH] 刀具上下刀优化
---
components/mold.vue | 46 ++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/components/mold.vue b/components/mold.vue
index a538c6d..6545385 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -175,7 +175,28 @@
confirmTool() {
this.showToolDialog = false;
},
- async handleUpTool() {
+ async handleUpTool() {
+ if (!this.workOrderNo) {
+ this.$showMessage('宸ュ崟鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.machineNo) {
+ this.$showMessage('鏈哄彴鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.selectedToolNo) {
+ this.$showMessage('鍒�鍏风紪鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.useLimitInput) {
+ this.$showMessage('浣跨敤涓婇檺涓嶈兘涓虹┖');
+ return;
+ }
+ const useLimit = Number(this.useLimitInput);
+ if (isNaN(useLimit) || useLimit <= 0) {
+ this.$showMessage('璇疯緭鍏ユ湁鏁堢殑浣跨敤涓婇檺');
+ return;
+ }
const payload = {
workOrderNo: this.workOrderNo, // 宸ュ崟鍙�
machineNo: this.machineNo, // 鏈哄彴缂栧彿
@@ -194,7 +215,28 @@
this.$showMessage(res.message || '涓婂垁鎻愪氦澶辫触');
}
},
- async handleDownTool() {
+ async handleDownTool() {
+ if (!this.workOrderNo) {
+ this.$showMessage('宸ュ崟鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.machineNo) {
+ this.$showMessage('鏈哄彴鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.selectedToolNo) {
+ this.$showMessage('鍒�鍏风紪鍙蜂笉鑳戒负绌�');
+ return;
+ }
+ if (!this.useLimitInput) {
+ this.$showMessage('浣跨敤涓婇檺涓嶈兘涓虹┖');
+ return;
+ }
+ const useLimit = Number(this.useLimitInput);
+ if (isNaN(useLimit) || useLimit <= 0) {
+ this.$showMessage('璇疯緭鍏ユ湁鏁堢殑浣跨敤涓婇檺');
+ return;
+ }
const payload = {
workOrderNo: this.workOrderNo,
machineNo: this.machineNo,
--
Gitblit v1.9.3