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
2405eda4
Commit
2405eda4
authored
Nov 03, 2023
by
sandroresende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
funcionalidade excluir selecao e numeros indicadores selecao prop
parent
c3c7a31c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4144 additions
and
4143 deletions
+4144
-4143
PropostaController.php
app/Http/Controllers/Propostas/PropostaController.php
+19
-17
SelecaoController.php
app/Http/Controllers/Propostas/SelecaoController.php
+11
-10
app.js
public/js/app.js
+4092
-4090
SelecionarProposta.vue
.../js/components/mod_propostas/admin/SelecionarProposta.vue
+22
-26
No files found.
app/Http/Controllers/Propostas/PropostaController.php
View file @
2405eda4
...
...
@@ -160,7 +160,7 @@ class PropostaController extends Controller
//return $whereProposta;
$proposta
=
Propostas
::
where
(
$whereProposta
)
->
get
();
$proposta
=
Propostas
::
where
(
$whereProposta
)
->
get
();
if
(
count
(
$proposta
)
==
0
){
flash
()
->
erro
(
"Erro"
,
"Não existe proposta."
);
...
...
@@ -177,20 +177,22 @@ class PropostaController extends Controller
}
DB
::
beginTransaction
();
$proposta
=
Propostas
::
find
(
$proposta
->
id
);
$propostaDeletada
=
$proposta
->
delete
();
$usuario
=
User
::
find
(
$userLog
);
$proposta
=
Propostas
::
find
(
$proposta
->
id
);
$proposta
->
situacao_proposta_id
=
8
;
$propostaDeletada
=
$proposta
->
update
();
if
(
$propostaDeletada
){
$itensFinanciveis
=
RlcItensFinanciaveisProposta
::
where
(
'proposta_id'
,
$proposta
->
id
)
->
get
();
foreach
(
$itensFinanciveis
as
$item
){
$itensdeletar
=
RlcItensFinanciaveisProposta
::
find
(
$item
->
id
);
$itensdeletar
->
delete
();
}
DB
::
commit
();
flash
()
->
sucesso
(
"Sucesso"
,
"Proposta excluída com sucesso!"
);
return
back
();
$entePublicoId
=
Crypt
::
encrypt
(
$usuario
->
ente_publico_id
);
$cpfUsuario
=
Crypt
::
encrypt
(
$usuario
->
txt_cpf_usuario
);
return
redirect
(
'/ente_publico/propostas/'
.
$cpfUsuario
.
'/'
.
$entePublicoId
);
}
else
{
DB
::
rollBack
();
flash
()
->
erro
(
"Erro"
,
"Não foi possível excluir a proposta."
);
...
...
@@ -237,7 +239,7 @@ class PropostaController extends Controller
$proposta
->
selecao_id
=
$request
->
selecao_id
;
$proposta
->
modalidade_participacao_id
=
3
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -318,7 +320,7 @@ class PropostaController extends Controller
//$proposta->municipio_id = $request->municipio;
//$proposta->uf_id = $request->estado;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -399,7 +401,7 @@ class PropostaController extends Controller
$proposta
->
selecao_id
=
$request
->
selecao_id
;
$proposta
->
modalidade_participacao_id
=
1
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -477,7 +479,7 @@ class PropostaController extends Controller
$proposta
->
municipio_id
=
$request
->
municipio
;
$proposta
->
uf_id
=
$request
->
estado
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -554,7 +556,7 @@ class PropostaController extends Controller
$proposta
->
selecao_id
=
$request
->
selecao_id
;
$proposta
->
modalidade_participacao_id
=
2
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -645,7 +647,7 @@ class PropostaController extends Controller
$proposta
->
selecao_id
=
$request
->
selecao_id
;
$proposta
->
modalidade_participacao_id
=
4
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
@@ -732,7 +734,7 @@ class PropostaController extends Controller
$proposta
->
municipio_id
=
$request
->
municipio
;
$proposta
->
uf_id
=
$request
->
estado
;
$proposta
->
dsc_obj_intervencao
=
$request
->
dsc_obj_intervencao
;
$proposta
->
vlr_intervencao
=
$request
->
vlr_intervencao
;
$proposta
->
vlr_intervencao
=
floatval
(
str_replace
(
"."
,
""
,
$request
->
vlr_intervencao
))
;
$proposta
->
dsc_justificativa
=
$request
->
dsc_justificativa
;
$proposta
->
dsc_problema_resolver
=
$request
->
dsc_problema_resolver
;
$proposta
->
dsc_beneficios_intervencao
=
$request
->
dsc_beneficios_intervencao
;
...
...
app/Http/Controllers/Propostas/SelecaoController.php
View file @
2405eda4
...
...
@@ -490,20 +490,21 @@ class SelecaoController extends Controller
$vlr_tarifa
=
0
;
$vlr_final_transferegov
=
0
;
if
((
$vlr_repasse
>
23885
0
)
&&
(
$vlr_repasse
<
75000
0
)){
$vlr_tarifa
=
(
$vlr_repasse
*
0.031999999
)
+
3500
;
}
else
if
((
$vlr_repasse
>=
7
50000
)
&&
(
$vlr_repasse
<
15000
00
)){
$vlr_tarifa
=
(
$vlr_repasse
*
0.03799999
6
)
+
3500
;
}
else
if
((
$vlr_repasse
>=
15
00000
)
&&
(
$vlr_repasse
<
200000
00
)){
$vlr_tarifa
=
(
$vlr_repasse
*
0.04
4
)
+
3500
;
}
else
if
(
$vlr_repasse
>=
200000
00
){
$vlr_tarifa
=
(
$vlr_repasse
*
0.0440000001
)
+
3500
;
if
((
$vlr_repasse
>
23885
6
)
&&
(
$vlr_repasse
<
77745
0
)){
$vlr_tarifa
=
(
(
$vlr_repasse
-
3500
)
*
0.03100775
)
+
3500
;
}
else
if
((
$vlr_repasse
>=
7
77450
)
&&
(
$vlr_repasse
<
15605
00
)){
$vlr_tarifa
=
(
(
$vlr_repasse
-
3500
)
*
0.0366088
6
)
+
3500
;
}
else
if
((
$vlr_repasse
>=
15
69500
)
&&
(
$vlr_repasse
<
835235
00
)){
$vlr_tarifa
=
(
(
$vlr_repasse
-
3500
)
*
0.04214559
4
)
+
3500
;
}
else
if
(
$vlr_repasse
>=
835235
00
){
$vlr_tarifa
=
(
(
$vlr_repasse
-
3500
)
*
0.0421455939
)
+
3500
;
}
else
{
$vlr_tarifa
=
0
;
}
}
$listaSelecaoProposta
->
vlr_repasse
=
floatval
(
$vlr_repasse
);
$listaSelecaoProposta
->
vlr_tarifa
=
floatval
(
$vlr_tarifa
);
$listaSelecaoProposta
->
vlr_tarifa
=
floatval
(
round
(
$vlr_tarifa
,
0
,
PHP_ROUND_HALF_UP
)
);
$listaSelecaoProposta
->
vlr_final_transferegov
=
floatval
(
$vlr_repasse
)
-
floatval
(
$vlr_tarifa
);
$listaSelecaoProposta
->
created_at
=
Date
(
"Y-m-d h:i:s"
);
...
...
public/js/app.js
View file @
2405eda4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
resources/assets/js/components/mod_propostas/admin/SelecionarProposta.vue
View file @
2405eda4
...
...
@@ -283,25 +283,21 @@
}
},
calcular
(){
if
((
this
.
vlr_repasse
>
238850
)
&&
(
this
.
vlr_repasse
<
750000
)){
this
.
vlr_tarifa
=
Number
((
this
.
vlr_repasse
*
0.031999999
)
+
3500
);
}
else
if
((
this
.
vlr_repasse
>=
750000
)
&&
(
this
.
vlr_repasse
<
1500000
)){
this
.
vlr_tarifa
=
Number
((
this
.
vlr_repasse
*
0.037999996
)
+
3500
);
}
else
if
((
this
.
vlr_repasse
>=
1500000
)
&&
(
this
.
vlr_repasse
<
5000000
)){
this
.
vlr_tarifa
=
Number
((
this
.
vlr_repasse
*
0.044
)
+
3500
);
}
else
if
((
this
.
vlr_repasse
>=
5000000
)
&&
(
this
.
vlr_repasse
<
20000000
)){
this
.
vlr_tarifa
=
Number
((
this
.
vlr_repasse
*
0.044
)
+
3500
);
}
else
if
(
this
.
vlr_repasse
>=
20000000
){
this
.
vlr_tarifa
=
Number
((
this
.
vlr_repasse
*
0.0440000001
)
+
3500
);
if
((
this
.
vlr_repasse
>
238856
)
&&
(
this
.
vlr_repasse
<
777450
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
vlr_repasse
-
3500
)
*
0.03100775
)
+
3500
));
}
else
if
((
this
.
vlr_repasse
>=
777450
)
&&
(
this
.
vlr_repasse
<
1560500
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
vlr_repasse
-
3500
)
*
0.03660886
)
+
3500
));
}
else
if
((
this
.
vlr_repasse
>=
1569500
)
&&
(
this
.
vlr_repasse
<
83523500
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
vlr_repasse
-
3500
)
*
0.042145594
)
+
3500
));
}
else
if
(
this
.
vlr_repasse
>=
83523500
){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
vlr_repasse
-
3500
)
*
0.0421455939
)
+
3500
));
}
else
{
this
.
vlr_tarifa
=
Number
(
0
);
}
}
this
.
vlr_tarifa
=
this
.
formatarValor
(
Number
(
Math
.
round
(
this
.
vlr_tarifa
)),
2
);
this
.
vlr_final_transferegov
=
this
.
formatarValor
(
Number
(
this
.
vlr_repasse
-
this
.
vlr_tarifa
),
2
);
this
.
vlr_tarifa
=
this
.
formatarValor
(
Number
(
this
.
vlr_tarifa
),
2
);
},
onChangeRepasse
(){
...
...
@@ -408,23 +404,23 @@
this
.
idh
=
this
.
dados_proposta
.
vlr_idhm
;
this
.
num_pop_atendida_esgotamento_sanitario
=
this
.
dados_proposta
.
num_pop_atendida_esgotamento_sanitario
;
this
.
num_pop_atendida_abastecimento_agua
=
this
.
dados_proposta
.
num_pop_atendida_abastecimento_agua
;
if
((
this
.
dados_proposta
.
vlr_intervencao
>
23885
0
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
75000
0
)){
this
.
vlr_tarifa
=
Number
(
(
this
.
dados_proposta
.
vlr_intervencao
*
0.031999999
)
+
3500
);
}
else
if
((
this
.
dados_proposta
.
vlr_intervencao
>=
750000
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
15000
00
)){
this
.
vlr_tarifa
=
Number
(
(
this
.
dados_proposta
.
vlr_intervencao
*
0.037999996
)
+
3500
);
}
else
if
((
this
.
dados_proposta
.
vlr_intervencao
>=
15
00000
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
200000
00
)){
this
.
vlr_tarifa
=
Number
(
(
this
.
dados_proposta
.
vlr_intervencao
*
0.044
)
+
3500
);
}
else
if
(
this
.
dados_proposta
.
vlr_intervencao
>=
200000
00
){
this
.
vlr_tarifa
=
Number
(
(
this
.
dados_proposta
.
vlr_intervencao
*
0.0440000001
)
+
3500
);
if
((
this
.
dados_proposta
.
vlr_intervencao
>
23885
6
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
77745
0
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
dados_proposta
.
vlr_intervencao
-
3500
)
*
0.03100775
)
+
3500
)
);
}
else
if
((
this
.
dados_proposta
.
vlr_intervencao
>=
777450
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
15605
00
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
dados_proposta
.
vlr_intervencao
-
3500
)
*
0.03660886
)
+
3500
)
);
}
else
if
((
this
.
dados_proposta
.
vlr_intervencao
>=
15
69500
)
&&
(
this
.
dados_proposta
.
vlr_intervencao
<
835235
00
)){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
dados_proposta
.
vlr_intervencao
-
3500
)
*
0.042145594
)
+
3500
)
);
}
else
if
(
this
.
dados_proposta
.
vlr_intervencao
>=
835235
00
){
this
.
vlr_tarifa
=
Number
(
Math
.
round
(((
this
.
dados_proposta
.
vlr_intervencao
-
3500
)
*
0.0421455939
)
+
3500
)
);
}
else
{
this
.
vlr_tarifa
=
Number
(
0
);
}
this
.
vlr_repasse
=
this
.
formatarValor
(
Number
(
this
.
dados_proposta
.
vlr_intervencao
),
2
);
this
.
vlr_repasse
=
this
.
formatarValor
(
Number
(
this
.
dados_proposta
.
vlr_intervencao
),
2
);
this
.
vlr_tarifa
=
this
.
formatarValor
(
Number
(
Math
.
round
(
this
.
vlr_tarifa
)),
2
);
this
.
vlr_final_transferegov
=
this
.
formatarValor
(
Number
(
this
.
dados_proposta
.
vlr_intervencao
-
this
.
vlr_tarifa
),
2
);
this
.
vlr_tarifa
=
this
.
formatarValor
(
Number
(
this
.
vlr_tarifa
),
2
);
}
else
{
Swal
({
title
:
'Atenção!'
,
...
...
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