First commit
This commit is contained in:
parent
cf97b64877
commit
cc69770608
1468 changed files with 265316 additions and 128 deletions
186
www/admin/lav/_js/tex-lavBollaPezza.js
Normal file
186
www/admin/lav/_js/tex-lavBollaPezza.js
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
///////////////////////////////////////////
|
||||
////////T O O L B A R /////////////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function scan(field) {
|
||||
|
||||
Android.scanBarcode(field);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
/* su servizioDPCR */
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
function selezionaTutto() {
|
||||
//var valore = $("#ckflgSelezionaTutto").attr("checked")=="checked"?true:false;
|
||||
var valore = $("#flgSelezionaTutto").val();
|
||||
$("input[id^='ckflgSel_']").each(function (index, element) {
|
||||
//element.checked = valore;
|
||||
var id = $(element).attr("name").replace("ckflgSel_", "");
|
||||
element.checked = valore == 0 ? false : true;
|
||||
$("#flgSel_" + id).val(valore);
|
||||
});
|
||||
}
|
||||
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
/* popup scelta tipo documento*/
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
function pregeneraDocumento() {
|
||||
// check dei servizi selezionati
|
||||
var id_sel = 0;
|
||||
//Ab.setChekBoxValue("main", "flgIgnoraRiferimentiDiversi", "1", "0");
|
||||
$("input[name^='ckflgSel_']").each(function () {
|
||||
// faccio la lista dei servizi selezionati da passare alla servlet
|
||||
if (this.checked) {
|
||||
id_sel += 1;
|
||||
}
|
||||
});
|
||||
// apro la dialog oppure mando un messaggio di errore
|
||||
if (id_sel > 0) {
|
||||
$("#tipoFatturaBP").modal("show");
|
||||
|
||||
} else {
|
||||
alert("Selezionare almeno una pezza.");
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
/*genera il documento dal popup*/
|
||||
/*****************************************/
|
||||
/*****************************************/
|
||||
function generaDocumento() {
|
||||
var f = document.main;
|
||||
|
||||
if ($("#id_tipoDocumentoD").val() != 0 && $("#flgStatoD").val()) {
|
||||
if (confirm("Verranno generate le fatture secondo i criteri di ricerca selezionati. Sei Sicuro?")) {
|
||||
$("#tipoFatturaBP").modal("hide");
|
||||
f.cmd.value = "generaDocumento";
|
||||
|
||||
$("#flgStato").val($("#flgStatoD").val());
|
||||
$("#id_tipoDocumento").val($("#id_tipoDocumentoD").val());
|
||||
|
||||
var id_lavPezze = "";
|
||||
$("input[name^='ckflgSel_']").each(function () {
|
||||
// faccio la lista dei servizi selezionati da passare alla servlet
|
||||
if (this.checked) {
|
||||
var id = this.name.replace("ckflgSel_", "");
|
||||
|
||||
id_lavPezze += id + ",";
|
||||
}
|
||||
});
|
||||
|
||||
f.id_lavPezze.value = id_lavPezze;
|
||||
|
||||
f.action = f.actionPage.value;
|
||||
//data emissione
|
||||
$("#dataEmissioneDocumento").val($("#dataED").val())
|
||||
//Ab.popUp('ELAB')
|
||||
//alert('pioxxx');
|
||||
Ab.submitAj("main", null, "listaDocumenti()");
|
||||
}
|
||||
} else {
|
||||
alert("Dati mancanti!");
|
||||
}
|
||||
}
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
// callback dopo la generazione delle fatture
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function listaDocumenti() {
|
||||
//alert('pioaaaa');
|
||||
//numero fatture....
|
||||
if ($("#numDocumentiGenerati").val() != 1 || true) {
|
||||
$("#listaDocumenti").modal("show");
|
||||
} else {
|
||||
|
||||
mostraDocumentoDaModal($("#idDocumentoGenerato").val());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
// mostra documento che nasconde la modal
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function mostraDocumentoDaModal(id) {
|
||||
|
||||
$("#listaDocumenti").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
mostraDocumento(id);
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* dettaglio documento se unico....*/
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function mostraDocumento(id) {
|
||||
//FACCIO IL SUBMIT
|
||||
var f = document.main;
|
||||
f.action = "../contab/Documento.abl";
|
||||
f.cmd.value = "md";
|
||||
f.id_documento.value = id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* MOSTRA DETTAGLIO PEZZE su popup */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function mostraPezzaPopup(l_id) {
|
||||
|
||||
|
||||
$(".pezza-body").load("../lav/BollaPezza.abl?cmd=mostraPezza&id_lavPezza=" + l_id);
|
||||
|
||||
$("#modalPezza").modal("show");
|
||||
|
||||
|
||||
}
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* aggiungi pezza */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function salvaPezza() {
|
||||
l_codicePezza = $("#codicePezza").val();
|
||||
l_mt = $("#mtPezza").val();
|
||||
//alert($("#codicePancaleE").val());
|
||||
if (Ab.validateForm('codicePancaleE', 'Pancale ', 'R', 'codicePezzaE', 'Codice Pezza', 'R', 'mtPezzaE', 'Mt. Pezza', 'RisNum>0')) {
|
||||
$("#modalPezza").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
$("#cmd").val("aggiungiPezza");
|
||||
//Ab.submitAj("main", null, "listaDocumenti()");
|
||||
Ab.submitAj("main");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
194
www/admin/lav/_js/tex-lavPezza.js
Normal file
194
www/admin/lav/_js/tex-lavPezza.js
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
///////////////////////////////////////////
|
||||
////////T O O L B A R /////////////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function scan(field) {
|
||||
|
||||
Android.scanBarcode(field);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* cerca disposizione relativa alla pezza */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function dettaglioDisposizione() {
|
||||
l_codicePezza = $("#codicePezza").val();
|
||||
|
||||
if (l_codicePezza != "") {
|
||||
|
||||
|
||||
var f = document.main;
|
||||
actionPage = f.actionPage.value;
|
||||
Ab.fetch4(actionPage, "cmd=dettaglioDisposizione&codicePezza=" + l_codicePezza, "dettaglioDisposizione", null);
|
||||
//
|
||||
Ab.setFocus("mtPezza");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* aggiungi pezza */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function aggiungiPezza() {
|
||||
l_codicePezza = $("#codicePezza").val();
|
||||
l_mt = Ab.toDouble($("#mtPezza").val());
|
||||
l_numColpi = Ab.toDouble($("#numColpi").val());
|
||||
|
||||
//alert(l_mt+" "+l_numColpi);
|
||||
if (l_mt == 0 && l_numColpi == 0) {
|
||||
|
||||
sweetAlert("Errore!", "Inserire Metri o Numero di colpi");
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (Ab.validateForm('codicePancale', 'Pancale ', 'R', 'codicePezza', 'Codice Pezza', 'R')) {
|
||||
|
||||
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
$("#cmd").val("aggiungiPezza");
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* aggiungi pezza passo passo */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function aggiungiPezzaStep(step) {
|
||||
//l_mt = Ab.toDouble($("#mtPezza").val());
|
||||
|
||||
if (step == 2) {
|
||||
l_codicePezza = $("#codicePezza").val();
|
||||
//alert(l_mt+" "+l_numColpi);
|
||||
if (l_codicePezza == "") {
|
||||
|
||||
sweetAlert("Errore!", "Inserire Codice Pezza");
|
||||
|
||||
} else {
|
||||
//inserisco numero pezza
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
//alert(f.actionPage.value);
|
||||
$("#cmd").val("step1");
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
|
||||
}
|
||||
} else if (step == 3) {
|
||||
l_mt = Ab.toDouble($("#mtPezza").val());
|
||||
l_numColpi = Ab.toDouble($("#numColpi").val());
|
||||
if (l_mt == 0 && l_numColpi == 0) {
|
||||
|
||||
sweetAlert("Errore!", "Inserire Metri o Numero di colpi");
|
||||
|
||||
} else {
|
||||
//inserisco numero pezza
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
//alert(f.actionPage.value);
|
||||
$("#cmd").val("step2");
|
||||
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* aggiungi pezza ultimo passo */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function aggiungiPezzaUltimoPasso(l_codicePancale) {
|
||||
$("#codicePancale").val(l_codicePancale);
|
||||
l_codicePezza = $("#codicePezza").val();
|
||||
l_mt = Ab.toDouble($("#mtPezza").val());
|
||||
l_numColpi = Ab.toDouble($("#numColpi").val());
|
||||
Swal.fire({
|
||||
title: "Registrazione pezza",
|
||||
text: "Verra' registrata la pezza " + l_codicePezza + " per mt. " + l_mt + " e colpi " + l_numColpi + "sul pancale N. " + l_codicePancale + ". Sei Sicuro?",
|
||||
icon: "warning",
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: `Si`,
|
||||
denyButtonText: `No`,
|
||||
cancelButtonText: `Annulla`,
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
//alert(f.actionPage.value);
|
||||
$("#cmd").val("step3");
|
||||
|
||||
Ab.submitAj('main');
|
||||
////////////////////////////////////////////////////////////////////
|
||||
} else if (result.isDenied) {
|
||||
//Swal.fire('Changes are not saved', '', 'info')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* pdf documento..... */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function stampaDocumentoCli(id) {
|
||||
//XXXswal(id);
|
||||
|
||||
if (id != 0) {
|
||||
var f = document.main; {
|
||||
var debug = false;
|
||||
var wwD = "700";
|
||||
var whD = "500";
|
||||
//+"&xxx="+f.xxx.value
|
||||
theAction = f.actionPage.value + ".pdf?cmd=printDoc&id_documento=" + id;
|
||||
//
|
||||
//var numLabels=prompt("Numero di etichette da stampare","1");
|
||||
if (debug == false) {
|
||||
window.open(theAction, "Stampa_Fattura", "width=" + wwD + ",height=" + whD + ",status=no,resizable=yes,top=100,left=100,scrollbars=yes");
|
||||
} else {
|
||||
window.open(theAction);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* pdf documento..... */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function reportAP() {
|
||||
|
||||
if (Ab.validateForm('dataDocumentoDa', 'Data Disposizione Da ', 'R', 'dataDocumentoA', 'Data Disposizione A', 'R')) {
|
||||
|
||||
report();
|
||||
|
||||
}
|
||||
}
|
||||
383
www/admin/lav/_js/tex-lavTessitura.js
Normal file
383
www/admin/lav/_js/tex-lavTessitura.js
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
|
||||
///////////////////////////////////////////
|
||||
////////T O O L B A R /////////////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////7
|
||||
function checkFields()
|
||||
/////////////////////////////////////////////7
|
||||
{
|
||||
//R per required
|
||||
//isNum per numerico
|
||||
//isNumKey è una chiave.. uguale a isNum>0 ma cambio il messaggio
|
||||
//isNum>x per numerico maggiore di x
|
||||
//isNum<x per numerico minore di x
|
||||
//isEmail per indirizzo email
|
||||
//inRange1:10 per ..
|
||||
//3 stringhe
|
||||
//1: nome del field
|
||||
//2: se '' visualizza il nome del field, altrimenti questo campo
|
||||
//3: R/N+''/isNum/isEmail/inRangea:b
|
||||
return Ab.validateForm('descrizione','Descrizione','R','id_tipo','Tipo','RisNumKey','id_iva','Iva','RisNumKey');
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////7
|
||||
function checkSearchFields()
|
||||
/////////////////////////////////////////////7
|
||||
{
|
||||
if(document.main.crNS==1)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
//return Ab.validateForm('descrizione','Descrizione','R','numero','Numero','RisNum>0','eMail','','NisEmail');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function checkBoxes()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
//Ab.setChekBoxValue("dettaglio","flgSommaCRL","1","0");
|
||||
|
||||
}
|
||||
|
||||
function checkRadio()
|
||||
{
|
||||
//Ab.setRadioButtonValue("dettaglio","flgPlaAntPos");
|
||||
}
|
||||
|
||||
function checkBoxesCR()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
//Ab.setChekBoxValue("ricerca","flgSommaCRL","1","0");
|
||||
}
|
||||
|
||||
function checkRadioCR()
|
||||
{
|
||||
//Ab.setRadioButtonValue("ricerca","flgPlaAntPos");
|
||||
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
function addRow()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
if (Ab.validateForm('id_componente','Componente','R'))
|
||||
{
|
||||
f.cmd.value="addComponente";
|
||||
f.act.value="";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
function delRow(l_id)
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
if (Ab.confirmDelete())
|
||||
{
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value="delComponente";
|
||||
f.act.value="";
|
||||
f.id_articoloFilatoComponente.value=l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
function addColore()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
if (Ab.validateForm('id_coloreFilato','Colore','R'))
|
||||
{
|
||||
f.cmd.value="addColore";
|
||||
f.act.value="";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
function delColore(l_id)
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
if (Ab.confirmDelete())
|
||||
{
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value="delColore";
|
||||
f.act.value="";
|
||||
f.id_articoloFilatoColore.value=l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* DETTAGLIO ARTICOLO VARIANTI da CR */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function dettaglioArticoliFilatiCR(l_id) {
|
||||
/*
|
||||
var f = document.main;
|
||||
theAction=webApp+"/admin/art/Articolo.abl?cmd=viewM&id_articolo="+l_id;
|
||||
wArticolo=window.open(theAction, "Lista_Varianti","width=810,height=600,status=yes,resizable=yes,top=100,left=100,scrollbars=yes");
|
||||
wArticolo.focus();
|
||||
*/
|
||||
|
||||
$(".mov-body").load("../filato/ArticoloFilatoColore.abl?cmd=dettaglioDisponibilita&id_articoloFilato="+l_id);
|
||||
|
||||
$("#modalMov").modal("show");
|
||||
|
||||
|
||||
}
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* DETTAGLIO ARTICOLO VARIANTI da dettaglio filato */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function dettaglioArticoliFilatiColoreCR(l_id) {
|
||||
/*
|
||||
var f = document.main;
|
||||
theAction=webApp+"/admin/art/Articolo.abl?cmd=viewM&id_articolo="+l_id;
|
||||
wArticolo=window.open(theAction, "Lista_Varianti","width=810,height=600,status=yes,resizable=yes,top=100,left=100,scrollbars=yes");
|
||||
wArticolo.focus();
|
||||
*/
|
||||
|
||||
$(".mov-body").load("../filato/ArticoloFilatoColore.abl?cmd=dettaglioDisponibilita&id_articoloFilatoColore="+l_id);
|
||||
|
||||
$("#modalMov").modal("show");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* toggle dettaglio popup articolo filato */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
|
||||
function toggleDetail()
|
||||
{
|
||||
if($("#detail").hasClass("out")) {
|
||||
$("#detail").addClass("in");
|
||||
$("#detail").removeClass("out");
|
||||
} else {
|
||||
$("#detail").addClass("out");
|
||||
$("#detail").removeClass("in");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando IMPOSTA TELAIO */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function impostaTelaioPopup(l_id_rigaBolla) {
|
||||
$("#id_rigaDocumento").val(l_id_rigaBolla);
|
||||
$("#impostaTelaio").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("id_telaioR");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function impostaTelaio() {
|
||||
|
||||
var f = document.main;
|
||||
|
||||
$("#impostaTelaio").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action=f.actionPage.value;
|
||||
f.cmd.value="impostaTelaio";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando IMPOSTA colpi iniziali */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function impostaColpiInizialiPopup(l_id_rigaBolla) {
|
||||
$("#id_rigaDocumento").val(l_id_rigaBolla);
|
||||
$("#impostaColpiIniziali").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("colpiInizialiR");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
function impostaColpiIniziali() {
|
||||
|
||||
var f = document.main;
|
||||
|
||||
$("#impostaColpiIniziali").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action=f.actionPage.value;
|
||||
f.cmd.value="impostaColpiIniziali";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando IMPOSTA colpi FINALI */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function impostaColpiFinaliPopup(l_id_rigaBolla) {
|
||||
$("#id_rigaDocumento").val(l_id_rigaBolla);
|
||||
$("#impostaColpiFinali").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("colpiFinaliR");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function impostaColpiFinali() {
|
||||
|
||||
var f = document.main;
|
||||
|
||||
$("#impostaColpiFinali").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action=f.actionPage.value;
|
||||
f.cmd.value="impostaColpiFinali";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando AGGIUNGI PEZZA */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function aggiungiPezzaPopup(l_id_rigaBolla) {
|
||||
$("#id_rigaDocumento").val(l_id_rigaBolla);
|
||||
$("#aggiungiPezza").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("codicePezza");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function aggiungiPezza() {
|
||||
|
||||
var f = document.main;
|
||||
|
||||
$("#aggiungiPezza").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action=f.actionPage.value;
|
||||
f.cmd.value="aggiungiPezza";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function scan(field){
|
||||
|
||||
Android.scanBarcode(field);
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function mostraDocumento(l_id){
|
||||
|
||||
var f = document.main;
|
||||
f.action="../contab/Documento.abl";
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value="md";
|
||||
f.act.value="";
|
||||
f.id_documento.value=l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* MOSTRA DETTAGLIO PEZZE su popup */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function mostraPezze(l_id) {
|
||||
|
||||
|
||||
$(".pezze-body").load("../lav/LavTessitura.abl?cmd=dettaglioPezze&id_rigaDocumento=" + l_id );
|
||||
|
||||
|
||||
$("#modalPezze").modal("show");
|
||||
|
||||
/*
|
||||
$( "#dettaglioWin" ).dialog("option", "title", "Dettaglio Articolo Varianti");
|
||||
$("#dettaglioWin").load("Articolo.abl?cmd=viewM&id_articolo="+l_id);
|
||||
$("#dettaglioWin").dialog("open");
|
||||
*/
|
||||
}
|
||||
499
www/admin/lav/_js/tex-lavTessituraStart.js
Normal file
499
www/admin/lav/_js/tex-lavTessituraStart.js
Normal file
|
|
@ -0,0 +1,499 @@
|
|||
///////////////////////////////////////////
|
||||
////////T O O L B A R /////////////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////7
|
||||
function checkFields()
|
||||
/////////////////////////////////////////////7
|
||||
{
|
||||
//R per required
|
||||
//isNum per numerico
|
||||
//isNumKey è una chiave.. uguale a isNum>0 ma cambio il messaggio
|
||||
//isNum>x per numerico maggiore di x
|
||||
//isNum<x per numerico minore di x
|
||||
//isEmail per indirizzo email
|
||||
//inRange1:10 per ..
|
||||
//3 stringhe
|
||||
//1: nome del field
|
||||
//2: se '' visualizza il nome del field, altrimenti questo campo
|
||||
//3: R/N+''/isNum/isEmail/inRangea:b
|
||||
return Ab.validateForm('descrizione', 'Descrizione', 'R', 'id_tipo', 'Tipo', 'RisNumKey', 'id_iva', 'Iva', 'RisNumKey');
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////7
|
||||
function checkSearchFields()
|
||||
/////////////////////////////////////////////7
|
||||
{
|
||||
if (document.main.crNS == 1)
|
||||
return false;
|
||||
else {
|
||||
//return Ab.validateForm('descrizione','Descrizione','R','numero','Numero','RisNum>0','eMail','','NisEmail');
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function checkBoxes()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
//Ab.setChekBoxValue("dettaglio","flgSommaCRL","1","0");
|
||||
|
||||
}
|
||||
|
||||
function checkRadio() {
|
||||
//Ab.setRadioButtonValue("dettaglio","flgPlaAntPos");
|
||||
}
|
||||
|
||||
function checkBoxesCR()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
//Ab.setChekBoxValue("ricerca","flgSommaCRL","1","0");
|
||||
}
|
||||
|
||||
function checkRadioCR() {
|
||||
//Ab.setRadioButtonValue("ricerca","flgPlaAntPos");
|
||||
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
function addRow()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
if (Ab.validateForm('id_componente', 'Componente', 'R')) {
|
||||
f.cmd.value = "addComponente";
|
||||
f.act.value = "";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
function delRow(l_id)
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
if (Ab.confirmDelete()) {
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value = "delComponente";
|
||||
f.act.value = "";
|
||||
f.id_articoloFilatoComponente.value = l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
function addColore()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
if (Ab.validateForm('id_coloreFilato', 'Colore', 'R')) {
|
||||
f.cmd.value = "addColore";
|
||||
f.act.value = "";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
function delColore(l_id)
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
if (Ab.confirmDelete()) {
|
||||
var f = document.main;
|
||||
f.action = f.actionPage.value;
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value = "delColore";
|
||||
f.act.value = "";
|
||||
f.id_articoloFilatoColore.value = l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* DETTAGLIO ARTICOLO VARIANTI da CR */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function dettaglioArticoliFilatiCR(l_id) {
|
||||
/*
|
||||
var f = document.main;
|
||||
theAction=webApp+"/admin/art/Articolo.abl?cmd=viewM&id_articolo="+l_id;
|
||||
wArticolo=window.open(theAction, "Lista_Varianti","width=810,height=600,status=yes,resizable=yes,top=100,left=100,scrollbars=yes");
|
||||
wArticolo.focus();
|
||||
*/
|
||||
|
||||
$(".mov-body").load("../filato/ArticoloFilatoColore.abl?cmd=dettaglioDisponibilita&id_articoloFilato=" + l_id);
|
||||
|
||||
$("#modalMov").modal("show");
|
||||
|
||||
|
||||
}
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* DETTAGLIO ARTICOLO VARIANTI da dettaglio filato */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function dettaglioArticoliFilatiColoreCR(l_id) {
|
||||
/*
|
||||
var f = document.main;
|
||||
theAction=webApp+"/admin/art/Articolo.abl?cmd=viewM&id_articolo="+l_id;
|
||||
wArticolo=window.open(theAction, "Lista_Varianti","width=810,height=600,status=yes,resizable=yes,top=100,left=100,scrollbars=yes");
|
||||
wArticolo.focus();
|
||||
*/
|
||||
|
||||
$(".mov-body").load("../filato/ArticoloFilatoColore.abl?cmd=dettaglioDisponibilita&id_articoloFilatoColore=" + l_id);
|
||||
|
||||
$("#modalMov").modal("show");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* toggle dettaglio popup articolo filato */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
|
||||
function toggleDetail() {
|
||||
if ($("#detail").hasClass("out")) {
|
||||
$("#detail").addClass("in");
|
||||
$("#detail").removeClass("out");
|
||||
} else {
|
||||
$("#detail").addClass("out");
|
||||
$("#detail").removeClass("in");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando IMPOSTA TELAIO */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function impostaTelaioPopup(l_id) {
|
||||
$("#id_documento").val(l_id);
|
||||
$("#impostaTelaio").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("id_telaioR");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
function impostaColpiInizialiPopup(l_id) {
|
||||
impostaTelaioPopup(l_id);
|
||||
}
|
||||
|
||||
function impostaTelaio() {
|
||||
|
||||
var f = document.main;
|
||||
if (Ab.validateForm('id_telaioR', 'Telaio', 'RisNumKey', 'colpoInizialeR', 'Colpi Iniziali', 'RisNum>0')) {
|
||||
|
||||
|
||||
$("#impostaTelaio").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action = f.actionPage.value;
|
||||
f.cmd.value = "impostaTelaio";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando IMPOSTA colpi FINALI */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function impostaColpiFinaliPopup(l_id, colpiIniziali) {
|
||||
$("#id_documento").val(l_id);
|
||||
$("#colpiInizialiShow").html(colpiIniziali);
|
||||
$("#impostaColpiFinali").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("colpiFinaliR");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function impostaColpiFinali() {
|
||||
|
||||
var f = document.main;
|
||||
if (Ab.validateForm('colpoFinaleR', 'Colpi Finali', 'RisNum')) {
|
||||
|
||||
|
||||
$("#impostaColpiFinali").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action = f.actionPage.value;
|
||||
f.cmd.value = "impostaColpiFinali";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* popup e comando AGGIUNGI PEZZA */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function aggiungiPezzaPopup(l_id_rigaBolla) {
|
||||
$("#id_rigaDocumento").val(l_id_rigaBolla);
|
||||
$("#aggiungiPezza").modal("show");
|
||||
setTimeout(function () {
|
||||
{
|
||||
Ab.setFocus("codicePezza");
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function aggiungiPezza() {
|
||||
|
||||
var f = document.main;
|
||||
|
||||
$("#aggiungiPezza").modal("hide");
|
||||
setTimeout(function () {
|
||||
{
|
||||
f.action = f.actionPage.value;
|
||||
f.cmd.value = "aggiungiPezza";
|
||||
//f.act.value="view";
|
||||
|
||||
Ab.submitAj('main');
|
||||
|
||||
}
|
||||
|
||||
}, 500);
|
||||
|
||||
}
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function scan(field) {
|
||||
|
||||
Android.scanBarcode(field);
|
||||
}
|
||||
|
||||
|
||||
/************************************/
|
||||
/************************************/
|
||||
/* chiama scanner barcode da webview android */
|
||||
/************************************/
|
||||
/************************************/
|
||||
function mostraDocumento(l_id) {
|
||||
|
||||
var f = document.main;
|
||||
f.action = "../contab/Documento.abl";
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value = "md";
|
||||
f.act.value = "";
|
||||
f.id_documento.value = l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* MOSTRA DETTAGLIO PEZZE su popup */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function mostraPezze(l_id) {
|
||||
|
||||
|
||||
$(".pezze-body").load("../lav/LavTessitura.abl?cmd=dettaglioPezze&id_documento=" + l_id);
|
||||
|
||||
|
||||
$("#modalPezze").modal("show");
|
||||
|
||||
/*
|
||||
$( "#dettaglioWin" ).dialog("option", "title", "Dettaglio Articolo Varianti");
|
||||
$("#dettaglioWin").load("Articolo.abl?cmd=viewM&id_articolo="+l_id);
|
||||
$("#dettaglioWin").dialog("open");
|
||||
*/
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* TROVA COLPI INIZIALI */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function trovaColpiIniziali() {
|
||||
|
||||
var id_telaio = $("#id_telaioR").val(),
|
||||
actionPage = $("#actionPage").val();
|
||||
|
||||
|
||||
if (id_telaio == 0) {
|
||||
//alert('pio');
|
||||
} else {
|
||||
//alert("cmd=caricaColoreFilato&id_articoloFilato=" + id_articoloFilato);
|
||||
Ab.fetch4(actionPage, "cmd=trovaColpiIniziali&id_telaio=" + id_telaio, null, "postTrovaColpiIniziali()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function postTrovaColpiIniziali(response) {
|
||||
//in response ho il risultato di _fetchCombFilatoColore.jsp
|
||||
|
||||
$("#colpoInizialeR").val(response);
|
||||
Ab.setFocus("colpoInizialeR");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* COMANDI SULLE RIGHE PER AGGIRNARE I VARI CAMPI*/
|
||||
/* PARAMETRI: nomeCampo, id*/
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
|
||||
function updateLTSField(campo, id) {
|
||||
|
||||
var f = document.main;
|
||||
var actionPage = f.actionPage.value,
|
||||
value = $("#" + campo + "_" + id).val();
|
||||
|
||||
//alert(campo+" "+id+" "+tab+" "+value);
|
||||
//basta la fetch
|
||||
|
||||
//alert("cmd=updateTdField&act=" + campo+"&id_tableDesc="+id+"&value="+value);
|
||||
if (true) {
|
||||
f.action = actionPage;
|
||||
f.cmd.value = "updateLTSField";
|
||||
f.act.value = "refresh";
|
||||
f.fieldName.value = campo;
|
||||
f.id_rigaDocumento.value = id;
|
||||
f.value.value = value;
|
||||
Ab.submitAj("main");
|
||||
} else {
|
||||
|
||||
|
||||
Ab.fetch4(actionPage, "cmd=updateLTSField&fieldName=" + campo + "&id_rigaDocumento=" + id + "&value=" + value, null, postUpdateLTSField);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function postUpdateLTSField(response) {
|
||||
if (response && response.trim() != "") {
|
||||
var messaggio = response;
|
||||
$('#messaggi').html(messaggio);
|
||||
|
||||
if ($('#messaggi').length > 0 && $('#messaggi').html().length > 0) {
|
||||
Ab.showMessage($('#messaggi').html());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* riapri riga */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function riapriRiga(id) {
|
||||
Swal.fire({
|
||||
title: "Riapri Riga",
|
||||
text: "Verranno azzerati i colpi finali. Sei Sicuro?",
|
||||
icon: "warning",
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: `Si`,
|
||||
denyButtonText: `No`,
|
||||
cancelButtonText: `Annulla`,
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
$("#main").attr("action", $("#actionPage").val());
|
||||
$("#flgReport").val("S");
|
||||
$("#cmd", "#main").val("updateLTSField");
|
||||
$("#act", "#main").val("refresh");
|
||||
$("#fieldName").val("colpoFinaleRiga");
|
||||
$("#value").val("0");
|
||||
$("#id_rigaDocumento").val(id);
|
||||
Ab.submitAj('main');
|
||||
////////////////////////////////////////////////////////////////////
|
||||
} else if (result.isDenied) {
|
||||
//Swal.fire('Changes are not saved', '', 'info')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* imposta i colpi iniziali sulla riga corrente */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function setColpiIniziali(id) {
|
||||
$("#colpoInizialeRiga_" + id).val(0);
|
||||
|
||||
updateLTSField('colpoInizialeRiga', id)
|
||||
}
|
||||
|
||||
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
/* annulla in lavorazione e ritprnda da pianificare */
|
||||
/***********************************************/
|
||||
/***********************************************/
|
||||
function annullaStatoLavorazione(id) {
|
||||
Swal.fire({
|
||||
title: "Annulla Lavorazione",
|
||||
text: "Verra' riportata la riga nello stato da pianificare. Sei Sicuro?",
|
||||
icon: "warning",
|
||||
showDenyButton: true,
|
||||
showCancelButton: false,
|
||||
confirmButtonText: `Si`,
|
||||
denyButtonText: `No`,
|
||||
cancelButtonText: `Annulla`,
|
||||
}).then((result) => {
|
||||
/* Read more about isConfirmed, isDenied below */
|
||||
if (result.isConfirmed) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
$("#main").attr("action", $("#actionPage").val());
|
||||
$("#flgReport").val("S");
|
||||
$("#cmd", "#main").val("annullaStatoLavorazione");
|
||||
$("#id_rigaDocumento").val(id);
|
||||
Ab.submitAj('main');
|
||||
////////////////////////////////////////////////////////////////////
|
||||
} else if (result.isDenied) {
|
||||
//Swal.fire('Changes are not saved', '', 'info')
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue