diff --git a/src/views/product/info/index.vue b/src/views/product/info/index.vue index dc59520..1617045 100644 --- a/src/views/product/info/index.vue +++ b/src/views/product/info/index.vue @@ -315,11 +315,37 @@ + + + + + + + + + + + + 一键设置 + + - + + +
@@ -412,19 +438,26 @@ export default { attributeList: [] }, templateTitleList: [ + { + "label":"规格图片", + "prop":"image" + }, { "label":"商品库存", "prop":"stock" }, { "label":"商品价格", "prop":"price" - }, { - "label":"规格图片", - "prop":"image" } ], titleList: [], - skuList: [] + skuList: [], + oneSettingForm: { + "image": null, + "stock": null, + "price": null + + } }; }, watch: { @@ -461,6 +494,9 @@ export default { this.getList(); }, methods: { + oneSetting(){ + + }, changeRule(ruleId){ this.titleList = [] let ruleInfo = this.ruleList.find(ruleInfo => ruleInfo.id === ruleId); @@ -480,7 +516,7 @@ export default { for (let i = 0; i < skuTotal; i++) { this.skuList.push( { - "image": "123", + "image": null, "price": 85.62, "stock": 236 } @@ -498,11 +534,12 @@ export default { forSize = forSize * ruleAttrList[forIndex].valueList.length } console.log(`${ruleAttrInfo.name} 规格 连续出现次数:${continuousSize} 循环出现次数:${forSize}`) + let counter = 0; for (let forIndex = 0; forIndex < forSize; forIndex++) { const {valueList} = ruleAttrInfo; valueList.forEach(value => { for (let continuousIndex = 0; continuousIndex < continuousSize; continuousIndex++) { - this.skuList + this.skuList[counter++]["prop"+currentIndex] = value; } }) }