From bd57b7c6e2307d6dfb07d778adfefc13c1afbffe Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 06 二月 2026 11:48:44 +0800
Subject: [PATCH] 经销商管理
---
admin/src/components/business/OperaGoodsWindow.vue | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/admin/src/components/business/OperaGoodsWindow.vue b/admin/src/components/business/OperaGoodsWindow.vue
index cb55733..942a92d 100644
--- a/admin/src/components/business/OperaGoodsWindow.vue
+++ b/admin/src/components/business/OperaGoodsWindow.vue
@@ -31,7 +31,7 @@
</el-select>
</el-form-item>
<el-form-item label="鍟嗗搧涓诲浘" prop="imgurl">
- <div style="display: flex; align-items: center;justify-content: center; height: 100%; width: 100%">
+ <div style="display: flex; align-items: center; height: 100%; width: 100%">
<UploadAvatarImage
:file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl}"
:uploadData="{folder:'goods'}"
@@ -106,7 +106,7 @@
<!--
<span style="line-height: 32px;font-size: 14px;"><b style="color: #F56C6C;margin-right: 4px;font-size: 11px;">*</b>{{'銆�'+(item.name)+'銆戠郴鍒楋細'}}</span>
-->
- <el-form-item v-for="(item,index) in applyBrands" v-if="item.show" :key="'warning_'+index" style="display: block;width: 100%;" :label="'銆�'+(item.name)+'銆戠郴鍒�'" >
+ <el-form-item v-for="(item,index) in applyBrands.filter(item=>item.show)" :key="'warning_'+index" style="display: block;width: 100%;" :label="'銆�'+(item.name)+'銆戠郴鍒�'" >
<el-select v-model="item.childIdList" filterable multiple style=" width: 500px;" clearable placeholder="璇烽�夋嫨鍝佺墝绯诲垪" >
<el-option v-for="item in item.childList" :label="item.name" :value="item.id" :key="'brand_'+index+item.id"> </el-option>
</el-select>
@@ -210,6 +210,13 @@
this.applyBrands = res
this.applyBrands.forEach(item => {
item.show = this.isSeletedBrand(item)
+ if(this.form.id && this.form.brandList && this.form.brandList.length){
+ this.form.brandList.forEach(item1 => {
+ if (item1.id === item.id) {
+ item.childIdList = item1.childIdList
+ }
+ })
+ }
})
})
},
@@ -221,8 +228,8 @@
this.visible = true
this.form.brandIdList = []
this.form.fileList = []
- this.form.imgurl=''
- this.form.imgurlfull=''
+ this.form.imgurl = ''
+ this.form.imgurlfull = ''
// debugger
// 鏂板缓
if (target == null) {
@@ -247,8 +254,8 @@
})
},
loadInfo () {
- this.form.brandIdList =[]
- this.form.fileList =[]
+ this.form.brandIdList = []
+ this.form.fileList = []
this.api.detail(this.form.id).then(res => {
if (res && res.brandList) {
this.form.brandList = res.brandList
--
Gitblit v1.9.3