'打开需要合同评审的单位
Dim e As RequestEventArgs = args(0)
Dim un As String = e.cookies("un")
Dim page As Integer = 0 '默认page为0,显示第一页
If e.GetValues.ContainsKey("crpage") Then '如果地址中有page参数
Integer.TryParse(e.GetValues("crpage"), page) '提取page参数
End If
Dim Id As Integer
If e.GetValues.ContainsKey("crid") Then
Integer.TryParse(e.GetValues("crid"), Id)
End If
Dim wb As new WeUI
Dim dr As DataRow = DataTables("职卫订单").Find("_identify = '" & Id & "'")
If dr IsNot Nothing Then
wb.AddForm("","form1","default.htm")
With wb.AddInputGroup("form1","ipg1","合同评审")
With .AddInput("订单编号","订单编号","text")
.value = dr("订单编号")
.Readonly = True
End With
With .AddInput("客户名称","客户名称","text")
.value = dr("客户名称")
.Readonly = True
End With
With .AddInput("业务员","业务员","text")
.value = dr("业务员")
.Readonly = True
End With
.AddInput("审核人","审核人","text").value = un
.AddInput ("审核日期","审核日期","date").value = Date.Today
End With
Dim usg As String
Dim tr As DataRow = DataTables("用户").find("Name = '" & un & "'")
If tr IsNot Nothing Then
usg = tr("Config")
End If
If usg Like "*业务*" Then
With wb.AddcheckGroup("form1","chk","业务审核")
.Add("rv","业务审核")
End With
ElseIf usg Like "*采样*" Then
With wb.AddcheckGroup("form1","chk","采样审核")
.Add("rv","采样审核")
End With
ElseIf usg Like "*评价*" Then
With wb.AddcheckGroup("form1","chk","评价审核")
.Add("rv","评价审核")
End With
ElseIf usg Like "*分析*" Then
With wb.AddcheckGroup("form1","chk","分析审核")
.Add("rv","分析审核")
End With
End If
With wb.AddInputGroup("form1","ipg2","审核意见")
If usg Like "*业务*" Then
.AddTextArea("业务意见")
ElseIf usg Like "*采样*" Then
.AddTextArea("采样意见")
ElseIf usg Like "*评价*" Then
.AddTextArea("评价意见")
ElseIf usg Like "*分析*" Then
.AddTextArea("分析意见")
End If
End With
End If
e.WriteString(wb.Build)