diff --git a/src/api/product/attribute.js b/src/api/product/attribute.js
index 948166e..bc66f29 100644
--- a/src/api/product/attribute.js
+++ b/src/api/product/attribute.js
@@ -29,7 +29,7 @@ export function addAttribute(data) {
// 修改商品属性
export function updateAttribute(data) {
return request({
- url: '/product/attribute',
+ url: '/product/attribute/'+data.id,
method: 'put',
data: data
})
diff --git a/src/components/CheckAttribute/index.vue b/src/components/CheckAttribute/index.vue
new file mode 100644
index 0000000..47bc93f
--- /dev/null
+++ b/src/components/CheckAttribute/index.vue
@@ -0,0 +1,131 @@
+
+
+
+
+ 已选属性
+
+
+
+
+ {{attribute.name}}
+
+
+
+
+
+
+ 未选属性
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{attribute.name}}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CheckAttributeGroup/index.vue b/src/components/CheckAttributeGroup/index.vue
new file mode 100644
index 0000000..07e011c
--- /dev/null
+++ b/src/components/CheckAttributeGroup/index.vue
@@ -0,0 +1,128 @@
+
+
+
+
+ 已选属性组
+
+
+
+
+ {{attributeGroup.name}}
+
+
+
+
+
+
+ 未选属性组
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{attributeGroup.name}}
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CheckBrand/index.vue b/src/components/CheckBrand/index.vue
new file mode 100644
index 0000000..9e15cb0
--- /dev/null
+++ b/src/components/CheckBrand/index.vue
@@ -0,0 +1,127 @@
+
+
+
+
+ 已选品牌
+
+
+
+
+ {{brand.nam}}
+
+
+
+
+
+
+ 未选品牌
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+ {{brand.nam}}
+
+
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index 546f125..48b928e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -37,6 +37,12 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
+//属性选择
+import CheckAttribute from "@/components/CheckAttribute";
+//属性组选择
+import CheckAttributeGroup from "@/components/CheckAttributeGroup";
+//品牌选择
+import CheckBrand from "@/components/CheckBrand";
// 全局方法挂载
Vue.prototype.getDicts = getDicts
@@ -57,6 +63,9 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
+Vue.component('CheckAttribute', CheckAttribute)
+Vue.component('CheckAttributeGroup', CheckAttributeGroup)
+Vue.component('CheckBrand', CheckBrand)
Vue.use(directive)
Vue.use(plugins)
diff --git a/src/views/product/attribute/index.vue b/src/views/product/attribute/index.vue
index 6ae257a..53fbd7d 100644
--- a/src/views/product/attribute/index.vue
+++ b/src/views/product/attribute/index.vue
@@ -9,14 +9,6 @@
@keyup.enter.native="handleQuery"
/>
-
-
-
搜索
重置
@@ -71,9 +63,8 @@
-
+
-
@@ -104,14 +95,14 @@
/>
-
+
+
+
+
-
-
-
@@ -153,25 +144,20 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
- name: null,
- groupId: null,
+ code: null,
+ name: null
},
// 表单参数
form: {},
// 表单校验
rules: {
+ code: [
+ { required: true, message: "属性编码不能为空", trigger: "blur" }
+ ],
name: [
{ required: true, message: "属性名不能为空", trigger: "blur" }
],
- groupId: [
- { required: true, message: "分组不能为空", trigger: "blur" }
- ],
- createBy: [
- { required: true, message: "创建人不能为空", trigger: "blur" }
- ],
- createTime: [
- { required: true, message: "创建时间不能为空", trigger: "blur" }
- ],
+
}
};
},
@@ -197,8 +183,8 @@ export default {
reset() {
this.form = {
id: null,
+ code: null,
name: null,
- groupId: null,
remark: null,
createBy: null,
createTime: null,
diff --git a/src/views/product/attributeGroup/index.vue b/src/views/product/attributeGroup/index.vue
index 9cb71ea..424ddb9 100644
--- a/src/views/product/attributeGroup/index.vue
+++ b/src/views/product/attributeGroup/index.vue
@@ -75,6 +75,14 @@
+
+
+
+
+ {{attributeInfo.name}}
+
+
+
@@ -108,25 +116,33 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
-
-
-
-
-
-
-
-
- {{dict.label}}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+