Dim e As RequestEventArgs = Args(0) Select Case e.Path Case "list.htm" Dim wb As New WeUI wb.AppendHTML("<style>.mark{background-color:red; color:white;}</style>", True) '添加样式 With wb.AddTable("","Table1") .head.Addrow("物料","已领数量","领料明细") For j As Integer = 0 To DataTables("表A").DataRows.count-1 Dim dr = DataTables("表A").DataRows(j) If dr("条数") =1 Then With .body.AddRow( dr("物料代码") & "<br>" & dr("物料名称") ) .Addcell(dr("领料总数") ) .Addcell( dr("领料明细") ) End With Else If dr("条数") >1 Then With .body.AddRow .AddCell(dr("物料代码") & "<br>" & dr("物料名称") ,"rowspan=" & dr("条数") ) .AddCell( dr("领料总数") ,"rowspan=" & dr("条数") ) .AddCell( dr("领料明细") ) End With For i As Integer=2 To dr("条数") j += 1 dr = DataTables("表A").DataRows(j) .body.AddRow( dr("领料明细") ) Next End If Next End With e.WriteString(wb.Build) End Select
|