|
@@ -15,10 +15,10 @@
|
|
|
:data="loadData"
|
|
|
:showPagination="false"
|
|
|
:defaultExpandedRowKeys="defaultExpandedRowKeys"
|
|
|
- :scroll="{ y: 300 }"
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
+ <!-- 系统内置类型不可编辑和删除 tenantId为0是内置 -->
|
|
|
<a-button
|
|
|
v-if="record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')"
|
|
|
type="link"
|
|
@@ -28,7 +28,7 @@
|
|
|
id="expenseType-addSubItem"
|
|
|
@click="handleAdd(record)">新增子级</a-button>
|
|
|
<a-button
|
|
|
- v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit')"
|
|
|
+ v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit') && record.tenantId!=0"
|
|
|
type="link"
|
|
|
class="button-info"
|
|
|
size="small"
|
|
@@ -36,14 +36,14 @@
|
|
|
id="expenseType-edit"
|
|
|
@click="handleEdit(record)">编辑</a-button>
|
|
|
<a-button
|
|
|
- v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_del')"
|
|
|
+ v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_del') && record.tenantId!=0"
|
|
|
type="link"
|
|
|
class="button-error"
|
|
|
size="small"
|
|
|
icon="delete"
|
|
|
id="expenseType-del"
|
|
|
@click="handleDel(record)">删除</a-button>
|
|
|
- <span v-if="!$hasPermissions('B_basicData_expenseType_add') && !$hasPermissions('B_basicData_expenseType_edit') && !$hasPermissions('B_basicData_expenseType_del')">--</span>
|
|
|
+ <span v-if="!(record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')) && !(record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit') && record.tenantId!=0) && !(record.pid != 0 && $hasPermissions('B_basicData_expenseType_del') && record.tenantId!=0)">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|