在扫一扫程序中,扫出了资产编号,也将得到的扫描信息填入文本框里了,
怎么在后台的资产明细表里通过资产编号,找到对应的资产信息,填写到对应的文本框内
谢谢老师
Dim fl As String = ProjectPath & "web\" & e.path
Dim path As String = "foxtableAppTest"
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar",".txt"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Select Case e.path
Case "test.htm"
Dim wb As new weui
wb.AppendHTML("<script type='text/javascript' src='/" & path & "/js/common.js'></script>", True)
wb.AppendHTML("<link rel='stylesheet' href='/" & path & "/css/common.css' Type='text/css' charset='utf-8'/>", True)
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","测试")
.AddInput("资产编号","资产编号","Text")
.AddInput("公司","公司","Text")
.AddInput("资产类别","资产类别","Text")
.AddInput("资产名称","资产名称","Text")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "扫一扫", "button").Attribute = " & path & "/plus/barcode_scan.html',true,true);"""
End With
'wb.InsertHTML("<script>function scaned( t, r, f ) {plus.nativeUI.alert('扫描返回的信息如:\n编码:' + t + '\n内容:' + r + '\n图片存放路径(在手机端):' + f);}</script>")
wb.InsertHTML("<script>function scaned( t, r, f ) {document.getElementById('资产编号').value=r;}</script>")
e.WriteString(wb.Build)
End Select