以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- Dialog还未点确认,代码就直接往下面执行了! (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=190062) |
||||
-- 作者:温馨的大树 -- 发布时间:2024/1/14 12:11:00 -- Dialog还未点确认,代码就直接往下面执行了! Dialog跳出弹窗,但是还未点确认,代码就直接往下面执行了!是哪里有错误吗?代码如下: Dim e As RequestEventArgs = args(0) \'获取要显示的页 Dim wb As New weui wb.AddToast("form1", "t1", "提交发单中", 1) \'定义提示 With wb.AddTabBar("", "tb1", 1) .Addbutton("bt0", "首页", "./images/sy.ico", "default.htm") .Addbutton("bt1", "消息通知", "./images/xxtz.ico", "xxtz.htm") .Addbutton("bt2", "最新动态", "./images/最新动态.ico", "zxdt.htm") .Addbutton("bt3", "订单查询", "./images/订单查询.ico", "ddcx.htm") .AddButton("bt5", "订单管理", "./images/订单管理.ico", "list.htm") .AddPage("page1", "调度管理", "./images/调度.ico") .AddButton("bt6", "退出", "./images/tc.ico", "exit.htm") End With wb.AddPageTitle("page1", "pageheader", "已发单", "您正在操作编号【" & e.GetValues("oid") & "】的订单!") Dim oid As String If e.GetValues.ContainsKey("oid") Then oid = e.GetValues("oid") End If Dim pr As DataRow = DataTables("订单明细表").SQLFind("订单编号=\'" & oid & "\'") If pr IsNot Nothing Then If e.PostValues.Count = 0 Then Dim url As String = "ddfs.htm?oid=" & pr("订单编号") wb.AddForm("page1", "form1", url).Attribute = """ With wb.AddInputGroup("form1", "", "") With .Addinput("姓名", "姓名", "text") .Value = pr("姓名") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg2", "时间日期") With .AddInput("订单日期", "订单日期", "date") .Value = pr ("订单日期") .Readonly = True End With With .AddInput("订单时间", "订单时间", "time") .Value = Format( pr("订单时间"), "HH:mm") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg3", "城市交通") With .Addinput("城市", "城市", "text") .Value = pr("城市") .Readonly = True End With With .Addinput("地铁站", "地铁站", "text") .Value = pr("地铁站") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg4", "客户信息") With .AddInput("客户网名", "客户网名", "Text") .Value = pr("客户网名") .Readonly = True End With With .AddInput("客户网名备注", "网名备注", "Text") .Value = pr("客户网名备注") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg5", "") With .AddInput("客服", "客服", "Text") .Value = pr("客服") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg6", "价格信息") With .AddInput("单价", "单价", "number") .Value = pr("单价") .Readonly = True End With With .AddInput("单位", "单位", "text") .Value = pr("单位") .Readonly = True End With End With With wb.AddInputGroup("form1", "ipg7", "已发单") .AddSwitch("已发单", "已发单").Value = True End With With wb.AddButtonGroup("form1", "bng2", True) .Add("btn1", "确定").Attribute = """ .Add("btn2", "取消").Attribute = """ End With With wb.AddDialog("form1", "dlg1", "提示", "您确定要提交已发单吗?") .AddButton("btnCancel", "取消", "default.htm").Kind = 1 .AddButton("btnOK", "确定", "submit") End With With wb.AddDialog("form1", "dlg2", "提示", "您确定要取消提交吗?") .AddButton("btnOK", "确定", "default.htm") End With e.WriteString(wb.Build) Else If pr("已发单") = True Then With wb.AddMsgPage("page1", "msgpage", "提示", "对不起,已发单已操作,请勿重复操作!") .icon = "info" \'改变图标 .AddButton("btn1", "返回", "default.htm") End With e.WriteString(wb.Build) Return"" Else pr("已发单") = True pr("发单时间") = Date.Now pr("订单状态") = "进行中:已发单" pr("状态时间") = Date.Now pr.Save() With wb.AddMsgPage("page1", "msgpage", "恭喜你,发单成功", "订单已发送给员工") .AddButton("btn1", "返回", "default.htm") End With e.WriteString(wb.Build) End If End If End If |
||||
-- 作者:有点蓝 -- 发布时间:2024/1/14 19:39:00 -- 没看到有打开Dialog的代码 |
||||
-- 作者:温馨的大树 -- 发布时间:2024/1/15 2:02:00 -- 不好意思,代码复制粘贴过来,有的不知道为什么丢失了部份 With wb.AddButtonGroup("form1", "bng2", True) .Add("btn1", "确定").Attribute = """ 这后面粘贴进来就没有了 .Add("btn2", "取消").Attribute = """ 这后面粘贴进来就没有了 End With 就是这部份丢失了 With wb.AddButtonGroup("form1", "bng2", True) .Add("btn1", "确定").Attribute = """ 代码表达就是点确定,show dlg1 .Add("btn2", "取消").Attribute = """ 代码表达就是 点取消,show dlg2 End With [此贴子已经被作者于2024/1/15 2:14:52编辑过]
|
||||
-- 作者:有点蓝 -- 发布时间:2024/1/15 8:36:00 -- 复制到记事本发上来 |
||||
-- 作者:温馨的大树 -- 发布时间:2024/1/15 16:18:00 -- 好的,记事本我上传上来
|
||||
-- 作者:有点蓝 -- 发布时间:2024/1/15 16:20:00 -- With wb.AddButtonGroup("form1", "bng2", True) .Add("btn1", "确定","button").Attribute = "onclick=""show(\'dlg1\')""" .Add("btn2", "取消","button").Attribute = "onclick=""show(\'dlg2\')""" End With 一般来说提交按钮的type参数设置为"submit"或者不设置;重置按钮的type参数设置为"reset";超链接按钮不要设置type参数,设置href参数即可;自定义按钮(单击执行代码)的type参数设置为"button"。
|
||||
-- 作者:温馨的大树 -- 发布时间:2024/1/15 16:57:00 -- 点确定后出现错误 此主题相关图片如下:qq图片20240115165652.png |
||||
-- 作者:有点蓝 -- 发布时间:2024/1/15 17:02:00 -- 肯定是乱改,改错地方了,重新把改后完整代码发上来 |
||||
-- 作者:温馨的大树 -- 发布时间:2024/1/15 17:18:00 -- 重新发上来
|
||||
-- 作者:有点蓝 -- 发布时间:2024/1/15 17:31:00 -- 看上你7楼浏览器地址并没有提交oid参数,这样代码里查不到内容的时候并没有返回任何内容,就是这个错误了 可以参考下面用法,没有查询到内容的时候返回一个提示
|