Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:求助,手机端的动态列表问题

1楼
873773115 发表于:2024/8/17 16:37:00
Dim wb As New weui
Dim da As DataTable = DataTables("过磅明细表")
Dim db As DataTable = DataTables("原材料字典")
Dim dc As DataTable = DataTables("原料采购计划表")

Select Case e.Path
    Case "up.htm"
        wb.title = "椰丝质量检测"
        wb.AddForm("", "form1", "receive.htm")
        wb.AddToast("", "t1", "正在上传", 1) '定义提示
        wb.AddTopTips("", "toptip1", "信息未完整录入,不可提交!")
        '''        wb.AddForm("", "form1", "upload.htm").Attribute = "" 
        With wb.AddInputGroup("form1", "ipg1", "原料信息")
            With .AddInput("rq", "日期", "date")
                .Attribute = """
            End With
            With .AddSelect("bdh", "磅单号", "")
                .Attribute = "" '调用js函数
            End With
            With .AddInput("rcsj", "进场时间", "text")
                .Readonly = True
            End With 
            With .AddInput("ccsj", "出场时间", "text")
                .Readonly = True
            End With 
            With .AddInput("pm", "品名", "text")
                .Readonly = True
            End With 
            With .AddInput("gys", "供应商名称", "text")
             .Readonly = True
             .Attribute = """
            End With
        End With
        
        With wb.AddInputGroup("form1", "ipg2", "椰丝情况")
            
            .AddSelect("htbh", "合同编号", "")
            With .AddInput("sf1", "前段水份", "number")
                .Max = 100
                .Min = 1
                .Placeholder = "水份范围为1到100"
            End With 
            With .AddInput("sf2", "后段水份", "number")
                .Max = 100
                .Min = 1
                .Placeholder = "水份范围为1到100"
            End With 
            
            .AddSelect("zzqk", "杂质情况", "|" & db.GetComboListString("名称", "类别 = '杂质情况'"))
            .AddSelect("ysqk", "椰丝颜色", "|" & db.GetComboListString("名称", "类别 = '颜色情况'"))
            .AddSelect("xwcd", "纤维长度", "|" & db.GetComboListString("名称", "类别 = '纤维长度'"))
            With .AddInput("cbpd", "初步判断", "text")
                .Value = "合格"
            End With 
            
            With .AddUploader("up1", "照片", True)
                .AllowDelete = True '允许删除
                .Accept = "image/*" '允许使用相册和相机
                .Incremental = True '允许重复选择文件或连续拍照
                .ScaleWidth = 2000 '自动压缩图片宽度为400个像素,高度等比例压缩
            End With
        End With
        
        With wb.AddInputGroup("form1", "ipg3", "备注")
            .AddTextArea("bz", 3).Placeholder = "请输入50字以内的备注"
        End With
        
        With wb.AddButtonGroup("form1", "btg1", True)
            With .Add("btn1", "确定", "button")
                .Attribute = "" 
                '''                .Attribute = "" '调用js函数上传
            End With 
        End With
        
        With wb.AddDialog("", "dlg1", "提示", "已成功上传!") '增加订单成功提示框
            .AddButton("btnYes", "确定").Attribute = ""
        End With
        
        With wb.AddDialog("", "dlg2", "提示", "上传失败!") '增加订单成功提示框
            .AddButton("btnYes", "确定")
        End With
        
        wb.InsertHTML("<h3 align='center' style='color:Silver;font-size:14px;margin-bottom:5px;'>Copyright &copy; 2018-2024 YxCq System</h3>")
        wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
        
        e.WriteString(wb.Build) '生成网页
    Case "getCounties.htm" '根据输入的省,获取县市列表
        Dim pps As String = da.sqlGetComboListString("单号", "日期 ='" & e.Values("rq") & "' and 单号 is not null")
        e.WriteString("|" & pps)
    Case "getCounties1.htm" '根据输入的省,获取县市列表
        Dim pps1 As String = dc.sqlGetComboListString("合同编号", "供应商名称 ='" & e.Values("gys") & "' and 合同状态 = '完成交货'")
        MessageBox.Show(e.Values("gys"))
        e.WriteString("|" & pps1)
        
    Case "getCodes.htm" '根据输入的省和县,获取区号有邮编
        If e.Values("bdh") > "" AndAlso e.Values("rq") > "" Then
            Dim dr As DataRow = da.sqlFind("日期='" & e.Values("rq") & "' and 单号 ='" & e.values("bdh") & "'")
            If dr IsNot Nothing Then
                e.WriteString(dr("入厂时间") & "|" & dr("出厂时间") & "|" & dr("品名") & "|" & dr("供应商名称") & "|" & dr("前段水份") & "|" & dr("后段水份") & "|" & dr("杂质情况") & "|" & dr("颜色情况") & "|" & dr("纤维长度") & "|" & dr("初步判断")) 
            End If
        Else
            e.WriteString("|||")
        End If 
    Case "receive.htm"
        If e.PostValues("rq") > "" AndAlso e.PostValues("bdh") > "" Then
            Dim rq1 As Date = CDate(e.PostValues("rq"))
            Dim bdh As String = CStr(e.PostValues("bdh"))
            Dim rqbh As String = rq1.Year & Format(rq1.Month, "00") & format(rq1.Day, "00")
            
            Dim wa As DataRow = da.sqlFind("日期 = '" & rq1 & "'and 单号 = '" & bdh & "'")
            If wa IsNot Nothing Then
                wa("前段水份") = e.PostValues("sf1")
                wa("后段水份") = e.PostValues("sf2")
                wa("杂质情况") = e.PostValues("zzqk")
                wa("颜色情况") = e.PostValues("ysqk")
                wa("纤维长度") = e.PostValues("xwcd")
                wa("初步判断") = e.PostValues("cbpd")
                wa("备注1") = e.PostValues("bz")
            End If
            
            Dim ftp1 As New FtpClient
            ftp1.Host = ""
            ftp1.Account = ""
            ftp1.Password = ""
            ftp1.ChangeDir("\原料\问题图片")
            
            Dim zp As String
            Dim s As Integer = 1
            Dim s1 As Integer
            For Each key As String In e.Files.Keys
                If key = "up1" Then
                    For Each fln As String In e.Files(key)
                        Dim hz As String = fln.Substring(fln.IndexOf("."))
                        Dim rqbh1 As String = rqbh & s & "@" & bdh & hz
                        e.SaveFile(key, fln, ProjectPath & "images\" & rqbh1) '保存接收到的文件
                        
                        If ftp1.Upload(ProjectPath & "images\" & rqbh1, rqbh1) = True Then
                            FileSys.DeleteFile(ProjectPath & "images\" & rqbh1)
                        End If 
                        
                        If zp = "" Then
                            zp = rqbh1
                        Else
                            zp = zp & "|" & rqbh1
                        End If 
                        s = s + 1
                    Next
                End If 
            Next
            
            wa("照片") = zp
            wa.Save()
            e.WriteString("OK") '返回增加成功消息
        End If 
End Select


2楼
873773115 发表于:2024/8/17 16:38:00
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:ajaxform.txt

3楼
873773115 发表于:2024/8/17 16:40:00
老师,现在是根据输入日期和磅单号,可自动带出供应商名称和规格等信息     然后现在想根据供应商名称,再带出 合同编号的动态列表,然后发现供应商名称的 onchange事件不触发,好像必须手动修改才触发,请教怎么实现?
4楼
有点蓝 发表于:2024/8/17 17:11:00
代码不完整,把1楼完整代码重新放到记事本发上来
5楼
873773115 发表于:2024/8/17 17:12:00
完整代码已上传
6楼
873773115 发表于:2024/8/17 17:13:00
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:完整.txt

7楼
有点蓝 发表于:2024/8/17 17:25:00
https://www.cnblogs.com/imgss/p/10279776.html

改下js

……
            document.getElementById("zzqk").value=vals[6];
            document.getElementById("ysqk").value=vals[7];
            document.getElementById("xwcd").value=vals[8];
            document.getElementById("cbpd").value=vals[9];
setAjaxOptions('htbh','getCounties1.htm','gys',false);
        }
    }
}
8楼
873773115 发表于:2024/8/17 18:09:00
谢谢老师!图片点击可在新窗口打开查看
共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .05078 s, 4 queries.