Dim e As RequestEventArgs = args(0)
Dim wb As New weui = args(1)
Dim drs As List(Of DataRow) = args(2)
With ExWeUI.WebUI.AddListGroup("page1", "lst01", 1)
Dim color1 As String = "style='background-color:#f69797'" '暗红色,未检疫
Dim color2 As String = "style='background-color:#d9a738'" '淡黄色,正在检疫
Dim color3 As String = "style='background-color:#198d65'" '淡绿色,已检疫
Dim color As String
For Each dr As DataRow In drs
If dr("是否离轮") = True Or dr("电讯检疫") = True Then '已检疫
color = color3
ElseIf dr("卫检登轮") = True And dr("是否离轮") <> True Then '检疫中
color = color2
ElseIf dr("卫检登轮") <> True Then
color = color1
End If
Dim txt As String = "<p " & color & ">中文船名:" & dr("中文船名") & "<br/>"
txt = txt & "入境时间:" & dr("入境时间") & "<br/>"
txt = txt & "船  籍:" & dr("船籍") & "<br/>"
txt = txt & "IMO号:" & dr("IMO号") & "</p>"
Dim s As String = dr("船舶资料")
If s.length > 10 Then
txt = txt & "<p>船舶资料:" & s.substring(0, 10) & "......" & "</p>"
Else
txt = txt & "<p>船舶资料:" & dr("船舶资料") & "</p>"
End If
With .AddList(dr("中文船名") & "(" & dr("检查类别") & ")", "")
.TextStyle = "color:red;font-size:20px" '字体颜色,字体大小
.ImageWidth = 2 '图片大小
With .LeftFooter
.AddFoot(txt).Attribute = "style='color:white;background-color:#f69797';font-size:17px'"
If e.Cookies("用户类别") = "企业" Then
.AddFoot("详细信息").Attribute = " & dr("_Identify") & "'"" style='color:blue;font-size:20px'"
Else
.AddFoot("详细信息").Attribute = " & dr("_Identify") & "'"" style='color:blue;font-size:20px'"
End If
End With
With .rightFooter
If e.Cookies("用户类别") = "企业" And dr("检查类别") = "进检" Then
' .AddFoot("申报出检").Attribute = " & dr("_Identify") & "'"" style='color:green;font-size:20px'"
.AddFoot("申报出检").Attribute = " & dr("_Identify") & "'"" style='color:green;font-size:20px'"
ElseIf e.Cookies("用户类别") <> "企业" Then
.AddFoot("拨打电话").Attribute = " & dr("手机号") & "'"" style='color:green;font-size:20px'"
End If
End With
End With
Next
p1Div1.InnerHtml = p1Div.InnerHtml & ExWeUI.WebUI.AddHtmlTag("", "p1", "div",.BuildHtml, "class=""exui-scrollview""").buildhtml
End With
wb.InsertHTML("<div style='height:50px'></div>")
wb.InsertHTML("page1", p1Div1.buildhtml)
wb.InsertHTML("</div>")
wb.InsertHTML("<div style='height:50px'></div>")
wb.AddPage("", "page3").Attribute = "style='position: fixed;bottom: 0;right: 0;left: 0'" '增加两个page
With wb.AddButtonGroup("page3", "btg1", False)
.Add("btn1", "返回首页", "", "default.htm")
If page > 0 Then
.Add("btnPrev", "上一页", "", "renamecx.htm?page=" & page - 1)
End If
If Endrow < count Then
.Add("btnNext", "下一页", "", "renamecx.htm?page=" & page + 1)
End If
.Add("btn2", "清除查询", "button", "Renamecx.htm")
End With