代码拉取完成,页面将自动刷新
同步操作将从 gujiejing/WEBWMS 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
window.onload=initPage;
var aID1 = "";
function initPage(){
document.getElementById("allocate").onclick=allocateSO;
document.getElementById("allocateDetail").onclick=allocateDetailSO;
document.getElementById("pickreport").onclick=pickreportPrint;
document.getElementById("cancelallocate").onclick=cancelallocateSO;
$("#finishOrder").click(function(){
console.log("finish");
$("#dialog1").text("确定是否要结束此单");
$("#dialog1").dialog({
resizable: false,
height:140,
modal: true,
buttons:{
Ok:function(){
$(this).dialog("close");
console.log("do something");
sendFinish();
},
Cancel:function(){
$(this).dialog("close");
}
}
});
});
}
function sendFinish(){
var id1=escape(document.getElementById("ID").value);
$.post("slsoformf.php",{
id: id1,
type: "finish"
},function(data,status){
//alert("Data: "+data+"\nStatus:"+status);
var respTxt=jQuery.parseJSON(data);
if(respTxt.result==1){
$("td#SOState11").text("FINISH");
}
});
}
function pickreportPrint(){
var id1=escape(document.getElementById("ID").value);
window.open("pickreport.php?id="+id1);
}
function cancelallocateSO(){
console.log("cancelallocateSO");
var SState= $("td#SOState11").text();
if(SState=="ALLOCATE"){}else{
alert("不是分配状态,不可取消分配");
return;
}
console.log(SState);
var id2 = escape(document.getElementById("ID").value);
var url="allocate.php?ID="+id2+"&cancelType=1";
aID1 = id2;
cancelallocateSORequest=createRequest();
if(cancelallocateSORequest==null){
alert("Unable to create request");
}else{
cancelallocateSORequest.onreadystatechange=showCAllocateDetailSO1
cancelallocateSORequest.open('GET',url,true);
cancelallocateSORequest.send(null);
}
}
function showCAllocateDetailSO1(){
if(cancelallocateSORequest.readyState == 4){
if(cancelallocateSORequest.status == 200){
console.log("responseText->"+cancelallocateSORequest.responseText);
var respTxt=eval("("+cancelallocateSORequest.responseText+")");
if(respTxt.result==1){
$("td#SOState11").text("CREATE");
$("div#showAllocateDetail").text("");
var id1=escape(document.getElementById("ID").value);
alert("取消分配成功!");
window.location.href="slsoform.php?ID="+id1;
}
}
}
}
function allocateDetailSO(){
console.log("allocateDetailSO");
var aa2= $("td#SOState11").text();
if(aa2=="ALLOCATE"){}else{
alert("不是分配状态,不可显示分配明细");
return;
}
console.log(aa2);
allocateDetailSORequest=createRequest();
if(allocateDetailSORequest==null){
alert("Unable to create request");
}else{
var url="showallocdetail.php?ID="+escape(document.getElementById("ID").value);
allocateDetailSORequest.onreadystatechange=showAllocateDetailSO
allocateDetailSORequest.open('GET',url,true);
allocateDetailSORequest.send(null);
}
}
function showAllocateDetailSO(){
console.log("showAllocateDetailSO");
if(allocateDetailSORequest.readyState == 4){
if(allocateDetailSORequest.status == 200){
console.log("allocateDetailSORequest->"+allocateDetailSORequest.responseText);
var respTxt=eval("("+allocateDetailSORequest.responseText+")");
if(respTxt.result==1){
$("div#showAllocateDetail").html(respTxt.table);
alert("responseText->"+respTxt.respText);
}
}
}
}
function allocateSO(){
console.log("allocateSO");
var aa1= $("td#SOState11").text();
if(aa1=="CREATE"){
}else{
alert("不是创建状态,不可分配出库单");
return;
}
console.log(aa1);
allocateSORequest=createRequest();
if(allocateSORequest==null){
alert("Unable to create request");
}else{
var url = "allocate.php?ID="+escape(document.getElementById("ID").value);
console.log(url);
allocateSORequest.onreadystatechange=showAllocateSO
allocateSORequest.open('GET',url,true);
allocateSORequest.send(null);
}
}
function showAllocateSO(){
console.log("showAllocateSO");
if(allocateSORequest.readyState == 4){
if(allocateSORequest.status == 200){
console.log("allocateSORequest->"+allocateSORequest.responseText);
var respTxt = eval("("+allocateSORequest.responseText+")");
console.log("respTxt.result->"+respTxt.result);
if(respTxt.result==0){
alert("responseText->"+respTxt.respText);
}else if(respTxt.result==1){
$("td#SOState11").text("ALLOCATE");
alert("responseText->"+respTxt.respText);
var id1 = escape(document.getElementById("ID").value);
window.location.href="slsoform.php?ID="+id1;
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。