📄 purchaseorderquery.aspx
字号:
if(node.attributes[ii].text=="未审核")
{
var span=document.createElement("SPAN");
span.innerText="未审核";
addClickEventForCheck(span,node.attributes[0].text,null,1);
cell.appendChild(span);
cell.style.color="red";
}
else
{
var img4=document.createElement("SPAN");
img4.innerText="已审核";
addClickEventForUnCheck(img4,node.attributes[0].text,1);
cell.appendChild(img4);
cell.style.color="blue";
}
}
else
{
if(ii==8)
{
if(node.attributes[ii].text=="未审核")
{
var span=document.createElement("SPAN");
span.innerText="未审核";
addClickEventForCheck(span,node.attributes[0].text,null,2);
cell.appendChild(span);
cell.style.color="red";
}
else
{
var img4=document.createElement("SPAN");
img4.innerText="已审核";
addClickEventForUnCheck(img4,node.attributes[0].text,2);
cell.appendChild(img4);
cell.style.color="blue";
}
}
else
{
cell.innerText=node.attributes[ii].text+" ";
}
}
}
var cell=row.insertCell();
var img=document.createElement("IMG");
img.src="../images/entry.gif";
img.title="查看入库单";
addOpenGodownentry(img,node.attributes[0].text,node.attributes[1].text);
cell.appendChild(img);
cell.align="center";
cell.className="td1";
cell=row.insertCell();
var img=document.createElement("IMG");
img.src="../images/entry.gif";
img.title="修改采购单";
//addOpenGodownentry(img,node.attributes[0].text,node.attributes[1].text);
addClickEventForModify(img,node.attributes[0].text)
cell.appendChild(img);
var span=document.createElement("SPAN");
span.innerHTML=" ";
cell.appendChild(span);
var img2=document.createElement("IMG");
img2.src="../images/delete.gif";
img2.title="删除采购单";
addClickEventForDelete(row,img2,node.attributes[0].text);
cell.appendChild(img2);
var span=document.createElement("SPAN");
span.innerHTML=" ";
cell.appendChild(span);
var img2=document.createElement("IMG");
img2.src="../images/details.gif";
img2.title="查看详细";
addViewDetails(img2,row);
cell.appendChild(img2);
var span=document.createElement("SPAN");
span.innerHTML=" ";
cell.appendChild(span);
var span=document.createElement("IMG");
span.src="../images/verifying.gif";
cell.appendChild(span);
var span2=document.createElement("IMG");
span2.src="../images/verifying.gif";
cell.appendChild(span2);
span.title="标识完成";
span2.title="标识未完成";
addIdentityFinish(span,span2,node.attributes[0].text,1);
addIdentityFinish(span2,span,node.attributes[0].text,0);
if(node.attributes[6].text=="未完成")
{
span2.style.display="none";
}
else
{
span.style.display="none";
}
cell.align="center";
cell.className="td1";
}
}
function addIdentityFinish(obj,obj2,id,op)
{
obj.attachEvent("onclick",function(){identityFinish(obj,obj2,id,op,"");});
}
function addViewDetails(obj,tr)
{
obj.attachEvent("onclick",function(){showList(tr);});
}
function addClickEventForModify(obj,id)
{
obj.attachEvent("onclick",function(){modifyPO(obj,id);});
}
function addOpenGodownentry(obj,id,no)
{
obj.attachEvent("onclick",function(){window.showModalDialog('GodownentryList.aspx?poid='+id+'&pono='+no,obj.parentElement.parentElement,'dialogHeight:600px;dialogWidth:610px;dialogTop:0px;');});
//obj.attachEvent("onclick",function(){window.open('GodownentryList.aspx?poid='+id+'&pono='+no,null,'width=600,height=600,status=yes,resizeble=yes');});
}
function identityFinish(obj,obj2,id,op,flag)
{
obj.cancelBubble=true;
if(flag=="sure")
var param="poid="+id+"&op="+op+"&sure=sure";
else
var param="poid="+id+"&op="+op;
var xmlHttp=new ActiveXObject("microsoft.XMLHTTP");
xmlHttp.open("POST","Handle/POFinish.aspx",false);
xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;");
xmlHttp.send(param);
var msg=xmlHttp.responsetext;
if(getState(msg)=="1")
{
// var o=obj.parentElement;
// o.innerText="";
obj.style.display="none";
obj2.style.display="";
if(op==1)
obj.parentElement.parentElement.cells[6].innerText="已完成";
else
obj.parentElement.parentElement.cells[6].innerText="未完成";
}
else
{
var msg2=getMsg(msg)
if(msg2.indexOf("**")!=-1)
{
if(confirm(msg2))
{
identityFinish(obj,obj2,id,op,"sure");
}
}
else
{
alert(msg2);
}
}
}
function modifyPO(obj,id)
{
var param="poid="+id;
window.showModalDialog("NewPOEdit.aspx?pop=1&poid="+id+"&op=modify",window,"dialogHeight:530px;dialogWidth:870px;dialogTop:200px;dialogLeft:70px;");
}
function check(obj,id,image,type)
{
obj.cancelBubble=true;
var param="poid="+id+"&type="+type;
var xmlHttp=new ActiveXObject("microsoft.XMLHTTP");
xmlHttp.open("POST","Handle/POCheck.aspx",false);
xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;");
xmlHttp.send(param);
var msg=xmlHttp.responsetext;
if(getState(msg)=="1")
{
var o=obj.parentElement;
o.innerText="";
var span=document.createElement("SPAN");
span.innerHTML="已审核";
span.style.color="blue";
o.appendChild(span);
addClickEventForUnCheck(span,id,type);
}
else
{
alert(getMsg(msg));
}
}
function deleteOp(tr,obj,id)
{
var param="poid="+id;
var xmlHttp=new ActiveXObject("microsoft.XMLHTTP");
xmlHttp.open("POST","Handle/PODelete.aspx",false);
xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;");
xmlHttp.send(param);
var msg=xmlHttp.responsetext;
if(getState(msg)=="1")
{
document.all("tb1").deleteRow(tr.rowIndex);
}
else
{
alert(getMsg(msg));
}
}
function unCheck(obj,id,type)
{
obj.cancelBubble=true;
var param="poid="+id+"&type="+type;
var xmlHttp=new ActiveXObject("microsoft.XMLHTTP");
xmlHttp.open("POST","Handle/POrecheck.aspx",false);
xmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded;");
xmlHttp.send(param);
var msg=xmlHttp.responsetext;
if(getState(msg)=="1")
{
var cell=obj.parentElement;
cell.innerText="";
var span=document.createElement("SPAN");
span.innerHTML="未审核";
addClickEventForCheck(span,id,null,type);
cell.appendChild(span);
}
else
{
alert(getMsg(msg));
}
}
function addClickEventForUnCheck(obj,id,type)
{
obj.attachEvent("onclick",function(){unCheck(obj,id,type);});
}
function addClickEventForCheck(obj,id,image,type)
{
obj.attachEvent("onclick",function(){check(obj,id,image,type);});
}
function addClickEventForDelete(tr,obj,id)
{
obj.attachEvent("onclick",function(){deleteOp(tr,obj,id);});
}
function getState(s)
{
var ary=s.split("|");
return ary[0];
}
function addTrStyle(row)
{
row.style.height="22";
row.style.whiteSpace="nowrap";
row.style.backgroundColor="#ffffff";
}
function getMsg(s)
{
var ary=s.split("|");
return ary[1];
}
//修改
function selectSltValueByText(objSlt,text)
{
objSlt.selectedIndex=0;
for(var i=0;i<objSlt.options.length;i++)
{
//alert(document.all("sltNewCategory").options.length);
if(objSlt.options[i].outerText==text)
{
objSlt.selectedIndex=i;
return;
}
}
}
function selectSltValueByValue(objSlt,value)
{
objSlt.selectedIndex=0;
for(var i=0;i<objSlt.options.length;i++)
{
if(vbTrim(objSlt.options[i].value)==value)
{
objSlt.selectedIndex=i;
return;
}
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -