Dim wbb As New weui
Dim e As RequestEventArgs = args(0)
Dim wb2 As New weui
wb2.AddPageFooter("","pf1","没有库存的商品将不显示!")
If e.Post Values.ContainsKey("gjz") Then
Dim dt As DataTable=Functions.Execute("分库库存模糊查询",e.Cookies("bm"),e.PostValues("gjz"))
Dim lst As List(of DataRow)=dt.Se lect("可用库存>0")
'With wb2.AddTable("","Table1")
'.Highlight=0
'.CreateFromDataTable(dt,False,"","","药材编码","名称","当前成本价","可用库存")
'
'End With
If lst.count>0 Then
With wb2.AddPanelGroup("","pg1","商品列表")
For Each dr As DataRow In lst
With .Add(dr("药材编码"),dr("药材编码"),"库存:" & dr("可用库存") & dr("单位"),"./images/药材类目/" & dr("名称") & ".jpg") '带子链接
.AddFoot( dr("名称"))
.AddFoot(" " & dr("型号"))
.AddFoot(" " & dr("规格"))
.AddFoot(" ¥" & dr("当前成本价"))
'' .Attribute ="" & dr("药材编码") & "','" & dr("名称") & "')'"
.Attribute =" & dr("药材编码") & "','" & dr("名称") & "')"""
''.Attribute ="on click=""choice('" & dr("药材编码") & "')"""
''' " & dr("销售单号") & "'"""
End With
Next
End With
Else
wb2.InsertHTML("没有可用库存商品!")
End If
Else
wb2.InsertHTML("请输入关键字!")
End If
wb2.AppendHTML("<script src='./lib/order.js'></script>")
e.WriteString(wb2.Build)
显示效果
此主题相关图片如下:1.png

同样代码放到page里面
显示的时候却是这样 如果不跳转到红色部分代码显示都正常

此主题相关图片如下:2.png
