This commit is contained in:
2026-06-26 01:25:15 +08:00
parent 984d5b8118
commit f6ebafccb9
12 changed files with 453 additions and 103 deletions

View File

@@ -254,6 +254,7 @@ const handleCurrentChange = (val) => {
const canCreate = computed(() => hasPermission('product', 'create'))
const canUpdate = computed(() => hasPermission('product', 'update'))
const canDelete = computed(() => hasPermission('product', 'delete'))
const canOperate = computed(() => canUpdate.value || canDelete.value)
</script>
@@ -328,7 +329,7 @@ const canDelete = computed(() => hasPermission('product', 'delete'))
<el-table-column prop="unit" label="单位" width="70" />
<el-table-column prop="specification" label="规格" min-width="140" show-overflow-tooltip />
<el-table-column prop="supplier" label="供应商" min-width="150" show-overflow-tooltip />
<el-table-column label="操作" width="150" fixed="right">
<el-table-column label="操作" width="150" fixed="right" v-if="canOperate">
<template #default="{ row }">
<el-button link type="primary" @click="editProduct(row)" v-if="canUpdate">编辑</el-button>
<el-button link type="danger" @click="deleteProduct(row.id)" v-if="canDelete">删除</el-button>