<!-- br.com.centralit.citcorpore.util.Enumerados.TipoValorImportacaoCarga : usado nos elementos select[name='tipoValor'] -->
<%@include file="/novoLayout/common/include/iframe.jsp" %>

<!doctype html public "">
<html <%=(iframe != null) ? "data-iframe=\"" + iframe + "\"" : "" %>>
	<head>	
		<%@include file="/novoLayout/common/include/libCabecalho.jsp" %>
		<%@include file="/novoLayout/common/include/titulo.jsp" %>
		<link type="text/css" rel="stylesheet" href="../../novoLayout/common/include/css/template.css"/>
		<link rel="stylesheet" type="text/css" href="./css/cargaPortfolioServico.css" />
		
		<script type="text/javascript">
			var ctx = "${ctx}";
		</script>
	</head>
	<cit:janelaAguarde id="JANELA_AGUARDE_MENU"  title="" style="display:none;top:325px;width:300px;left:500px;height:50px;position:absolute;"></cit:janelaAguarde>
	<body>
		<%@include file="/novoLayout/common/include/customtip.jsp"%>
		<div class="container-fluid fixed">
			<div class="navbar main hidden-print">
				<%@include file="/novoLayout/common/include/cabecalho.jsp" %>
				<%@include file="/novoLayout/common/include/menuPadrao.jsp" %>
			</div>
	
			<div id="wrapper">
				<div id="content">
					<div class="separator top"></div>
					<div class="row-fluid">
						<div id="innerLR" class="innerLR">
							<div id="cargaPortfolioServico" class="widget">
								<div class="widget-head">
									<h4 class="heading"><fmt:message key="cargaPortfolioServico.nome" /></h4>
								</div>
								<div class="widget-body">
									<div class="tabsbar">
										<ul>
											<li class="active"><a href="#tabCargaPortfolioServicoModelo" data-toggle="tab"><fmt:message key="cargaPortfolioServico.modelo"/></a></li>
											<li id="liTabCargaPortfolioServicoImportacao"><a href="#tabCargaPortfolioServicoImportacao" data-toggle="tab"><fmt:message key="cargaPortfolioServico.importacao"/></a></li>
										</ul>
									</div>
									<div class="tab-content">
										<div class="tab-pane active" id="tabCargaPortfolioServicoModelo">
											<form name="formCargaPortfolioServico" action="${ctx}/pages/cargaPortfolioServico/cargaPortfolioServico">
												<input type="hidden" id="idCampoOpcional" name="idCampoOpcional" />
												<input type="hidden" id="json" name="json" />
												<input type="hidden" id="quantidadeRegistros" name="quantidadeRegistros" />
												
												<!-- Portfólio -->
												
												<h5 class="heading-arrow"> <fmt:message key="gerenciaportfolio.portfolio" /> </h5>
												
												<div id="divContentCamposPortfolio">
													<div id="campoCargaPortfolioNome" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.portfolio" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);">
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="nomePortfolioCarga" name="" maxlength="256" class="span12 Description[gerenciaportfolio.portfolio] hide campoValorPreenchido"/>
														</div>
													</div>
												</div>
												
												<div class="separator"></div>
												
												<!-- Serviço -->
												
												<h5 class="heading-arrow"> <fmt:message key="gerenciaportfolio.servicoNegocio" /> </h5>
												
												<div id="divContentCamposServico">
													<div id="campoCargaServicoNome" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.nomeServico" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="nomeServicoCarga" name="" maxlength="256" class="span12 Description[gerenciaportfolio.nomeServico] hide campoValorPreenchido"/>
														</div>
													</div>
													
													<div id="campoCargaServicoNomeCategoriaNegocio" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="categoriaServico.categoriaNegocio" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="categoriaNegocioServicoCarga" name="" maxlength="" class="span12 Description[categoriaServico.categoriaNegocio] pointer hide campoValorPreenchido" 
															onclick="CargaPortfolioServico.servico.onClickCategoriaNegocio();" readonly="readonly"/>
														</div>
													</div>
													
													<div id="campoCargaServicoDataImplantacao" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.dataInicio" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);">
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="dataImplantacaoServicoCarga" name="dataImplantacaoServicoCarga" maxlength="10" class="span12 Format[Date] Valid[Date] Description[gerenciaportfolio.dataInicio] datepicker hide campoValorPreenchido"/>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
													<div id="campoCargaServicoFase" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.faseServico" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.servico.onChangeTipoValorFaseServico(this);"> 
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<select name="faseServico" id="faseServicoCarga" class="span12 Description[gerenciaportfolio.faseServico] hide campoValorPreenchido" 
															onchange="CargaPortfolioServico.servico.onChangeFaseServico(this);">
															</select>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
													<div id="campoCargaServicoStatus" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.statusServico" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.servico.onChangeTipoValorStatusServico(this);"> 
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<select name="" id="statusServicoCarga" class="span12 Description[gerenciaportfolio.statusServico] hide campoValorPreenchido">
															</select>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
													<div class="row-fluid">
														<div class="span12">
															<a href="#" title="" id="addRemoverServicoClassificacao" class="strong" onclick="CargaPortfolioServico.servico.addRemoverCamposClassificao();" data-add=""> 
																<span id="spanAddServicoClassificacao"> <fmt:message key="cargaPortfolioServico.classificacaoServico.addCampos" /></span> 
																<span id="spanRemoverServicoClassificacao"> <fmt:message key="cargaPortfolioServico.classificacaoServico.removerCampos" /> </span>
															</a>
														</div>
													</div>
													
													<div id="campoCargaServicoClassificacao">
														<div id="campoCargaServicoCriticidade" class="row-fluid divCampoCarga">
															<div class="span4">
																<label class="campoCarga"><fmt:message key="gerenciaportfolio.servicoNegocio.criticidadeServico" /></label>
															</div>
															<div class="span3">
																<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																	<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																	<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																	<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
																</select>
															</div>
															<div class="span4">
																<select name="" id="criticidadeServicoCarga" class="span12 Description[gerenciaportfolio.servicoNegocio.criticidadeServico] hide campoValorPreenchido">
																</select>
																<label class="campoValorDefault" data-valor=""></label> 
															</div>
														</div>
														
														<div id="campoCargaServicoTipoInvestimento" class="row-fluid divCampoCarga">
															<div class="span4">
																<label class="campoCarga"><fmt:message key="gerenciaportfolio.tipoDeInvestimento" /></label>
															</div>
															<div class="span3">
																<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																	<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																	<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
																</select>
															</div>
															<div class="span4">
																<select name="" id="tipoInvestimentoServicoCarga" class="span12 Description[gerenciaportfolio.tipoDeInvestimento] hide campoValorPreenchido">
																</select>
															</div>
														</div>
														
														<div id="campoCargaServicoTipoDemanda" class="row-fluid divCampoCarga">
															<div class="span4">
																<label class="campoCarga"><fmt:message key="gerenciaportfolio.classificacao.demandaServico" /></label>
															</div>
															<div class="span3">
																<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																	<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																	<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
																</select>
															</div>
															<div class="span4">
																<select name="" id="tipoDemandaServicoCarga" class="span12 Description[gerenciaportfolio.classificacao.demandaServico] hide campoValorPreenchido">
																</select>
															</div>
														</div>
														
														<div id="campoCargaServicoRetornoFinanceiro" class="row-fluid divCampoCarga">
															<div class="span4">
																<label class="campoCarga"><fmt:message key="gerenciaportfolio.classificacao.retornoFinanceiroServico" /></label>
															</div>
															<div class="span3">
																<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																	<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																	<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
																</select>
															</div>
															<div class="span4">
																<select name="" id="retornoFinanceiroServicoCarga" class="span12 Description[gerenciaportfolio.classificacao.retornoFinanceiroServico] hide campoValorPreenchido">
																</select>
															</div>
														</div>
													</div>
													
												</div>
												
												<div class="separator"></div>
												
												<!-- Incidente/Requisição -->
												
												<h5 class="heading-arrow"> <fmt:message key="cargaPortfolioServico.incidenteRequisicao" /> </h5>
												
												<div id="divContentCamposIncidenteRequisicaoNome">
													<div id="campoCargaIncidenteRequisicao" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="cargaPortfolioServico.nomeServicoIncidenteRequisicao" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="nomeServicoIncReqCarga" name="" maxlength="" class="span12 Description[gerenciaportfolio.nomeServicoIncidenteRequisicao] hide campoValorPreenchido"/>
														</div>
													</div>
													
													<div id="campoCargaIncidenteRequisicaoSituacao" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="cargaPortfolioServico.situacaoServicoIncidenteRequisicao" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<select name="situacaoServicoIncReqCarga" id="" class="span12 Description[cargaPortfolioServico.situacaoServicoIncidenteRequisicao] hide campoValorPreenchido">
															</select>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
													<div id="campoCargaIncidenteRequisicaoDataImplantacao" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="cargaPortfolioServico.dataInicioIncidenteRequisicao" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="dataImplantacaoServicoIncReqCarga" name="dataImplantacaoServicoIncReqCarga" maxlength="10" class="span12 Format[Date] Valid[Date] Description[cargaPortfolioServico.dataInicioIncidenteRequisicao] datepicker hide campoValorPreenchido"/>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
													<div id="campoCargaIncidenteRequisicaoTipoDemanda" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.tipoDemandaServico" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);">
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<select name="" id="tipoDemandaServicoIncReqCarga" class="span12 Description[gerenciaportfolio.tipoDemandaServico] hide campoValorPreenchido">
															</select>
														</div>
													</div>
													
													<div id="campoCargaIncidenteRequisicaoCategoria" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="cargaPortfolioServico.categoriaServicoIncidenteRequisicao" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);"> 
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<input type="text" id="categoriaServicoIncReqCarga" name="" maxlength="" onclick="CargaPortfolioServico.servicoIncReq.onClickCategoria();"
															class="span12 Description[cargaPortfolioServico.categoriaServicoIncidenteRequisicao] pointer hide campoValorPreenchido" readonly="readonly"/>
														</div>
													</div>
													
													<div id="campoCargaIncidenteRequisicaoDisponivelPortal" class="row-fluid divCampoCarga">
														<div class="span4">
															<label class="campoCarga"><fmt:message key="gerenciaportfolio.dispPortal" /></label>
														</div>
														<div class="span3">
															<select name="tipoValor" id="" class="span12" onchange="CargaPortfolioServico.onChangeTipoValor(this);">
																<option value="2"> <fmt:message key="cargaPortfolioServico.valorDefault" /> </option>
																<option value="0"> <fmt:message key="cargaPortfolioServico.valorEmBranco" /> </option>
																<option value="1"> <fmt:message key="cargaPortfolioServico.valorInformado" /> </option>
															</select>
														</div>
														<div class="span4">
															<select name="" id="disponivelPortalServicoIncReqCarga" class="span12 Description[gerenciaportfolio.dispPortal] hide campoValorPreenchido">
															</select>
															<label class="campoValorDefault" data-valor=""></label> 
														</div>
													</div>
													
												</div>
												
												<div class="separator"></div>
												
												<div class="row-fluid">
													<div class="span12">
														<button type="button" name="btnExportar" class="lFloat btn btn-icon btn-primary" onclick="CargaPortfolioServico.gerarModeloCargaXls();">
															<i></i><fmt:message key="cargaPortfolioServico.gerarModelo" /> .xls
														</button>
														<button type="button" name="btnExportar" class="lFloat btn btn-icon btn-primary" onclick="CargaPortfolioServico.gerarModeloCargaXlsx();">
															<i></i><fmt:message key="cargaPortfolioServico.gerarModelo" /> .xlsx
														</button>
														<button type="button" name="btnLimpar" class="lFloat btn btn-icon btn-primary" onclick="CargaPortfolioServico.limpar();"><i></i><fmt:message key="citcorpore.comum.limpar" /></button>
													</div>
												</div>
												
												<a id="linkDownloadModeloCargaPortfolioXls" target="_blank" class="hide" href="${ctx}/pages/importarCargaPortfolioServico/modelo/modeloCargaPortfolioServico.xls">
													xls
												</a>
												<a id="linkDownloadModeloCargaPortfolioXlsx" target="_blank" class="hide" href="${ctx}/pages/importarCargaPortfolioServico/modelo/modeloCargaPortfolioServico.xlsx">
													xlsx
												</a>
												
												<!-- Modais -->
												<div class="modal hide fade modal-small" id="modal-carga-portfolio-quantidade-registros" data-tipo-arquivo="">
													<div class="modal-header">
														<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
														<h3 class="title"> <fmt:message key="cargaPortfolioServico.quantidadeRegistros" /> </h3>
													</div>
													<div class="modal-body">
														<div class="row-fluid">
															<div class="span12">
																<input type="text" id="qtdRegistros" maxlength="10000" class="span12 Description[cargaPortfolioServico.quantidadeRegistros]" />
															</div>
														</div>
													</div>
													<div class="modal-footer">
														<a href="#" class="btn btn-primary" onclick="CargaPortfolioServico.gerarModeloModalQtdRegistros();"><fmt:message key="cargaPortfolioServico.gerarModelo" /></a>
													</div>
												</div>
												
											</form>
										</div> <!-- tabCargaPortfolioServicoModelo -->
										
										<div class="tab-pane" id="tabCargaPortfolioServicoImportacao">
											<div class="row-fluid">
												<div class="span12">
													<iframe id="frameImportarCargaPortfolioServico" src="about:blank" width="99%" height="530" class="iframeSemBorda"></iframe>
												</div>
											</div>
										</div> <!-- tabCargaPortfolioServicoImportacao -->
										
									</div> <!-- .tab-content -->
								</div><!-- .widget-body -->
							</div><!-- .widget -->
						</div><!-- innerLR -->
					</div>
				</div><!-- content -->
				<!--  Fim conteudo-->
				<%@include file="/novoLayout/common/include/rodape.jsp" %>
			</div><!-- wrapper -->
		</div> <!-- container-fluid -->
		
		<div class="modal hide fade" id="modal-selecionar-servico-categoria">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h3 class="title"> <fmt:message key="categoriaServico.categoriaServico" /> </h3>
			</div>
			<div class="modal-body modal-body-max-height">
				<%@include file="/pages/categoriaServico/categoriaServicoConteudo/categoriaServicoConteudo.jsp" %>
			</div>
		</div>
		
		<div class="modal hide fade" id="modal-carga-portfolio-add-contrato">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h3 class="title"> <fmt:message key="categoriaServico.categoriaServico" /> </h3>
			</div>
			<div class="modal-body modal-body-max-height">
				<form name="formPesquisaContrato">
					<cit:findField formName="formPesquisaContrato" lockupName="LOOKUP_CONTRATOS_NEGOCIO_ATIVOS" id="LOOKUP_CONTRATOS_VINCULAR" heigth="400" javascriptCode="true" htmlCode="true"/>
				</form>
			</div>
		</div>
		
		<div class="modal hide fade" id="modal-carga-portfolio-importar">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h3 class="title"> <fmt:message key="cargaPortfolioServico.importar" /> </h3>
			</div>
			<div class="modal-body">
				
			</div>
		</div>
		
		<script type="text/javascript" src="js/cargaPortfolioServico.js"></script>
		<script type="text/javascript" src="${ctx}/pages/importarCargaPortfolioServico/js/importarCargaPortfolioServico.js"></script>
		<script type="text/javascript" src="${ctx}/pages/categoriaServico/js/categoriaServico.js"></script>

		<script type="text/javascript" src="${ctx}/novoLayout/common/theme/scripts/plugins/calendars/fullcalendar/lib/moment.min.js"></script>
	</body>
</html>