以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]在扫一扫示例程序中,扫描出了资产编号,如何根据资产编号在后台调出资产信息 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=135261) |
-- 作者:sjx71 -- 发布时间:2019/5/22 10:09:00 -- [求助]在扫一扫示例程序中,扫描出了资产编号,如何根据资产编号在后台调出资产信息 在扫一扫程序中,扫出了资产编号,也将得到的扫描信息填入文本框里了, 怎么在后台的资产明细表里通过资产编号,找到对应的资产信息,填写到对应的文本框内 谢谢老师 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
|
-- 作者:有点甜 -- 发布时间:2019/5/22 10:49:00 -- 在这里,编写ajax函数,获取值
wb.InsertHTML("<script>function scaned( t, r, f ) {alert(r); 在这里调用ajax}</script>")
http://www.foxtable.com/mobilehelp/scr/0108.htm
http://www.foxtable.com/mobilehelp/scr/0107.htm
|
-- 作者:sjx71 -- 发布时间:2019/5/22 17:35:00 -- 甜老师,您好 我对 js 不熟,不知道怎么写通过扫描到的资产编号到后台找对应的记录 以及将对应的值写入到网页的文本框内, 甜老师能帮我写个例子么,怎么通过扫到的资产编号找到后台对应的记录,并把对应的公司值写到文本框内 谢谢老师
|
-- 作者:有点甜 -- 发布时间:2019/5/22 17:44:00 -- 参考
http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=126304&authorid=0&page=0&star=1
|