From fb0551bc7520f51d8d344d408d5e0f1b31d3b726 Mon Sep 17 00:00:00 2001
From: DongZeLiang <2746733890@qq.com>
Date: Fri, 8 Mar 2024 16:34:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=A7=84=E6=A0=BCSKU?=
=?UTF-8?q?=E7=94=9F=E6=88=90=20=E4=B8=80=E9=94=AE=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/product/info/index.vue | 51 +++++++++++++++++++++++++++-----
1 file changed, 44 insertions(+), 7 deletions(-)
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 @@
+
+
+
+
+
+
+
+
+
+
+
+ 一键设置
+
+
-
+
+
+ {{scope.row[title.prop]}}
+
+
+
+
@@ -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;
}
})
}