<div>

    <div class="modal-header">
        <h3>{{selected.item.op}} Inventário</h3>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <ul class="nav navbar-nav">
                    <li ng-click="cTab=!cTab" ng-class="{active:!cTab}"><a href="">Dados</a></li>
                    <li ng-click="cTab=true" ng-class="{active:cTab}"><a href="">Outros Dados</a></li>
                </ul>
                <!--<form class="navbar-form navbar-right" role="navigation" ng-show="selected.item.op=='Novo'">
                    <div class="form-group">
                        <span>Nº Repetições</span>

                        <input class="form-control" style="width:50px"
                               ng-model="selected.item.NumRepetir"
                               maxlength="3" />
                    </div>
                </form>-->
            </div>
        </nav>
    </div>
    <div class="modal-body" ng-controller="cadastroController">
        <div ng-show="!cTab" class="row">
            <div class="col-md-6">
                <span>Classificação CIBE</span>
                <br />
                <div class="input-group apontar"  ng-click="mostrarClassificacoes(selected.item)">
                    <input type="text" placeholder="Classificação" class="form-control readonly" readonly="readonly" ng-model="selected.item.Classificacao">
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>
                </div>
                <br />
                
                <span>Data</span>
                <br />
                <!--<input type="text" id="txtDataNovoBem" readonly="readonly"
                       class="date form-control readonly simple-field-data-mask"
                       data-mask="0000-00-00"
                       ng-model="selected.item.Data"
                       placeholder="____-__-__"
                       datepicker-popup="yyyy-MM-dd" is-open="dataAlteracao_opened"
                       ng-required="true" close-text="Fechar" clear-text="Limpar" current-text="Hoje" />-->
                <div class="input-group">
                    <input type="text" id="txtDataNovoBem"
                           placeholder="____-__-__"
                           ng-model="selected.item.Data"
                           datepicker-popup="yyyy-MM-dd"
                           is-open="data_opened"
                           class="date form-control readonly simple-field-data-mask"
                           data-mask="0000-00-00"
                           ng-required="false" close-text="Fechar" clear-text="Limpar" current-text="Hoje" />
                    <span class="input-group-btn">
                        <button class="btn btn-default" ng-click="opendate($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
                <br />
                <span>Gestor</span>
                <br />
                <input type="hidden" ng-model="selected.item.Fk_Responsavel" />
                <div class="input-group apontar"
                     ng-click="mostrarResponsavelLocal(selected.item);">
                    <input type="text" placeholder="Procurar"
                           class="form-control readonly"
                           readonly="readonly"
                           ng-model="selected.item.NomeResponsavel">
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>
                </div>
                <br />
            </div>
            <div class="col-md-6">
                                
                <span>C. Funcional</span>
                <br />
                <div class="input-group apontar"
                     ng-click="mostrarClassificacaoFuncional(selected.item)">
                    <input type="text" placeholder="Classificação" class="form-control readonly" readonly="readonly"
                           ng-model="selected.item.Cfuncional">
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>
                </div>
                <br />
                Tipo aquisição
                <br />
                <select class="form-control" ng-init="carregarCodAquisicaoRunOnloadCallback(selCodAquisicaoV3,[selected.item])"
                        ng-change="dadosModificados(true); selCodAquisicaoV2(selectedCodAquisicao,selected.item)"
                        ng-model="selectedCodAquisicao"
                        ng-options="e.Codigo+' - '+ e.Designacao for e in codAquisicao"></select>

                <br />
                Tipo Despesa
                <br />
                <select class="form-control" ng-init="carregarTipoDespesaRunOnloadCallback(selTipoDespesaV3,[selected.item])"
                        ng-change="dadosModificados(true); selTipoDespesaV2(selectedTipoDespesa,selected.item)"
                        ng-model="selectedTipoDespesa"
                        ng-options="e.Descricao for e in itemsDesp"></select>
                <br />
            </div>
        </div>
        <div ng-show="cTab" class="row">
            <div class="col-md-12">
                
                <span>Nº Requisição Oficial</span>
                <br />
                <input class="form-control"
                       ng-model="selected.item.NumRequisicaoOficial"
                       maxlength="50" />
                <br />
                <span>Ref. Marca</span>
                <br />
                <input class="form-control"
                       ng-model="selected.item.RefMarca"
                       maxlength="100" />
                <br />
                <span>Modelo</span>
                <br />
                <input class="form-control"
                       ng-model="selected.item.Modelo"
                       maxlength="100" />
                <br />
                <span>Localização</span>
                <br />
                <div class="input-group apontar"
                     ng-click="mostrarLocalizacoes(selected.item)">
                    <input type="text" placeholder="Procurar" class="form-control readonly" readonly="readonly" ng-model="selected.item.Localizacao">
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>

                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer" ng-controller="dupCadController">

        <button class="btn btn-primary"
                ng-click="ok()"
                ng-disabled="selected.item.perm.PCriar==false">
            Guardar
        </button>
        <button class="btn btn-warning" ng-click="cancel()" id="btnModalFechar">Fechar</button>
    </div>

</div>
<script>
    $(document).ready(function () {
        $('.date').mask('0000-00-00');

    });
</script>
