--
Dim rs As Integer = DataTables("出库扫描").DataRows.Count
For n As Integer = 0 To rs - 1
Dim dr As Row = Tables("出库扫描").Rows(n)
For m As Integer = 1 To dr("PCS")
Dim r As Row = Tables("bsc").AddNew()
Dim s As String = Tables("出库扫描").Rows(n)("BARCODE")
Dim code As String = System.Text.RegularExpressions.Regex.Match(s,"[0-9.]+").ToString()
Dim zm As String = System.Text.RegularExpressions.Regex.Match(s,"[a-zA-Z]+").ToString()
r("BARCODE") = zm & code + m -1
r("SO-NO") = dr("SONO")
r("CODE") =dr("CODE")
r("ITEM") = dr("ITEM")
Next
Next
我这样写了!好像可以用!