Primer commit del sistema avantika sin cambios
This commit is contained in:
155
javascript/envios-tienda-detalles.js
Executable file
155
javascript/envios-tienda-detalles.js
Executable file
@@ -0,0 +1,155 @@
|
||||
function AutorizarEnvio(id){
|
||||
|
||||
var message = "Realmente deseas autorizar este envio?";
|
||||
|
||||
if(!confirm(message)){
|
||||
return;
|
||||
}
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/envios.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: {type:"autorizarEnvio", envioId:id},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
window.location.href = WEB_ROOT + "/envios-tienda";
|
||||
else
|
||||
ShowStatus(splitResponse[1]);
|
||||
|
||||
HideFview();
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//AutorizarEnvio
|
||||
|
||||
function AutorizarEnvioSuc(id){
|
||||
|
||||
var message = "Realmente deseas autorizar este envio?";
|
||||
|
||||
if(!confirm(message)){
|
||||
return;
|
||||
}
|
||||
|
||||
var noCajas = $("noCajas").value;
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/envios.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: {type:"autorizarEnvioSuc", envioId:id, noCajas:noCajas},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
window.location.href = WEB_ROOT + "/envios-tienda";
|
||||
else
|
||||
ShowStatus(splitResponse[1]);
|
||||
|
||||
HideFview();
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//AutorizarEnvioSuc
|
||||
|
||||
function RechazarEnvioPopup(id){
|
||||
|
||||
grayOut(true);
|
||||
|
||||
if(id == 0){
|
||||
$('fview').hide();
|
||||
grayOut(false);
|
||||
return;
|
||||
}
|
||||
$('fview').show();
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/envios.php',{
|
||||
method:'post',
|
||||
parameters: {type: "rechazarEnvioPopup", envioId:id},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
FViewOffSet(response);
|
||||
Event.observe($('btnSave'), "click", RechazarEnvio);
|
||||
Event.observe($('btnCancel'), "click", function(){ HideFview(); });
|
||||
Event.observe($('fviewclose'), "click", function(){ HideFview(); });
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//RechazarEnvioPopup
|
||||
|
||||
function RechazarEnvio(){
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/envios.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: $('frmRechazarEnvio').serialize(),
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
window.location.href = WEB_ROOT + "/envios-tienda";
|
||||
else
|
||||
ShowStatusPopUp(splitResponse[1]);
|
||||
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//RechazarEnvio
|
||||
|
||||
function RecibirMercancia(){
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/envios.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: $('frmRecibir').serialize(),
|
||||
onLoading: function(){
|
||||
$("loader").show();
|
||||
},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
$("loader").hide();
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
window.location.href = WEB_ROOT + "/envios-tienda";
|
||||
else
|
||||
ShowStatus(splitResponse[1]);
|
||||
|
||||
HideFview();
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//RecibirMercancia
|
||||
|
||||
function ShowOtroMotivo(){
|
||||
|
||||
var motivoId = $("motivoId").value;
|
||||
var status;
|
||||
|
||||
if(motivoId == 3)
|
||||
status = "";
|
||||
else
|
||||
status = "none";
|
||||
|
||||
$("inputOtroMotivo").style.display = status;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user