Primer commit del sistema avantika sin cambios
This commit is contained in:
55
javascript/pedidos-distribucion.js
Executable file
55
javascript/pedidos-distribucion.js
Executable file
@@ -0,0 +1,55 @@
|
||||
function DistribucionPedido(){
|
||||
|
||||
$("type").value = "actualizarDist";
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/pedidos-distribucion.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: $('frmDistribucion').serialize(),
|
||||
onLoading: function(){
|
||||
$("loader").show();
|
||||
},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
console.log(response);
|
||||
$("loader").hide();
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
window.location.href = WEB_ROOT + "/pedidos";
|
||||
else{
|
||||
ShowStatus(splitResponse[1]);
|
||||
HideFview();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}//DistribucionPedido
|
||||
|
||||
function UpdateSaldoPrendas(id){
|
||||
|
||||
$("type").value = "updateSaldoPrendas";
|
||||
$("idProd").value = id;
|
||||
|
||||
new Ajax.Request(WEB_ROOT+'/ajax/pedidos.php',
|
||||
{
|
||||
method:'post',
|
||||
parameters: $('frmDistribucion').serialize(),
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText || "no response text";
|
||||
var splitResponse = response.split("[#]");
|
||||
|
||||
if(splitResponse[0] == "ok")
|
||||
$("txtCantPrendas_"+id).innerHTML = splitResponse[1];
|
||||
|
||||
},
|
||||
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user