From c3a4f841d5499b74e9153fce421cebd1fb4ac72d Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 15 七月 2025 10:55:52 +0800
Subject: [PATCH] 1、mdc设备多选输入框优化新增点击输入框同样触发查询按钮弹出抽屉或弹窗 2、解决进入过产品结构树页面后再进入设备日志页面后设备状态分布图样式变形问题以及优化组件代码

---
 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