Select Case e.DataCol.Name
Case "加工工序","毛坯编码","生产日期","班次"
Dim Filter As String = "毛坯编码 = '" & e.DataRow("毛坯编码") & "' and 加工工序 = '" & e.DataRow("加工工序") & "' and 生产日期 = #" & Date.Today & "# And 班次 = '白班'"
Dim i = DataTables("每日排产").Compute("Sum(加工数量)", Filter)
If i = 1 Then
e.DataRow("完成数量") = 2
End If
e.DataRow.save
End Select
Select Case e.DataCol.Name
Case "加工工序","毛坯编码","生产日期","班次"
Dim Filter As String = "毛坯编码 = '" & e.DataRow("毛坯编码") & "' and 加工工序 = '" & e.DataRow("加工工序") & "' and 生产日期 = #" & Date.Today.AddDays(1) & "# And 班次 = '白班'"
Dim i = DataTables("每日排产").Compute("Sum(加工数量)", Filter)
If i = 1 Then
e.DataRow("完成数量") = 3
End If
e.DataRow.save
End Select
'If e.DataRow("完成数量") = 1 Then
'e.DataRow("未加工工序") = Nothing
'Else
'e.DataRow("未加工工序") = e.DataRow("加工工序")
'End If