metadadosDocumentoEdit.html
16.1 KB
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<div id="widget-documento" class="widget-box margin-bottom">
<div class="widget-header">
<h2 class="widget-title">
<translate>LABEL.DOCUMENTO</translate>
</h2>
<div class="widget-toolbar">
<a href="#void" ng-click="widgetDocumentoIsCollapsed = !widgetDocumentoIsCollapsed"> <i class="fa"
ng-class="{'fa-chevron-up': !widgetDocumentoIsCollapsed, 'fa-chevron-down': widgetDocumentoIsCollapsed}"></i></a> <a href="#void" ng-click="closeWidget('widget-processo')"> <i class="fa fa-close"></i></a>
</div>
</div>
<div id="metadadosDocumentoGedCollapsed" collapse="widgetDocumentoIsCollapsed" class="widget-body">
<div class="widget-main clearfix">
<div id="editDocumentoGed" class="page-content clearfix">
<p>
<small>( <span class="red">*</span> ) <translate>LABEL.CAMPOS_OBRIGATORIOS</translate></small>
</p>
<div class="row">
<div class="col-md-12">
<label ng-show='documentoGed.id != null' style="position: absolute; right: 16px"><translate>ECM.LABEL.VERSAO_ATUAL</translate> {{documentoGed.documentoVersao}}</label>
</div>
</div>
<fieldset>
<legend>
<translate>ECM.LABEL.DADOS_DOCUMENTO</translate>
</legend>
<div class="row">
<div class="col-md-6">
<label-input-radio ng-id="documentoGed.formaCriacao.codigo" ng-label="ECM.LABEL.FORMADECRIACAO" list="formaCriacaoList" ng-disabled="!edit || documentoGed.id" text="descricao" value="codigo"
ng-model="documentoGed.formaCriacao.codigo" form="documentoGedForm" ng-custom-change='limparCamposDocumento()'></label-input-radio>
</div>
</div>
<div class="row">
<div class="col-md-8">
<auto-complete ng-id="documentoGed.tipoDocumento" ng-set-result="construirRelacionamento(item)" ng-label="ECM.LABEL.TIPODOCUMENTO" ng-model="documentoGed.tipoDocumento" form="documentoGedForm"
ng-obrigatorio="true" ng-acao-borracha='limparCamposTipoProcesso()' ng-disabled="!edit ||(documentoGed.id && documentoGed.formaCriacao.codigo == 1)"
ng-find="findAutoCompleteTipoDocumento(value)" ng-item="item.nome" />
</div>
</div>
<div class="row">
<div class="col-md-4">
<label-input ng-id="documentoGed.numero" ng-label="LABEL.NUMERO" ng-type="numerico" ng-model="documentoGed.numero" form="documentoGedForm" ng-obrigatorio="documentoGed.formaCriacao.codigo == 2"
ng-custom-maxlength="255" ng-type="text" ng-disabled="!edit || (documentoGed.formaCriacao.codigo == 1 && documentoGed.tipoDocumento.formaNumeracao.codigo != 2)" />
</div>
<div class="row" ng-show='documentoGed.formaCriacao.codigo == 2'>
<div class="col-md-4">
<label-input-data ng-id="documentoGed.dataReferencia" form="documentoGedForm" ng-label="ECM.LABEL.DATA_REFERENCIA" ng-obrigatorio="documentoGed.formaCriacao.codigo == 2" ng-disabled="!edit"
ng-model="documentoGed.dataReferencia" />
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<label-select ng-id="documentoGed.estado" ng-model="documentoGed.estado" ng-label="ECM.LABEL.ESTADO" ng-obrigatorio='true' form="documentoGedForm" ng-list="estadoList"
ng-custom-options="dominioEstado.originalElement as dominioEstado.descricao for dominioEstado" track-by="track by dominioEstado.id" ng-disabled='!edit'> </label-select>
</div>
<div class="col-md-8">
<auto-complete ng-id="documentoGed.destinatario" ng-label="ECM.LABEL.DESTINATARIO" ng-model="documentoGed.destinatario" form="documentoGedForm" ng-obrigatorio="true" ng-disabled="!edit"
ng-find="findAutoCompleteDestinatario(value);" ng-item="item.nome" />
</div>
</div>
<div class="row">
<div class="col-md-12" ng-show='documentoGed.tipoDocumento.id'>
<auto-complete ng-id="assuntoSelecionado" ng-label="ECM.LABEL.ASSUNTO" ng-model="assuntoSelecionado" ng-set-result='setTipoAssunto(item)' form="documentoGedForm" ng-obrigatorio="{{!sugestoes}}"
ng-disabled="!edit || sugestoes.length > 0" ng-find="findAutoCompleteSugestao(value)" ng-item="item.assunto" />
</div>
</div>
<div class="row">
<div class="col-md-12" ng-show='documentoGed.tipoDocumento.id'>
<div class="form-group">
<label><translate>ECM.LABEL.SUGESTOES_ASSUNTO</translate></label>
<div class="input-group">
<select class="form-control typeahead-wide" ng-model="sugestoes" ng-change="setAssunto(sugestoes)" multiple id="sugestoes" name="sugestoes" ng-disabled='assuntoSelecionado.id' ng-multiple="true"
ng-options="sugestao as sugestao.assunto for sugestao in assuntos track by sugestao.id">
</select>
<span ng-show="sugestoes" class="input-group-addon" ng-click="sugestoes = null" ng-class="{'hover-directive' : (($hover == true) && !disabled)}" ng-mouseover="$hover = true"
ng-mouseout="$hover = false"> <i class="fa fa-eraser bigger-110"></i>
</span>
<span class="input-group-addon" style="visibility: hidden;"> <i class="fa fa-search bigger-110"></i></span>
</div>
</div>
</div>
</div>
<div class="row" ng-show='documentoGed.tipoDocumento.id'>
<div class="col-md-6">
<label-select ng-id="documentoGed.nivelAcesso" ng-label="ECM.LABEL.NIVEL_ACESSO" ng-model="documentoGed.nivelAcesso" ng-custom-change='setHipoteseLegal(documentoGed.nivelAcesso.id)'
form="documentoGedForm" ng-obrigatorio="true" ng-disabled="!edit"
ng-custom-options="nivelAcessoTipoDocumento.originalElement as nivelAcessoTipoDocumento.nivelAcesso.descricao for nivelAcessoTipoDocumento" track-by="track by nivelAcessoTipoDocumento.id"
ng-list="nivelAcessoTipoDocumentoList" />
</div>
<div class="col-md-6">
<div class="form-group" ng-show='documentoGed.nivelAcesso.nivelAcesso.codigo == 0'>
<label class="control-label block"
ng-class="{'has-error': documentoGedForm['documentoGed.tipoSigiloDocumento.id'].$error.required && (!documentoGedForm['documentoGed.tipoSigiloDocumento.id'].$pristine || documentoGedForm.$submitted)}">
<translate>ECM.LABEL.SIGILO</translate> <span class="red">*</span> <i
ng-show="documentoGedForm['documentoGed.tipoSigiloDocumento.id'].$error.required && (!documentoGedForm['documentoGed.tipoSigiloDocumento.id'].$pristine || documentoGedForm.$submitted)"
class='fa fa-warning red' tooltip="{{$translate.instant('ECM.LABEL.SIGILO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i>
</label>
<div class="radio-inline" ng-repeat="sigiloTipoDocumento in documentoGed.nivelAcesso.sigilos">
<label> <input type="radio" required="documentoGed.nivelAcesso.nivelAcesso.codigo == 1" name="documentoGed.tipoSigiloDocumento.id" id="documentoGed.tipoSigiloDocumento.id"
ng-disabled="!edit" ng-value="sigiloTipoDocumento.sigilo.id" ng-model="documentoGed.sigilo.id" ng-change='setHipoteseLegal()' /> {{sigiloTipoDocumento.sigilo.tipoSigilo.descricao}}
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6" ng-show='documentoGed.nivelAcesso.nivelAcesso.codigo == 1 || documentoGed.sigilo.id'>
<label-select ng-id="documentoGed.hipoteseLegal" ng-model="documentoGed.hipoteseLegal" ng-label="ECM.LABEL.HIPOTESELEGAL" ng-obrigatorio='documentoGed.nivelAcesso.nivelAcesso.codigo == 1 || documentoGed.sigilo.id' form="documentoGedForm" ng-list="hipoteses"
ng-custom-options="hipoteseLegal.originalElement as hipoteseLegal.nome for hipoteseLegal" track-by="track by hipoteseLegal.id" ng-disabled='!edit'> </label-select>
</div>
</div>
<div class="row" ng-show='documentoGed.formaCriacao.codigo == 2'>
<div class="col-md-6">
<auto-complete ng-id="documentoGed.tipoSuporteDocumento" ng-label="ECM.LABEL.TIPO_SUPORTE" ng-disabled="!edit" form='documentoGedForm' ng-model="documentoGed.tipoSuporteDocumento"
ng-find="findAutoCompleteTipoSuporte(value)" button-new-action="novoTipoSuporteDocumento()" button-new-tooltip="{{$translate.instant('ECM.LABEL.NOVO_TIPO_SUPORTE')}}" button-new-show="true" ng-item="item.nome" ng-obrigatorio="{{documentoGed.formaCriacao.codigo == 2 && !outrosSuporte}}" />
</div>
</div>
<div class="row" ng-show='documentoGed.formaCriacao.codigo == 2'>
<div class="col-md-2" style="margin-bottom: 34px;">
<label-input-checkbox ng-model="mantido" ng-disabled="!edit" ng-label="ECM.LABEL.MANTIDO" ng-custom-change="limparLocalizacao()"></label-input-checkbox>
</div>
<div class="col-md-10" ng-show="mantido">
<label-input ng-id="documentoGed.localizacao" ng-label="LABEL.LOCALIZACAO" ng-type="text" ng-model="documentoGed.localizacao" form="documentoGedForm" ng-obrigatorio="mantido"
ng-custom-maxlength="255" ng-type="text" ng-disabled="!edit" />
</div>
</div>
<div class="row">
<div class="col-md-12">
<label-text-area ng-id="documentoGed.assuntoComplementar" ng-label="ECM.LABEL.ASSUNTOCOMPLEMENTAR" ng-model="documentoGed.assuntoComplementar" form="documentoGedForm" ng-obrigatorio="false"
ng-disabled="!edit" rows="3" />
</div>
</div>
<fieldset>
<legend>
<label> <translate>ECM.LABEL.INTERESSADOS</translate>
</label>
</legend>
<div class="row">
<div class="col-md-10">
<auto-complete ng-id="interessado" ng-label="ECM.LABEL.INTERESSADO" ng-disabled="!edit" form='documentoGedForm' ng-model="interessado" ng-find="findAutoCompleteInteressados(value)"
ng-item="item.nome" ng-set-result="setInteressados(item)" />
</div>
<div class="col-md-12">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<button class="btn btn-clear" type="button" ng-hide="!edit" ng-click="removerInteressados()">
<i class="fa fa-times red"></i>
<translate>LABEL.REMOVER</translate>
</button>
</div>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th width="5%" class="text-center"></th>
<th class="text-center"><translate>LABEL.NOME</translate></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="interessado in documentoGed.interessados">
<td class="text-center"><input type="radio" name="interessadoChecked" id="interessadoChecked" ng-value="interessado" ng-model="$parent.interessadoChecked"
ng-click="setInteressadoRemocao(interessado, $index)" /></td>
<td class="text-center">{{interessado.interessado.nome}}</td>
</tr>
<tr ng-hide="documentoGed.interessados.length > 0">
<td colspan="3" class="text-center"><translate>LABEL.TABELA_VAZIA</translate></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset ng-show='edit && documentoGed.formaCriacao.codigo == 1'>
<legend>
<label class="control-label block" ng-class="{'has-error': !documentoGed.conteudo && documentoGedForm.$submitted}"> <translate>ECM.LABEL.CONTEUDO</translate><span class="red">*</span> <i
ng-show="!documentoGed.conteudo && documentoGedForm.$submitted" class='fa fa-warning red'
tooltip="{{$translate.instant('ECM.LABEL.CONTEUDO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}" tooltip-placement='top'></i></label>
</legend>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div id="documentoGed.conteudo" ckeditor="options" ng-model="documentoGed.conteudo" ready="onReady()"></div>
</div>
</div>
</div>
</fieldset>
<fieldset ng-show='edit && documentoGed.formaCriacao.codigo == 2'>
<legend>
<label ng-class="{'has-error' : documentoGedForm.$submitted && !uploader.queue.length}"> <translate>ECM.LABEL.ANEXO</translate> <span class='red'>*</span> <i
ng-show="documentoGedForm.$submitted && !uploader.queue.length" class='fa fa-warng red' tooltip="{{$translate.instant('LABEL.ANEXO') + ' ' +$translate.instant('LABEL.CAMPO_OBRIGATORIO')}}"
tooltip-placement='top'></i>
</label>
</legend>
<div class="row" style="padding: 0px 12px 0px 12px !important;" ng-show='uploader.queue < 1 && !documentoGed.anexo.id'>
<div nv-file-drop="" uploader="uploader" id="actionUploadArquivos" onclick="$('#uploadArquivos').click();">
<div nv-file-over="" uploader="uploader" over-class="another-file-over-class" class="well my-drop-zone">
<p>
<translate>MSG.ARRASTE_SOLTE_ARQUIVO</translate>
<i class="upload-icon ace-icon fa fa-cloud-upload blue fa-3x"></i>
</p>
</div>
</div>
<input id="uploadArquivos" type="file" nv-file-select="" uploader="uploader" ng-required='documentoGed.formaCriacao.codigo == 2' ng-show='false' />
</div>
<div class="row" ng-show='uploader.queue[0]'>
<div class="col-sm-6">
<label>{{ uploader.queue[0].file.name}}</label>
</div>
<div class="col-sm-4">
<strong><label>{{ uploader.queue[0].file.size/1024/1024|number:2 }} MB</label></strong>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-default btn-sm" title="{{$translate.instant('LABEL.REMOVER')}}" ng-click="exibirDialogRemocaoUpload()" ng-hide="!edit">
<i class="fa fa-times red"></i>
<translate>LABEL.REMOVER</translate>
</button>
</div>
</div>
<div class="row" ng-show='documentoGed.anexo.id'>
<div class="col-sm-6">
<strong><label>{{ documentoGed.anexo.descricao}}</label></strong>
</div>
<div class="col-sm-4">
<strong><label>{{ documentoGed.anexo.tamanho/1024/1024|number:2 }} MB</label></strong>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-default btn-sm" title="{{$translate.instant('LABEL.REMOVER')}}" ng-click="exibirDialogRemocaoUpload()" ng-hide="!edit">
<i class="fa fa-times red"></i>
<translate>LABEL.REMOVER</translate>
</button>
</div>
</div>
</fieldset>
</fieldset>
<div class="row" ng-show="edit && documentoGed.id == null">
<div class="col-md-12">
<div ng-show="edit && documentoGed.id == null" class="btn-group">
<button title="{{$translate.instant('LABEL.SALVAR')}}" ng-click="saveOrUpdate(false)" alt="{{$translate.instant('LABEL.SALVAR')}}" type="button" class="btn btn-sm btn-primary" dropdown-toggle>
<translate>LABEL.SALVAR</translate>
</button>
</div>
<div class="btn-group">
<button class="btn btn-sm btn-primary" ng-click="resetForm()" type="button">
<translate>LABEL.LIMPAR</translate>
</button>
</div>
</div>
</div>
<div class="row" ng-show="edit && documentoGed.id != null">
<div class="col-md-12">
<div ng-show="edit" class="btn-group dropup" role="group" dropdown>
<button title="{{$translate.instant('LABEL.SALVAR')}}" alt="{{$translate.instant('LABEL.SALVAR')}}" type="button" class="btn btn-sm btn-primary" dropdown-toggle>
<i class="fa fa-save green"></i>
<translate>LABEL.SALVAR</translate>
<span class="fa fa-caret-down icon-on-right"></span>
</button>
<ul class="dropdown-menu-center dropdown-menu dropdown-caret" role="menu">
<li><a href="#void" ng-click="saveOrUpdate(true)"><i class="fa fa-file-text-o red"></i> <translate>ECM.LABEL.NOVA_VERSAO</translate>({{documentoGed.versaoDocumento + 1 | number:0}}.0)</a></li>
<li><a href="#void" ng-click="saveOrUpdate(false)"><i class="fa fa-file-text-o red"></i> <translate>ECM.LABEL.VERSAO_INTERMEDIARIA</translate>({{documentoGed.versaoDocumento + 0.1 |
number:1}})</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn btn-sm btn-primary" ng-click="resetForm()" type="button">
<translate>LABEL.LIMPAR</translate>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>