1 Star 1 Fork 1

gujiejing / WEBWMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
slso.js 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
wisdom 提交于 2017-11-03 23:31 . upupup new alll
window.onload=initPage;
function initPage(){
ahrefs = document.getElementsByTagName("a");
console.log(ahrefs.length);
for(var i=0;i<ahrefs.length;i++){
aaa=ahrefs[i];
aaa.onclick=function(){
var id1 = this.id;
console.log(id1);
var strop = this.innerHTML;
if(strop=="DEL"){
fnDel2(id1);
}
}
}
}
function fnDel(id1){
//alert("del:"+id1);
fnDelRequeest = createRequest();
if(fnDelRequeest == null){
alert("Unable to create request");
}else{
var url = "delslso.php?id="+id1;
fnDelRequeest.onreadystatechange = showfnDel;
fnDelRequeest.open('GET',url,true);
fnDelRequeest.send(null);
}
}
function showfnDel(){
console.log("showfnDel");
if(fnDelRequeest.readyState==4){
if(fnDelRequeest.status==200){
console.log("fnDelRequeest->"+fnDelRequeest.responseText);
var respText=eval("("+ fnDelRequeest.responseText +")");
if(respText.result==0){
alert("错误,原因为:"+respText.reason);
}else if(respText.result==1){
alert("删除成功:"+respText.reason);
window.location.href="showlistso.php";
}
}
}
}
function fnDel2(id1){
console.log(id1);
//$("div#dialog").innerHTML="aaaaaaaaaaaaaaaaaaaa";
$("div#dialog").html("<h2>是否删除此出库单ID:"+id1+"</h2>");
$(function() {
$("#dialog").dialog({
position: ["center","top"],
resizable: false,
modal: true,
height:200,
buttons: {
Ok: function(){
$(this).dialog("close");
fnDel(id1);
},
Cancel: function(){
$(this).dialog("close");
}
}
});
});
}
/**
$(function() {
$( "#dialog" ).dialog();
});
*/
PHP
1
https://gitee.com/laotou99_admin/WEBWMS.git
git@gitee.com:laotou99_admin/WEBWMS.git
laotou99_admin
WEBWMS
WEBWMS
master

搜索帮助