From ade347e7d681f55bd42a6bde416467bf79a8a388 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 23 十月 2025 15:13:34 +0800
Subject: [PATCH] 上刀不强制录入使用上限

---
 components/mold.vue |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index b1139c9..142d210 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -252,9 +252,10 @@
                 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; }
+                //涓婂垁涓嶅己鍒跺綍鍏ヤ娇鐢ㄤ笂闄�
+                //if (!this.useLimitInput) { this.$showMessage('浣跨敤涓婇檺涓嶈兘涓虹┖'); return; }
+                //const useLimit = Number(this.useLimitInput);
+                //if (isNaN(useLimit) || useLimit <= 0) { this.$showMessage('璇疯緭鍏ユ湁鏁堢殑浣跨敤涓婇檺'); return; }
 
                 // sdjs 浣跨敤宸ュ崟 currentCjNum
                 const sdjs = this.workOrderCurrentCjNum != null ? Number(this.workOrderCurrentCjNum) : null;
@@ -274,16 +275,19 @@
                         data: JSON.stringify(payload),
                         headers: { 'Content-Type': 'application/json' }
                     });
-                    if (res.data && res.data.outMsg !== undefined) {
+                    if (res.data && res.data.outSum === "0") {
                         uni.showToast({
                             title: res.data.outMsg || '',
                             icon: 'error'
                         });
                         return;
+                    } else if (res.data && res.data.outMsg) {
+                        uni.showToast({
+                            title: res.data.outMsg,
+                            icon: 'none'
+                        });
                     }
-                    if (res.status === 0) {
-                        await this.fetchFormData();
-                    }
+                    // 鍚庣画閫昏緫缁х画鎵ц
                     if (res.status === 0) {
                         await this.fetchFormData();
                     }
@@ -321,13 +325,19 @@
                         data: JSON.stringify(payload),
                         headers: { 'Content-Type': 'application/json' }
                     });
-                    if (res.data && res.data.outMsg !== undefined) {
+                    if (res.data && res.data.outSum === "0") {
                         uni.showToast({
                             title: res.data.outMsg || '',
                             icon: 'error'
                         });
                         return;
+                    } else if (res.data && res.data.outMsg) {
+                        uni.showToast({
+                            title: res.data.outMsg,
+                            icon: 'none'
+                        });
                     }
+                    // 鍚庣画閫昏緫缁х画鎵ц
                     if (res.status === 0) {
                         await this.fetchFormData();
                     }

--
Gitblit v1.9.3