修正发票管理界面删除功能的权限判断

This commit is contained in:
2025-12-08 14:02:31 +08:00
parent 00e1c62de0
commit 205c58782b
2 changed files with 7 additions and 9 deletions

View File

@@ -496,17 +496,15 @@ export default {
return;
}
// 严格检查权限:只有管理员或记录所有者可以删除
if (this.currentUser.status !== '0' && record.employeeId !== this.currentUser.employeeId) {
alert('您没有权限删除此记录!普通人员只能删除自己的记录。');
// 严格检查权限:只能删除自己维护的发票号码段
if (record.operator !== this.currentUser.name) {
alert('您没有权限删除此记录!只能删除自己维护的发票号码段。');
return;
}
// 检查发票号码段使用状态
// 检查1: 如果当前号码已使用且不等于起始号码,说明已使用
// 检查2: 如果状态明确为已使用,也不允许删除
if ((record.currentNum && record.currentNum !== record.startNum) || record.status === '已使用') {
alert('该发票号码段已被使用,无法删除!请确认发票使用情况。');
// 检查发票号码段使用状态:如果当前号码已使用(大于起始号码),说明已使用
if (record.currentNum && record.currentNum > record.startNum) {
alert('在发票号码段已有使用的发票号码,请核对!');
return;
}

View File

@@ -969,7 +969,7 @@ onMounted(() => {
.radio-group {
display: flex;
gap: 16px;
gap: 1px;
}
.radio-item {