以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 模糊查询,选择返回AddInput (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=152609) |
||||
-- 作者:有点蓝 -- 发布时间:2020/7/16 14:24:00 -- 参考:http://www.foxtable.com/mobilehelp/topics/0103.htm |
||||
-- 作者:有点蓝 -- 发布时间:2020/7/20 15:00:00 -- 默认就包含主键的,如果要手工设置参考:http://www.foxtable.com/mobilehelp/topics/0119.htm |
||||
-- 作者:有点蓝 -- 发布时间:2020/7/20 15:21:00 -- 使用什么方式建表的,都是可以指定需要显示的列的:http://www.foxtable.com/mobilehelp/topics/0067.htm |
||||
-- 作者:有点蓝 -- 发布时间:2020/7/20 15:48:00 -- 不能使用submitAjaxFileds,可以使用sendAjaxJSON或者sendAjaxText 参考这里的js获取行数据:http://www.foxtable.com/mobilehelp/topics/0147.htm
|
||||
-- 作者:有点蓝 -- 发布时间:2020/7/21 14:01:00 -- httprequests事件 Select Case e.Path Case "test.htm" Dim wb As New weui wb.AddForm("","form1","tongji.htm") With wb.AddInputGroup("form1","ipg1","销售统计") .AddSelect("水平分组","水 平分组","产品|客户|雇员") .AddSelect("垂直分组","垂直分组","产品|[客户]|雇员") .AddSelect("统计列","统计列","数量|金额") End With With wb.AddInputGroup("form1","ipg2","动态赋值") .AddInput("xm1","值1","text") .AddInput("xm2","值2","text") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "统计", "button").Attribute= "onclick= \'tongji()\'" End With wb.AppendHTML("<div id=\'p1\' style=\'margin:0.5em\'></div>") \'插入一个div,用于显示服务器返回的 页面 wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>") \'引入脚本文件 e.WriteString(wb.Build) Case "tongji.htm" Dim wb As New weui If e.PostValues.ContainsKey("垂直分组") AndAlso e.PostValues.ContainsKey("水平分组") AndAlso e.PostValues.ContainsKey("统计列") Then Dim b As New CrossTableBuilder("统计表1",DataTables("订单")) b.HGroups.AddDef(e.PostValues("水平分组")) b.VGroups.AddDef(e.PostValues("垂直分组")) b.Totals.AddDef(e.PostValues("统计列")) Dim dt As DataTable = b.Build(True) With wb.AddTable("","Table1") Dim lst As new List(of String) For Each dc As DataCol In dt.DataCols lst.Add(IIF(dc.Caption = "",dc.Name,dc.Caption)) Next .head.AddRow(lst.ToArray) For Each dr As DataRow In dt.DataRows lst.Clear For Each dc As DataCol In dt.DataCols lst.Add(dr(dc.Name)) Next .body.AddRow(lst.ToArray).Attribute= "onclick= \'setvalues()\'" Next End With Else wb.InsertHTML("请按输入分组列和统计列!") End If e.WriteString(wb.Build) End Select ajaxform.js文件 function tongji(){ var result = submitAjaxForm(\'form1\',\'\',false); document.getElementById("p1").innerHTML=result; bindTable(); } function bindTable() { var eles = document.querySelectorAll(".fox_actionsheet"); for (var i = 0; i < eles.length; i++) { eles[i].onclick = hide; } eles = document.getElementsByClassName("fox_table") for (var i = 0; i < eles.length; i++) { eles[i].onmousedown = tableMouseDown; eles[i].rowSel = -1; eles[i].colSel = -1; if (eles[i].hasAttribute("data-pagenumber")) { eles[i].pagenumber = eles[i].attributes["data-pagenumber"].value; } } eles = document.getElementsByClassName("weui_mask_transition"); for (var i = 0; i < eles.length; i++) { eles[i].addEventListener("transitionend", hideActionMask); } } function setvalues(){ document.getElementById("xm1").value = table1.rows[table1.rowSel].cells[0].innerHTML; document.getElementById("xm2").value = table1.rows[table1.rowSel].cells[1].innerHTML; } [此贴子已经被作者于2020/7/21 22:15:33编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2020/7/21 20:25:00 -- 我测试没有问题。如果看不懂就上传有问题的项目说明 |
||||
-- 作者:有点蓝 -- 发布时间:2020/7/21 22:15:00 --
|