Foxtable(狐表)用户栏目专家坐堂 → 做了个手机页面增加请假单,每次提交都会出现三行是什么问题?


  共有3262人关注过本帖树形打印复制链接

主题:做了个手机页面增加请假单,每次提交都会出现三行是什么问题?

帅哥哟,离线,有人找我吗?
jiterp
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:715 积分:8574 威望:0 精华:0 注册:2011/11/13 15:49:00
做了个手机页面增加请假单,每次提交都会出现三行是什么问题?  发帖心情 Post By:2021/3/8 11:36:00 [显示全部帖子]

做了个手机页面增加请假单,每次提交都会出现三行是什么问题,看代码好象没什么问题呀,这是什么情况?


下面是整段函数代码:



'定义部门档案
Dim dept As New SQLCommand
dept.C
dept.CommandText = "s elect depname from sy_dept"
Dim deptdr As DataTable = dept.ExecuteReader

Dim e As RequestEventArgs = args(0)
Dim wb As New weui
If e.PostValues.Count = 0 Then '生成增加订单网页
    wb.AddForm("","form1","Qjd_addnew.htm")
    wb.AddPageTitle("form1","ph1","填制请假单")
    With wb.AddInputGroup("form1","ipg1")
        .AddSelect("qjtype","请假类型","事假|病假|婚假")
        .AddSelect("staname","员工名称","|"+ DataTables("sy_staff").GetComboListString("staname"))
        .AddSelect("sdepname","所属部门","|"+deptdr.GetComboListString("depname"))
        .AddInput("stardate","开始日期","date")
        .AddInput("strtime","开始时间","time")
        .AddInput("enddate","结束日期","date")
        .AddInput("endtime","结束时间","time")
        With wb.AddInputGroup("form1","ipg2","请假事由")
            .AddTextArea("qjtext",5).Placeholder = "请输入200字以内的请假原因"
        End With
    End With
    
    With wb.AddButtonGroup("form1","btg1", False)  '水平排列
        .Add("btn1", "提交","submit")
    End With
    e.WriteString(wb.Build)
Else '保存新增的订单
    Dim nms() As String = {"qjtype","staname","sdepname","stardate","strtime","enddate","endtime","qjtext"}
    Dim dr As DataRow = DataTables("hr_qjd").AddNew()
    For Each nm As String In nms
        dr(nm) = e.PostValues(nm)
    Next
    dr("maker")="admin"
    dr("djdate")= Date.Today
    dr("cstate")= 0
    dr("qjcode")= Functions.Execute("Maxcode",Date.Today,"ck_hr_qjd")  '自动单据编号
    dr("dateqty")= 1
    dr("workuser")= 8
    dr.Save()

    With wb.AddMsgPage("","msgpage","请假单创建成功", "好好学习,天天向上") '增加订单成功提示信息
        .AddButton("btn1","继续增加","Qjd_addnew.htm")
    End With
    e.WriteString(wb.Build)
End If
[此贴子已经被作者于2021/3/8 11:37:05编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
jiterp
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:715 积分:8574 威望:0 精华:0 注册:2011/11/13 15:49:00
  发帖心情 Post By:2021/3/8 12:02:00 [显示全部帖子]

谢谢老师提醒:是httprequest事件里多了最后一行,最后一行去掉就正常了。
Select Case e.Path
    Case "Qjd_filter.htm"
        Functions.Execute("Filter",e)
    Case "list.htm"
        Functions.Execute("List",e) 
    Case "tongji.htm"
        Functions.Execute("Statistics",e)

End
Select
e.WriteString(wb.Build)  

 回到顶部