Dim dr As DataRow = DataTables("U8物料数量汇总表").SQLFind("入库单号 = '" & Vars("fckrkdh") & "' And 物料编码 = '" & e.DataRow("物料编码") & "'")
If dr IsNot Nothing Then
Dim fdr As DataRow = DataTables("非插卡收货扫描").SQLFind("SN = '" & e.DataRow("SN") & "' And _Identify <> " & e.DataRow("_Identify"))
If fdr IsNot Nothing Then
If fdr("状态") = "收货重复扫描" Or fdr("状态") = "收货完成" Then
e.DataRow("数量") = 0
e.DataRow("状态") = "收货重复扫描"
e.DataRow.Save
e.DataRow.locked = True
End If
Else
If (dr("实扫到数量") - dr("总数量") < 0) Then
e.DataRow("库位类别") = dr("库位类别")
e.DataRow("入库单号") = Vars("fckrkdh")
e.DataRow("数量") = 1
dr("实扫到数量") = dr("实扫到数量") + 1-----后台sql已经把实扫到数量值给改了,可是前台表实扫到数量仍然没改。难道每次都load?
dr.save
e.DataRow("状态") = "收货完成"
e.DataRow("收货完成时间") = Date.now
e.DataRow.Save
e.DataRow.locked = True