Aggiunta associazione
This commit is contained in:
53
associazione/jsl/ordini_edit.js
Normal file
53
associazione/jsl/ordini_edit.js
Normal file
@@ -0,0 +1,53 @@
|
||||
$(function(){
|
||||
$("#categoria").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore").html(r.prod);
|
||||
$("#materiale").html(r.mat);
|
||||
$("#vendita").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale").html(r.mat);
|
||||
$("#vendita").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita").val(r.art);
|
||||
$("#taglia").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
270
associazione/jsl/ordini_edit_main.js
Normal file
270
associazione/jsl/ordini_edit_main.js
Normal file
@@ -0,0 +1,270 @@
|
||||
$(function(){
|
||||
$("#articoli").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
window.location = '?articoli=' + questo.val();
|
||||
});
|
||||
|
||||
|
||||
$("#categoria1").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore1").html(r.prod);
|
||||
$("#materiale1").html(r.mat);
|
||||
$("#vendita1").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore1").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria1");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale1").html(r.mat);
|
||||
$("#vendita1").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale1").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita1").val(r.art);
|
||||
$("#taglia1").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#categoria2").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore2").html(r.prod);
|
||||
$("#materiale2").html(r.mat);
|
||||
$("#vendita2").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore2").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria2");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale2").html(r.mat);
|
||||
$("#vendita2").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale2").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita2").val(r.art);
|
||||
$("#taglia2").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#categoria3").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore3").html(r.prod);
|
||||
$("#materiale3").html(r.mat);
|
||||
$("#vendita3").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore3").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria3");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale3").html(r.mat);
|
||||
$("#vendita3").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale3").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita3").val(r.art);
|
||||
$("#taglia3").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#categoria4").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore4").html(r.prod);
|
||||
$("#materiale4").html(r.mat);
|
||||
$("#vendita4").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore4").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria4");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale4").html(r.mat);
|
||||
$("#vendita4").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale4").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita4").val(r.art);
|
||||
$("#taglia4").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#categoria5").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore5").html(r.prod);
|
||||
$("#materiale5").html(r.mat);
|
||||
$("#vendita5").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore5").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria5");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale5").html(r.mat);
|
||||
$("#vendita5").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale5").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita5").val(r.art);
|
||||
$("#taglia5").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user