From 5c51207ebb9419cbfbb1729c2c3069e452598238 Mon Sep 17 00:00:00 2001 From: zhh Date: Fri, 18 May 2018 17:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=88=86=E7=B1=BB=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/brand.js | 2 +- src/api/productAttrCate.js | 31 ++++ src/router/index.js | 9 +- src/views/pms/brand/index.vue | 5 +- src/views/pms/productAttr/index.vue | 216 ++++++++++++++++++++++++++++ 5 files changed, 260 insertions(+), 3 deletions(-) create mode 100644 src/api/productAttrCate.js create mode 100644 src/views/pms/productAttr/index.vue diff --git a/src/api/brand.js b/src/api/brand.js index 2e51ab9..2a2772f 100644 --- a/src/api/brand.js +++ b/src/api/brand.js @@ -3,7 +3,7 @@ export function fetchList(params) { return request({ url:'/brand/list', method:'get', - params + params:params }) } export function createBrand(data) { diff --git a/src/api/productAttrCate.js b/src/api/productAttrCate.js new file mode 100644 index 0000000..1d7043b --- /dev/null +++ b/src/api/productAttrCate.js @@ -0,0 +1,31 @@ +import request from '@/utils/request' +export function fetchList(params) { + return request({ + url:'/productAttribute/category/list', + method:'get', + params:params + }) +} + +export function createProductAttrCate(data) { + return request({ + url:'/productAttribute/category/create', + method:'post', + data:data + }) +} + +export function deleteProductAttrCate(id) { + return request({ + url:'/productAttribute/category/delete/'+id, + method:'get' + }) +} + +export function updateProductAttrCate(id,data) { + return request({ + url:'/productAttribute/category/update/'+id, + method:'post', + data:data + }) +} diff --git a/src/router/index.js b/src/router/index.js index d7a2c59..7927511 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -71,9 +71,16 @@ export const constantRouterMap = [ { path: 'productAttr', name: 'productAttr', - component: () => import('@/views/pms/product/index'), + component: () => import('@/views/pms/productAttr/index'), meta: {title: '商品类型', icon: 'product-attr'} }, + { + path: 'addProductAttr', + name: 'addProductAttr', + component: () => import('@/views/pms/productAttr/index'), + meta: {title: '添加商品属性'}, + hidden:true + }, { path: 'brand', name: 'brand', diff --git a/src/views/pms/brand/index.vue b/src/views/pms/brand/index.vue index 8db9dc7..01e88f6 100644 --- a/src/views/pms/brand/index.vue +++ b/src/views/pms/brand/index.vue @@ -257,11 +257,14 @@ this.getList(); }, handleBatchOperate() { + console.log(this.multipleSelection); if(this.multipleSelection<1){ this.$message({ message: '请选择一条记录', - type: 'warning' + type: 'warning', + duration:1000 }); + return; } let showStatus = 0; if(this.operateType==='showBrand'){ diff --git a/src/views/pms/productAttr/index.vue b/src/views/pms/productAttr/index.vue new file mode 100644 index 0000000..c400419 --- /dev/null +++ b/src/views/pms/productAttr/index.vue @@ -0,0 +1,216 @@ + + + + +