From 1fb44496929548b4f07b37796d506dedc494d44a Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 30 七月 2024 17:29:35 +0800
Subject: [PATCH] update 问题修复

---
 sub_pages/supplier/flower-manage/flower-add.vue |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/sub_pages/supplier/flower-manage/flower-add.vue b/sub_pages/supplier/flower-manage/flower-add.vue
index b234d61..2382501 100644
--- a/sub_pages/supplier/flower-manage/flower-add.vue
+++ b/sub_pages/supplier/flower-manage/flower-add.vue
@@ -385,7 +385,7 @@
 					}
 				}
 			},
-			mapCategoryTree(node, arr) {
+			mapCategoryTree(node, arr,parentCheckTrue=false) {
 				var has = true
 				if (arr) {
 					var hasTrue = false
@@ -396,6 +396,9 @@
 						has = true
 						if (this.columns_categorys_search) {
 							has = false
+						}
+						if(parentCheckTrue){
+							has = true
 						}
 						var tmp = {
 							...item,
@@ -419,12 +422,14 @@
 						// }
 						this.columns_categorys_dict['@' + item.id] = item
 						if (item.children && item.children.length > 0) {
-							tmp.children = []
-							var childrenhas = this.mapCategoryTree(tmp.children, item.children)
-							if (childrenhas) {
-								has = true
-								hasTrue = true
+							//如果上级已经有了,下级都包含
+							tmp.children = []
+							var childrenhas = this.mapCategoryTree(tmp.children, item.children,has)
+							if (childrenhas) {
+								has = true
+								hasTrue = true
 							}
+
 						} else {
 							tmp.children = undefined
 						}
@@ -535,7 +540,7 @@
 				var tmp = parseFloat(this.dto.price)
 				if (isNaN(tmp) || parseFloat('' + tmp).toFixed(3) !== parseFloat('' + this.dto.price).toFixed(3)) {
 					this.$message.showToast('商品价格格式错误,精确到分')
-					console.log('a1', ('' + tmp) )
+					console.log('a1', ('' + tmp))
 					console.log('a1', ('' + this.dto.price))
 					return
 				}
@@ -733,8 +738,9 @@
 		// height: 100px;
 
 		.label {
-			width: 300rpx;
-			line-height: 60px;
+			width: 240rpx;
+			line-height: 60px;
+			min-width: 240rpx;
 
 		}
 

--
Gitblit v1.9.3