From d24e109be8920cd3cee9e591fdc0825f3181bd76 Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 21 May 2018 14:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/productAttr.js | 16 ++ src/router/index.js | 7 + src/views/pms/productAttr/index.vue | 4 +- src/views/pms/productAttr/productAttrList.vue | 239 ++++++++++++++++++ 4 files changed, 264 insertions(+), 2 deletions(-) create mode 100644 src/api/productAttr.js create mode 100644 src/views/pms/productAttr/productAttrList.vue diff --git a/src/api/productAttr.js b/src/api/productAttr.js new file mode 100644 index 00000000..474ab02a --- /dev/null +++ b/src/api/productAttr.js @@ -0,0 +1,16 @@ +import request from '@/utils/request' +export function fetchList(cid,params) { + return request({ + url:'/productAttribute/list/'+cid, + method:'get', + params:params + }) +} + +export function deleteProductAttr(data) { + return request({ + url:'/productAttribute/delete', + method:'post', + data:data + }) +} diff --git a/src/router/index.js b/src/router/index.js index 79275111..74084c1d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -74,6 +74,13 @@ export const constantRouterMap = [ component: () => import('@/views/pms/productAttr/index'), meta: {title: '商品类型', icon: 'product-attr'} }, + { + path: 'productAttrList', + name: 'productAttrList', + component: () => import('@/views/pms/productAttr/productAttrList'), + meta: {title: '商品属性列表'}, + hidden:true + }, { path: 'addProductAttr', name: 'addProductAttr', diff --git a/src/views/pms/productAttr/index.vue b/src/views/pms/productAttr/index.vue index c400419d..c86bf7c4 100644 --- a/src/views/pms/productAttr/index.vue +++ b/src/views/pms/productAttr/index.vue @@ -157,10 +157,10 @@ this.productAttrCate.id = row.id; }, getAttrList(index, row) { - console.log('addProductAttrCate') + this.$router.push({path: '/pms/productAttrList',query:{cid:row.id,cname:row.name,type:0}}) }, getParamList(index, row) { - console.log('addProductAttrCate') + this.$router.push({path: '/pms/productAttrList',query:{cid:row.id,cname:row.name,type:1}}) }, handleConfirm(formName){ this.$refs[formName].validate((valid) => { diff --git a/src/views/pms/productAttr/productAttrList.vue b/src/views/pms/productAttr/productAttrList.vue new file mode 100644 index 00000000..5211f47f --- /dev/null +++ b/src/views/pms/productAttr/productAttrList.vue @@ -0,0 +1,239 @@ + + + + + +