Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sistema_mcid
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marcio neto
sistema_mcid
Commits
cec2483e
Commit
cec2483e
authored
Jan 11, 2024
by
sandroresende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inclusa do mod debendures
parent
0a5f7e77
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
769 additions
and
139 deletions
+769
-139
DebenduresReidiController.php
...ollers/Mod_debendures_reidi/DebenduresReidiController.php
+6
-0
app.js
public/js/app.js
+608
-125
ProjetoDebenduresReidi.vue
...omponents/mod_debendures_reidi/ProjetoDebenduresReidi.vue
+149
-10
Dados_projeto.blade.php
...ces/views/modulo_debendures_reidi/Dados_projeto.blade.php
+5
-4
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/Mod_debendures_reidi/DebenduresReidiController.php
View file @
cec2483e
...
...
@@ -78,4 +78,10 @@ class DebenduresReidiController extends Controller
$projeto
->
load
(
'tipoProjeto'
,
'setorProjeto'
);
return
view
(
'modulo_debendures_reidi.dados_projeto'
,
compact
(
'projeto'
));
}
public
function
updateProjeto
(
Request
$request
)
{
return
$request
->
all
();
}
}
public/js/app.js
View file @
cec2483e
This diff is collapsed.
Click to expand it.
resources/assets/js/components/mod_debendures_reidi/ProjetoDebenduresReidi.vue
View file @
cec2483e
<
template
>
<div
class=
"form-group"
>
<div
class=
"row"
v-if=
"!(codSaci || codMCidades)"
>
<div
class=
"row"
>
<div
class=
"column col-xs-12 col-md-2"
>
<label
for=
"uf"
>
UF
</label>
<select
...
...
@@ -8,9 +8,10 @@
class=
"form-select br-select"
name=
"estado"
@
change=
"onChangeEstado"
v-model=
"estado"
>
v-model=
"estado"
:disabled=
"this.dados.sg_uf && this.dados.uf_id"
>
<option
value=
""
>
Escolha um Estado:
</option>
<option
v-for=
"estado in estados"
v-text=
"estado.
sg_uf"
:value=
"estado.sg_uf"
:key=
"estado.sg
_uf"
></option>
<option
v-for=
"estado in estados"
v-text=
"estado.
txt_sigla_uf"
:value=
"estado.txt_sigla_uf"
:key=
"estado.txt_sigla
_uf"
></option>
</select>
</div>
<div
class=
"column col-xs-12 col-md-5"
>
...
...
@@ -19,7 +20,8 @@
id=
"tipo_projeto"
class=
"form-select br-select"
name=
"tipo_projeto"
v-model=
"tipo_projeto"
>
v-model=
"tipo_projeto"
:disabled=
"this.dados.tipo_projeto_id"
>
<option
value=
""
>
Escolha um tipo projeto:
</option>
<option
v-for=
"tipo_projeto in tipo_projetos"
v-text=
"tipo_projeto.txt_tipo_projeto"
:value=
"tipo_projeto.id"
:key=
"tipo_projeto.id"
></option>
</select>
...
...
@@ -30,12 +32,108 @@
id=
"setor_projeto"
class=
"form-select br-select"
name=
"setor_projeto"
v-model=
"setor_projeto"
>
v-model=
"setor_projeto"
:disabled=
"this.dados.setor_projeto_id"
>
<option
value=
""
>
Escolha um setor projeto:
</option>
<option
v-for=
"setor_projeto in setor_projetos"
v-text=
"setor_projeto.txt_setor_projeto"
:value=
"setor_projeto.id"
:key=
"setor_projeto.id"
></option>
</select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col col-xs-12 col-sm-12 br-input"
>
<label
for=
"titular_projeto"
class=
"control-label"
>
Titular do Projeto
</label>
<input
id=
"titular_projeto"
type=
"text"
class=
"form-control"
name=
"titular_projeto"
v-model=
"titular_projeto"
:disabled=
"this.dados.txt_titular_projeto"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col col-xs-12 col-sm-12 br-textarea"
>
<label
for=
"txt_nome_projeto"
class=
"control-label"
>
Nome do Projeto
</label>
<textarea
class=
"form-control"
id=
"txt_nome_projeto"
name=
"txt_nome_projeto"
v-model=
"nome_projeto"
rows=
"7"
:disabled=
"this.dados.txt_nome_projeto"
required
>
</textarea>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col col-xs-12 col-sm-6 br-input"
>
<label
for=
"portaria"
class=
"control-label"
>
Portaria
</label>
<input
id=
"portaria"
type=
"text"
class=
"form-control"
name=
"portaria"
v-model=
"portaria"
:disabled=
"this.dados.num_portaria"
>
</div>
<div
class=
"col col-xs-12 col-sm-6 br-input"
>
<label
for=
"data_portaria"
class=
"control-label"
>
Data da Portaria
</label>
<input
id=
"data_portaria"
type=
"date"
class=
"form-control"
name=
"data_portaria"
v-model=
"data_portaria"
:disabled=
"this.dados.dte_portaria"
>
</div>
</div>
<div
class=
"row"
v-if=
"this.tipo_projeto == 1"
>
<div
class=
"col col-xs-12 col-sm-5 br-input"
>
<label
for=
"vlr_projeto"
class=
"control-label"
>
Valor do projeto
</label>
<input
id=
"vlr_projeto"
type=
"text"
class=
"form-control"
name=
"vlr_projeto"
v-model=
"vlr_projeto"
>
</div>
<div
class=
"col col-xs-12 col-sm-5 br-input"
>
<label
for=
"vlr_estimado"
class=
"control-label"
>
Valor Estimado
</label>
<input
id=
"vlr_estimado"
type=
"text"
class=
"form-control"
name=
"vlr_estimado"
v-model=
"vlr_estimado"
>
</div>
<div
class=
"column col-xs-12 col-md-2"
>
<label
for=
"bln_contabilizar_valores"
>
Contabilizar Valores
</label>
<select
id=
"bln_contabilizar_valores"
class=
"form-select br-select"
name=
"bln_contabilizar_valores"
v-model=
"bln_contabilizar_valores"
>
<option
value=
""
>
Escolha uma opção:
</option>
<option
value=
"1"
>
Sim
</option>
<option
value=
"0"
>
Não
</option>
</select>
</div>
</div>
<div
class=
"row"
v-if=
"this.tipo_projeto == 2"
>
<div
class=
"col col-xs-12 col-sm-6 br-input"
>
<label
for=
"vlr_projeto_com_reidi"
class=
"control-label"
>
Valor do projeto com Reidi
</label>
<input
id=
"vlr_projeto_com_reidi"
type=
"text"
class=
"form-control"
name=
"vlr_projeto_com_reidi"
v-model=
"vlr_projeto_com_reidi"
>
</div>
<div
class=
"col col-xs-12 col-sm-6 br-input"
>
<label
for=
"vlr_projeto_sem_reidi"
class=
"control-label"
>
Valor do projeto sem Reidi
</label>
<input
id=
"vlr_projeto_sem_reidi"
type=
"text"
class=
"form-control"
name=
"vlr_projeto_sem_reidi"
v-model=
"vlr_projeto_sem_reidi"
>
</div>
</div>
</div>
</
template
>
...
...
@@ -50,6 +148,16 @@
tipo_projeto
:
''
,
setor_projetos
:
''
,
setor_projeto
:
''
,
nome_projeto
:
''
,
titular_projeto
:
''
,
nome_projeto
:
''
,
portaria
:
''
,
data_portaria
:
''
,
vlr_projeto
:
''
,
vlr_projeto_sem_reidi
:
''
,
vlr_projeto_com_reidi
:
''
,
vlr_estimado
:
''
,
bln_contabilizar_valores
:
''
,
}
},
methods
:{
...
...
@@ -74,15 +182,29 @@
this
.
municipio
=
''
;
this
.
textoEscolhaMunicipio
=
"Filtre o Estado"
}
}
},
formatarData
(
data
)
{
if
(
data
)
{
const
novaData
=
data
.
toLocaleDateString
(
'pt-BR'
);
return
novaData
;
}
else
{
return
''
;
}
},
formatarValor
(
valor
,
casas
)
{
if
(
valor
)
{
let
val
=
(
valor
/
1
).
toFixed
(
casas
).
replace
(
'.'
,
','
)
return
val
.
toString
().
replace
(
/
\B(?=(\d{3})
+
(?!\d))
/g
,
"."
)
}
else
{
return
'0.00'
;
}
}
}
,
mounted
()
{
//console.log(this.form._token);
axios
.
get
(
this
.
url
+
'/api/
debendures/
ufs'
).
then
(
resposta
=>
{
axios
.
get
(
this
.
url
+
'/api/ufs'
).
then
(
resposta
=>
{
//console.log(resposta.data);
this
.
estados
=
resposta
.
data
;
this
.
estado
=
''
;
this
.
municipio
=
''
;
this
.
estados
=
resposta
.
data
;
}).
catch
(
erro
=>
{
console
.
log
(
erro
);
})
...
...
@@ -105,7 +227,24 @@
})
if
(
this
.
dados
){
console
.
log
(
this
.
dados
.
sg_uf
);
this
.
estado
=
this
.
dados
.
sg_uf
;
this
.
tipo_projeto
=
this
.
dados
.
tipo_projeto_id
;
this
.
setor_projeto
=
this
.
dados
.
setor_projeto_id
;
this
.
nome_projeto
=
this
.
dados
.
txt_nome_projeto
;
this
.
titular_projeto
=
this
.
dados
.
txt_titular_projeto
;
this
.
nome_projeto
=
this
.
dados
.
txt_nome_projeto
;
this
.
portaria
=
this
.
dados
.
num_portaria
;
this
.
data_portaria
=
this
.
dados
.
dte_portaria
;
this
.
vlr_projeto
=
this
.
formatarValor
(
this
.
dados
.
vlr_projeto
,
2
);
this
.
vlr_projeto_sem_reidi
=
this
.
formatarValor
(
this
.
dados
.
vlr_projeto_sem_reidi
,
2
);
this
.
vlr_projeto_com_reidi
=
this
.
formatarValor
(
this
.
dados
.
vlr_projeto_com_reidi
,
2
);
this
.
vlr_estimado
=
this
.
formatarValor
(
this
.
dados
.
vlr_estimado
,
2
);
if
(
this
.
dados
.
bln_contabilizar_valores
){
this
.
bln_contabilizar_valores
=
1
;
}
else
{
this
.
bln_contabilizar_valores
=
0
;
}
}
}
...
...
resources/views/modulo_debendures_reidi/Dados_projeto.blade.php
View file @
cec2483e
...
...
@@ -14,13 +14,13 @@
</
historico
-
navegacao
>
<
div
class
="
main
-
content
pl
-
sm
-
3
mt
-
5
container
-
fluid
" id="
main
-
content
">
<
div
class
="
main
-
content
pl
-
sm
-
3
mt
-
5
container
-
fluid
" id="
main
-
content
"
>
<cabecalho-relatorios
:titulo="
'{{$projeto->txt_titular_projeto}}'
"
:subtitulo1="
'{{$projeto->tipoProjeto->txt_tipo_projeto}}'
"
:subtitulo2="
'{{$projeto->setorProjeto->txt_setor_projeto}}'
"
:subtitulo3="
'{{$projeto->sg_uf}}'
"
:subtitulo3="
'{{$projeto->sg_uf}}'
"
:linkcompartilhar="
'{{ url("/debendures_reidi/projeto/".$projeto->id) }}'
"
@if(
$projeto->updated_at
)
:dataatualizacao="
'{{date('
d
/
m
/
Y
',strtotime($projeto->updated_at))}}'
"
...
...
@@ -32,14 +32,15 @@
<form role="
form
" method="
POST
" action='{{ url("
debendures_reidi
/
projeto
/
update
") }}'>
@csrf
<input type="
hidden
" id="
projeto_id
" name="
projeto_id
" value="
{{
$projeto
->
id
}}
">
<projeto-debendures-reidi
:url="
'{{ url('
/
') }}'
"
v-bind:dados="
{{
$projeto
}}
"
v-bind:dados="
{{
json_encode
(
$projeto
)
}}
"
></projeto-debendures-reidi>
<div class="
p
-
3
text
-
right
">
<button class="
br
-
button
primary
mr
-
3
" type="
button
" name="
imprimir
" value="
Imprimir
" onclick="
window
.
print
();
">Imprimi
r
<button class="
br
-
button
primary
mr
-
3
" type="
submit
">Atualiza
r
</button>
<button class="
br
-
button
danger
mr
-
3
" type="
button
" onclick="
javascript
:
window
.
history
.
go
(
-
1
)
">Voltar
</button>
...
...
routes/web.php
View file @
cec2483e
...
...
@@ -351,3 +351,4 @@ Route::get('/codem/demanda/observacao/excluir/{observacao}', 'Mod_codem\Observac
Route
::
get
(
'/debendures_reidi/projetos/consultar'
,
'Mod_debendures_reidi\DebenduresReidiController@consultarProjeto'
);
Route
::
post
(
'/debendures_reidi/projetos/pesquisar'
,
'Mod_debendures_reidi\DebenduresReidiController@pesquisarProjeto'
);
Route
::
get
(
'/debendures_reidi/projeto/{projeto}'
,
'Mod_debendures_reidi\DebenduresReidiController@dadosProjeto'
);
Route
::
post
(
'/debendures_reidi/projeto/update'
,
'Mod_debendures_reidi\DebenduresReidiController@updateProjeto'
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment