工资结算

This commit is contained in:
zhx 2026-05-25 16:18:55 +08:00
parent dfe6c4d858
commit 6e516e95f2

View File

@ -242,7 +242,15 @@ function countryLabel(code?: string) {
}
function getRowKey(record: Record<string, any>) {
return String(record.userId || record.id || '');
return String(record.id || record.userProfile?.account || record.userId || '');
}
function getPayUserIdentifier(record: Record<string, any>) {
const account = record.userProfile?.account;
if (account && query.sysOrigin) {
return `*type:USER,sysOrigin:${query.sysOrigin},accountType:SHORT,content:${account}*`;
}
return String(record.userId || '');
}
function getSalarySortValue(
@ -319,7 +327,11 @@ function confirmPay() {
return;
}
const userIds = [...selectedUserIds.value];
const selectedKeys = new Set(selectedUserIds.value);
const userIds = tableRows.value
.filter((record) => selectedKeys.has(record.rowKey))
.map(getPayUserIdentifier)
.filter(Boolean);
const hasSelectedUsers = userIds.length > 0;
Modal.confirm({
@ -346,7 +358,7 @@ function settleUser(record: Record<string, any>) {
message.warning('请选择国家');
return;
}
const userId = String(record.userId || '');
const userId = getPayUserIdentifier(record);
if (!userId) {
message.warning('用户ID为空');
return;