以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- weui如何建立关联页面查询 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=172680) |
-- 作者:chen_sheng -- 发布时间:2021/10/25 18:39:00 -- weui如何建立关联页面查询 通过 .Addbutton("查看进度详情", "./mx.htm?bh=" & dr("编号")) 如何可以直接实现查询订单进度的目的 Case "", "default.htm" \'首页 \'\'Dim wb As New weui For Each dr As DataRow In DataTables("订单").SqlSelect("","","下单时间 DESC") With wb.AddPreview("","pv"& dr("编号"),"订单编号",dr("编号")) .AddItem("下单时间",dr("下单时间")) .AddItem("颜色",dr("颜色")) .AddItem("花型",dr("花型")) .AddItem("结构",dr("结构")) .AddItem("评审交期", dr("评审交期")) .Addbutton("查看进度详情", "./mx.htm?bh=" & dr("编号")) End With wb.AppendHTML("<br/>") Next e.WriteString(wb.Build) \'生成网页 Case "mx.htm" wb.AddPageTitle("","pageheader","订单进度管理系统","技术支持:软件公司") wb.AppendHTML("<link rel=\'stylesheet\' href=\'./weui/exweui.css\'/>",True) wb.AddForm("","form1","mx.htm") Dim ip As object With wb.AddInputGroup("form1","ipg1","查询订单") ip = .AddInput("bh","编号","text") End With Dim bh As String \'编号 Dim dr As DataRow \'当前订单 \' Dim name As String = e.Cookies("username") \'用户名 If e.PostValues.ContainsKey("bh") Then \'如果包含编号,说明是点击了查询或者审核按钮 bh = e.PostValues("bh") ip.value = bh \'编号文本框赋值 dr = DataTables("订单").Find("编号=\'" & bh & "\'") \'查询是否有此编号数据 End If \' Dim Iscur As Boolean \'用于判断当前用户有没有审核权限 If dr IsNot Nothing Then Dim dr2 As DataRow = DataTables("订单流程表").Find("编号=\'" & bh & "\'","步骤 desc") \'查询此订单最新的步骤状态 \' If dr2 Is Nothing \'如果没有数据,说明是新建的单 \' Dim dr3 As DataRow = DataTables("流程表").Find("类别=\'订单\' and 审核人=\'" & name & "\'") \'查询登录用户的审核权限 \' If dr3 IsNot Nothing AndAlso dr3("状态") = "主管审核" Then \'如果有主管审核权限,新建单的第一个权限 \' Iscur = True \' End If \' \' Else \'如果有数据 \' \' Dim dr3 As DataRow = DataTables("流程表").Find("类别=\'订单\' and 审核人=\'" & name & "\' and 步骤=" & dr2("步骤")+1) \'查询流程表下一个步骤的审核人是否是当前登陆用户 \' \' If dr3 IsNot Nothing Then \'查询有结果,说明有审核权限 \' \' Iscur = True \' \' End If \' End If End If \' If Iscur Then \'如果有审核权限才显示意见输入框 \' With wb.AddInputGroup("form1","ipg2","审核意见") \' .AddTextArea("yj",5).Placeholder = "请输入100字以内的意见" \' End With \' End If With wb.AddButtonGroup("form1","btg1",False) .Add("btn1", "查询", "submit") \' If Iscur Then \'如果有审核权限才显示审核按钮 \' .Add("btn2", "审核", "submit") \' End If \'.Add("btn3", "退出", "button","logon.htm") End With If bh > "" Then \'如果有提交了编号 If dr Is Nothing Then \'查询无此编号 wb.AddTopTips("","toptip1","无此订单!").msec = 2000 Else \'有此编号,则显示对应的流程状态 With ExWeUI.WebUI.AddStepGroup("","step1","订单" & bh & "流程") \'With .AddStep("st00","","新建") \'显示新建状态 \'If dr("状态") = "新建" Then \'.color = ExWeUI.ExWeuiStepColorEnum.green \'.IsCurrent = True \'End If \'End With Dim drs As List(Of DataRow) = DataTables("订单流程表").Select("编号=\'" & bh & "\'","步骤") \'查询获取已经审核的流程 For Each dr1 As DataRow In drs With .AddStep("st0" & dr1("步骤"),dr1("步骤"),dr1("状态")) .color = ExWeUI.ExWeuiStepColorEnum.blue If dr1("状态") = dr("状态") \'如果状态等于订单表当前状态,说明是当前步骤,界面显示为实心序号状态 .IsCurrent = True End If .Description = dr1("审核时间") & "<br />" & dr1("审核意见") End With Next Dim max As Integer = 0 If drs.Count > 0 Then max = drs(drs.Count - 1)("步骤") \'获取已审核的最新步骤 End If drs = DataTables("流程表").Select("类别=\'订单\' and 步骤 >" & max,"步骤") For Each dr1 As DataRow In drs \'从已审核的最新步骤下一个步骤开始显示未处理的步骤 With .AddStep("st0" & dr1("步骤"),dr1("步骤"),dr1("状态")) .color = ExWeUI.ExWeuiStepColorEnum.wait .Description = "待处理" If drs.Count = 1 Then .color = ExWeUI.ExWeuiStepColorEnum.Orange .Description = "流程已全部结束" End If End With Next \'添加已完成 If drs.Count = 0 Then With .AddStep("st99","","已完成") .color = ExWeUI.ExWeuiStepColorEnum.Orange .Description = "流程已全部结束" End With End If wb.InsertHTML(.BuildHtml) End With End If Else wb.AddTopTips("","toptip1","请输入单号再查询!").msec = 2000 End If e.WriteString(wb.Build) [此贴子已经被作者于2021/10/25 18:40:34编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/10/25 21:25:00 -- If e.getValues.ContainsKey("bh") Then \'如果包含编号,说明是点击了查询或者审核按钮 bh = e.getValues("bh") ip.value = bh \'编号文本框赋值 dr = DataTables("订单").Find("编号=\'" & bh & "\'") \'查询是否有此编号数据 End If |