工资结算
This commit is contained in:
parent
dfe6c4d858
commit
6e516e95f2
@ -242,7 +242,15 @@ function countryLabel(code?: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getRowKey(record: Record<string, any>) {
|
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(
|
function getSalarySortValue(
|
||||||
@ -319,7 +327,11 @@ function confirmPay() {
|
|||||||
return;
|
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;
|
const hasSelectedUsers = userIds.length > 0;
|
||||||
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
@ -346,7 +358,7 @@ function settleUser(record: Record<string, any>) {
|
|||||||
message.warning('请选择国家');
|
message.warning('请选择国家');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const userId = String(record.userId || '');
|
const userId = getPayUserIdentifier(record);
|
||||||
if (!userId) {
|
if (!userId) {
|
||||||
message.warning('用户ID为空');
|
message.warning('用户ID为空');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user