发布商品回显问题
parent
d645f4ea6b
commit
532cbc943d
|
@ -373,11 +373,12 @@
|
||||||
:title="paramsGroup.groupName"
|
:title="paramsGroup.groupName"
|
||||||
style="text-align: left" :key="paramsGroup.groupName">
|
style="text-align: left" :key="paramsGroup.groupName">
|
||||||
<Panel :name="paramsGroup.groupName">
|
<Panel :name="paramsGroup.groupName">
|
||||||
|
{{paramsGroup.groupName}}
|
||||||
<p slot="content">
|
<p slot="content">
|
||||||
<FormItem v-for="( params, paramsIndex) in paramsGroup.params" :key="paramsIndex"
|
<FormItem v-for="( params, paramsIndex) in paramsGroup.params" :key="paramsIndex"
|
||||||
:label="`${params.paramName}:`">
|
:label="`${params.paramName}:`">
|
||||||
<Select v-model="params.paramName" placeholder="请选择" style="width: 200px" clearable
|
<Select v-model="params.paramValue" placeholder="请选择" style="width: 200px" clearable
|
||||||
@on-change="selectParams(paramsGroup,groupIndex,params,paramsIndex,params.val)">
|
@on-change="selectParams(paramsGroup,groupIndex,params,paramsIndex,params.paramValue)">
|
||||||
<Option v-for="option in params.options.split(',')" :label="option"
|
<Option v-for="option in params.options.split(',')" :label="option"
|
||||||
:value="option"></Option>
|
:value="option"></Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -864,14 +865,13 @@ export default {
|
||||||
required:'',
|
required:'',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//赋予参数明
|
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[paramsIndex]={
|
||||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[paramsIndex].paramName = params.paramName
|
paramName: params.paramName,
|
||||||
//赋予参数值
|
paramValue: value,
|
||||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[paramsIndex].paramValue = value
|
isIndex: params.isIndex,
|
||||||
//参数是否索引
|
required: params.required,
|
||||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[paramsIndex].isIndex = params.isIndex
|
}
|
||||||
//参数是否必填
|
console.log(this.baseInfoForm.goodsParamsDTOList);
|
||||||
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[paramsIndex].required = params.required
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 编辑sku图片
|
// 编辑sku图片
|
||||||
|
@ -1137,14 +1137,31 @@ export default {
|
||||||
this.params_panel.push(item.groupName)
|
this.params_panel.push(item.groupName)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
// 循环参数分组
|
if (this.baseInfoForm.goodsParamsDTOList) {
|
||||||
this.goodsParams.forEach((parmsGroup) => {
|
// 已选值集合
|
||||||
this.baseInfoForm.goodsParamsDTOList.forEach(paramsGroup=>{
|
const paramsArr = []
|
||||||
paramsGroup.goodsParamsItemDTOList.forEach(params=>{
|
this.baseInfoForm.goodsParamsDTOList.forEach(group =>{
|
||||||
params.paramName=params.paramValue
|
group.goodsParamsItemDTOList.forEach(param => {
|
||||||
})
|
param.groupId = group.groupId
|
||||||
})
|
paramsArr.push(param)
|
||||||
});
|
console.log(param);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// 循环参数分组
|
||||||
|
this.goodsParams.forEach((parmsGroup) => {
|
||||||
|
parmsGroup.params.forEach(param => {
|
||||||
|
|
||||||
|
paramsArr.forEach(arr=>{
|
||||||
|
if(param.paramName == arr.paramName){
|
||||||
|
param.paramValue = arr.paramValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
});
|
||||||
|
console.log(this.goodsParams);
|
||||||
|
} else {
|
||||||
|
this.baseInfoForm.goodsParamsDTOList = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue