Foxtable(狐表)用户栏目专家坐堂 → 求助,weui删除之前如何加一个验证条件


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

主题:求助,weui删除之前如何加一个验证条件

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


加好友 发短信
等级:超级版主 帖子:107440 积分:546479 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2024/2/13 20:25:00 [显示全部帖子]

增加一个函数,比如checked,代码
Dim e As RequestEventArgs = args(0)
If
 DataTables("订单").SQLCompute("count(订单编号)","订单编号='" & e.PlainText & "' and 数量 >1000") > 0 Then 
    e.WriteString("1")
else
    e.WriteString("0")
End If

httpRequest事件代码:

Select Case e.Path
    Case "list.htm"
        Functions.Execute("List",e) '
分页显示
    Case "edit.htm"
        If e.PostValues.Count > 0 Then
            
Functions.Execute("Save",e) '保存表单数据
        End If
        Functions.Execute("Edit",e) '生成订单编辑页面

    Case "checked.htm"

Functions.Execute("checked",e)
End
 Select


js

function del(){

var result = sendAjaxText(table1.primarykey,"checked.htm","",false);

if (result == "0") {
   location="list.htm?page=" + table1.pagenumber + "&deloid=" + table1.primarykey;

}

else{

alert("数量超过1000不能删除");

}
}


 回到顶部