解决退号记录的退号操作工作取值问题

This commit is contained in:
2025-11-21 13:15:08 +08:00
parent 36628342dc
commit 992b03f9c2
4 changed files with 9 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ const useUserStore = defineStore(
this.roles = ['ROLE_DEFAULT']
}
this.id = user.userId
this.name = user.userName
this.name = user.userName // 用户账号对应数据库的user_name字段如'admin'
this.orgId = user.orgId
this.orgName = user.orgName
this.nickName = user.nickName

View File

@@ -206,9 +206,10 @@ function submit() {
// 获取当前时间作为退号操作日期
const returnDate = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss');
// 获取当前用户信息作为操作工号(使用用户管理中的用户号)
const operatorId = userStore.id || null;
const operatorName = userStore.name || userStore.nickName || '';
// 获取当前用户信息作为操作工号(使用用户管理中的用户号)
// userStore.name 对应后端的 userName用户账号如 'admin'
const operatorId = userStore.name || null; // 退号操作工号(用户账号)
const operatorName = userStore.nickName || userStore.name || ''; // 退号操作人姓名
// 计算退款总金额
const refundAmount = formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);