新建发票管理页面

This commit is contained in:
叶锦涛
2025-11-18 10:40:57 +08:00
parent 5bf7ab481f
commit e83fc94334
13 changed files with 1136 additions and 160 deletions

View File

@@ -763,18 +763,27 @@ function handleExport() {
);
}
/** 用户状态修改 */
function handleStatusChange(row) {
/* 测试用例:
1. 启用状态切换:点击启用/停用开关,确认后只更新用户状态字段
2. 角色保持不变:切换状态后,用户的角色权限应保持原样
3. 不同用户类型:对管理员、普通用户、医生等不同角色用户测试状态切换
4. 批量操作:测试批量修改状态是否也只改变状态不改变角色
*/
function handleStatusChange(row) {
let text = row.status === '0' ? '启用' : '停用';
proxy.$modal
.confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
.then(function () {
// 只更新用户状态,不修改用户角色
return changeUserStatus(row.userId, row.status);
})
.then(() => {
proxy.$modal.msgSuccess(text + '成功');
getList(); // 刷新列表,确保显示最新的用户信息
proxy.$modal.msgSuccess(text + '并设置为' + roleText + '成功');
})
.catch(function () {
row.status = row.status === '0' ? '1' : '0';
proxy.$modal.msgError('操作失败,请重试');
});
}
/** 更多操作 */