-- 作者:zaq3574020
-- 发布时间:2023/6/19 19:54:00
-- 列“XXX”不属于表 统筹分配_统筹分配。
For Each drs As DataRow In DataTables("统筹分配_统筹分配").Select("") cnt = drs("数量") drs("剩余") = drs("数量") fors = DataTables("门店等级表").Compute("max(配货数量)", CkFilter & "and 门店等级=\'A\'") For i = 1 To fors For Each djbs As DataRow In DataTables("门店等级表").Select("门店等级=\'A\'") If djbs IsNot Nothing And cnt > 0 And String.Compare(djbs("配货数量").ToString, drs(djbs("仓库")).ToString, False) Then If Tables("统筹分配_统筹分配").Compute("sum(剩余)", "款号=\'" & drs("款号") & "\' And 花色=\'" & drs("花色") & "\' and 尺码 = \'" & drs("尺码") & "\'") > "0" Then drs(djbs("仓库")) = val(drs(djbs("仓库"))) + 1 cnt = cnt - 1 End If End If Next Next For Each xstjs As DataRow In DataTables("销售统计").Select(CkFilter, "总吊牌价") MessageBox.Show(xstjs("仓库")) → MessageBox.Show(drs(xstjs("仓库"))) If xstjs IsNot Nothing And cnt > 0 Then If Tables("统筹分配_加盟商库存").Compute("sum(数量)", "款号=\'" & drs("款号") & "\' And 花色=\'" & drs("花色") & "\' and 尺码 = \'" & drs("尺码") & "\'And 仓库 = \'" & xstjs("仓库") & "\'") Is Nothing And val(drs(xstjs("仓库"))) <= 0 Then drs(xstjs("仓库")) = 1 cnt = cnt - 1 End If End If Next drs("剩余") = cnt Next
MessageBox.Show(drs(xstjs("仓库")))这句话提示出错,没明白错在哪里,上面的drs(djbs("仓库")) 是可以正常输出的
|