自动结算
This commit is contained in:
parent
b94e6db9af
commit
66568253aa
@ -79,13 +79,13 @@ const columns = [
|
||||
{ dataIndex: 'currentTarget', key: 'currentTarget', title: '本次积分', width: 130 },
|
||||
{ dataIndex: 'policyLevel', key: 'policyLevel', title: '本次积分档位', width: 130 },
|
||||
{ dataIndex: 'expectedMemberSalary', key: 'expectedMemberSalary', title: '主播应发', width: 120 },
|
||||
{ dataIndex: 'expectedAgentSalary', key: 'expectedAgentSalary', title: '代理应发', width: 120 },
|
||||
{ dataIndex: 'expectedAgentSalary', key: 'expectedAgentSalary', title: '上级代理应发', width: 130 },
|
||||
{ dataIndex: 'expectedSalary', key: 'expectedSalary', title: '应发合计', width: 120 },
|
||||
{ dataIndex: 'payableMemberSalary', key: 'payableMemberSalary', title: '主播差额', width: 120 },
|
||||
{ dataIndex: 'payableAgentSalary', key: 'payableAgentSalary', title: '代理差额', width: 120 },
|
||||
{ dataIndex: 'payableSalary', key: 'payableSalary', title: '合计差额', width: 140 },
|
||||
{ dataIndex: 'payableAgentSalary', key: 'payableAgentSalary', title: '上级代理差额', width: 130 },
|
||||
{ dataIndex: 'payableSalary', key: 'payableSalary', title: '合计待发', width: 140 },
|
||||
{ dataIndex: 'memberIssuedSalary', key: 'memberIssuedSalary', title: '主播实收', width: 140 },
|
||||
{ dataIndex: 'agentIssuedSalary', key: 'agentIssuedSalary', title: '代理实收', width: 140 },
|
||||
{ dataIndex: 'agentIssuedSalary', key: 'agentIssuedSalary', title: '上级代理实收', width: 140 },
|
||||
{ dataIndex: 'totalIssuedSalary', key: 'totalIssuedSalary', title: '总发工资', width: 140 },
|
||||
{ dataIndex: 'currentSalaryBalance', key: 'currentSalaryBalance', title: '当前工资', width: 140 },
|
||||
{ dataIndex: 'action', fixed: 'right', key: 'action', title: '操作', width: 110 },
|
||||
@ -230,19 +230,8 @@ function formatMoney(value?: number | string) {
|
||||
return `$${amount.toFixed(2)}`;
|
||||
}
|
||||
|
||||
function shouldShowAgentSalary(record: Record<string, any>) {
|
||||
if (record.agentMember !== undefined && record.agentMember !== null) {
|
||||
return record.agentMember === true;
|
||||
}
|
||||
return (
|
||||
!!record.userId &&
|
||||
!!record.teamOwnId &&
|
||||
String(record.userId) === String(record.teamOwnId)
|
||||
);
|
||||
}
|
||||
|
||||
function formatAgentMoney(record: Record<string, any>, key: string) {
|
||||
return shouldShowAgentSalary(record) ? formatMoney(record[key]) : '-';
|
||||
return formatMoney(record[key]);
|
||||
}
|
||||
|
||||
function formatInteger(value?: number | string) {
|
||||
@ -568,7 +557,7 @@ void loadCountries();
|
||||
<template v-else-if="column.key === 'agentIssuedSalary'">
|
||||
<span>{{ formatAgentMoney(record, 'agentIssuedSalary') }}</span>
|
||||
<span
|
||||
v-if="shouldShowAgentSalary(record) && Number(record.agentOverIssuedSalary || 0) > 0"
|
||||
v-if="Number(record.agentOverIssuedSalary || 0) > 0"
|
||||
class="over-issued-salary"
|
||||
>
|
||||
({{ formatMoney(record.agentOverIssuedSalary) }})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user