From 4da164dcba856068f541f295434f90b560eca2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Sun, 26 Sep 2021 18:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=A7=84=E6=A0=BC=E6=A0=A1=E9=AA=8C=EF=BC=8C=E5=90=8E?= =?UTF-8?q?=E7=BB=AD=E4=BC=9A=E4=BC=98=E5=8C=96=E8=A7=84=E6=A0=BC=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=B8=AD=E6=B7=BB=E5=8A=A0=E8=A7=84=E6=A0=BC=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E6=95=B0=E6=8D=AE=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/goods/goods-seller/addGoods.scss | 2 +- .../goods/goods-seller/goodsOperationSec.vue | 58 +++++++++++-------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/seller/src/views/goods/goods-seller/addGoods.scss b/seller/src/views/goods/goods-seller/addGoods.scss index 9122a813..61f48109 100644 --- a/seller/src/views/goods/goods-seller/addGoods.scss +++ b/seller/src/views/goods/goods-seller/addGoods.scss @@ -79,7 +79,7 @@ .sku-val{ justify-content: flex-start; flex-wrap: wrap; - >.sku-item-content-val{ + /deep/ .sku-item-content-val{ margin-right: 20px; diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 64f4802c..fd05a805 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -91,29 +91,32 @@ - - - - - -
- - - +
+ + - + +
+
+
+ + + + + + +
@@ -296,7 +299,6 @@ export default { }, }, data() { - // 表单验证项,商品价格 const checkPrice = (rule, value, callback) => { if (!value && value !== 0) { @@ -422,6 +424,7 @@ export default { value: [regular.REQUIRED, regular.VARCHAR60], templateId: [regular.REQUIRED], }, + skuInfoRules: {}, /** 品牌列表 */ brandList: [], /** 店铺分类列表 */ @@ -443,6 +446,9 @@ export default { }; }, methods: { + changeSku(val){ + console.warn(val) + }, /** * 选择参数 * @paramsGroup 参数分组 @@ -699,7 +705,7 @@ export default { { id: u.specValueId, name: u.specName, - value: u.specValue, + value: u.specValue || "", }, ], }); @@ -712,7 +718,7 @@ export default { sk.spec_values.push({ id: u.specValueId, name: u.specName, - value: u.specValue, + value: u.specValue || "", }); } if (!sk.spec_id && u.specName === "specId") { @@ -777,6 +783,7 @@ export default { // 写入对象,下标,具体对象 this.$set(this.skuInfo, this.skuInfo.length, { spec_values: [], + name: "规格名", }); this.renderTableData(); }, @@ -832,6 +839,7 @@ export default { } this.$set(item.spec_values, item.spec_values.length, { name: item.name, + value: "", }); this.baseInfoForm.regeneratorSkuFlag = true; /** @@ -861,6 +869,7 @@ export default { let pushData = []; //渲染头部 this.skuInfo.forEach((sku) => { + !sku.name ? sku.name = "规格名" : '' //列名称 let columnName = sku.name; pushData.push({ @@ -934,6 +943,7 @@ export default { cloneTemp[0].spec_values.forEach((valItem) => { let obj = cloneObj(resItem); obj[cloneTemp[0].name] = valItem.value; + table.push(obj); }); });