Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
Intranet
Overview
Overview
Details
Activity
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
Matteo
Intranet
Commits
e2508ec5
Commit
e2508ec5
authored
Jul 11, 2019
by
Matteo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aggiunta condivisione allegati Pareri e Gestione Fatture per struttura
parent
3162141f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
30 deletions
+47
-30
fatture-request.ts
src/app/interface/fatture-request.ts
+1
-0
parere.page.html
src/app/pages/parere/parere.page.html
+2
-2
parere.page.ts
src/app/pages/parere/parere.page.ts
+1
-1
segreteria.page.html
src/app/pages/segreteria/segreteria.page.html
+14
-18
segreteria.page.ts
src/app/pages/segreteria/segreteria.page.ts
+26
-7
segreteria.service.ts
src/app/service/segreteria.service.ts
+3
-2
No files found.
src/app/interface/fatture-request.ts
View file @
e2508ec5
...
...
@@ -2,5 +2,6 @@ import { Pair } from './pair';
export
interface
FattureRequest
{
cliente
:
number
;
limite
:
number
;
struttura
:
number
;
filtri
:
Pair
[];
}
src/app/pages/parere/parere.page.html
View file @
e2508ec5
...
...
@@ -71,7 +71,7 @@
<p>
{{parereAttivo.testo}}
</p>
<div
class=
"download-doc"
*
ngIf=
"parereAttivo.nomeFile != null"
>
<div
class=
"image"
title=
"Scarica allegato"
>
<a
*
ngIf=
"!platform.is('desktop')"
(
click
)="
getFile
(
parereAttivo
.
idRichiesta
,
parereAttivo
.
nomeFile
,
true
);"
target=
"_blank"
download
><ion-icon
name=
"
cloud-download
"
[
style
.
color
]="'#
e5e5ea
'"
></ion-icon></a>
<a
*
ngIf=
"!platform.is('desktop')"
(
click
)="
getFile
(
parereAttivo
.
idRichiesta
,
parereAttivo
.
nomeFile
,
true
);"
target=
"_blank"
download
><ion-icon
name=
"
share-alt
"
[
style
.
color
]="'#
e5e5ea
'"
></ion-icon></a>
<a
*
ngIf=
"platform.is('desktop')"
href=
"{{parereAttivo.url}}"
target=
"_blank"
download
><ion-icon
name=
"cloud-download"
[
style
.
color
]="'#
e5e5ea
'"
></ion-icon></a>
</div>
<div
class=
"filename"
>
{{parereAttivo.nomeFile}}
</div>
...
...
@@ -83,7 +83,7 @@
<p>
{{parereAttivo.interventi[0].testo}}
</p>
<div
*
ngIf=
"parereAttivo.interventi[0].nomeFile != null"
class=
"download-doc"
>
<div
class=
"image"
title=
"Scarica allegato"
>
<a
*
ngIf=
"!platform.is('desktop')"
(
click
)="
getFile
(
parereAttivo
.
interventi
[
0
].
idIntervento
,
parereAttivo
.
interventi
[
0
].
nomeFile
,
false
);"
target=
"_blank"
download
><ion-icon
name=
"
cloud-download
"
[
style
.
color
]="'#
2b94d1
'"
></ion-icon></a>
<a
*
ngIf=
"!platform.is('desktop')"
(
click
)="
getFile
(
parereAttivo
.
interventi
[
0
].
idIntervento
,
parereAttivo
.
interventi
[
0
].
nomeFile
,
false
);"
target=
"_blank"
download
><ion-icon
name=
"
share-alt
"
[
style
.
color
]="'#
2b94d1
'"
></ion-icon></a>
<a
*
ngIf=
"platform.is('desktop')"
href=
"{{parereAttivo.interventi[0].url}}"
target=
"_blank"
download
><ion-icon
name=
"cloud-download"
[
style
.
color
]="'#
2b94d1
'"
></ion-icon></a>
</div>
<div
class=
"filename"
>
{{parereAttivo.interventi[0].nomeFile}}
</div>
...
...
src/app/pages/parere/parere.page.ts
View file @
e2508ec5
...
...
@@ -78,7 +78,7 @@ export class ParerePage implements OnInit {
getFile
(
id
,
nomeFile
,
richiesta
)
{
var
fileUrl
=
this
.
httpClientDataService
.
BASE_ADDRESS
+
"/intranet/richiesta.do?idcliente="
+
this
.
idCliente
+
"&idrichiesta="
+
id
+
"&isrichiesta="
+
richiesta
;
this
.
utilService
.
download
Documento
(
fileUrl
,
nomeFile
);
this
.
utilService
.
share
Documento
(
fileUrl
,
nomeFile
);
}
async
loadPareri
(
fase
)
...
...
src/app/pages/segreteria/segreteria.page.html
View file @
e2508ec5
...
...
@@ -26,6 +26,18 @@
</div>-->
<div
[
ngSwitch
]="
segreteria
"
ngDefaultControl
>
<ion-item
class=
"selection item-no-border"
no-margin
no-padding
>
<ion-label>
Seleziona la struttura
</ion-label>
<ion-select
value=
"clienteSel"
[(
ngModel
)]="
idStrutturaSel
"
(
ionChange
)="
cambiaStruttura
()"
no-scroll
title=
"Seleziona una struttura"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
<ion-select-option
*
ngFor=
"let struttura of strutture;"
value=
"{{struttura.id}}"
>
{{struttura.denominazione}}
</ion-select-option>
</ion-select>
</ion-item>
<ion-text
class=
"selection-done margin-top"
>
La struttura che hai selezionato è
</ion-text>
<ion-text
class=
"grigio selection-done"
text-wrap
>
<br/><strong>
{{strutturaSel.denominazione}}
</strong>
</ion-text>
<ion-list
*
ngSwitchCase=
"'fatture'"
ngDefaultControl
>
<ion-grid>
<ion-row
class=
"search-date"
>
...
...
@@ -104,23 +116,7 @@
<div
class=
"title-infra"
>
Estratto conto
</div>
<ion-item
class=
"selection item-no-border"
no-margin
no-padding
>
<ion-label>
Seleziona la struttura
</ion-label>
<ion-select
value=
"clienteSel"
[(
ngModel
)]="
idStrutturaSel
"
(
ionChange
)="
cambiaStruttura
()"
no-scroll
title=
"Seleziona una struttura"
>
<ion-icon
name=
"arrow-forward"
></ion-icon>
<ion-select-option
*
ngFor=
"let struttura of strutture;"
value=
"{{struttura.id}}"
>
{{struttura.denominazione}}
</ion-select-option>
</ion-select>
</ion-item>
<ion-text
class=
"selection-done margin-top"
>
La struttura che hai selezionato è
</ion-text>
<div
class=
"download item-no-border"
>
<a
*
ngIf=
"!platform.is('desktop')"
(
click
)="
getEstrattoConto
(
idCliente
,
'
EstrattoConto
.
pdf
',
strutturaSel
.
id
);"
target=
"_blank"
download
tappable
>
<ion-icon
name=
"cloud-download"
class=
"download-icon"
></ion-icon></a>
<a
*
ngIf=
"platform.is('desktop')"
href=
"http://localhost:8080/stman/intranet/estrattoconto.do?idcliente={{idCliente}}&idstruttura={{strutturaSel.id}}"
target=
"_blank"
download
tappable
>
<ion-icon
name=
"cloud-download"
class=
"download-icon"
title=
"Scarica estratto conto"
></ion-icon></a>
</div>
<ion-text
class=
"grigio selection-done"
text-wrap
>
<br/><strong>
{{strutturaSel.denominazione}}
</strong>
</ion-text>
</ion-list>
<ion-list
*
ngSwitchCase=
"'solleciti'"
ngDefaultControl
>
...
...
@@ -147,7 +143,7 @@
<ion-icon
src=
"assets/icon/fatture-progetti-bianco.svg"
id=
"icon-fatture"
class=
"icon-footer"
></ion-icon>
<ion-label
id=
"label-fatture"
style=
"color: white;"
>
Fatture e Progetti
</ion-label>
</ion-tab-button>
<ion-tab-button
value=
"estratto"
(
click
)="
changeSel
('
estratto
')"
>
<ion-tab-button
value=
"estratto"
(
click
)="
downloadEstrattoConto
('
estratto
')"
>
<ion-icon
src=
"assets/icon/estratto-conto-grigio.svg"
id=
"icon-estratto"
class=
"icon-footer"
></ion-icon>
<ion-label
id=
"label-estratto"
>
Estratto Conto
</ion-label>
</ion-tab-button>
...
...
src/app/pages/segreteria/segreteria.page.ts
View file @
e2508ec5
...
...
@@ -35,15 +35,18 @@ export class SegreteriaPage implements OnInit {
this
.
initPage
();
if
(
AuthService
.
clienteSelezionato
.
id
!=
null
)
{
this
.
loadStrutture
();
this
.
loadFatture
(
'initial'
);
this
.
loadData
();
}
this
.
events
.
subscribe
(
'functionCall:clienteCambiato'
,
eventData
=>
{
this
.
loadStrutture
();
this
.
loadFatture
(
'initial'
);
this
.
loadData
();
});
}
loadData
()
{
this
.
loadStrutture
();
}
segreteria
:
string
;
fatture
:
Fattura
[];
idCliente
;
...
...
@@ -222,6 +225,16 @@ export class SegreteriaPage implements OnInit {
this
.
utilService
.
shareDocumento
(
fileUrl
,
nomeFile
);
}
downloadEstrattoConto
()
{
if
(
this
.
platform
.
is
(
"desktop"
))
{
var
url
=
"http://localhost:8080/stman/intranet/estrattoconto.do?idcliente="
+
this
.
idCliente
+
"&idstruttura="
+
this
.
strutturaSel
.
id
;
window
.
open
(
url
,
"_system"
);
}
else
this
.
getEstrattoConto
(
this
.
idCliente
,
'EstrattoConto.pdf'
,
this
.
strutturaSel
.
id
);
}
async
redirectTo2p2
()
{
var
id
=
await
this
.
authService
.
getId
();
...
...
@@ -245,6 +258,7 @@ export class SegreteriaPage implements OnInit {
if
(
this
.
idStrutturaSel
==
this
.
strutture
[
i
].
id
)
this
.
strutturaSel
=
this
.
strutture
[
i
];
}
this
.
loadFatture
(
'initial'
);
}
loadStrutture
()
...
...
@@ -253,7 +267,12 @@ export class SegreteriaPage implements OnInit {
this
.
segreteriaService
.
getStrutture
(
AuthService
.
clienteSelezionato
.
id
).
subscribe
((
res
:
StruttureResponse
)
=>
{
//this.utilService.closeLoading();
this
.
strutture
=
res
.
strutture
;
if
(
this
.
strutture
.
length
>
0
)
this
.
strutturaSel
=
this
.
strutture
[
0
];
if
(
this
.
strutture
.
length
>
0
)
{
this
.
strutturaSel
=
this
.
strutture
[
0
];
this
.
loadFatture
(
'initial'
);
}
},
(
error
:
ErrorResponse
)
=>
{
//this.utilService.closeLoading();
...
...
@@ -281,8 +300,8 @@ export class SegreteriaPage implements OnInit {
if
(
this
.
date2
!=
null
&&
this
.
date2
!=
""
)
dataA
=
this
.
utilService
.
dateFormatConvert
(
this
.
date2
);
var
request
:
FattureRequest
;
this
.
idCliente
=
AuthService
.
clienteSelezionato
.
id
;
if
(
fase
==
"initial"
)
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
10
,
null
,
null
,
numeroP
,
numeroN
);
else
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
null
,
dataDa
,
dataA
,
numeroP
,
numeroN
);
if
(
fase
==
"initial"
)
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
10
,
null
,
null
,
numeroP
,
numeroN
,
this
.
strutturaSel
.
id
);
else
request
=
this
.
segreteriaService
.
createFatturaRequest
(
this
.
idCliente
,
null
,
dataDa
,
dataA
,
numeroP
,
numeroN
,
this
.
strutturaSel
.
id
);
this
.
segreteriaService
.
getFatture
(
request
).
subscribe
((
res
:
FattureResponse
)
=>
{
this
.
utilService
.
closeLoading
();
if
(
res
.
error
){
...
...
src/app/service/segreteria.service.ts
View file @
e2508ec5
...
...
@@ -30,7 +30,7 @@ export class SegreteriaService {
errorRespose
:
ErrorResponse
;
createFatturaRequest
(
id
,
limite
,
daData
,
aData
,
nProgNotula
,
nNotula
)
createFatturaRequest
(
id
,
limite
,
daData
,
aData
,
nProgNotula
,
nNotula
,
struttura
)
{
var
request
:
FattureRequest
;
var
pair
:
Pair
;
...
...
@@ -78,6 +78,7 @@ export class SegreteriaService {
request
=
{
cliente
:
id
,
limite
:
limite
,
struttura
:
struttura
,
filtri
:
pairs
};
return
request
;
...
...
@@ -147,7 +148,7 @@ export class SegreteriaService {
encodeBody
(
params
)
{
var
request
=
"{
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
",
\"
filtri
\"
: {"
;
var
request
=
"{
\"
cliente
\"
: "
+
params
.
cliente
+
",
\"
limite
\"
: "
+
params
.
limite
+
",
\"
struttura
\"
: "
+
params
.
struttura
+
",
\"
filtri
\"
: {"
;
var
filtro
;
var
first
=
true
;
var
i
;
...
...
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