From 4617951af57412dcf13c2c70ccefbd49196ff49a Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期五, 01 八月 2025 14:08:12 +0800
Subject: [PATCH] 库位号添加禁用规则

---
 src/views/tms/modules/outBound/OutboundOrderSelectList.vue |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/views/tms/modules/outBound/OutboundOrderSelectList.vue b/src/views/tms/modules/outBound/OutboundOrderSelectList.vue
index 46b1eb2..4358e5e 100644
--- a/src/views/tms/modules/outBound/OutboundOrderSelectList.vue
+++ b/src/views/tms/modules/outBound/OutboundOrderSelectList.vue
@@ -252,11 +252,31 @@
           this.$message.warning("璇烽�夋嫨鏄庣粏鍚庡啀鍑哄簱锛�")
           return
         }
+        // 鍏堥獙璇佹墍鏈夐�変腑椤�
+        const validationErrors = [];
+        for (let i = 0; i < this.selectionRows.length; i++) {
+          const item = this.selectionRows[i];
+          // 妫�鏌ュ繀濉瓧娈�
+          if (item.accuracyClass === '1') { // 鍙湁鍦ㄤ笉绂佺敤鐘舵�佷笅鎵嶉渶瑕佹牎楠屽繀濉�
+            if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.ratedLife)) {
+              validationErrors.push(`鏄庣粏绗�${i+1}琛岋細棰濆畾瀵垮懡涓哄繀濉」`);
+            }
+            if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.useLife)) {
+              validationErrors.push(`鏄庣粏绗�${i+1}琛岋細浣跨敤瀵垮懡涓哄繀濉」`);
+            }
+          }
+        }
+        if (validationErrors.length > 0) {
+          this.$message.error(validationErrors.join('锛�'));
+          return;
+        }
         const params = this.selectionRows.map((item) => {
           return {
             outBoundOrderId: this.selectedMainId,
             outboundDetailId: item.id,
-            outboundQuantity: item.outboundQuantity
+            outboundQuantity: item.outboundQuantity,
+            ratedLife:item.ratedLife,
+            useLife:item.useLife
           }
         })
         postAction(this.url.outbound, params).then(res=>{
@@ -292,7 +312,7 @@
         }
         this.onClearSelected()
         this.queryParam.orderStatus = '3'
-        this.queryParam.outStatus = '1'
+        this.queryParam.outStatus = ['1','2'].join(',')
         var params = this.getQueryParams();//鏌ヨ鏉′欢
         this.loading = true;
         getAction(this.url.list, params).then((res) => {

--
Gitblit v1.9.3