From a99b32aee78f130d44f5353b30b001f96c84977a Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期四, 17 八月 2023 18:45:29 +0800
Subject: [PATCH] 改bug

---
 h5_standard/src/views/needToBeDealtWith/outbound.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/h5_standard/src/views/needToBeDealtWith/outbound.vue b/h5_standard/src/views/needToBeDealtWith/outbound.vue
index 21d39a9..a1d47d1 100644
--- a/h5_standard/src/views/needToBeDealtWith/outbound.vue
+++ b/h5_standard/src/views/needToBeDealtWith/outbound.vue
@@ -44,7 +44,7 @@
                         <span>鍑哄簱璐т綅锛歿{ item.locationName }}</span>
                         <div class="rework_qd_item_hw_right">
                             <span>鏁伴噺锛�</span>
-                            <input type="number" v-model="item.num" placeholder="0" />
+                            <input type="number" v-model="item.num" @input="changeNum(item)" placeholder="0" />
                             <span>{{ item.unitName }}</span>
                         </div>
                     </div>
@@ -111,7 +111,16 @@
     const onCancel = () => {
         typeShow.value = false
     }
-    
+    const changeNum = (obj: any) => {
+        if (obj.num < 0) {
+            obj.num = ''
+            return Toast('鍑哄簱鐗╂枡鏁伴噺蹇呴』澶т簬0')
+        }
+        if (obj.num > obj.total) {
+            obj.num = ''
+            return Toast('鍑哄簱鐗╂枡鏁伴噺涓嶈兘澶т簬搴撳瓨鏁�')
+        }
+    }
     // 鑾峰彇褰撳ぉ骞存湀鏃�
     const getDay = () => {
       var date = new Date();
@@ -127,7 +136,7 @@
         if (!form.warehouseId) return Toast('璇烽�夋嫨鍑哄簱浠撳簱')
         if (list.value.length === 0) return Toast('鑷冲皯閫夋嫨涓�鏉″嚭搴撶墿鏂�')
         for (let i = 0; i < list.value.length; i++) {
-            if (!list.value[i].num || list.value[i].num == '' || list.value[i].num == 0) {
+            if (!list.value[i].num || list.value[i].num == '' || list.value[i].num <= 0) {
                 return Toast(`绗�${i + 1}涓嚭搴撶墿鏂欐暟閲忓繀椤诲ぇ浜�0`)
             }
             if (list.value[i].num > list.value[i].total) {
@@ -352,7 +361,7 @@
                             color: #333333;
                             background: #FFFFFF;
                             border-radius: 8px;
-                            border: 1px solid #CCCCCC;
+                            border: 1PX solid #CCCCCC;
                             margin: 0 20px;
                             padding: 0 30px;
                             box-sizing: border-box;

--
Gitblit v1.9.3