Select Case e.DataCol.name
Case "姓名","开始时间","结束时间"
Dim filter As String = "1=1"
If e.DataRow.IsNull("开始时间") = False Then
filter &= " and 承保日期 >= #" & e.DataRow("开始时间") & "#"
End If
If e.DataRow.IsNull("结束时间") = False Then
filter &= " and 承保日期 <= #" & e.DataRow("结束时间") & "#"
End If
'则累计订单表中同名产品总的销售量,然后赋值给变动行的数量列
e.DataRow("首年佣金") = DataTables("承保明细").Compute("Sum(佣金)","[业务员姓名] = '" & e.DataRow("姓名") & "' and " & filter)
e.DataRow("总标准保费") = DataTables("承保明细").Compute("Sum(标准保费)","[业务员姓名] = '" & e.DataRow("姓名") & "' and " & filter)
e.DataRow("增员津贴_直接") = DataTables("承保明细").Compute("Sum(一代增员津贴)","[一代推荐人姓名] = '" & e.DataRow("姓名") & "' and " & filter)
e.DataRow("增员津贴_间接") = DataTables("承保明细").Compute("Sum(二代增员津贴)","[二代推荐人姓名] = '" & e.DataRow("姓名") & "' and " & filter)
e.DataRow("直辖团队总FYC") = DataTables("承保明细").Compute("Sum(佣金)","[营销部经理] = '" & e.DataRow("姓名") & "' and " & filter)
End Select
If e.DataRow("现任职级")= "见习理财经理" Then
If e.DataRow("首年佣金")>= 6000 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.35
ElseIf e.DataRow("首年佣金")>= 3000 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.3
ElseIf e.DataRow("首年佣金")>= 0 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.15
End If
Else
If e.DataRow("首年佣金")>= 6000 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.35
ElseIf e.DataRow("首年佣金")>= 3000 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.3
ElseIf e.DataRow("首年佣金")>= 0 Then
e.DataRow("展业津贴") = e.DataRow("总标准保费")*0.2
End If
End If
If e.DataRow("直辖团队总FYC")>= 15000 Then
e.DataRow("管理津贴") = e.DataRow("直辖团队总FYC")*0.12
ElseIf e.DataRow("首年佣金")>= 7500 Then
e.DataRow("管理津贴") = e.DataRow("直辖团队总FYC")*0.08
ElseIf e.DataRow("首年佣金")>= 0 Then
e.DataRow("管理津贴") = e.DataRow("直辖团队总FYC")*0.04
End If