reisGestione.jsp 7.65 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
<%@ include file="/project/include.jsp" %>
<script type="text/javascript">
function gotoStep0() {
	var event = 'zcomcag.reis?step=0&dmKey=' + bui_datamanagement.getKey();
	juiceChangeLocation(event);
}

function gotoStep1() {
	var dataInizio = document.getElementById('dataInizioCld').value;
	var dataFine = document.getElementById('dataFineCld').value;
	//var dataInInterv = document.getElementById('dataIntCld').value;
	//var dataFineInt = document.getElementById('dataFineIntCld').value;
	//if ((dataInizio == '')||(dataFine=='')||(dataInInterv=='')||(dataFineInt=='')){
	if ((dataInizio == '')||(dataFine=='')){
		alert("Le date sono obbligatorie");
		return;
	}
	//var event = 'zcomcag.reis?step=1&dataInizio='+dataInizio +'&dataFine='+dataFine+'&dataInInterv='+dataInInterv+ '&dataFineIntervento='+dataFineInt+'&dmKey=' + bui_datamanagement.getKey();
	var event = 'zcomcag.reis?step=1&dataInizio='+dataInizio +'&dataFine='+dataFine+'&dmKey=' + bui_datamanagement.getKey();
	juiceChangeLocation(event);
}	

function gotoStep2() {
	var totale = document.getElementById('totale').value;
	var dataInizio = document.getElementById('di').value;
	var dataFine = document.getElementById('df').value;
	
	if (totale == '') {
		alert("Inserire l'importo disponibile");
		return;
	}
	
	var event = 'zcomcag.reis?step=2&totale='+totale+'&dataInizio='+dataInizio +'&dataFine='+dataFine+'&dmKey=' + bui_datamanagement.getKey();
	document.getElementById('totale').value=totale;
	juiceChangeLocation(event);
	
}
function gotoStep3() {
	var dataInInterv = document.getElementById('dataIntCld').value;
	var dataFineInt = document.getElementById('dataFineIntCld').value;
	if ((dataInInterv == '') || (dataFineInt== '')) {
		alert("le date dell'intervento sono obbligatorie ");
		return;
	}
	var event = 'zcomcag.reis?step=3&dataInInterv='+dataInInterv+ '&dataFineIntervento='+dataFineInt+'&dmKey=' + bui_datamanagement.getKey();
	juiceChangeLocation(event);		
}
function goBack(){
	var event = 'zcomcag.reis?step=1&dataInizio=a&dataFine=b&dmKey=' + bui_datamanagement.getKey();
	juiceChangeLocation(event);
}

</script>

<shell:fieldset title="Periodo riferimento">
	<c:choose>
		<c:when test="${dto_step == 0}">			
			<table border="0" cellspacing="3" cellpadding="0" >		
				<tr>
					<td class="form-label">
						Data inizio <span class="form-label-required">*</span>
					</td>
					<td class="form-values">				
						<input class="form-date" id="dataInizioCld" />
						<shell:calendar inputId="dataInizioCld"/>
					</td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td class="form-label">
						Data fine <span class="form-label-required">*</span>
					</td>
					<td class="form-values">
						<input class="form-date" id="dataFineCld" />
						<shell:calendar inputId="dataFineCld"/>				
					</td>						
				</tr>
		<!--	<tr>
					<td class="form-label">
						Data inizio interventi da creare <span class="form-label-required">*</span>
					</td>
					<td class="form-values">
						<input class="form-date" id="dataIntCld" />
						<shell:calendar inputId="dataIntCld"/>				
					</td>						
				</tr>
				<tr>
					<td class="form-label">
						Data fine interventi da creare <span class="form-label-required">*</span>
					</td>
					<td class="form-values">
						<input class="form-date" id="dataFineIntCld" />
						<shell:calendar inputId="dataFineIntCld"/>				
					</td>						
				</tr>-->
				<tr>
					<td>&nbsp;</td> 
					<td><shell:button text="Avanti" img="commons.navigateRight" title="Ricerca le domande accettate" href="javascript:gotoStep1();"/></td>						
				</tr>
			</table>
		</c:when>
		<c:otherwise>
			<table border="0" cellspacing="3" cellpadding="0" >		
				<tr> <td class="form-label" id="di">data Inizio</td><td class="form-values" >${dto_dataInizio}</td></tr>
				<tr></tr>
				<tr> <td class="form-label" id="df">data Fine</td><td class="form-values">${dto_dataFine}</td></tr>
				<tr></tr>
				<c:choose>
					<c:when test="${dto_step == 2}">
						<tr>
							<td class="form-label">
								Data inizio interventi da creare <span class="form-label-required">*</span>
							</td>
							<td class="form-values">
								<input class="form-date" id="dataIntCld" />
								<shell:calendar inputId="dataIntCld"/>				
							</td>						
						</tr>
						<tr>
							<td class="form-label">
								Data fine interventi da creare <span class="form-label-required">*</span>
							</td>
							<td class="form-values">
								<input class="form-date" id="dataFineIntCld" />
								<shell:calendar inputId="dataFineIntCld"/>				
							</td>
						</tr>	
					</c:when>
					<c:when test="${dto_step > 2}">
						<tr> <td class="form-label" id="dInt">data inizio interventi da creare</td><td class="form-values">${dto_dataInizioIntervento}</td></tr>		 	
							<tr></tr>
						<tr> <td class="form-label" id="dFineInt">data fine interventi da creare</td><td class="form-values">${dto_dataFineIntervento}</td></tr>
					</c:when>
				</c:choose>
			</table>
		</c:otherwise>
	</c:choose>
</shell:fieldset>
<c:if test="${dto_step >= 1}">
	<shell:fieldset title="Informazioni sulle domande presentate">
		<table border="0" cellspacing="3" cellpadding="0" >		
			<tr> <td class="form-label">Nr domande presentate</td> <td class="form-values" >${dto_nrDomande}</td> </tr>	
			<tr> <td class="form-label">Importo totale da erogare (Euro)</td> <td class="form-values">${dto_daErogare}</td> </tr>
			
				<c:if test="${! empty dto_msg1}">
					<tr><td class="msg_text_info" style="padding: 4px 10px 4px 10px" colspan="2">${dto_msg1}</td> </tr>
				</c:if>
			
			
					<tr> 
						<td class="form-label">Totale disponibile (Euro)</td>
						<td class="form-values">
							 <input id="totale" class="form-normal-text" type="text"/>
						</td> 
					</tr>
					<tr>
						<td>
						</td>
						<td class="form-submit">
							<shell:button type="submit" text="Esegui calcolo" title="Esegui calcolo" href="javascript:gotoStep2();" enabled="true"/>
						</td>
					</tr>
					
					
				
				<tr> <td>&nbsp;</td> 
					<td class="form-values"  style="padding-top: 10px;">
					<c:choose>
					<c:when test="${dto_step == 1}">
						<shell:button text="Indietro" img="commons.navigateLeft" title="Indietro" href="javascript:gotoStep0();"/> &nbsp;&nbsp;&nbsp;
					</c:when >
					<c:otherwise>
						<shell:button type="submit" text="Indietro" img="commons.navigateLeft" title="Indietro" href="javascript:goBack();"/> &nbsp;&nbsp;&nbsp;
					</c:otherwise>
					</c:choose>
						<shell:button text="crea interventi" img="commons.navigateRight" title="crea Interventi" href="javascript:gotoStep3();" enabled="${dto_continue}"/>
					</td>						
				</tr>
				
			
		</table>
	</shell:fieldset>
	<c:if test="${dto_step == 2}">
	<shell:fieldset title="Informazioni sulle domande presentate">
		<c:if test="${! empty dto_nuovoTotale}">
			<div class="msg_text_info"  style="padding: 4px 10px 4px 10px">Il ricalcolo dei contributi  andato a buon fine.</div>
			<table border="0" cellspacing="3" cellpadding="0" >		
				<tr> <td class="form-label">Risultato: </td> <td class="form-values">${dto_nuovoTotale}</td> </tr>
			</table>
		</c:if>		
		</shell:fieldset>
	</c:if>
	<c:if test="${dto_step == 3}">
	<shell:fieldset title="Interventi creati">
		<c:choose>
			<c:when test="${dto_nInterventi==0}">	
				<div class="msg_text_info"  style="padding: 4px 10px 4px 10px">non sono stati creati interventi</div>
			</c:when>
			<c:otherwise>
			<div class="msg_text_info"  style="padding: 4px 10px 4px 10px">la creazione degli interventi  andata a buon termine</div>
				<table border="0" cellspacing="3" cellpadding="0" >		
					<tr> <td class="form-label">Interventi creati: </td> <td class="form-values">${dto_nInterventi}</td> </tr>
				</table>
			</c:otherwise>
		</c:choose>		
	</shell:fieldset>
	</c:if>
</c:if>