If e.Col.name = "工号" Then '如果选择的主表是订单表
If e.Row.Isnull("截止日期") Then
e.Col.Combolist = DataTables("招聘信息").GetComboListString("招聘姓名")
Else
Dim str As String
Dim str2 As String
If e.Row("时段") = Nothing OrElse e.Row("时段") = "全天" Then
str2 = e.Table.DataTable.GetComboListString("工号", "截止日期 = '" & e.Row("截止日期") & "' and _Identify <> " & e.Row("_Identify"))
str = DataTables("请假").GetComboListString("请假人", "请假日期 = '" & e.Row("截止日期") & "'")
Else
str2 = e.Table.DataTable.GetComboListString("工号", "截止日期 = '" & e.Row("截止日期") & "' and (时段 = '" & e.Row("时段") & "' or 时段 = '全天' or 时段 is null) And _Identify <> " & e.Row("_Identify"))
str = DataTables("请假").GetComboListString("请假人", "请假日期 = '" & e.Row("截止日期") & "' and (',' + 时段 + ',' like '%," & e.Row("时段") & ",%' or 时段 like '%全天%')")
End If
e.Col.Combolist = DataTables("招聘信息").GetComboListString("招聘姓名", "招聘姓名 not in ('" & str.replace("|", "','") & "', '" & str2.replace(",", "','").replace("|", "','") & "') ")
End If
End If
老师:这段代码在加载出来截止日期的订单时可以生效的。如果没有加载出来订单,在新增订单上,”工号“还是会显示已派单的人员。
希望实现 动态表 ,只是新增加一行。在没有加载全“截止日期”的情况下,只显示,后台判断还没有请假或没有安排的人员。谢谢!
[此贴子已经被作者于2023/7/24 13:49:38编辑过]