修改逻辑

This commit is contained in:
dzl
2025-09-10 09:08:07 +08:00
parent 9e0b4a69f5
commit 594990c6e8
2 changed files with 42 additions and 41 deletions

View File

@@ -152,50 +152,52 @@
</el-table-column>
<el-table-column label="操作" width="280" fixed="right">
<template #default="{ row }">
<template v-if="row.status === 'confirmed'">
<el-button
type="success"
size="small"
@click="confirmReceived(row.id)"
:title="currentUser && row.to_user_id === currentUser.id ? '确认收款' : '管理员代确认收款'"
>
{{ currentUser && row.to_user_id === currentUser.id ? '确认收款' : '代确认收款' }}
</el-button>
<template v-if="row.transfer_type === 'user_to_user'">
<template v-if="row.status === 'confirmed'">
<el-button
type="success"
size="small"
@click="confirmReceived(row.id)"
:title="currentUser && row.to_user_id === currentUser.id ? '确认收款' : '管理员代确认收款'"
>
{{ currentUser && row.to_user_id === currentUser.id ? '确认收款' : '代确认收款' }}
</el-button>
<el-button
type="warning"
size="small"
@click="confirmNotReceived(row.id)"
:title="currentUser && row.to_user_id === currentUser.id ? '未收到款' : '管理员代标记未收到款'"
>
{{ currentUser && row.to_user_id === currentUser.id ? '未收到款' : '代标记未收到' }}
</el-button>
</template>
<!-- 解除坏账按钮 -->
<el-button
v-if="row.is_bad_debt"
type="warning"
size="small"
@click="confirmNotReceived(row.id)"
:title="currentUser && row.to_user_id === currentUser.id ? '未收到款' : '管理员代标记未收到款'"
@click="removeBadDebt(row)"
:loading="row.removingBadDebt"
>
{{ currentUser && row.to_user_id === currentUser.id ? '未收到款' : '代标记未收到' }}
解除坏账
</el-button>
<!-- 强制变更状态按钮管理员权限 -->
<el-button
v-if="currentUser && currentUser.role === 'admin'"
type="danger"
size="small"
@click="showForceChangeDialog(row)"
>
强制变更
</el-button>
<el-button
type="info"
size="small"
@click="viewDetails(row)"
>
详情
</el-button>
</template>
<!-- 解除坏账按钮 -->
<el-button
v-if="row.is_bad_debt"
type="warning"
size="small"
@click="removeBadDebt(row)"
:loading="row.removingBadDebt"
>
解除坏账
</el-button>
<!-- 强制变更状态按钮管理员权限 -->
<el-button
v-if="currentUser && currentUser.role === 'admin'"
type="danger"
size="small"
@click="showForceChangeDialog(row)"
>
强制变更
</el-button>
<el-button
type="info"
size="small"
@click="viewDetails(row)"
>
详情
</el-button>
</template>
</el-table-column>
</el-table>
@@ -778,8 +780,7 @@ const getTypeText = (type) => {
'return': '返还转账',
'user_to_user': '用户转账',
'user_to_public': '用户转公户',
'public_to_user': '公户转用户',
'user_to_system': '系统缴费'
'public_to_user': '公户转用户'
}
return typeMap[type] || type
}

View File

@@ -929,7 +929,7 @@ const handleSubmit = async () => {
username: userForm.username,
role: userForm.role,
user_type: userForm.accountType, // 使用新的账户类型字段
avatar: userForm.avatar,
avatar: userForm.avatar.replace('https://minio.zrbjr.com', ''),
realName: userForm.realName,
idCard: userForm.idCard,
phone: userForm.phone,