First commit
This commit is contained in:
parent
cf97b64877
commit
cc69770608
1468 changed files with 265316 additions and 128 deletions
179
www/admin/tessutoConfig/_js/tex-baseTessuto.js
Normal file
179
www/admin/tessutoConfig/_js/tex-baseTessuto.js
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
// pkg_tipoPagamento
|
||||
|
||||
///////////////////////////////////////////
|
||||
////////T O O L B A R /////////////////////
|
||||
///////////////////////////////////////////
|
||||
|
||||
function report()
|
||||
{
|
||||
//FACCIO IL SUBMIT
|
||||
var f = document.main;
|
||||
f.flgReport.value="S";
|
||||
//f.action=webApp+"/tr/Pratica.abl";
|
||||
f.cmd.value="search";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////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('id_datiTecniciTessuto','Articolo / serie','R');
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////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 settaColore()
|
||||
{
|
||||
var id_datiTecniciTessuto = $("#id_datiTecniciTessuto").val(),
|
||||
id_fondo = $("#id_fondo").val(),
|
||||
flgTintoFiloPezza = $("#flgTintoFiloPezza").val(),
|
||||
fondoContainer = $("#fondoContainer"),
|
||||
coloreContainer = $("#coloreContainer");
|
||||
|
||||
if (id_datiTecniciTessuto > 0)
|
||||
{
|
||||
if (flgTintoFiloPezza == 1)
|
||||
{
|
||||
fondoContainer.removeClass("hide");
|
||||
coloreContainer.addClass("hide");
|
||||
|
||||
if (id_fondo == 0)
|
||||
{
|
||||
Ab.fetch4($("#actionPage").val(), "cmd=getFondi&id_datiTecniciTessuto=" + id_datiTecniciTessuto, null, "postCaricaFondi()");
|
||||
}
|
||||
|
||||
$("#id_fondo").focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
fondoContainer.addClass("hide");
|
||||
coloreContainer.removeClass("hide");
|
||||
$("#colore").focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// fetch che carica i fondi dell'articolo/serie selezionato
|
||||
////////////////////////////////////
|
||||
function postCaricaFondi(response)
|
||||
{
|
||||
if (response && response.trim() != "")
|
||||
{
|
||||
var fondi = JSON.parse(response),
|
||||
opt = "";
|
||||
|
||||
// compilo la select dei listini
|
||||
for (var i = 0, len = fondi.length; i < len; i++)
|
||||
{
|
||||
if (i == 0) {
|
||||
opt += "<option value='" + fondi[i].id_fondo + "' selected>" + fondi[i].descrizione + "</option>";
|
||||
} else {
|
||||
opt += "<option value='" + fondi[i].id_fondo + "'>" + fondi[i].descrizione + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#id_fondo").html(opt);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////
|
||||
function addRow()
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
if (Ab.validateForm('id_articoloFilato','Filato','RisNum>0','id_coloreFilato','Colore','RisNum>0','grPerMetro','Gr/mt','RisNum>0'))
|
||||
{
|
||||
f.cmd.value="addFilato";
|
||||
f.act.value="";
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
}
|
||||
|
||||
function modRow(l_id)
|
||||
/////////////////////////////////////////////
|
||||
{
|
||||
var f = document.main;
|
||||
f.action=f.actionPage.value;
|
||||
// FACCIO IL SUBMIT
|
||||
f.cmd.value="modFilato";
|
||||
f.act.value="";
|
||||
f.id_baseTessutoFilato.value=l_id;
|
||||
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="delFilato";
|
||||
f.act.value="";
|
||||
f.id_baseTessutoFilato.value=l_id;
|
||||
Ab.submitAj('main');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function documentReadyScript()
|
||||
{
|
||||
settaColore();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue