用户权限调整
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<div class="header_wrap">
|
||||
<router-link :to="{ name: 'add_shop' }">
|
||||
<el-button type="primary" icon="el-icon-plus">添加商品</el-button>
|
||||
</router-link>
|
||||
<!-- <router-link :to="{ name: 'add_shop' }" > -->
|
||||
<el-button type="primary" icon="el-icon-plus" @click="toPath( '/product/add_shop')">添加商品</el-button>
|
||||
<!-- </router-link> -->
|
||||
<el-select v-model="tableData.sort" placeholder="排序" @change="getTableData">
|
||||
<el-option value="createdAt,desc" label="创建时间"></el-option>
|
||||
<el-option value="stockNumber,asc" label="数量由低到高"></el-option>
|
||||
@@ -318,7 +318,11 @@ export default {
|
||||
async toPath ( path , row) {
|
||||
let res = await hasPermission('允许修改商品');
|
||||
if ( !res) { return; }
|
||||
this.$router.push({path: path, query: { goods_id: row.id }})
|
||||
let query = {};
|
||||
if ( row ) {
|
||||
query.goods_id = row.id;
|
||||
}
|
||||
this.$router.push({path: path, query: query})
|
||||
},
|
||||
// 显示修改商品警告线
|
||||
showStockWarningHandle() {
|
||||
@@ -431,7 +435,9 @@ export default {
|
||||
}
|
||||
},
|
||||
// 显示绑定耗材
|
||||
showBindCons(item) {
|
||||
async showBindCons(item) {
|
||||
let res = await hasPermission('允许修改商品');
|
||||
if ( !res) { return; }
|
||||
// console.log(item);
|
||||
this.$refs.bindCons.show(item)
|
||||
},
|
||||
@@ -555,6 +561,8 @@ export default {
|
||||
},
|
||||
// 删除商品
|
||||
async delTableHandle(ids) {
|
||||
let res = await hasPermission('允许修改商品');
|
||||
if ( !res) { return; }
|
||||
try {
|
||||
await tbProductDelete(ids)
|
||||
this.getTableData()
|
||||
|
||||
Reference in New Issue
Block a user