Commit 94ba1400 authored by wanglianghe's avatar wanglianghe

价格列表

parent ad03d207
......@@ -175,16 +175,31 @@ export const constantRoutes = [
}
]
},
// {
// path: '/product',
// component: Layout,
// hidden: true,
// redirect: 'noredirect',
// children: [{
// path: 'product-list',
// component: (resolve) => require(['@/views/ecw/product/index'], resolve),
// name: 'ProductList',
// meta: {title: '商品列表', activeMenu: '/product/product-list'}
// }
// ]
// },
{
path: '/producttype',
path: '/product',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [{
path: 'productlist',
component: (resolve) => require(['@/views/ecw/product/index'], resolve),
name: 'product',
meta: {title: '产品列表', activeMenu: '/product/product-type'}
path: 'product-price',
component: (resolve) => require(['@/views/ecw/productPrice/index'], resolve),
name: 'ProductPrice',
meta: {title: '价格列表', activeMenu: '/product/product-list'}
}
]
}
......
......@@ -78,6 +78,10 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="toPriceManager(scope.row)"
v-hasPermi="['ecw:product-price:query']">价格管理</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:product:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
......@@ -140,7 +144,7 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum, AuditStatusEnum} from '@/utils/constants'
export default {
name: "Product",
name: "ProductList",
components: {
},
data() {
......@@ -216,12 +220,12 @@ export default {
},
},
created() {
let typeId = this.$route.query.typeId;
if(typeId) {
this.queryParams.typeId = parseInt(typeId);
}
this.getAttrList();
this.getTypeList();
this.getList();
......@@ -241,6 +245,16 @@ export default {
})
},
/**跳转价格管理 */
toPriceManager(row) {
this.$router.push({
name:'ProductPrice',
params: {
product:row
}
})
},
handleStatusChange(row, statusType) {
updateProduct(row).then(() => {
this.$modal.msgSuccess("修改成功");
......
......@@ -174,6 +174,9 @@ export default {
};
},
created() {
let product = this.$route.params.product;
console.log(product);
this.getList();
openedRouterList({}).then(response => {
......
......@@ -182,7 +182,7 @@ export default {
/**跳转到产品列表 */
typeProductList(row) {
this.$router.push({
path:'/producttype/productlist',
path:'/product/product-list',
query: {
typeId:row.id
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment