From 9bb3a1f8eb391726176ba8da6076f449d321136e Mon Sep 17 00:00:00 2001
From: DongZeLiang <2746733890@qq.com>
Date: Thu, 7 Mar 2024 11:00:43 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=85=B1=E6=9C=89=E5=85=83?=
=?UTF-8?q?=E7=B4=A0=20=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/product/info/index.vue | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/src/views/product/info/index.vue b/src/views/product/info/index.vue
index db91d99..e9aabb8 100644
--- a/src/views/product/info/index.vue
+++ b/src/views/product/info/index.vue
@@ -256,19 +256,19 @@
添加商品属性
- 添加自有属性
-
+ 添加自有属性
+
-
+
-
+
-
+
- 确定
+ 确定
@@ -337,6 +337,7 @@ import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/i
import {listBrand} from "@/api/product/brand";
import {getTemplateAttribute, listCategory} from "@/api/product/category";
import {listRule} from "@/api/product/rule";
+import {addAttribute} from "@/api/product/attribute";
export default {
name: "Info",
@@ -393,10 +394,10 @@ export default {
categoryOptionValue: [],
ruleList: [],
activeName: "attributeGroup",
- customPropertiesForm: {
+ customAttributeForm: {
},
- customPropertiesFormStatus: false,
+ customAttributeFormStatus: false,
attributeIdCheckedList: [],
attributeCheckedList: [],
categoryCommonElement: {
@@ -440,6 +441,18 @@ export default {
this.getList();
},
methods: {
+ saveCustomAttribute(){
+ addAttribute({"code": this.customAttributeForm.code, "name": this.customAttributeForm.name}).then(response => {
+ if (response.code === 200){
+ // 添加逻辑
+ let attributeId = response.data,
+ code = this.customAttributeForm.code,
+ name = this.customAttributeForm.name,
+ value = this.customAttributeForm.value;
+
+ }
+ })
+ },
attributeCheckedFun() {
// attributeIdCheckedList -> attributeCheckedList 不在
// 1 -> ID 1 : attributeCheckedList[] -> 1