From c95e7e5af5e80d6603b8dfc922201079b27b9056 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期二, 09 九月 2025 19:29:03 +0800
Subject: [PATCH] art: 上料列表、新增页面

---
 src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue b/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue
index 4b0ad49..2211b9e 100644
--- a/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue
+++ b/src/views/mes/modules/MesProductionWorkOrderEquipmentInspectionModal.vue
@@ -172,7 +172,6 @@
     handleEquipmentChange(id) {
       getAction(this.url.queryByEquipmentId, {equipmentId: id}).then(res => {
         if (res.success) {
-          console.log(res.result)
           this.model = {
             ...this.model,
             standardId: res.result.id,
@@ -190,6 +189,10 @@
           this.$message.error("璇峰畬鎴愭墍鏈夊繀濉俊鎭悗鍐嶆彁浜わ紒")
         } else {
           let tableData = this.$refs.table.getTableData().fullData
+          if (!tableData || tableData.length === 0) {
+            this.$message.error("鐐规椤逛负绌猴紝鏃犳硶鎻愪氦锛�")
+            return
+          }
           const data = {
             ...this.model,
             workOrderId: this.workOrderId,
@@ -226,7 +229,9 @@
       })
     },
     resetFormData() {
-      this.$refs.form.resetFields()
+      if (this.$refs.form) {
+        this.$refs.form.resetFields()
+      }
       this.model = {}
       this.dataSource = []
     },

--
Gitblit v1.9.3