Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.AppendHTML("<style>.mark{font:bolder; font-size:20px;color:black}</style>", True) '添加样式
wb.AddPageTitle("", "ph1", "新增船舶", "")
'If e.PostValues.Count = 0 Then '生成增加订单网页
wb.AddForm("", "form2", "receive.htm")
With wb.AddInputGroup("form2", "ipg1", "信息录入")
If e.GetValues.ContainsKey("chujian") Then '如果容纳chujian
If e.GetValues.ContainsKey("name") Then
Dim dr As DataRow = DataTables("检疫资料").SQLFind("用户姓名 = '" & e.Cookies("用户姓名") & "' And _Identify = '" & e.getvalues("name") & "'")
If dr IsNot Nothing Then
With .AddInput("中文船名", "中文船名", "Text")
.Value = dr("中文船名")
.Readonly = True
End With
With .AddInput("IMO号", "IMO号", "text")
.Value = dr("IMO号")
.Readonly = True
End With
With .AddInput("入境时间", "入境时间", "date")
.Value = dr("入境时间")
.Readonly = True
End With
With .AddInput("检查类别", "检查类别", "text")
.Value = "出检"
.Readonly = True
End With
.AddInput("航次号", "航次号", "text")
End If
End If
Else
With .AddTextArea("一键解析", 10)
.Placeholder = "请输入船舶信息进行解析"
.class = "mark"
End With
With wb.AddButtonGroup("form2", "btg77", False)
.Add("btn77", "一键解析", "button").Attribute = "" '调用js函数上传
End With
.AddInput("入境时间", "入境时间", "date")
.AddInput("中文船名", "中文船名", "Text")
.AddInput("英文船名", "英文船名", "text")
.AddInput("船籍", "船    籍", "Text")
.AddInput("总吨", "总    吨", "number")
.AddInput("IMO号", "IMO号", "text")
.AddInput("航次号", "航次号", "text")
.AddInput("进检船员数量", "进境船员数量", "number")
.AddInput("来自国家", "来自国家", "text")
.Addselect("检查类别", "检查类别", "[进检]|出检")
End If
' .Addselect("船员体温", "船员体温", "正常|不正常")
.AddInput("出境时间", "出境时间", "date")
.AddInput("出检船员数量", "出检船员数量", "number")
.AddInput("去往国家", "去往国家", "Text")
.AddInput("本港休假船员数量", "本港休假船员数量", "number")
End With
wb.AppendHTML("<link rel='stylesheet' href='./weui/exweui.css'/>", True)
wb.AppendHTML("<script src='./weui/exweui.js' ></script>", True)
wb.AppendHTML("<script src='./lib/test.js'></script>") '引入脚本文件
With wb.AddInputGroup("form2", "船舶资料", "船舶资料")
With .AddTextArea("船舶资料", 15)
.Placeholder = "请输入船舶信息概况"
.class = "mark"
End With
End With
With wb.AddInputGroup("form2", "随附图片", "随附图片")
With .AddUploader("up128", "随附图片", True)
.Incremental = True '允许重复选择文件或连续拍照
.AllowAdd = True
.Accept = "image/*"
.ScaleWidth = 1200 '自动压缩图片宽度为400个像素,高度等比例压缩
End With
End With
With wb.AddButtonGroup("form2", "btg1", False)
.Add("btn1", "首页", "button", "default.htm")
.Add("btn3", "清除", "reset")
.Add("btn2", "保存", "button").Attribute = "" '调用js函数上传
End With
wb.AddToast("", "tst1", "正在上传", 1)
wb.AddToast("", "tst2", "上传成功", 0)
wb.AddToast("", "tst3", "上传失败", 0).Icon = "warn"
With wb.AddDialog("", "dlg1", "提示", "存在相同船名航次,增加失败!")
.AddButton("btnOK", "确定")
End With
With wb.AddDialog("", "dlg2", "提示", "资料已被删除!")
.AddButton("btnOK", "确定")
End With
With wb.AddDialog("", "dlg3", "提示", "船名、航次、IMO号、检查类别不能为空")
.AddButton("btnOK", "确定")
End With
wb.InsertHTML("<style>#ipg1 .weui_label{color:black;width:100px}</style>") ''设置输入框长度
wb.AppendHTML("<script>initExWeUI();</script>") '需要注意的是,这里不需要使用true参数
e.WriteString(wb.Build) '生成网页
在这个网页中黄色部分想录入一段文字,比如中文船名:海航
英文船名:sea
IMO号:99886
然后点击一键解析则对应的内容自动录入到网页中的空格内,需要用到js吧?这个应该怎么写?另外我现在“一键解析”这个按钮总跑到下边,怎样能直接挨着录入内容显示?