Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
1168 righe
43 KiB
1168 righe
43 KiB
//$(document).ready(function () { |
|
// $('#vi_c_Iban').bind("cut copy", function (e) { |
|
// e.preventDefault(); |
|
// console.log('operazione non consentita'); |
|
// }); |
|
// $("#vi_c_Iban").on("input", function () { |
|
// $("#ripeti_iban").val(""); |
|
// }); |
|
//// 43.32.10 |
|
// |
|
// $("#493210_INTESTATARIO_NATO_A").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// dropdownParent: $('#modal493210'), |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// $("#493210_INTESTATARIO_COMUNE").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// dropdownParent: $('#modal493210'), |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// |
|
// $('#493210_INTESTATARIO_COMUNE').on('select2:select', function (e) { |
|
// var data = e.params.data; |
|
// if (data) { |
|
// $("#493210_INTESTATARIO_PROV").val(data.codice_provincia); |
|
// // verificaCfDirigente(); |
|
// } else { |
|
// functionSwall('error', "Selezionare un Comune presente nella lista sottostante!", 'error'); |
|
// $("#493210_INTESTATARIO_COMUNE").val(""); |
|
// } |
|
// }); |
|
// |
|
//// $("#493210_INTESTATARIO_NATO_A").autocomplete({ |
|
//// source: WS_CALL + "?module=domanda&action=searchComune", |
|
//// minLength: 2, |
|
//// appendTo: "#modal493210", |
|
//// change: function (event, ui) { |
|
//// try { |
|
//// $("#493210_INTESTATARIO_NATO_A").val(ui.item.label); |
|
//// } catch (er) { |
|
//// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
//// $("#493210_INTESTATARIO_NATO_A").val(""); |
|
//// } |
|
//// |
|
//// } |
|
//// }); |
|
//// |
|
//// |
|
//// $("#493210_INTESTATARIO_COMUNE").autocomplete({ |
|
//// source: WS_CALL + "?module=domanda&action=searchComune", |
|
//// minLength: 2, |
|
//// appendTo: "#modal493210", |
|
//// change: function (event, ui) { |
|
//// try { |
|
//// $("#493210_INTESTATARIO_COMUNE").val(ui.item.label); |
|
//// $("#493210_INTESTATARIO_PROV").val(ui.item.codice_provincia); |
|
//// } catch (er) { |
|
//// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
//// $("#493210_INTESTATARIO_COMUNE").val(""); |
|
//// $("#493210_INTESTATARIO_PROV").val(""); |
|
//// } |
|
//// |
|
//// } |
|
//// }); |
|
//// 43.32.20 |
|
// $("#493220_INTESTATARIO_NATO_A").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// dropdownParent: $('#mezziModal493220'), |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// $("#493220_INTESTATARIO_COMUNE").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// dropdownParent: $('#mezziModal493220'), |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// |
|
// $('#493220_INTESTATARIO_COMUNE').on('select2:select', function (e) { |
|
// var data = e.params.data; |
|
// if (data) { |
|
// $("#493220_INTESTATARIO_PROV").val(data.codice_provincia); |
|
// // verificaCfDirigente(); |
|
// } else { |
|
// functionSwall('error', "Selezionare un Comune presente nella lista sottostante!", 'error'); |
|
// $("#493220_INTESTATARIO_COMUNE").val(""); |
|
// } |
|
// }); |
|
// |
|
// |
|
//// $("#493220_INTESTATARIO_NATO_A").autocomplete({ |
|
//// source: WS_CALL + "?module=domanda&action=searchComune", |
|
//// minLength: 2, |
|
//// appendTo: "#mezziModal493220", |
|
//// change: function (event, ui) { |
|
//// try { |
|
//// $("#493220_INTESTATARIO_NATO_A").val(ui.item.label); |
|
//// } catch (er) { |
|
//// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
//// $("#493220_INTESTATARIO_NATO_A").val(""); |
|
//// } |
|
//// |
|
//// } |
|
//// }); |
|
//// $("#493220_INTESTATARIO_COMUNE").autocomplete({ |
|
//// source: WS_CALL + "?module=domanda&action=searchComune", |
|
//// minLength: 2, |
|
//// appendTo: "#mezziModal493220", |
|
//// change: function (event, ui) { |
|
//// try { |
|
//// $("#493220_INTESTATARIO_COMUNE").val(ui.item.label); |
|
//// $("#493220_INTESTATARIO_PROV").val(ui.item.codice_provincia); |
|
//// } catch (er) { |
|
//// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
//// $("#493220_INTESTATARIO_COMUNE").val(""); |
|
//// $("#493220_INTESTATARIO_PROV").val(""); |
|
//// } |
|
//// |
|
//// } |
|
//// }); |
|
// |
|
// |
|
// |
|
// |
|
// |
|
// |
|
// $('#natanteModal').on('hidden.bs.modal', function (e) { |
|
// resetFormModal('form-dettaglio-501000'); |
|
// }); |
|
// $('#mezziModal').on('hidden.bs.modal', function (e) { |
|
// resetFormModal('form-dettaglio-493909'); |
|
// }); |
|
// |
|
// $('.nav-tabs a').on('click', function (e) { |
|
// console.log(this); |
|
// e.preventDefault(); |
|
// $(this).tab('show'); |
|
// }); |
|
// |
|
// if (tabActive) { |
|
// $('#myTab a[href="#' + tabActive + '"]').tab('show'); |
|
// } |
|
// |
|
// $("#comune_nascita").autocomplete({ |
|
// source: WS_CALL + "?module=domanda&action=searchComune", |
|
// minLength: 2, |
|
// change: function (event, ui) { |
|
// try { |
|
// $("#comune_nascita").val(ui.item.label); |
|
// $("#prov_nascita").val(ui.item.codice_provincia); |
|
// $("#cap_nascita").val(ui.item.cap); |
|
// } catch (er) { |
|
//// console.log(ui); |
|
// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
// $("#luogo_nascita").val(""); |
|
// } |
|
// |
|
// } |
|
// }); |
|
// $("#comune_residenza").autocomplete({ |
|
// source: WS_CALL + "?module=domanda&action=searchComune", |
|
// minLength: 2, |
|
// change: function (event, ui) { |
|
// try { |
|
// $("#comune_residenza").val(ui.item.label); |
|
// $("#prov_residenza").val(ui.item.codice_provincia); |
|
// $("#cap_residenza").val(ui.item.cap); |
|
// } catch (er) { |
|
//// console.log(ui); |
|
// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
// $("#comune_residenza").val(""); |
|
// } |
|
// |
|
// } |
|
// }); |
|
// $("#comune_legale").autocomplete({ |
|
// source: WS_CALL + "?module=domanda&action=searchComune", |
|
// minLength: 2, |
|
// change: function (event, ui) { |
|
// try { |
|
// $("#comune_legale").val(ui.item.label); |
|
// $("#prov_legale").val(ui.item.codice_provincia); |
|
// $("#cap_legale").val(ui.item.cap); |
|
// } catch (er) { |
|
//// console.log(ui); |
|
// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
// $("#comune_legale").val(""); |
|
// } |
|
// |
|
// } |
|
// }); |
|
// |
|
// $("#comune_operativa").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// |
|
// $('#comune_operativa').on('select2:select', function (e) { |
|
// var data = e.params.data; |
|
// if (data) { |
|
// $("#prov_operativa").val(data.codice_provincia); |
|
// $("#cap_operativa").val(data.cap); |
|
// // verificaCfDirigente(); |
|
// } else { |
|
// functionSwall('error', "Selezionare un Comune presente nella lista sottostante!", 'error'); |
|
// $("#comune_operativa").val(""); |
|
// } |
|
// }); |
|
// |
|
// /*$("#comune_operativa").autocomplete({ |
|
// source: WS_CALL + "?module=domanda&action=searchComune", |
|
// minLength: 2, |
|
// change: function (event, ui) { |
|
// try { |
|
// $("#comune_operativa").val(ui.item.label); |
|
// $("#prov_operativa").val(ui.item.codice_provincia); |
|
// $("#cap_operativa").val(ui.item.cap); |
|
// } catch (er) { |
|
// // console.log(ui); |
|
// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
// $("#comune_operativo").val(""); |
|
// } |
|
// |
|
// } |
|
// });*/ |
|
// |
|
// $("#tx_RILASCIO_COMUNE_ENTE").select2({ |
|
// language: "it", |
|
// minimumInputLength: 3, |
|
// ajax: { |
|
// url: WS_CALL + "?module=account&action=searchComune", |
|
// type: "post", |
|
// dataType: 'json', |
|
// delay: 250, |
|
// data: function (params) { |
|
// return { |
|
// searchTerm: params.term // search term |
|
// }; |
|
// }, |
|
// processResults: function (response) { |
|
// return { |
|
// results: response |
|
// }; |
|
// }, |
|
// cache: true |
|
// } |
|
// }); |
|
// |
|
// $('#tx_RILASCIO_COMUNE_ENTE').on('select2:select', function (e) { |
|
// var data = e.params.data; |
|
// if (data) { |
|
// $("#tx_RILASCIO_PROVINCIA").val(data.codice_provincia); |
|
// // verificaCfDirigente(); |
|
// } else { |
|
// functionSwall('error', "Selezionare un Comune presente nella lista sottostante!", 'error'); |
|
// $("#tx_RILASCIO_COMUNE_ENTE").val(""); |
|
// } |
|
// }); |
|
// |
|
//// $("#tx_RILASCIO_COMUNE_ENTE").autocomplete({ |
|
//// source: WS_CALL + "?module=domanda&action=searchComune", |
|
//// minLength: 2, |
|
//// change: function (event, ui) { |
|
//// try { |
|
//// $("#tx_RILASCIO_COMUNE_ENTE").val(ui.item.label); |
|
//// $("#tx_RILASCIO_PROVINCIA").val(ui.item.codice_provincia); |
|
//// } catch (er) { |
|
////// console.log(ui); |
|
//// functionSwall('error', "Inserire un Comune presente nella lista sottostante!", 'error'); |
|
//// $("#tx_RILASCIO_COMUNE_ENTE").val(""); |
|
//// $("#tx_RILASCIO_PROVINCIA").val(""); |
|
//// } |
|
//// |
|
//// } |
|
//// }); |
|
// if (id_domanda > 0) { |
|
// listAllegati(); |
|
// } |
|
// |
|
//}); |
|
//function resetForm(valore) { |
|
// $("#493220_INTESTATARIO_NATO_A").val('').trigger('change'); |
|
// $("#493220_INTESTATARIO_COMUNE").val('').trigger('change'); |
|
// $("#493210_INTESTATARIO_NATO_A").val('').trigger('change'); |
|
// $("#493210_INTESTATARIO_COMUNE").val('').trigger('change'); |
|
// document.getElementById(valore).reset(); |
|
// |
|
//} |
|
//function selezionaAzienda() { |
|
// |
|
// if ($("#startIP").val() != "") { |
|
// var object = { |
|
// cf: $("#startIP").val(), |
|
// ateco: ateco, |
|
// tipo_istanza: tipo_istanza, |
|
// module: 'info_camere', |
|
// action: 'loadVisuraImpresa' |
|
// } |
|
// $('#loader').show(); |
|
// var txtMsg = document.createElement('h3'); |
|
// txtMsg.setAttribute('class', 'text-white'); |
|
// txtMsg.append("Ti preghiamo di attendere... Stiamo effettuando il collegamento al servizio del Registro delle imprese per recuperare tutte le informazioni relative alla tua azienda."); |
|
// $("#msg_spinner").append(txtMsg); |
|
// postdataClassic(WS_CALL, object, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// |
|
// if (risp.esito > 0) { |
|
// if (risp.denominazione == "") { |
|
// $("#form-domanda input[name='RAGIONE_SOCIALE']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='RAGIONE_SOCIALE']").attr("readonly", true); |
|
// $("#form-domanda input[name='RAGIONE_SOCIALE']").val(risp.denominazione); |
|
// } |
|
// if (risp.forma_giuridica == "") { |
|
// $("#form-domanda input[name='FORMA_GIURIDICA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='FORMA_GIURIDICA']").attr("readonly", true); |
|
// $("#form-domanda input[name='FORMA_GIURIDICA']").val(risp.forma_giuridica); |
|
// } |
|
// if (risp.partita_iva == "") { |
|
// $("#form-domanda input[name='PIVA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='PIVA']").attr("readonly", true); |
|
// $("#form-domanda input[name='PIVA']").val(risp.partita_iva); |
|
// } |
|
// if (risp.c_fiscale == "") { |
|
// $("#form-domanda input[name='CODICE_FISCALE_IMPRESA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='CODICE_FISCALE_IMPRESA']").attr("readonly", true); |
|
// $("#form-domanda input[name='CODICE_FISCALE_IMPRESA']").val(risp.c_fiscale); |
|
// } |
|
// if (risp.n_rea == "") { |
|
// $("#form-domanda input[name='REA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='REA']").attr("readonly", true); |
|
// $("#form-domanda input[name='REA']").val(risp.n_rea); |
|
// } |
|
// if (risp.dt_inizio_attivita_impresa == "") { |
|
// $("#form-domanda input[name='DATA_INIZIO_ATTIVITA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='DATA_INIZIO_ATTIVITA']").attr("readonly", risp.dt_inizio_readonly); |
|
// $("#form-domanda input[name='DATA_INIZIO_ATTIVITA']").val(risp.dt_inizio_attivita_impresa); |
|
// } |
|
// if (risp.comune == "") { |
|
// $("#form-domanda input[name='SEDE_LEGALE_COMUNE']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='SEDE_LEGALE_COMUNE']").attr("readonly", true); |
|
// $("#form-domanda input[name='SEDE_LEGALE_COMUNE']").val(risp.comune); |
|
// } |
|
// if (risp.provincia == "") { |
|
// $("#form-domanda input[name='SEDE_LEGALE_PROV']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='SEDE_LEGALE_PROV']").attr("readonly", true); |
|
// $("#form-domanda input[name='SEDE_LEGALE_PROV']").val(risp.provincia); |
|
// } |
|
// if (risp.cap == "") { |
|
// $("#form-domanda input[name='SEDE_LEGALE_CAP']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='SEDE_LEGALE_CAP']").attr("readonly", true); |
|
// $("#form-domanda input[name='SEDE_LEGALE_CAP']").val(risp.cap); |
|
// } |
|
// if (risp.indirizzo_posta_certificata == "") { |
|
//// $("#form-domanda input[name='PEC']").removeAttr('readonly'); |
|
// $("#form-domanda input[id='pec']").attr("readonly", true); |
|
// } else { |
|
// $("#form-domanda input[id='pec']").attr("readonly", true); |
|
// $("#form-domanda input[id='pec']").val(risp.indirizzo_posta_certificata); |
|
// $("#form-domanda input[id='pec_pro']").val(risp.indirizzo_posta_certificata); |
|
// } |
|
// if (risp.dt_inizio_attivita_impresa == "") { |
|
// $("#form-domanda input[name='SEDE_LEGALE_DATA_APERTURA']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='SEDE_LEGALE_DATA_APERTURA']").attr("readonly", true); |
|
// $("#form-domanda input[name='SEDE_LEGALE_DATA_APERTURA']").val(risp.dt_inizio_attivita_impresa); |
|
// } |
|
// if (risp.indirizzo == "") { |
|
// $("#form-domanda input[name='SEDE_LEGALE_INDIRIZZO']").removeAttr('readonly'); |
|
// } else { |
|
// $("#form-domanda input[name='SEDE_LEGALE_INDIRIZZO']").attr("readonly", true); |
|
// $("#form-domanda input[name='SEDE_LEGALE_INDIRIZZO']").val(risp.indirizzo); |
|
// } |
|
// $("#form-domanda input[name='STATO_AZIENDA']").val(risp.c_stato_attivita); |
|
//// $("#form-domanda input[name='SEDE_LEGALE_RECAPITO']").val(risp.cap); |
|
// $("#box_selezione").attr("hidden", true);//('display', 'none'); |
|
// $("#box_domanda").removeAttr('hidden'); |
|
// } else { |
|
// $("#box_selezione").removeAttr('hidden'); |
|
// $("#box_domanda").attr("hidden", true); |
|
// functionSwall('error', risp.erroreDescrizione, "domande.php"); |
|
// |
|
// } |
|
// $("#msg_spinner").empty(); |
|
// $('#loader').hide(); |
|
// |
|
// }); |
|
// } else { |
|
// functionSwall('error', "Campo Azienda Obbligatorio", ""); |
|
// } |
|
//} |
|
// |
|
//function cambiaREN(checkREN) { |
|
// if (checkREN.checked) { |
|
// $("#NUMERO_REN").removeAttr('readonly'); |
|
// } else { |
|
// $("#NUMERO_REN").attr('readonly', true); |
|
// $("#NUMERO_REN").val(""); |
|
// } |
|
//} |
|
// |
|
//function saveDomanda() { |
|
// $('#loader').show(); |
|
// var form = document.getElementById('form-domanda'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.delete("tx_TARGA"); |
|
// formInvio.delete("tx_DATA"); |
|
// formInvio.delete("tx_COMUNE"); |
|
// formInvio.delete("tx_PROV"); |
|
// formInvio.append("module", "domanda"); |
|
// formInvio.append("action", "saveDomanda"); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
//} |
|
// |
|
//var selfPage = 'domanda.php'; |
|
//function assegnaValue() { |
|
// $("#mezzi_ID").val(0); |
|
// $("#nat_ID").val(0); |
|
//} |
|
// |
|
//function resetFormModal(f) { |
|
// var form = document.getElementById(f); |
|
// form.reset(); |
|
//} |
|
// |
|
//function editField493909(object) { |
|
// var provo = b64DecodeUnicode(object); |
|
// var a = JSON.parse(provo); |
|
// console.log(a); |
|
// openModalAteco493909(a.TIPO_REGISTRO); |
|
// $("#mezzi_ID").val(a.ID); |
|
// $("#mezzi_ID_DOMANDA").val(a.ID_DOMANDA); |
|
// $("#mezzi_ATECO").val(a.ATECO); |
|
// $("#mezzi_LICENZA_AUTORIZZAZIONE_N").val(a.LICENZA_AUTORIZZAZIONE_N); |
|
// $("#mezzi_TARGA").val(a.TARGA); |
|
// $("#mezzi_FABBRICA_TIPO").val(a.FABBRICA_TIPO); |
|
// $("#mezzi_RILASCIO_DATA").val(a.RILASCIO_DATA); |
|
// $("#mezzi_TIPO_REGISTRO").val(a.TIPO_REGISTRO); |
|
// $("#mezzi_NOME_REGISTRO").val(a.NOME_REGISTRO); |
|
//} |
|
// |
|
// |
|
// |
|
// |
|
//function editField501000(object) { |
|
// var provo = b64DecodeUnicode(object); |
|
// var a = JSON.parse(provo); |
|
// $("#nat_ID").val(a.ID); |
|
// $("#nat_ID_DOMANDA").val(a.ID_DOMANDA); |
|
// $("#nat_ATECO").val(a.ATECO); |
|
// $("#nat_TARGA").val(a.TARGA); |
|
//} |
|
// |
|
//function deleteDichiarazione(id) { |
|
// var object = { |
|
// module: 'domanda', |
|
// action: 'deleteDettaglio', |
|
// id: id |
|
// } |
|
// Swal.fire({ |
|
// title: "Attenzione", |
|
// text: "Sei sicuro di voler proseguire con l'operazione selezionata?", |
|
// icon: 'warning', |
|
// showCancelButton: true, |
|
// confirmButtonColor: '#3085d6', |
|
// cancelButtonColor: '#d33', |
|
// confirmButtonText: 'OK' |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// $('#loader').show(); |
|
// postdataClassic(WS_CALL, object, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda, |
|
// tab: 'dichiarazioniTab' |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
// }); |
|
//} |
|
// |
|
// |
|
//function saveModal501000() { |
|
// $('#loader').show(); |
|
// var form = document.getElementById('form-dettaglio-501000'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveDettaglio'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda, |
|
// tab: 'dichiarazioniTab' |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
//} |
|
// |
|
//function saveModal493909() { |
|
// $('#loader').show(); |
|
// var form = document.getElementById('form-dettaglio-493909'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveDettaglio'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda, |
|
// tab: 'dichiarazioniTab' |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
//} |
|
// |
|
//function checkTipoDoc(ricevo) { |
|
// if (ricevo.value != '') { |
|
// $("#documento_allegato").removeAttr("disabled"); |
|
// |
|
// } else { |
|
// $("#documento_allegato").attr("disabled", true); |
|
// } |
|
//} |
|
// |
|
//function saveAllegato() { |
|
// $('#loader').show(); |
|
// var file = document.getElementById("documento_allegato"); |
|
// var estensione = file.files[0].type; |
|
// if (estensione == "application/pdf") { |
|
// var dimensionetrovata = file.files[0].size; |
|
// if (dimensionetrovata > parseInt(MAX_SIZE_FILE_UPLOAD)) { |
|
// $('#loader').hide(); |
|
// functionSwall('error', "La dimensione del file allegato eccede i limiti massimi previsti", ""); |
|
// } else { |
|
// var form = document.getElementById('form-allegato'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveAllegato'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// $('#loader').hide(); |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda, |
|
// tab: 'documentiTab' |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }); |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', "Estensione del file non valida", ""); |
|
// } |
|
//} |
|
//// |
|
////function deleteAllegati(id) { |
|
//// var object = { |
|
//// module: 'domanda', |
|
//// action: 'deleteAllegato', |
|
//// id: id |
|
//// } |
|
//// Swal.fire({ |
|
//// title: "Attenzione", |
|
//// text: "Sei sicuro di voler proseguire con l'operazione selezionata?", |
|
//// icon: 'warning', |
|
//// showCancelButton: true, |
|
//// confirmButtonColor: '#3085d6', |
|
//// cancelButtonColor: '#d33', |
|
//// confirmButtonText: 'OK' |
|
//// }).then((result) => { |
|
//// if (result.value) { |
|
//// $('#loader').show(); |
|
//// postdataClassic(WS_CALL, object, function (response) { |
|
//// var risp = jQuery.parseJSON(response); |
|
//// if (risp.esito === 1) { |
|
//// $('#loader').hide(); |
|
//// Swal.fire({ |
|
//// type: 'success', |
|
//// title: 'OK', |
|
//// text: "Operazione completata con successo", |
|
//// showCancelButton: false, |
|
//// confirmButtonColor: '#3085d6', |
|
//// confirmButtonText: 'OK', |
|
//// allowOutsideClick: false |
|
//// }).then((result) => { |
|
//// if (result.value) { |
|
//// var object = { |
|
//// domanda: risp.domanda |
|
//// } |
|
//// $.redirect(selfPage, object); |
|
//// } |
|
//// }) |
|
//// } else { |
|
//// $('#loader').hide(); |
|
//// functionSwall('error', risp.erroreDescrizione, ""); |
|
//// } |
|
//// }); |
|
//// } |
|
//// }); |
|
////} |
|
// |
|
//function salvaAllegato2() { |
|
// $('#loader').show(); |
|
// var file = document.getElementById("allegato2"); |
|
// var estensione = file.files[0].type; |
|
// var maxsize = parseInt(MAX_SIZE_FILE_UPLOAD); |
|
// var dimensionetrovata = file.files[0].size; |
|
// if (dimensionetrovata > maxsize) { |
|
// functionSwall('error', "La dimensione del file allegato eccede i limiti massimi previsti", ""); |
|
// } else { |
|
// var form = document.getElementById('form-allegato2'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveAllegato2'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// $('#loader').hide(); |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
// |
|
//} |
|
// |
|
//function salvaAllegato3() { |
|
// $('#loader').show(); |
|
// var file = document.getElementById("allegato3"); |
|
// var estensione = file.files[0].type; |
|
// var maxsize = parseInt(MAX_SIZE_FILE_UPLOAD); |
|
// var dimensionetrovata = file.files[0].size; |
|
// if (dimensionetrovata > maxsize) { |
|
// functionSwall('error', "La dimensione del file allegato eccede i limiti massimi previsti", ""); |
|
// } else { |
|
// var form = document.getElementById('form-allegato3'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveAllegato3'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// $('#loader').hide(); |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
// |
|
//} |
|
// |
|
// |
|
// |
|
// |
|
//function generaAllegato(module, id_domanda, id_documento, id_allegato) { |
|
//// var object = { |
|
//// domanda: id |
|
//// }; |
|
//// $.redirect(BASE_HTTP + "modules/private/generaAllegato3.php", object, "POST", "_blank"); |
|
// |
|
// $('#loader').show(); |
|
// var obj = { |
|
// domanda: id_domanda, |
|
// documento: id_documento, |
|
// allegato: id_allegato, |
|
// module: module, |
|
// action: 'saveFile' |
|
// }; |
|
// postdataClassic(WS_CALL, obj, function (response) { |
|
// var ri = jQuery.parseJSON(response); |
|
// if (ri.esito === 1) { |
|
// $('#loader').hide(); |
|
// var object = { |
|
// file: ri.fileName, |
|
// id: ri.lastId, |
|
// module: 'streamerFile', |
|
// action: 'download' |
|
// }; |
|
// $.redirect(WS_CALL, object, "POST"); |
|
// listAllegati(true); |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', ri.erroreDescrizione, ""); |
|
// } |
|
// |
|
// }); |
|
// |
|
// |
|
//} |
|
// |
|
// |
|
///* |
|
// ####################### NUOVA GESTIONE ALLEGATI |
|
// * |
|
// */ |
|
// |
|
//function listAllegati(reload) { |
|
// |
|
// var dt = $("#lista_allegati"); |
|
// if (!reload) { |
|
// dtAllegati = dt.DataTable({ |
|
// 'processing': true, |
|
// 'serverSide': true, |
|
// 'paging': false, |
|
// 'serverMethod': 'post', |
|
// "dom": '', |
|
// //"order": [[0, 'ASC']], |
|
// 'ajax': { |
|
// 'url': WS_CALL, // + '?module=istituto&action=list_istituti' |
|
// 'data': { |
|
// 'module': 'domanda', |
|
// 'action': 'listAllegati', |
|
// 'tipo': '', |
|
// 'length': 30, |
|
// 'DOMANDA': id_domanda |
|
// } |
|
// }, |
|
// 'columnDefs': [ |
|
// {'width': '120px', 'targets': 5}, |
|
// {'width': '100px', 'targets': 6}, |
|
// {'width': '180px', 'targets': 7} |
|
// ], |
|
// 'columns': [ |
|
// {data: 'PRIORITA', "visible": false}, |
|
// {data: 'ID', "visible": false}, |
|
// {data: 'ID_DOMANDA', "visible": false}, |
|
// {data: 'ID_DOCUMENTO', "visible": false}, |
|
// {data: 'DOCUMENTO', orderable: false}, |
|
// {data: 'TIPO', orderable: false}, |
|
// {data: 'STATO', orderable: false}, |
|
// {data: 'OP', orderable: false} |
|
// //{data: 'OP', "visible": !readOnly, orderable: false} |
|
// ], |
|
// 'initComplete': function (settings, json) { |
|
// checkRenderRequest(json); |
|
// } |
|
// }); |
|
// } else { |
|
// dt.DataTable().ajax.reload(function (json) { |
|
// checkRenderRequest(json); |
|
// }); |
|
// } |
|
//} |
|
// |
|
///* GESTIONE RENDER INVIA RICHIESTA */ |
|
//function checkRenderRequest(json) { |
|
// |
|
// $("#msg_allegati").empty(); |
|
// var txtMsg = document.createElement('span'); |
|
// txtMsg.setAttribute('id', 'num-doc-obl'); |
|
// $("#msg_allegati").append(txtMsg); |
|
// $("#num-doc-obl").html(json.msg_allegati); |
|
// if (json.allAllegatiCompleti) { |
|
// renderConfirmRequest(); |
|
// } else { |
|
// resetConfirmRequest(); |
|
// } |
|
//} |
|
// |
|
//function renderConfirmRequest() { |
|
// $("#confirm-request").html('<a class="btn btn-success btn-sm text-white" onclick="presenta()"><i class="fas fa-paper-plane"></i> Conferma Preparazione Istanza</a>'); |
|
//} |
|
// |
|
//function resetConfirmRequest() { |
|
// $("#confirm-request").empty(); |
|
//} |
|
// |
|
//function assegnaValue(id_documento, obbligatorio, ext, id_allegato) { |
|
// $('#id_documento').val(id_documento); |
|
// $('#id_domanda').val(id_domanda); |
|
// $('#id_allegato').val(id_allegato); |
|
// $('#documento').val('');//reset |
|
// $('#note').val('');//reset |
|
// $('#ext_file_ammessa').empty(); |
|
// $('#ext_file_ammessa').append(ext); |
|
// |
|
// if (obbligatorio == 0) { |
|
// $('#note').attr('required', true); |
|
// } else { |
|
// $('#note').attr('required', false); |
|
// } |
|
//} |
|
// |
|
//function saveAllegatoNewVersion() { |
|
// var file = document.getElementById("documento"); |
|
// |
|
// var maxsize = (MAX_SIZE_FILE_UPLOAD); |
|
// var dimensionetrovata = file.files[0].size; |
|
// if (dimensionetrovata > maxsize) { |
|
// functionSwall('error', "La dimensione del file allegato eccede i limiti massimi previsti", ""); |
|
// } else { |
|
// $('#loader').show(); |
|
// var form = document.getElementById('form-allegati'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.set('module', 'domanda'); |
|
// formInvio.set('action', 'saveAllegato'); |
|
// formInvio.append('id_domanda', id_domanda); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// $('#loader').hide(); |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// $('#allegatiModal').modal('toggle'); |
|
// listAllegati(true); |
|
// } |
|
// }); |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
//} |
|
// |
|
// |
|
//function deleteAllegato(id) { |
|
// var object = { |
|
// module: 'domanda', |
|
// action: 'deleteAllegato', |
|
// id: id |
|
// }; |
|
// Swal.fire({ |
|
// title: "Attenzione", |
|
// text: "Sei sicuro di voler proseguire con l'operazione selezionata?", |
|
// type: 'warning', |
|
// showCancelButton: true, |
|
// confirmButtonColor: '#3085d6', |
|
// cancelButtonColor: '#d33', |
|
// confirmButtonText: 'OK' |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// $('#loader').show(); |
|
// postdataClassic(WS_CALL, object, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// listAllegati(true); |
|
// } |
|
// }); |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
// } |
|
// }); |
|
//} |
|
// |
|
// |
|
//function presenta() { |
|
// |
|
// Swal.fire({ |
|
// title: "Attenzione", |
|
// text: "Dopo la presentazione della domanda non sarà più possibile modificare le informazioni inserite, le stesse saranno disponibili in sola lettura. Vuoi procedere con la conferma della preparazione della domanda?", |
|
// icon: 'warning', |
|
// showCancelButton: true, |
|
// confirmButtonColor: '#3085d6', |
|
// cancelButtonColor: '#d33', |
|
// confirmButtonText: 'OK' |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// $('#loader').show(); |
|
// |
|
// var object = { |
|
// module: 'domanda', |
|
// action: 'presentaDomanda', |
|
// domanda: id_domanda |
|
// }; |
|
// |
|
// postdataClassic(WS_CALL, object, function (response) { |
|
// var ri = jQuery.parseJSON(response); |
|
// if (ri.esito === 1) { |
|
// $('#loader').hide(); |
|
// functionSwall('success', 'Operazione effettuata con successo', HTTP_PRIVATE_SECTION + 'dashboard.php'); |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', ri.erroreDescrizione, ""); |
|
// } |
|
// |
|
// }); |
|
// |
|
// } |
|
// }); |
|
// |
|
//} |
|
//function saveModal493210() { |
|
// $('#loader').show(); |
|
// var form = document.getElementById('form-dettaglio-493210'); |
|
// var formInvio = new FormData(form); |
|
// formInvio.append('module', 'domanda'); |
|
// formInvio.append('action', 'saveDettaglio'); |
|
// postdata(WS_CALL, formInvio, function (response) { |
|
// var risp = jQuery.parseJSON(response); |
|
// if (risp.esito === 1) { |
|
// $('#loader').hide(); |
|
// Swal.fire({ |
|
// type: 'success', |
|
// title: 'OK', |
|
// text: "Operazione completata con successo", |
|
// showCancelButton: false, |
|
// confirmButtonColor: '#3085d6', |
|
// confirmButtonText: 'OK', |
|
// allowOutsideClick: false |
|
// }).then((result) => { |
|
// if (result.value) { |
|
// var object = { |
|
// domanda: risp.domanda, |
|
// tab: 'dichiarazioniTab' |
|
// } |
|
// $.redirect(selfPage, object); |
|
// } |
|
// }) |
|
// } else { |
|
// $('#loader').hide(); |
|
// functionSwall('error', risp.erroreDescrizione, ""); |
|
// } |
|
// }); |
|
//} |
|
//function openStreamer(id) { |
|
// var object = { |
|
// id: id, |
|
// module: 'streamerFile', |
|
// action: 'download' |
|
// }; |
|
// $.redirect(WS_CALL, object, "POST"); |
|
//}
|