From 36f24888ba3c8ee6b7cd855245a3403b534cb0c9 Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Thu, 8 Feb 2024 18:42:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/product/add_shop.vue | 46 ++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 11 deletions(-)
diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue
index d0a1206..b16fd1c 100644
--- a/src/views/product/add_shop.vue
+++ b/src/views/product/add_shop.vue
@@ -121,7 +121,7 @@
-
+
scope.row.coverImg = res[0]"
v-if="!scope.row.coverImg" />
@@ -129,33 +129,37 @@
-
-
+
+ 售价
+
+
+
+
-
+
-
+
-
+
-
+
-
+
@@ -267,7 +271,8 @@ export default {
groupSnap: [],
specInfo: [],
selectSpec: [],
- specTableHeaders: []
+ specTableHeaders: [],
+ skuSnap: ''
},
rules: {
typeEnum: [
@@ -304,6 +309,9 @@ export default {
}
},
methods: {
+ showNumberChange(index) {
+ console.log(index)
+ },
// 商品详情
async tbProductGetDetail() {
try {
@@ -404,6 +412,7 @@ export default {
// 生成多规格表体
createSkuBody() {
let bodys = []
+ let skuSnap = []
for (let item of this.selectSpec) {
if (item.selectSpecResult.length) {
let arr = []
@@ -412,12 +421,17 @@ export default {
[item.name]: val
})
}
+ skuSnap.push({
+ name: item.name,
+ value: item.selectSpecResult.join(',')
+ })
bodys.push(arr)
}
}
+ this.form.skuSnap = JSON.stringify(skuSnap)
let arr = this.cartesian(bodys)
- console.log(arr)
+ // console.log(arr)
let newarr = []
const m = {
@@ -456,7 +470,7 @@ export default {
this.form.skuList = []
this.form.skuList = newarr
- console.log(this.form.skuList)
+ // console.log(this.form.skuList)
},
// 笛卡尔积算法
cartesian(arr) {
@@ -594,4 +608,14 @@ export default {
}
}
}
+
+.icon {
+ font-size: 14px;
+ color: #1890FF;
+ margin-left: 10px;
+
+ &:hover {
+ cursor: pointer;
+ }
+}
\ No newline at end of file