fix: disable clickable material name links for users without edit permissions across all inbound tables

This commit is contained in:
DXC
2026-03-23 11:19:25 +08:00
parent d53362f06f
commit f701ed7fc8
3 changed files with 6 additions and 3 deletions

View File

@ -150,9 +150,10 @@
:sortable="isColumnSortable(col.prop) ? 'custom' : false" :sortable="isColumnSortable(col.prop) ? 'custom' : false"
> >
<template #default="scope" v-if="col.prop === 'material_name'"> <template #default="scope" v-if="col.prop === 'material_name'">
<span class="clickable-text" @click="handleUpdate(scope.row)"> <span v-if="userStore.hasPermission('inbound_buy:operation')" class="clickable-text" @click="handleUpdate(scope.row)">
{{ scope.row.material_name }} {{ scope.row.material_name }}
</span> </span>
<span v-else>{{ scope.row.material_name }}</span>
</template> </template>
<template #default="scope" v-else-if="col.prop === 'sn_bn'"> <template #default="scope" v-else-if="col.prop === 'sn_bn'">

View File

@ -154,9 +154,10 @@
> >
<template #default="scope" v-if="col.prop === 'material_name'"> <template #default="scope" v-if="col.prop === 'material_name'">
<span class="clickable-text" @click="handleUpdate(scope.row)"> <span v-if="userStore.hasPermission('inbound_product:operation')" class="clickable-text" @click="handleUpdate(scope.row)">
{{ scope.row.material_name }} {{ scope.row.material_name }}
</span> </span>
<span v-else>{{ scope.row.material_name }}</span>
</template> </template>
<template #default="scope" v-else-if="col.prop === 'company_name'"> <template #default="scope" v-else-if="col.prop === 'company_name'">

View File

@ -166,9 +166,10 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template #default="scope" v-if="col.prop === 'material_name'"> <template #default="scope" v-if="col.prop === 'material_name'">
<span class="clickable-text" @click="handleUpdate(scope.row)"> <span v-if="userStore.hasPermission('inbound_semi:operation')" class="clickable-text" @click="handleUpdate(scope.row)">
{{ scope.row.material_name }} {{ scope.row.material_name }}
</span> </span>
<span v-else>{{ scope.row.material_name }}</span>
</template> </template>
<template #default="scope" v-else-if="col.prop === 'company_name'"> <template #default="scope" v-else-if="col.prop === 'company_name'">