From 2f519ead537a0b38019bbf64a6075cbb6e08f9b4 Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期三, 09 七月 2025 13:53:01 +0800
Subject: [PATCH] 车间大屏看板设置设备默认图片

---
 src/views/tms/modules/inbound/InboundModel.vue |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/views/tms/modules/inbound/InboundModel.vue b/src/views/tms/modules/inbound/InboundModel.vue
index bbd4993..d4d8ad2 100644
--- a/src/views/tms/modules/inbound/InboundModel.vue
+++ b/src/views/tms/modules/inbound/InboundModel.vue
@@ -283,6 +283,7 @@
       return filterObj(this.param)
     },
     add (nodeSelected) {
+      this.qrList = []
       this.classifyId = nodeSelected.key
       this.model.classifyNum =  nodeSelected.entity.classifyId
       this.model.typeName =  nodeSelected.entity.typeName
@@ -325,17 +326,20 @@
     },
     handleOk() {
       const that = this
+      if(this.dataSource.length == 0){
+        that.$message.error("璇峰厛閫夋嫨闇�瑕佸叆搴撶殑宸ュ叿!")
+        return
+      }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
-      this.form.validateFields((err, values) => {
-        if (!err) {
+      this.$refs.form.validate(valid => {
+        if (valid) {
           that.confirmLoading = true
-          let formData = Object.assign(this.model, values)
-          formData.detailData = this.dataSource
-          formData.classifyId = this.classifyId
-          postAction(this.url.addInStorage, formData)
+          this.model.detailData = this.dataSource
+          this.model.classifyId = this.classifyId
+          postAction(this.url.addInStorage, this.model)
             .then((res) => {
               if (res.success) {
-                if(formData.inStorehouseType === '1'){
+                if(this.model.inStorehouseType === '1'){
                   this.qrList = res.result.map((content, i) => ({
                   content:res.result[i].content,
                   base64: res.result[i].image

--
Gitblit v1.9.3