Compare commits
38 Commits
806ac42eae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e89895b07b | ||
|
|
c366a55c15 | ||
|
|
afd6b453d7 | ||
|
|
eee589174e | ||
|
|
47945c9b54 | ||
|
|
1c5652dae6 | ||
| 1f5ab7b133 | |||
|
|
769af04587 | ||
|
|
7bc186cbe2 | ||
|
|
b8cda807ef | ||
|
|
8bf7331837 | ||
|
|
1a26b75cb0 | ||
|
|
de46ca882d | ||
|
|
e464c54c97 | ||
|
|
6292312e1d | ||
|
|
f300dc07d1 | ||
|
|
1cb849a299 | ||
|
|
f1f76a8a9a | ||
|
|
f04f5f5215 | ||
|
|
210a26cb82 | ||
|
|
84a1d84929 | ||
| 161ed4dbe0 | |||
|
|
e24fd41cce | ||
| fc41c4929b | |||
|
|
adcf5a435d | ||
| 3110e0aeb4 | |||
| 8aa310daec | |||
| e4de5af67a | |||
| 18bbf6cd5e | |||
|
|
ce89051e71 | ||
|
|
921a3a5d53 | ||
|
|
133a87cc00 | ||
|
|
d7edd99bd2 | ||
|
|
befaf1872f | ||
|
|
10c7a590f0 | ||
|
|
32d4a3f2b9 | ||
|
|
c58290621a | ||
|
|
76048ad64e |
@@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
REGISTRY="git.simplifiquehc.com.br"
|
REGISTRY="172.35.0.216:3000"
|
||||||
IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal"
|
IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal"
|
||||||
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
|
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||||
|
|
||||||
@@ -45,22 +45,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
|
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||||
IMAGE_NAME="git.simplifiquehc.com.br/simplifique/vendaweb-portal"
|
|
||||||
|
|
||||||
MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml"
|
MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml"
|
||||||
|
|
||||||
sed -i -E "s|^([[:space:]]*image: ${IMAGE_NAME}:).*|\\1${SHA_TAG}|g" "$MANIFEST_FILE"
|
# Match image line for vendaweb-portal and replace tag (works with any registry hostname)
|
||||||
|
sed -i -E "s|(image: .*vendaweb-portal:).*|\1${SHA_TAG}|" "$MANIFEST_FILE"
|
||||||
|
|
||||||
if [ -z "${{ secrets.GITEA_TOKEN }}" ]; then
|
if [ -z "${{ secrets.GITEA_TOKEN }}" ]; then
|
||||||
echo "Missing secrets.GITEA_TOKEN (needed to push back to repo)"
|
echo "Missing secrets.GITEA_TOKEN (needed to push back to repo)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@git.simplifiquehc.com.br/simplifique/Vendaweb-portal.git"
|
git remote set-url origin "http://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@172.35.0.216:3000/simplifique/Vendaweb-portal.git"
|
||||||
|
|
||||||
git config user.name "Gitea Action"
|
git config user.name "Gitea Action"
|
||||||
git config user.email "actions@simplifiquehc.com.br"
|
git config user.email "actions@simplifiquehc.com.br"
|
||||||
|
|
||||||
git add "$MANIFEST_FILE"
|
git add "$MANIFEST_FILE"
|
||||||
git commit -m "chore: update image tag to $SHA_TAG [skip ci]"
|
if git diff --staged --quiet; then
|
||||||
git push origin main
|
echo "Manifest already has image tag $SHA_TAG, nothing to commit"
|
||||||
|
else
|
||||||
|
git commit -m "chore: update image tag to $SHA_TAG [skip ci]"
|
||||||
|
git push origin main
|
||||||
|
fi
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ spec:
|
|||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
||||||
containers:
|
containers:
|
||||||
- name: portal
|
- name: portal
|
||||||
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:latest
|
image: 172.35.0.216:3000/simplifique/vendaweb-portal:latest
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: portal
|
- name: portal
|
||||||
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:e14157c
|
image: 172.35.0.216:3000/simplifique/vendaweb-portal:c366a55
|
||||||
|
|||||||
@@ -96,27 +96,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.is-text {
|
.is-text {
|
||||||
/* Auto layout */
|
/* Auto layout */
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
position: static;
|
position: static;
|
||||||
width: 408px;
|
width: 408px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 66px;
|
top: 66px;
|
||||||
|
|
||||||
/* Inside auto layout */
|
/* Inside auto layout */
|
||||||
|
|
||||||
flex: none;
|
flex: none;
|
||||||
order: 2;
|
order: 2;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
margin: 10px 0px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="col-12 col-sm-8 col-md-6 col-xl-4">
|
<div class="col-12 col-sm-8 col-md-6 col-xl-4">
|
||||||
<div class="cs-login">
|
<div class="cs-login">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<span class="ls-saudacao">Bem-vindo(a),</span>
|
<span class="ls-saudacao">Bem-vindo(a), </span>
|
||||||
<span class="ls-plataforma">SIMPLIFIQUE</span>
|
<span class="ls-plataforma">SIMPLIFIQUE</span>
|
||||||
</div>
|
</div>
|
||||||
<form class="fs-login" [formGroup]="form" (keydown.enter)="submitForm()">
|
<form class="fs-login" [formGroup]="form" (keydown.enter)="submitForm()">
|
||||||
@@ -29,13 +29,8 @@
|
|||||||
<kendo-textbox class="k-textbox is-text" type="password" placeholder="Informe sua senha" #password
|
<kendo-textbox class="k-textbox is-text" type="password" placeholder="Informe sua senha" #password
|
||||||
formControlName="password">
|
formControlName="password">
|
||||||
<ng-template kendoTextBoxSuffixTemplate>
|
<ng-template kendoTextBoxSuffixTemplate>
|
||||||
<button
|
<button kendoButton look="clear" [icon]="passwordVisible ? 'eye-slash' : 'eye'"
|
||||||
kendoButton
|
(click)="toggleVisibility()" type="button"></button>
|
||||||
look="clear"
|
|
||||||
[icon]="passwordVisible ? 'eye-slash' : 'eye'"
|
|
||||||
(click)="toggleVisibility()"
|
|
||||||
type="button"
|
|
||||||
></button>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</kendo-textbox>
|
</kendo-textbox>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
|
|||||||
this.authService.setDataInLocalStorage('user', JSON.stringify(res.data));
|
this.authService.setDataInLocalStorage('user', JSON.stringify(res.data));
|
||||||
this.authService.setDataInLocalStorage('token', res.data.token);
|
this.authService.setDataInLocalStorage('token', res.data.token);
|
||||||
localStorage.removeItem('cart');
|
localStorage.removeItem('cart');
|
||||||
this.router.navigate(['/menu']);
|
this.router.navigate(['/sales/menu']);
|
||||||
} else {
|
} else {
|
||||||
this.loadingIcon = '';
|
this.loadingIcon = '';
|
||||||
this.showErrorMessage(res.message);
|
this.showErrorMessage(res.message);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="container d-flex justify-content-between align-items-center py-3">
|
<div class="container d-flex justify-content-between align-items-center py-3">
|
||||||
<!-- Logo à esquerda -->
|
<!-- Logo à esquerda -->
|
||||||
<div class="logo-jurunense">
|
<div class="logo-jurunense">
|
||||||
<a href="/#/menu" title="Simplifique">
|
<a href="/#/sales/menu" title="Simplifique">
|
||||||
<img src="assets/img/logo_simplifique.png" alt="Imagem" class="img-fluid" />
|
<img src="assets/img/logo_simplifique.png" alt="Imagem" class="img-fluid" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="container d-flex justify-content-between align-items-center py-3">
|
<div class="container d-flex justify-content-between align-items-center py-3">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<div class="logo-jurunense">
|
<div class="logo-jurunense">
|
||||||
<a href="/#/menu" title="Simplifique">
|
<a href="/#/sales/menu" title="Simplifique">
|
||||||
<img src="assets/img/logo_simplifique.png" alt="Logo Simplifique" class="img-fluid" />
|
<img src="assets/img/logo_simplifique.png" alt="Logo Simplifique" class="img-fluid" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,17 +4,11 @@
|
|||||||
<h4>FILTRO DE PARCEIROS</h4>
|
<h4>FILTRO DE PARCEIROS</h4>
|
||||||
<label>
|
<label>
|
||||||
<span>CPF</span>
|
<span>CPF</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="cpf" placeholder="Informe o CPF do parceiro"></kendo-textbox>
|
||||||
formControlName="cpf"
|
|
||||||
placeholder="Informe o CPF do parceiro"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
<label class="mt-2">
|
<label class="mt-2">
|
||||||
<span>Nome</span>
|
<span>Nome</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="name" placeholder="Informe o nome do parceiro"></kendo-textbox>
|
||||||
formControlName="name"
|
|
||||||
placeholder="Informe o nome do parceiro"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
@@ -23,72 +17,34 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-4 col-lg-2">
|
<div class="col-sm-12 col-md-4 col-lg-2">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" name="type" value="P" #other formControlName="type" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
name="type"
|
|
||||||
value="P"
|
|
||||||
#other
|
|
||||||
formControlName="type"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
<span class="in-line">Parceiros</span>
|
<span class="in-line">Parceiros</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-4 col-lg-2">
|
<div class="col-sm-12 col-md-4 col-lg-2">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" name="type" value="B" #other formControlName="type" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
name="type"
|
|
||||||
value="B"
|
|
||||||
#other
|
|
||||||
formControlName="type"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
<span class="in-line">Bella Obra</span>
|
<span class="in-line">Bella Obra</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-4 col-lg-3">
|
<div class="col-sm-12 col-md-4 col-lg-3">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" name="type" value="M" #other formControlName="type" kendoRadioButton />
|
||||||
type="radio"
|
<span class="in-line">Mestre Simplifique</span>
|
||||||
name="type"
|
|
||||||
value="M"
|
|
||||||
#other
|
|
||||||
formControlName="type"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
<span class="in-line">Mestre Jurunense</span>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-4 col-lg-2">
|
<div class="col-sm-12 col-md-4 col-lg-2">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" name="type" value="T" #other formControlName="type" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
name="type"
|
|
||||||
value="T"
|
|
||||||
#other
|
|
||||||
formControlName="type"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
<span class="in-line">Todos</span>
|
<span class="in-line">Todos</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 row-buttons">
|
<div class="mt-3 row-buttons">
|
||||||
<button
|
<button kendoButton rounded="medium" themeColor="primary" (click)="getPartners()">
|
||||||
kendoButton
|
|
||||||
rounded="medium"
|
|
||||||
themeColor="primary"
|
|
||||||
(click)="getPartners()"
|
|
||||||
>
|
|
||||||
Pesquisar
|
Pesquisar
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button kendoButton rounded="medium" themeColor="waring" (click)="open()">
|
||||||
kendoButton
|
|
||||||
rounded="medium"
|
|
||||||
themeColor="waring"
|
|
||||||
(click)="open()"
|
|
||||||
>
|
|
||||||
Incluir
|
Incluir
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -96,15 +52,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="flex-fill">
|
<main class="flex-fill">
|
||||||
<kendo-grid
|
<kendo-grid [kendoGridBinding]="gridView" class="gridPartners" (edit)="editPartner($event)" [sortable]="true"
|
||||||
[kendoGridBinding]="gridView"
|
[reorderable]="true" [resizable]="true" [columnMenu]="{ filter: true }">
|
||||||
class="gridPartners"
|
|
||||||
(edit)="editPartner($event)"
|
|
||||||
[sortable]="true"
|
|
||||||
[reorderable]="true"
|
|
||||||
[resizable]="true"
|
|
||||||
[columnMenu]="{ filter: true }"
|
|
||||||
>
|
|
||||||
<kendo-grid-column title="Código" field="id" width="80">
|
<kendo-grid-column title="Código" field="id" width="80">
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column title="Tipo Parceiro" field="type" width="150">
|
<kendo-grid-column title="Tipo Parceiro" field="type" width="150">
|
||||||
@@ -115,11 +64,7 @@
|
|||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column title="Nome" field="name" width="250">
|
<kendo-grid-column title="Nome" field="name" width="250">
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column
|
<kendo-grid-column title="Telefone" field="phone" width="100"></kendo-grid-column>
|
||||||
title="Telefone"
|
|
||||||
field="phone"
|
|
||||||
width="100"
|
|
||||||
></kendo-grid-column>
|
|
||||||
|
|
||||||
<kendo-grid-column title="Data Cadastro" field="createDate" width="100">
|
<kendo-grid-column title="Data Cadastro" field="createDate" width="100">
|
||||||
<ng-template kendoGridCellTemplate let-dataItem>
|
<ng-template kendoGridCellTemplate let-dataItem>
|
||||||
@@ -163,25 +108,13 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<kendo-window
|
<kendo-window *ngIf="opened" autoFocusedElement="#cpf" title="CADASTRO DE PROFISSIONAL" (close)="close()"
|
||||||
*ngIf="opened"
|
[minWidth]="250" [width]="650" [height]="650">
|
||||||
autoFocusedElement="#cpf"
|
|
||||||
title="CADASTRO DE PROFISSIONAL"
|
|
||||||
(close)="close()"
|
|
||||||
[minWidth]="250"
|
|
||||||
[width]="650"
|
|
||||||
[height]="650"
|
|
||||||
>
|
|
||||||
<form class="k-form" [formGroup]="formPartner">
|
<form class="k-form" [formGroup]="formPartner">
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>CPF</span>
|
<span>CPF</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="cpf" [clearButton]="true" #cpf (blur)="searchPartner()"></kendo-textbox>
|
||||||
formControlName="cpf"
|
|
||||||
[clearButton]="true"
|
|
||||||
#cpf
|
|
||||||
(blur)="searchPartner()"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror>Error: CPF é obrigatório</kendo-formerror>
|
<kendo-formerror>Error: CPF é obrigatório</kendo-formerror>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -189,12 +122,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Nome</span>
|
<span>Nome</span>
|
||||||
<input
|
<input class="inputText" formControlName="name" #fullName kendoTextBox />
|
||||||
class="inputText"
|
|
||||||
formControlName="name"
|
|
||||||
#fullName
|
|
||||||
kendoTextBox
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror>Error: Nome é obrigatório</kendo-formerror>
|
<kendo-formerror>Error: Nome é obrigatório</kendo-formerror>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -204,78 +132,43 @@
|
|||||||
<ul class="k-radio-list">
|
<ul class="k-radio-list">
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #mestre value="B" kendoRadioButton formControlName="type"
|
||||||
type="radio"
|
(change)="filterCategory('B')" />
|
||||||
#mestre
|
|
||||||
value="B"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="type"
|
|
||||||
(change)="filterCategory('B')"
|
|
||||||
/>
|
|
||||||
<span> Bella Obra</span>
|
<span> Bella Obra</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #mestre value="P" kendoRadioButton formControlName="type"
|
||||||
type="radio"
|
(change)="filterCategory('P')" />
|
||||||
#mestre
|
|
||||||
value="P"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="type"
|
|
||||||
(change)="filterCategory('P')"
|
|
||||||
/>
|
|
||||||
<span> Parceiro</span>
|
<span> Parceiro</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #parceiro kendoRadioButton value="M" formControlName="type"
|
||||||
type="radio"
|
(change)="filterCategory('M')" />
|
||||||
#parceiro
|
|
||||||
kendoRadioButton
|
|
||||||
value="M"
|
|
||||||
formControlName="type"
|
|
||||||
(change)="filterCategory('M')"
|
|
||||||
/>
|
|
||||||
<span> Mestre</span>
|
<span> Mestre</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required"
|
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required">Error: O tipo do parceiro é
|
||||||
>Error: O tipo do parceiro é obrigatório</kendo-formerror
|
obrigatório</kendo-formerror>
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield *ngIf="showCommission" showHints="initial">
|
<kendo-formfield *ngIf="showCommission" showHints="initial">
|
||||||
<label>
|
<label>
|
||||||
<span class="d-block">Comissão (%)</span>
|
<span class="d-block">Comissão (%)</span>
|
||||||
<input
|
<input *ngIf="!inputPercentPartner()" [readOnly]="!inputPercentPartner()" disabled="!inputPercentPartner()"
|
||||||
*ngIf="!inputPercentPartner()"
|
formControlName="commission" type="number" kendoNumericTextBox />
|
||||||
[readOnly]="!inputPercentPartner()"
|
<input *ngIf="inputPercentPartner()" formControlName="commission" type="number" kendoNumericTextBox />
|
||||||
disabled="!inputPercentPartner()"
|
|
||||||
formControlName="commission"
|
|
||||||
type="number"
|
|
||||||
kendoNumericTextBox
|
|
||||||
/>
|
|
||||||
<input
|
|
||||||
*ngIf="inputPercentPartner()"
|
|
||||||
formControlName="commission"
|
|
||||||
type="number"
|
|
||||||
kendoNumericTextBox
|
|
||||||
/>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial">
|
<kendo-formfield showHints="initial">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input kendoCheckBox id="terms" type="checkbox" formControlName="buyer" />
|
||||||
kendoCheckBox
|
|
||||||
id="terms"
|
|
||||||
type="checkbox"
|
|
||||||
formControlName="buyer"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Parceiro é comprador de cliente PJ?</span>
|
<span class="ms-2">Parceiro é comprador de cliente PJ?</span>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -283,17 +176,9 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Cliente</span>
|
<span>Cliente</span>
|
||||||
<kendo-combobox
|
<kendo-combobox textField="name" valueField="customerId" formControlName="customer" [data]="customer$ | async"
|
||||||
textField="name"
|
[loading]="loadingCustomer" [filterable]="true" (filterChange)="handleFilterCustomer($event)"
|
||||||
valueField="customerId"
|
placeholder="Selecione o cliente..." (selectionChange)="selectCustomer($event)">
|
||||||
formControlName="customer"
|
|
||||||
[data]="customer$ | async"
|
|
||||||
[loading]="loadingCustomer"
|
|
||||||
[filterable]="true"
|
|
||||||
(filterChange)="handleFilterCustomer($event)"
|
|
||||||
placeholder="Selecione o cliente..."
|
|
||||||
(selectionChange)="selectCustomer($event)"
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -304,74 +189,46 @@
|
|||||||
<input formControlName="email" class="inputEmail" kendoTextBox #email />
|
<input formControlName="email" class="inputEmail" kendoTextBox #email />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required"
|
<kendo-formerror *ngIf="formPartner.controls.type.errors?.required">Error: Email is required</kendo-formerror>
|
||||||
>Error: Email is required</kendo-formerror
|
<kendo-formerror *ngIf="formPartner.controls.email.errors?.email">Error: Not valid email format</kendo-formerror>
|
||||||
>
|
|
||||||
<kendo-formerror *ngIf="formPartner.controls.email.errors?.email"
|
|
||||||
>Error: Not valid email format</kendo-formerror
|
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>RG</span>
|
<span>RG</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="rg" [clearButton]="true" #rg></kendo-textbox>
|
||||||
formControlName="rg"
|
|
||||||
[clearButton]="true"
|
|
||||||
#rg
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<kendo-formerror *ngIf="formPartner.controls.rg.errors?.rg"
|
<kendo-formerror *ngIf="formPartner.controls.rg.errors?.rg">Error: RG é obrigaário</kendo-formerror>
|
||||||
>Error: RG é obrigaário</kendo-formerror
|
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Registro Profissional</span>
|
<span>Registro Profissional</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="professionalNumber" [clearButton]="true" #professionalnumber></kendo-textbox>
|
||||||
formControlName="professionalNumber"
|
|
||||||
[clearButton]="true"
|
|
||||||
#professionalnumber
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Telefone (Whatsapp)</span>
|
<span>Telefone (Whatsapp)</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="phone" [clearButton]="true" #phone></kendo-textbox>
|
||||||
formControlName="phone"
|
|
||||||
[clearButton]="true"
|
|
||||||
#phone
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Chave PIX</span>
|
<span>Chave PIX</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="pixKey" [clearButton]="true" #pixKey></kendo-textbox>
|
||||||
formControlName="pixKey"
|
|
||||||
[clearButton]="true"
|
|
||||||
#pixKey
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Vendedor</span>
|
<span>Vendedor</span>
|
||||||
<kendo-combobox
|
<kendo-combobox textField="name" valueField="sellerId" formControlName="seller" [data]="sellers$ | async"
|
||||||
textField="name"
|
[kendoDropDownFilter]="{ operator: 'contains' }" placeholder="Selecione o vendedor que indicou o parceiro..."
|
||||||
valueField="sellerId"
|
(selectionChange)="selectSeller($event)">
|
||||||
formControlName="seller"
|
|
||||||
[data]="sellers$ | async"
|
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
placeholder="Selecione o vendedor que indicou o parceiro..."
|
|
||||||
(selectionChange)="selectSeller($event)"
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -379,16 +236,9 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Categoria</span>
|
<span>Categoria</span>
|
||||||
<kendo-combobox
|
<kendo-combobox textField="name" valueField="id" formControlName="category" [data]="filterCategoryPartners"
|
||||||
textField="name"
|
[itemDisabled]="categoryDisabled" [kendoDropDownFilter]="{ operator: 'contains' }"
|
||||||
valueField="id"
|
placeholder="Selecione a categoria do parceiro..." (selectionChange)="selectCategory($event)">
|
||||||
formControlName="category"
|
|
||||||
[data]="filterCategoryPartners"
|
|
||||||
[itemDisabled]="categoryDisabled"
|
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
placeholder="Selecione a categoria do parceiro..."
|
|
||||||
(selectionChange)="selectCategory($event)"
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -398,12 +248,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Cep</span>
|
<span>Cep</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="zipCode" [clearButton]="true" #zipCode (blur)="consultaCep()"></kendo-textbox>
|
||||||
formControlName="zipCode"
|
|
||||||
[clearButton]="true"
|
|
||||||
#zipCode
|
|
||||||
(blur)="consultaCep()"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
@@ -417,11 +262,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Número</span>
|
<span>Número</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="number" [clearButton]="true" #number></kendo-textbox>
|
||||||
formControlName="number"
|
|
||||||
[clearButton]="true"
|
|
||||||
#number
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
@@ -456,20 +297,12 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Praça</span>
|
<span>Praça</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="places$ | async" formControlName="place"
|
||||||
[data]="places$ | async"
|
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
|
||||||
formControlName="place"
|
(selectionChange)="selectPlace($event)" placeholder="Selecione a praça do parceiro...">
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
(selectionChange)="selectPlace($event)"
|
|
||||||
placeholder="Selecione a praça do parceiro..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror
|
<kendo-formerror>Erro: É obrigatório informar a praça do cliente</kendo-formerror>
|
||||||
>Erro: É obrigatório informar a praça do cliente</kendo-formerror
|
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<h4 class="my-3">DADOS BANCÁRIOS</h4>
|
<h4 class="my-3">DADOS BANCÁRIOS</h4>
|
||||||
@@ -478,12 +311,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Banco</span>
|
<span>Banco</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="bank" [clearButton]="true" #bank required></kendo-textbox>
|
||||||
formControlName="bank"
|
|
||||||
[clearButton]="true"
|
|
||||||
#bank
|
|
||||||
required
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
</div>
|
</div>
|
||||||
@@ -491,12 +319,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Agencia</span>
|
<span>Agencia</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="agencia" [clearButton]="true" #agencia required></kendo-textbox>
|
||||||
formControlName="agencia"
|
|
||||||
[clearButton]="true"
|
|
||||||
#agencia
|
|
||||||
required
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
</div>
|
</div>
|
||||||
@@ -504,12 +327,7 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Conta</span>
|
<span>Conta</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="conta" [clearButton]="true" #conta required></kendo-textbox>
|
||||||
formControlName="conta"
|
|
||||||
[clearButton]="true"
|
|
||||||
#conta
|
|
||||||
required
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
</div>
|
</div>
|
||||||
@@ -524,12 +342,7 @@
|
|||||||
<input formControlName="observer2" kendoTextBox #observer2 />
|
<input formControlName="observer2" kendoTextBox #observer2 />
|
||||||
</label>
|
</label>
|
||||||
<div class="k-form-buttons">
|
<div class="k-form-buttons">
|
||||||
<button
|
<button kendoButton themeColor="primary" (click)="submitForm()" [disabled]="!formPartner.valid">
|
||||||
kendoButton
|
|
||||||
themeColor="primary"
|
|
||||||
(click)="submitForm()"
|
|
||||||
[disabled]="!formPartner.valid"
|
|
||||||
>
|
|
||||||
Salvar
|
Salvar
|
||||||
</button>
|
</button>
|
||||||
<button kendoButton (click)="clearForm()">Cancelar</button>
|
<button kendoButton (click)="clearForm()">Cancelar</button>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export class CommissionComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
console.log("tipo: " + intType);
|
console.log("tipo: " + intType);
|
||||||
this.urlPrintPreOrder =
|
this.urlPrintPreOrder =
|
||||||
`http://10.1.1.205:8068/Viewer/{action}?partnerId=${partnerId}&type=${type}&start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
|
`http://172.35.0.219:8068/Viewer/{action}?partnerId=${partnerId}&type=${type}&start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
|
||||||
|
|
||||||
// `http://localhost:52986/Viewer/{action}?partnerId=${this.selectedPartner.id}
|
// `http://localhost:52986/Viewer/{action}?partnerId=${this.selectedPartner.id}
|
||||||
// &start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
|
// &start=${this.range.start.toUTCString()}&end=${this.range.end.toUTCString()}`;
|
||||||
|
|||||||
@@ -849,10 +849,19 @@
|
|||||||
<div class="col-12 col-sm-6 p-0 mt-3 mt-sm-0">
|
<div class="col-12 col-sm-6 p-0 mt-3 mt-sm-0">
|
||||||
<div class="row w-100 m-0 p-0 d-flex justify-content-between">
|
<div class="row w-100 m-0 p-0 d-flex justify-content-between">
|
||||||
<div class="col-6 p-1">
|
<div class="col-6 p-1">
|
||||||
<button kendoButton class="btn-pre-order w-100" [disabled]="isLoadingPreOrder"
|
<!-- <button kendoButton class="btn-pre-order w-100" [disabled]="isLoadingPreOrder"
|
||||||
[icon]="loadingIconPreOrder" (click)="showConfirmation()">
|
[icon]="loadingIconPreOrder" (click)="showConfirmation()">
|
||||||
<span *ngIf="!isLoadingPreOrder" class="text-btn-order">Fechar orçamento</span>
|
<span *ngIf="!isLoadingPreOrder" class="text-btn-order">Fechar orçamento</span>
|
||||||
|
</button> -->
|
||||||
|
|
||||||
|
<button *ngIf="!isLoadingPreOrder" kendoButton class="btn-order w-100"
|
||||||
|
(click)="showConfirmation()" [disabled]="isLoadingPreOrder" [icon]="loadingIconOrder">
|
||||||
|
<span class="text-btn-order">Fechar orçamento</span>
|
||||||
</button>
|
</button>
|
||||||
|
<kendo-loader *ngIf="isLoadingPreOrder" size="small"></kendo-loader>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 p-1">
|
<div class="col-6 p-1">
|
||||||
<button *ngIf="!isLoadingOrder" kendoButton class="btn-order w-100"
|
<button *ngIf="!isLoadingOrder" kendoButton class="btn-order w-100"
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ import { OrderDiscount } from '../store/models/order-discount.model';
|
|||||||
import { SaleState } from '../store/models/sale-state.model';
|
import { SaleState } from '../store/models/sale-state.model';
|
||||||
import { ShoppingItem } from '../store/models/shopping-item';
|
import { ShoppingItem } from '../store/models/shopping-item';
|
||||||
import { Shopping } from '../store/models/shopping.model';
|
import { Shopping } from '../store/models/shopping.model';
|
||||||
|
import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';
|
||||||
|
|
||||||
export interface JsonModel {
|
export interface JsonModel {
|
||||||
shippingDate: string;
|
shippingDate: string;
|
||||||
@@ -604,6 +605,8 @@ export class CartSalesComponent
|
|||||||
this.stores.find((s) => s.id === this.authService.getStore())
|
this.stores.find((s) => s.id === this.authService.getStore())
|
||||||
);
|
);
|
||||||
localStorage.setItem('invoiceStore', saveStoreInvoice);
|
localStorage.setItem('invoiceStore', saveStoreInvoice);
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
|
|
||||||
}
|
}
|
||||||
this.formPayment.patchValue({
|
this.formPayment.patchValue({
|
||||||
invoiceStore: JSON.parse(saveStoreInvoice),
|
invoiceStore: JSON.parse(saveStoreInvoice),
|
||||||
@@ -630,7 +633,7 @@ export class CartSalesComponent
|
|||||||
|
|
||||||
if (billing !== null) {
|
if (billing !== null) {
|
||||||
const savePayment = localStorage.getItem('paymentPlan');
|
const savePayment = localStorage.getItem('paymentPlan');
|
||||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob, customer !== null ? customer.customerId : 1);
|
||||||
this.subscritpionPaymentPlan = this.paymentPlan$.subscribe((data) => {
|
this.subscritpionPaymentPlan = this.paymentPlan$.subscribe((data) => {
|
||||||
this.paymentPlans = data;
|
this.paymentPlans = data;
|
||||||
if (
|
if (
|
||||||
@@ -698,6 +701,7 @@ export class CartSalesComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
async showConfirmation() {
|
async showConfirmation() {
|
||||||
|
this.isLoadingPreOrder = true;
|
||||||
const dialog: DialogRef = this.dialogService.open({
|
const dialog: DialogRef = this.dialogService.open({
|
||||||
title: 'Por favor, confirme',
|
title: 'Por favor, confirme',
|
||||||
content: 'Deseja gravar como orçamento ?',
|
content: 'Deseja gravar como orçamento ?',
|
||||||
@@ -713,6 +717,7 @@ export class CartSalesComponent
|
|||||||
dialog.result.subscribe((result) => {
|
dialog.result.subscribe((result) => {
|
||||||
if (result instanceof DialogCloseResult) {
|
if (result instanceof DialogCloseResult) {
|
||||||
console.log('close');
|
console.log('close');
|
||||||
|
this.isLoadingPreOrder = false;
|
||||||
} else {
|
} else {
|
||||||
const resultConfirmation = JSON.stringify(result);
|
const resultConfirmation = JSON.stringify(result);
|
||||||
console.log('action1', resultConfirmation);
|
console.log('action1', resultConfirmation);
|
||||||
@@ -720,6 +725,7 @@ export class CartSalesComponent
|
|||||||
console.log('criando orçamento');
|
console.log('criando orçamento');
|
||||||
this.createPreOrder();
|
this.createPreOrder();
|
||||||
}
|
}
|
||||||
|
this.isLoadingPreOrder = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -750,6 +756,7 @@ export class CartSalesComponent
|
|||||||
if (localStorage.getItem('paymentPlan') === 'undefined') {
|
if (localStorage.getItem('paymentPlan') === 'undefined') {
|
||||||
localStorage.setItem('paymentPlan', JSON.stringify(paymentPlan));
|
localStorage.setItem('paymentPlan', JSON.stringify(paymentPlan));
|
||||||
this.selectPaymentPlan = paymentPlan;
|
this.selectPaymentPlan = paymentPlan;
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
this.confirmChangePaymentPlan(true);
|
this.confirmChangePaymentPlan(true);
|
||||||
} else {
|
} else {
|
||||||
this.selectPaymentPlan = paymentPlan;
|
this.selectPaymentPlan = paymentPlan;
|
||||||
@@ -767,6 +774,7 @@ export class CartSalesComponent
|
|||||||
'paymentPlan',
|
'paymentPlan',
|
||||||
JSON.stringify(this.selectPaymentPlan)
|
JSON.stringify(this.selectPaymentPlan)
|
||||||
);
|
);
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
|
const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
|
||||||
this.idPaymentPlan = this.selectPaymentPlan.codplpag;
|
this.idPaymentPlan = this.selectPaymentPlan.codplpag;
|
||||||
this.subscriptionUpdatePayment = this.shoppingService
|
this.subscriptionUpdatePayment = this.shoppingService
|
||||||
@@ -794,19 +802,23 @@ export class CartSalesComponent
|
|||||||
|
|
||||||
setBilling(billing: any) {
|
setBilling(billing: any) {
|
||||||
localStorage.setItem('billing', JSON.stringify(billing));
|
localStorage.setItem('billing', JSON.stringify(billing));
|
||||||
|
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
||||||
this.idBilling = billing.codcob;
|
this.idBilling = billing.codcob;
|
||||||
console.log(JSON.stringify(billing));
|
console.log(JSON.stringify(billing));
|
||||||
localStorage.removeItem('paymentPlan');
|
localStorage.removeItem('paymentPlan');
|
||||||
this.formPayment.patchValue({
|
this.formPayment.patchValue({
|
||||||
paymentPlan: null,
|
paymentPlan: null,
|
||||||
});
|
});
|
||||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob,
|
||||||
|
customer !== null ? customer.customerId : 1
|
||||||
|
);
|
||||||
this.subscritpionPaymentPlan = this.paymentPlan$
|
this.subscritpionPaymentPlan = this.paymentPlan$
|
||||||
.pipe(
|
.pipe(
|
||||||
tap((data) => (this.paymentPlans = data)),
|
tap((data) => (this.paymentPlans = data)),
|
||||||
tap((planos) => console.log(planos))
|
tap((planos) => console.log(planos))
|
||||||
)
|
)
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
}
|
}
|
||||||
|
|
||||||
setPartner(partner: any) {
|
setPartner(partner: any) {
|
||||||
@@ -815,6 +827,7 @@ export class CartSalesComponent
|
|||||||
|
|
||||||
setInvoiceStore(invoiceStore: any) {
|
setInvoiceStore(invoiceStore: any) {
|
||||||
localStorage.setItem('invoiceStore', JSON.stringify(invoiceStore));
|
localStorage.setItem('invoiceStore', JSON.stringify(invoiceStore));
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
}
|
}
|
||||||
|
|
||||||
isInvoiceStore9Or10() {
|
isInvoiceStore9Or10() {
|
||||||
@@ -930,14 +943,14 @@ export class CartSalesComponent
|
|||||||
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
||||||
|
|
||||||
if (localStorage.getItem('customer') != undefined) {
|
if (localStorage.getItem('customer') != undefined) {
|
||||||
if (customer.place.id == 19) {
|
// if (customer.place.id == 19) {
|
||||||
this.titleInformation = 'Pedido de venda';
|
// this.titleInformation = 'Pedido de venda';
|
||||||
this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!';
|
// this.messageInformation = 'ATENÇÃO! Cliente com praça do E-COMMERCE!';
|
||||||
this.informationDescription =
|
// this.informationDescription =
|
||||||
'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.';
|
// 'Altere a praça do cliente pela opção NOVO CLIENTE para continuar.';
|
||||||
this.showInformation = true;
|
// this.showInformation = true;
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (
|
if (
|
||||||
customer.place.name == 'INATIVO' ||
|
customer.place.name == 'INATIVO' ||
|
||||||
customer.place.name == 'INATIVA'
|
customer.place.name == 'INATIVA'
|
||||||
@@ -1000,6 +1013,7 @@ export class CartSalesComponent
|
|||||||
}
|
}
|
||||||
this.updateFormCustomer(result);
|
this.updateFormCustomer(result);
|
||||||
localStorage.setItem('customer', JSON.stringify(result));
|
localStorage.setItem('customer', JSON.stringify(result));
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
this.updateTaxDelivery();
|
this.updateTaxDelivery();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1579,20 +1593,29 @@ export class CartSalesComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateCart(
|
public updateCart(
|
||||||
cartId: string,
|
cartId: string
|
||||||
customerId: number,
|
|
||||||
addressId: number,
|
|
||||||
saleStoreId: string,
|
|
||||||
paymentPlanId: number,
|
|
||||||
billingId: string
|
|
||||||
) {
|
) {
|
||||||
|
console.log('Atualizando carrinho: ' + cartId);
|
||||||
this.shoppingService.getShopping(cartId).subscribe((shopping) => {
|
this.shoppingService.getShopping(cartId).subscribe((shopping) => {
|
||||||
if (shopping) {
|
if (shopping) {
|
||||||
shopping.codcli = customerId;
|
console.log('Carrinho encontrado: ' + JSON.stringify(shopping));
|
||||||
shopping.codendentcli = addressId;
|
const invoiceStore = JSON.parse(
|
||||||
shopping.saleStore = saleStoreId;
|
localStorage.getItem('invoiceStore')
|
||||||
shopping.codplpag = paymentPlanId;
|
) as StoreERP;
|
||||||
shopping.codcob = billingId;
|
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
||||||
|
const address = JSON.parse(
|
||||||
|
localStorage.getItem('address')
|
||||||
|
) as CustomerAddress;
|
||||||
|
const paymentPlan = JSON.parse(
|
||||||
|
localStorage.getItem('paymentPlan')
|
||||||
|
) as PaymentPlan;
|
||||||
|
const billing = JSON.parse(localStorage.getItem('billing')) as Billing;
|
||||||
|
|
||||||
|
shopping.codcli = customer ? customer.customerId : 0;
|
||||||
|
shopping.codendentcli = address ? address.idAddress : 0;
|
||||||
|
shopping.saleStore = invoiceStore ? invoiceStore.id : this.authService.getStore();
|
||||||
|
shopping.codplpag = paymentPlan ? paymentPlan.codplpag : 0;
|
||||||
|
shopping.codcob = billing ? billing.codcob : '';
|
||||||
|
|
||||||
this.shoppingService.updateShopping(shopping).subscribe(
|
this.shoppingService.updateShopping(shopping).subscribe(
|
||||||
(response) => {
|
(response) => {
|
||||||
@@ -1630,6 +1653,7 @@ export class CartSalesComponent
|
|||||||
this.showSelectAddress = false;
|
this.showSelectAddress = false;
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
localStorage.setItem('address', JSON.stringify(result));
|
localStorage.setItem('address', JSON.stringify(result));
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
this.updateFormAddress(result);
|
this.updateFormAddress(result);
|
||||||
this.updateTaxDelivery();
|
this.updateTaxDelivery();
|
||||||
}
|
}
|
||||||
@@ -2331,6 +2355,7 @@ export class CartSalesComponent
|
|||||||
if (action === 'Sim') {
|
if (action === 'Sim') {
|
||||||
if (this.customer !== undefined && this.customer.customerId !== 1) {
|
if (this.customer !== undefined && this.customer.customerId !== 1) {
|
||||||
localStorage.setItem('customer', JSON.stringify(this.customer));
|
localStorage.setItem('customer', JSON.stringify(this.customer));
|
||||||
|
this.updateCart(this.shoppingService.getCart());
|
||||||
this.updateFormCustomer(this.customer);
|
this.updateFormCustomer(this.customer);
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
@@ -2368,7 +2393,7 @@ export class CartSalesComponent
|
|||||||
openPrintPreOrder() {
|
openPrintPreOrder() {
|
||||||
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
||||||
this.urlPrintPreOrder =
|
this.urlPrintPreOrder =
|
||||||
'http://10.1.1.205:8068/Viewer/{action}?order=' +
|
'https://portainer.simplifiquehc.com.br/Viewer/{action}?order=' +
|
||||||
this.preOrderNumber +
|
this.preOrderNumber +
|
||||||
'&model=' +
|
'&model=' +
|
||||||
this.modelPrintPreOrder;
|
this.modelPrintPreOrder;
|
||||||
@@ -2382,7 +2407,7 @@ export class CartSalesComponent
|
|||||||
openPrintOrder() {
|
openPrintOrder() {
|
||||||
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
||||||
this.urlPrintOrder =
|
this.urlPrintOrder =
|
||||||
'http://10.1.1.205:8068/Viewer/{action}?orderId=' +
|
'https://portainer.simplifiquehc.com.br/Viewer/{action}?orderId=' +
|
||||||
this.orderNumber +
|
this.orderNumber +
|
||||||
'&model=' +
|
'&model=' +
|
||||||
this.modelPrintOrder;
|
this.modelPrintOrder;
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<kendo-dialog
|
<kendo-dialog *ngIf="openedDialog" [(width)]="windowWidth" [(height)]="windowHeight" (close)="closeDialog()"
|
||||||
*ngIf="openedDialog"
|
title="Novo endereço" autoFocusedElement="#zipCode">
|
||||||
[(width)]="windowWidth"
|
|
||||||
[(height)]="windowHeight"
|
|
||||||
(close)="closeDialog()"
|
|
||||||
title="Novo endereço"
|
|
||||||
autoFocusedElement="#zipCode"
|
|
||||||
>
|
|
||||||
<!--kendo-window-titlebar
|
<!--kendo-window-titlebar
|
||||||
style="background-color: rgb(34, 34, 61); color: white"
|
style="background-color: rgb(34, 34, 61); color: white"
|
||||||
>
|
>
|
||||||
@@ -25,29 +19,18 @@
|
|||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Cep</span>
|
<span>Cep</span>
|
||||||
<input
|
<input kendoTextBox id="zipCode" formControlName="zipCode" showSuccessIcon="initial"
|
||||||
kendoTextBox
|
showErrorIcon="initial" (blur)="consultaCep()">
|
||||||
id="zipCode"
|
|
||||||
formControlName="zipCode"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="consultaCep()"
|
|
||||||
>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Praça</span>
|
<span>Praça</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="places$ | async" formControlName="place"
|
||||||
[data]="places$ | async"
|
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
|
||||||
formControlName="place"
|
placeholder="Selecione a praça do cliente...">
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
</kendo-combobox>
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a praça do cliente..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -55,80 +38,49 @@
|
|||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Endereço</span>
|
<span>Endereço</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #address [maxlength]="40" formControlName="address" showSuccessIcon="initial"
|
||||||
#address
|
showErrorIcon="initial" (blur)="removeCharacters('address')"></kendo-textbox>
|
||||||
[maxlength]="40"
|
|
||||||
formControlName="address"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('address')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Número</span>
|
<span>Número</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #addressNumber formControlName="addressNumber" showSuccessIcon="initial"
|
||||||
#addressNumber
|
|
||||||
formControlName="addressNumber"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
showErrorIcon="initial"
|
||||||
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
|
onkeypress="return event.charCode >= 48 && event.charCode <= 57"></kendo-textbox>
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Complemento</span>
|
<span>Complemento</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #complement [maxlength]="40" formControlName="complement" showSuccessIcon="initial"
|
||||||
#complement
|
showErrorIcon="initial" (blur)="removeCharacters('complement')"></kendo-textbox>
|
||||||
[maxlength]="40"
|
|
||||||
formControlName="complement"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('complement')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Bairro</span>
|
<span>Bairro</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #neighbourhood formControlName="neighborhood" showSuccessIcon="initial"
|
||||||
#neighbourhood
|
showErrorIcon="initial" (blur)="removeCharacters('neighborhood')"></kendo-textbox>
|
||||||
formControlName="neighborhood"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('neighborhood')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Cidade</span>
|
<span>Cidade</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #city [maxlength]="15" formControlName="city" showSuccessIcon="initial"
|
||||||
#city
|
showErrorIcon="initial" (blur)="removeCharacters('city')"></kendo-textbox>
|
||||||
[maxlength]="15"
|
|
||||||
formControlName="city"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('city')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Estado</span>
|
<span>Estado</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #state formControlName="state" showSuccessIcon="initial"
|
||||||
#state
|
showErrorIcon="initial"></kendo-textbox>
|
||||||
formControlName="state"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
@@ -138,37 +90,21 @@
|
|||||||
<ul class="k-radio-list k-list-horizontal">
|
<ul class="k-radio-list k-list-horizontal">
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeNormal value="N" kendoRadioButton formControlName="addressType" />
|
||||||
type="radio"
|
|
||||||
#addressTypeNormal
|
|
||||||
value="N"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Normal</span>
|
<span class="ms-2">Normal</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeShopping value="S" kendoRadioButton
|
||||||
type="radio"
|
formControlName="addressType" />
|
||||||
#addressTypePorto
|
<span class="ms-2">Shopping</span>
|
||||||
value="P"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Porto</span>
|
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeCondominio value="C" kendoRadioButton
|
||||||
type="radio"
|
formControlName="addressType" />
|
||||||
#addressTypeCondominio
|
|
||||||
value="C"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Condominio</span>
|
<span class="ms-2">Condominio</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@@ -180,26 +116,16 @@
|
|||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Ponto de referencia</span>
|
<span>Ponto de referencia</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #state formControlName="referencePoint" showSuccessIcon="initial" showErrorIcon="initial"
|
||||||
#state
|
(blur)="removeCharacters('referencePoint')"></kendo-textbox>
|
||||||
formControlName="referencePoint"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('referencePoint')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Observações</span>
|
<span>Observações</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #state formControlName="note" showSuccessIcon="initial" showErrorIcon="initial"
|
||||||
#state
|
(blur)="removeCharacters('note')"></kendo-textbox>
|
||||||
formControlName="note"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('note')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -210,11 +136,7 @@
|
|||||||
<div class="k-loading-panel">
|
<div class="k-loading-panel">
|
||||||
<div class="k-loading-panel-mask"></div>
|
<div class="k-loading-panel-mask"></div>
|
||||||
<div class="k-loading-panel-wrapper">
|
<div class="k-loading-panel-wrapper">
|
||||||
<kendo-loader
|
<kendo-loader [type]="'infinite-spinner'" [themeColor]="'primary'" [size]="'large'">
|
||||||
[type]="'infinite-spinner'"
|
|
||||||
[themeColor]="'primary'"
|
|
||||||
[size]="'large'"
|
|
||||||
>
|
|
||||||
</kendo-loader>
|
</kendo-loader>
|
||||||
<div class="k-loading-panel-text">Aguarde...</div>
|
<div class="k-loading-panel-text">Aguarde...</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -225,53 +147,27 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<kendo-dialog-actions>
|
<kendo-dialog-actions>
|
||||||
<button
|
<button (click)="showConfirmation()" class="btn-fill-blue text-btn-white" kendoButton [primary]="true"
|
||||||
(click)="showConfirmation()"
|
[disabled]="!form.valid">
|
||||||
class="btn-fill-blue text-btn-white"
|
|
||||||
kendoButton
|
|
||||||
[primary]="true"
|
|
||||||
[disabled]="!form.valid"
|
|
||||||
>
|
|
||||||
Gravar
|
Gravar
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="closeDialog()">
|
||||||
class="btn-flat text-btn-flat"
|
|
||||||
kendoButton
|
|
||||||
look="flat"
|
|
||||||
(click)="closeDialog()"
|
|
||||||
>
|
|
||||||
Cancelar
|
Cancelar
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="googleGeocode()">
|
||||||
class="btn-flat text-btn-flat"
|
Mapa do Endereço
|
||||||
kendoButton
|
</button>
|
||||||
look="flat"
|
|
||||||
(click)="googleGeocode()"
|
|
||||||
>
|
|
||||||
Mapa do Endereço
|
|
||||||
</button>
|
|
||||||
</kendo-dialog-actions>
|
</kendo-dialog-actions>
|
||||||
|
|
||||||
<app-confirmation
|
<app-confirmation *ngIf="isShowConfirmation" opened="isShowConfirmation" title="{{ titleMessage }}"
|
||||||
*ngIf="isShowConfirmation"
|
message="{{ messageConfirmation }}" textButtonConfirmation="{{ textButtonConfirmation }}"
|
||||||
opened="isShowConfirmation"
|
textButtonCancel="{{ textButtonCancel }}" (resultEvent)="returnConfirmationSalve($event)"></app-confirmation>
|
||||||
title="{{ titleMessage }}"
|
|
||||||
message="{{ messageConfirmation }}"
|
|
||||||
textButtonConfirmation="{{ textButtonConfirmation }}"
|
|
||||||
textButtonCancel="{{ textButtonCancel }}"
|
|
||||||
(resultEvent)="returnConfirmationSalve($event)"
|
|
||||||
></app-confirmation>
|
|
||||||
</kendo-dialog>
|
</kendo-dialog>
|
||||||
|
|
||||||
|
|
||||||
<kendo-dialog
|
<kendo-dialog *ngIf="showMap" [height]="600" [width]="800" title="Confirme a localização do endereço"
|
||||||
*ngIf="showMap"
|
(close)="MapCep(false)">
|
||||||
[height]="600"
|
|
||||||
[width]="800"
|
|
||||||
title="Confirme a localização do endereço"
|
|
||||||
(close)="MapCep(false)"
|
|
||||||
>
|
|
||||||
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom">
|
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom">
|
||||||
<agm-marker [latitude]="latitude" [longitude]="longitude"></agm-marker>
|
<agm-marker [latitude]="latitude" [longitude]="longitude"></agm-marker>
|
||||||
</agm-map>
|
</agm-map>
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<kendo-dialog
|
<kendo-dialog *ngIf="openedDialog" [(width)]="windowWidth" [(height)]="windowHeight" (close)="closeDialog()"
|
||||||
*ngIf="openedDialog"
|
autoFocusedElement="#person" title="Novo cliente">
|
||||||
[(width)]="windowWidth"
|
|
||||||
[(height)]="windowHeight"
|
|
||||||
(close)="closeDialog()"
|
|
||||||
autoFocusedElement="#person"
|
|
||||||
title="Novo cliente"
|
|
||||||
>
|
|
||||||
<!--kendo-window-titlebar
|
<!--kendo-window-titlebar
|
||||||
style="background-color: rgb(34, 34, 61); color: white"
|
style="background-color: rgb(34, 34, 61); color: white"
|
||||||
>
|
>
|
||||||
@@ -27,23 +21,11 @@
|
|||||||
<div class="col-12 col-sm-8">
|
<div class="col-12 col-sm-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<input
|
<input type="radio" value="true" #company formControlName="company" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
value="true"
|
|
||||||
#company
|
|
||||||
formControlName="company"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 text-start p-0">Jurídica</div>
|
<div class="col-5 text-start p-0">Jurídica</div>
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<input
|
<input type="radio" value="false" id="person" formControlName="company" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
value="false"
|
|
||||||
id="person"
|
|
||||||
formControlName="company"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-5 text-start p-0">Física</div>
|
<div class="col-5 text-start p-0">Física</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,19 +33,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<kendo-formfield
|
<kendo-formfield showErrors="initial" *ngIf="form.value['company'] == 'false'">
|
||||||
showErrors="initial"
|
|
||||||
*ngIf="form.value['company'] == 'false'"
|
|
||||||
>
|
|
||||||
<label>
|
<label>
|
||||||
<span>Cpf</span>
|
<span>Cpf</span>
|
||||||
<kendo-maskedtextbox
|
<kendo-maskedtextbox formControlName="cpfCnpj" [mask]="cpfMask" id="inputCpf"
|
||||||
formControlName="cpfCnpj"
|
(blur)="searchCustomerByDocument()" required>
|
||||||
[mask]="cpfMask"
|
|
||||||
id="inputCpf"
|
|
||||||
(blur)="searchCustomerByDocument()"
|
|
||||||
required
|
|
||||||
>
|
|
||||||
</kendo-maskedtextbox>
|
</kendo-maskedtextbox>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
@@ -76,37 +50,22 @@
|
|||||||
<kendo-formfield *ngIf="form.value['company'] == 'true'">
|
<kendo-formfield *ngIf="form.value['company'] == 'true'">
|
||||||
<label>
|
<label>
|
||||||
<span>Cnpj</span>
|
<span>Cnpj</span>
|
||||||
<kendo-maskedtextbox
|
<kendo-maskedtextbox #cnpj formControlName="cpfCnpj" [mask]="cnpjMask" #inputCnpj
|
||||||
#cnpj
|
(blur)="searchCustomerByDocument()" required>
|
||||||
formControlName="cpfCnpj"
|
|
||||||
[mask]="cnpjMask"
|
|
||||||
#inputCnpj
|
|
||||||
(blur)="searchCustomerByDocument()"
|
|
||||||
required
|
|
||||||
>
|
|
||||||
<kendo-loader *ngIf="loaderVisible" size="small">
|
<kendo-loader *ngIf="loaderVisible" size="small">
|
||||||
</kendo-loader>
|
</kendo-loader>
|
||||||
</kendo-maskedtextbox>
|
</kendo-maskedtextbox>
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror
|
<kendo-formerror>Erro: CNPJ deve ser informado para cliente pessoa
|
||||||
>Erro: CNPJ deve ser informado para cliente pessoa
|
jurídica</kendo-formerror>
|
||||||
jurídica</kendo-formerror
|
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showErrors="initial">
|
<kendo-formfield showErrors="initial">
|
||||||
<label>
|
<label>
|
||||||
<span>Nome</span>
|
<span>Nome</span>
|
||||||
<kendo-textbox
|
<kendo-textbox [maxlength]="40" formControlName="name" #firstName required showSuccessIcon="initial"
|
||||||
[maxlength]="40"
|
showErrorIcon="initial" partner="^[a-zA-Z0-9._\b]+$"
|
||||||
formControlName="name"
|
(blur)="removeCharacters('name')"></kendo-textbox>
|
||||||
#firstName
|
|
||||||
required
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
partner="^[a-zA-Z0-9._\b]+$"
|
|
||||||
(blur)="removeCharacters('name')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror>Erro: Nome é obrigatório</kendo-formerror>
|
<kendo-formerror>Erro: Nome é obrigatório</kendo-formerror>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -116,33 +75,15 @@
|
|||||||
<!-- <div class="row d-flex flex-row"> -->
|
<!-- <div class="row d-flex flex-row"> -->
|
||||||
<div class="row w-100">
|
<div class="row w-100">
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<input
|
<input type="radio" value="F" #company formControlName="gender" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
value="F"
|
|
||||||
#company
|
|
||||||
formControlName="gender"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 text-start p-0">Feminino</div>
|
<div class="col-3 text-start p-0">Feminino</div>
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<input
|
<input type="radio" value="M" id="gender" formControlName="gender" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
value="M"
|
|
||||||
id="gender"
|
|
||||||
formControlName="gender"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 text-start p-0">Masculino</div>
|
<div class="col-3 text-start p-0">Masculino</div>
|
||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<input
|
<input type="radio" value="N" id="gender" formControlName="gender" kendoRadioButton />
|
||||||
type="radio"
|
|
||||||
value="N"
|
|
||||||
id="gender"
|
|
||||||
formControlName="gender"
|
|
||||||
kendoRadioButton
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 text-start p-0">Não declarado</div>
|
<div class="col-3 text-start p-0">Não declarado</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,139 +92,80 @@
|
|||||||
<kendo-formfield showHints="initial" showErrors="initial">
|
<kendo-formfield showHints="initial" showErrors="initial">
|
||||||
<label>
|
<label>
|
||||||
<span>Celular</span>
|
<span>Celular</span>
|
||||||
<kendo-maskedtextbox
|
<kendo-maskedtextbox #phoneNumber formControlName="cellPhone" [mask]="phoneNumberMask"
|
||||||
#phoneNumber
|
[value]="phoneNumberValue" showSuccessIcon="initial" showErrorIcon="initial"></kendo-maskedtextbox>
|
||||||
formControlName="cellPhone"
|
|
||||||
[mask]="phoneNumberMask"
|
|
||||||
[value]="phoneNumberValue"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-maskedtextbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield
|
<kendo-formfield *ngIf="form.value['company'] == 'true'" showHints="initial" showErrors="always">
|
||||||
*ngIf="form.value['company'] == 'true'"
|
|
||||||
showHints="initial"
|
|
||||||
showErrors="always"
|
|
||||||
>
|
|
||||||
<label>
|
<label>
|
||||||
<span>Inscrição Estadual</span>
|
<span>Inscrição Estadual</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #numberState formControlName="numberState" showSuccessIcon="initial"
|
||||||
#numberState
|
showErrorIcon="initial"></kendo-textbox>
|
||||||
formControlName="numberState"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>EMail</span>
|
<span>EMail</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #email formControlName="email" showSuccessIcon="initial"
|
||||||
#email
|
showErrorIcon="initial"></kendo-textbox>
|
||||||
formControlName="email"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Cep</span>
|
<span>Cep</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #zipCode maxlength="8" formControlName="zipCode" showSuccessIcon="initial"
|
||||||
#zipCode
|
showErrorIcon="initial" (blur)="consultaCep()"></kendo-textbox>
|
||||||
maxlength="8"
|
|
||||||
formControlName="zipCode"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="consultaCep()"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Endereço</span>
|
<span>Endereço</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #address [maxlength]="40" formControlName="address" showSuccessIcon="initial"
|
||||||
#address
|
showErrorIcon="initial" (blur)="removeCharacters('address')"></kendo-textbox>
|
||||||
[maxlength]="40"
|
|
||||||
formControlName="address"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('address')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Número</span>
|
<span>Número</span>
|
||||||
<kendo-textbox
|
<kendo-textbox onkeypress="return event.charCode >= 48 && event.charCode <= 57" #addressNumber
|
||||||
onkeypress="return event.charCode >= 48 && event.charCode <= 57"
|
formControlName="addressNumber" showSuccessIcon="initial" showErrorIcon="initial"></kendo-textbox>
|
||||||
#addressNumber
|
|
||||||
formControlName="addressNumber"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Complemento</span>
|
<span>Complemento</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #complement [maxlength]="40" formControlName="complement" showSuccessIcon="initial"
|
||||||
#complement
|
showErrorIcon="initial" (blur)="removeCharacters('complement')"></kendo-textbox>
|
||||||
[maxlength]="40"
|
|
||||||
formControlName="complement"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('complement')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Bairro</span>
|
<span>Bairro</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #neighbourhood [maxlength]="40" formControlName="neighborhood" showSuccessIcon="initial"
|
||||||
#neighbourhood
|
showErrorIcon="initial" (blur)="removeCharacters('neighborhood')"></kendo-textbox>
|
||||||
[maxlength]="40"
|
|
||||||
formControlName="neighborhood"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('neighborhood')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Cidade</span>
|
<span>Cidade</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #city [maxlength]="15" formControlName="city" showSuccessIcon="initial"
|
||||||
#city
|
showErrorIcon="initial" (blur)="removeCharacters('city')"></kendo-textbox>
|
||||||
[maxlength]="15"
|
|
||||||
formControlName="city"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('city')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Estado</span>
|
<span>Estado</span>
|
||||||
<kendo-textbox
|
<kendo-textbox #state [maxlength]="2" formControlName="state" showSuccessIcon="initial"
|
||||||
#state
|
showErrorIcon="initial" (blur)="removeCharacters('state')"></kendo-textbox>
|
||||||
[maxlength]="2"
|
|
||||||
formControlName="state"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
(blur)="removeCharacters('state')"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
@@ -293,37 +175,21 @@
|
|||||||
<ul class="k-radio-list k-list-horizontal">
|
<ul class="k-radio-list k-list-horizontal">
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeNormal value="N" kendoRadioButton formControlName="addressType" />
|
||||||
type="radio"
|
|
||||||
#addressTypeNormal
|
|
||||||
value="N"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Normal</span>
|
<span class="ms-2">Normal</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeShopping value="S" kendoRadioButton
|
||||||
type="radio"
|
formControlName="addressType" />
|
||||||
#addressTypePorto
|
<span class="ms-2">Shopping</span>
|
||||||
value="P"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Porto</span>
|
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #addressTypeCondominio value="C" kendoRadioButton
|
||||||
type="radio"
|
formControlName="addressType" />
|
||||||
#addressTypeCondominio
|
|
||||||
value="C"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="addressType"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Condominio</span>
|
<span class="ms-2">Condominio</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@@ -335,14 +201,9 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Ramo de atividade</span>
|
<span>Ramo de atividade</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="ramos$ | async" formControlName="ramo"
|
||||||
[data]="ramos$ | async"
|
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
|
||||||
formControlName="ramo"
|
placeholder="Selecione a ramo de atividade do cliente...">
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a ramo de atividade do cliente..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -350,44 +211,29 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Praça</span>
|
<span>Praça</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="places$ | async" formControlName="place"
|
||||||
[data]="places$ | async"
|
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
|
||||||
formControlName="place"
|
placeholder="Selecione a praça do cliente...">
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a praça do cliente..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
<kendo-formerror
|
<kendo-formerror>Erro: É obrigatório informar a praça do
|
||||||
>Erro: É obrigatório informar a praça do
|
cliente</kendo-formerror>
|
||||||
cliente</kendo-formerror
|
|
||||||
>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield showHints="initial" showErrors="always">
|
<kendo-formfield showHints="initial" showErrors="always">
|
||||||
<label>
|
<label>
|
||||||
<span>Data de nascimento</span>
|
<span>Data de nascimento</span>
|
||||||
<kendo-dateinput
|
<kendo-dateinput #birthdate [format]="format" formControlName="birthdate" showSuccessIcon="initial"
|
||||||
#birthdate
|
showErrorIcon="initial"></kendo-dateinput>
|
||||||
[format]="format"
|
|
||||||
formControlName="birthdate"
|
|
||||||
showSuccessIcon="initial"
|
|
||||||
showErrorIcon="initial"
|
|
||||||
></kendo-dateinput>
|
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Como conheceu a JURUNENSE?</span>
|
<span>Como conheceu a SIMPPLIFIQUE?</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="listCommunicate" formControlName="communicate"
|
||||||
[data]="listCommunicate"
|
|
||||||
formControlName="communicate"
|
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
[kendoDropDownFilter]="{ operator: 'contains' }"
|
||||||
placeholder="Informe como o cliente conheceu a JURUNENSE..."
|
placeholder="Informe como o cliente conheceu a SIMPLIFIQUE...">
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -395,15 +241,9 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Categoria</span>
|
<span>Categoria</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="category$ | async" formControlName="category"
|
||||||
[data]="category$ | async"
|
(valueChange)="filterSubCategoria($event)" [kendoDropDownFilter]="{ operator: 'contains' }"
|
||||||
formControlName="category"
|
textField="name" valueField="id" placeholder="Selecione a categoria do cliente...">
|
||||||
(valueChange)="filterSubCategoria($event)"
|
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a categoria do cliente..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
@@ -411,27 +251,16 @@
|
|||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<label>
|
<label>
|
||||||
<span>Sub-Categoria</span>
|
<span>Sub-Categoria</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="subCategories" formControlName="subCategory"
|
||||||
[data]="subCategories"
|
[kendoDropDownFilter]="{ operator: 'contains' }" textField="name" valueField="id"
|
||||||
formControlName="subCategory"
|
placeholder="Selecione a sub-categoria do cliente...">
|
||||||
[kendoDropDownFilter]="{ operator: 'contains' }"
|
|
||||||
textField="name"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a sub-categoria do cliente..."
|
|
||||||
>
|
|
||||||
</kendo-combobox>
|
</kendo-combobox>
|
||||||
</label>
|
</label>
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
|
|
||||||
<kendo-formfield>
|
<kendo-formfield>
|
||||||
<kendo-label
|
<kendo-label [for]="allow" text="Permite envio de mensagens"></kendo-label>
|
||||||
[for]="allow"
|
<kendo-switch #allow formControlName="notifications"></kendo-switch>
|
||||||
text="Permite envio de mensagens"
|
|
||||||
></kendo-label>
|
|
||||||
<kendo-switch
|
|
||||||
#allow
|
|
||||||
formControlName="notifications"
|
|
||||||
></kendo-switch>
|
|
||||||
</kendo-formfield>
|
</kendo-formfield>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
@@ -441,11 +270,7 @@
|
|||||||
<div class="k-loading-panel">
|
<div class="k-loading-panel">
|
||||||
<div class="k-loading-panel-mask"></div>
|
<div class="k-loading-panel-mask"></div>
|
||||||
<div class="k-loading-panel-wrapper">
|
<div class="k-loading-panel-wrapper">
|
||||||
<kendo-loader
|
<kendo-loader [type]="'infinite-spinner'" [themeColor]="'primary'" [size]="'large'">
|
||||||
[type]="'infinite-spinner'"
|
|
||||||
[themeColor]="'primary'"
|
|
||||||
[size]="'large'"
|
|
||||||
>
|
|
||||||
</kendo-loader>
|
</kendo-loader>
|
||||||
<div class="k-loading-panel-text">Aguarde...</div>
|
<div class="k-loading-panel-text">Aguarde...</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -462,42 +287,21 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<kendo-dialog-actions>
|
<kendo-dialog-actions>
|
||||||
<button
|
<button (click)="showConfirmation()" class="btn-fill-blue text-btn-white" kendoButton [primary]="true"
|
||||||
(click)="showConfirmation()"
|
[disabled]="!form.valid || inProcess">
|
||||||
class="btn-fill-blue text-btn-white"
|
|
||||||
kendoButton
|
|
||||||
[primary]="true"
|
|
||||||
[disabled]="!form.valid || inProcess"
|
|
||||||
>
|
|
||||||
Gravar
|
Gravar
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="closeDialog()">
|
||||||
class="btn-flat text-btn-flat"
|
|
||||||
kendoButton
|
|
||||||
look="flat"
|
|
||||||
(click)="closeDialog()"
|
|
||||||
>
|
|
||||||
Cancelar
|
Cancelar
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button class="btn-flat text-btn-flat" kendoButton look="flat" (click)="googleGeocode()">
|
||||||
class="btn-flat text-btn-flat"
|
|
||||||
kendoButton
|
|
||||||
look="flat"
|
|
||||||
(click)="googleGeocode()"
|
|
||||||
>
|
|
||||||
Mapa do endereço
|
Mapa do endereço
|
||||||
</button>
|
</button>
|
||||||
</kendo-dialog-actions>
|
</kendo-dialog-actions>
|
||||||
|
|
||||||
<app-confirmation
|
<app-confirmation *ngIf="isShowConfirmation" opened="isShowConfirmation" title="{{ titleMessage }}"
|
||||||
*ngIf="isShowConfirmation"
|
message="{{ messageConfirmation }}" textButtonConfirmation="{{ textButtonConfirmation }}"
|
||||||
opened="isShowConfirmation"
|
textButtonCancel="{{ textButtonCancel }}" (resultEvent)="returnConfirmationSalve($event)"></app-confirmation>
|
||||||
title="{{ titleMessage }}"
|
|
||||||
message="{{ messageConfirmation }}"
|
|
||||||
textButtonConfirmation="{{ textButtonConfirmation }}"
|
|
||||||
textButtonCancel="{{ textButtonCancel }}"
|
|
||||||
(resultEvent)="returnConfirmationSalve($event)"
|
|
||||||
></app-confirmation>
|
|
||||||
</kendo-dialog>
|
</kendo-dialog>
|
||||||
|
|
||||||
<!-- <kendo-dialog
|
<!-- <kendo-dialog
|
||||||
|
|||||||
@@ -84,15 +84,9 @@ export class DiscountOrderComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
confirmDiscount() {
|
confirmDiscount() {
|
||||||
const domain = '@jurunense.com.br';
|
|
||||||
let email = this.formDiscount.get('formUser.email').value;
|
let email = this.formDiscount.get('formUser.email').value;
|
||||||
|
|
||||||
// Remover domínio se já estiver presente
|
const emailUpperCase = email.toUpperCase();
|
||||||
if (email.toLowerCase().endsWith(domain)) {
|
|
||||||
email = email.substring(0, email.length - domain.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
const emailUpperCase = (email + domain).toUpperCase();
|
|
||||||
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
|
const passwordUpperCase = this.formDiscount.get('formUser.password').value.toUpperCase();
|
||||||
|
|
||||||
if (this.discountAuthorization < this.percent) {
|
if (this.discountAuthorization < this.percent) {
|
||||||
|
|||||||
@@ -10,18 +10,18 @@
|
|||||||
<button kendoButton class="new-order text-button" (click)="openNewOrder()">
|
<button kendoButton class="new-order text-button" (click)="openNewOrder()">
|
||||||
Novo pedido
|
Novo pedido
|
||||||
</button>
|
</button>
|
||||||
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashTodaysale()">
|
<!-- <button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashTodaysale()">
|
||||||
Dashboard Venda dia
|
Dashboard Venda dia
|
||||||
</button>
|
</button>
|
||||||
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashSeller()">
|
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openDashSeller()">
|
||||||
Dashboard Vendedor
|
Dashboard Vendedor
|
||||||
</button>
|
</button> -->
|
||||||
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openOrders()">
|
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openOrders()">
|
||||||
Pedidos de venda
|
Pedidos de venda
|
||||||
</button>
|
</button>
|
||||||
<button kendoButton class="button-flat text-button-flat mt-2" (click)="openProductOrder()">
|
<!--button kendoButton class="button-flat text-button-flat mt-2" (click)="openProductOrder()">
|
||||||
Produtos Vendidos
|
Produtos Vendidos
|
||||||
</button>
|
</button> -->
|
||||||
<button kendoButton class="button-flat-blue text-button-flat-blue mt-2" (click)="openClose(true)">
|
<button kendoButton class="button-flat-blue text-button-flat-blue mt-2" (click)="openClose(true)">
|
||||||
Orçamentos pendentes
|
Orçamentos pendentes
|
||||||
</button>
|
</button>
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
</button>
|
</button>
|
||||||
<div *ngIf="isMobileMenuOpen" class="mobile-menu-items shadow-sm">
|
<div *ngIf="isMobileMenuOpen" class="mobile-menu-items shadow-sm">
|
||||||
<button class="dropdown-item w-100" (click)="openNewOrder()">Novo pedido</button>
|
<button class="dropdown-item w-100" (click)="openNewOrder()">Novo pedido</button>
|
||||||
<button class="dropdown-item w-100" (click)="openDashTodaysale()">Dashboard Venda dia</button>
|
<!-- <button class="dropdown-item w-100" (click)="openDashTodaysale()">Dashboard Venda dia</button>
|
||||||
<button class="dropdown-item w-100" (click)="openDashSeller()">Dashboard Vendedor</button>
|
<button class="dropdown-item w-100" (click)="openDashSeller()">Dashboard Vendedor</button>-->
|
||||||
<button class="dropdown-item w-100" (click)="openOrders()">Pedidos de venda</button>
|
<button class="dropdown-item w-100" (click)="openOrders()">Pedidos de venda</button>
|
||||||
<button class="dropdown-item w-100" (click)="openProductOrder()">Produtos Vendidos</button>
|
<button class="dropdown-item w-100" (click)="openProductOrder()">Produtos Vendidos</button>
|
||||||
<button class="dropdown-item w-100" (click)="openClose(true)">Orçamentos pendentes</button>
|
<button class="dropdown-item w-100" (click)="openClose(true)">Orçamentos pendentes</button>
|
||||||
|
|||||||
@@ -9,13 +9,8 @@
|
|||||||
<div class="col-md-6 col-sm-12">
|
<div class="col-md-6 col-sm-12">
|
||||||
<label>
|
<label>
|
||||||
<span>Filial de venda</span>
|
<span>Filial de venda</span>
|
||||||
<kendo-combobox
|
<kendo-combobox [data]="store$ | async" textField="shortName" valueField="id"
|
||||||
[data]="store$ | async"
|
placeholder="Selecione a filial de venda..." (selectionChange)="selectedStore($event)"></kendo-combobox>
|
||||||
textField="shortName"
|
|
||||||
valueField="id"
|
|
||||||
placeholder="Selecione a filial de venda..."
|
|
||||||
(selectionChange)="selectedStore($event)"
|
|
||||||
></kendo-combobox>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
|
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
|
||||||
@@ -33,16 +28,10 @@
|
|||||||
<span class="d-block">Data do pedido</span>
|
<span class="d-block">Data do pedido</span>
|
||||||
<kendo-daterange class="d-flex gap-3 align-items-center">
|
<kendo-daterange class="d-flex gap-3 align-items-center">
|
||||||
<kendo-floatinglabel text="Início" id="dtinicio">
|
<kendo-floatinglabel text="Início" id="dtinicio">
|
||||||
<kendo-dateinput
|
<kendo-dateinput kendoDateRangeStartInput [(value)]="filterPreOrder.start"></kendo-dateinput>
|
||||||
kendoDateRangeStartInput
|
|
||||||
[(value)]="filterPreOrder.start"
|
|
||||||
></kendo-dateinput>
|
|
||||||
</kendo-floatinglabel>
|
</kendo-floatinglabel>
|
||||||
<kendo-floatinglabel text="Término" id="dtfim">
|
<kendo-floatinglabel text="Término" id="dtfim">
|
||||||
<kendo-dateinput
|
<kendo-dateinput kendoDateRangeEndInput [(value)]="filterPreOrder.end"></kendo-dateinput>
|
||||||
kendoDateRangeEndInput
|
|
||||||
[(value)]="filterPreOrder.end"
|
|
||||||
></kendo-dateinput>
|
|
||||||
</kendo-floatinglabel>
|
</kendo-floatinglabel>
|
||||||
</kendo-daterange>
|
</kendo-daterange>
|
||||||
</label>
|
</label>
|
||||||
@@ -50,10 +39,7 @@
|
|||||||
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
|
<div class="col-md-6 col-sm-12 mt-3 mt-md-0">
|
||||||
<label>
|
<label>
|
||||||
<span class="d-block">CPF / CNPJ</span>
|
<span class="d-block">CPF / CNPJ</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="document" placeholder="Informe o CPF ou CNPJ do cliente"></kendo-textbox>
|
||||||
formControlName="document"
|
|
||||||
placeholder="Informe o CPF ou CNPJ do cliente"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,64 +49,43 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<label class="w-100">
|
<label class="w-100">
|
||||||
<span class="d-block">Nome do cliente</span>
|
<span class="d-block">Nome do cliente</span>
|
||||||
<kendo-textbox
|
<kendo-textbox formControlName="nameCustomer"
|
||||||
formControlName="nameCustomer"
|
placeholder="Informe o nome ou razão social do cliente"></kendo-textbox>
|
||||||
placeholder="Informe o nome ou razão social do cliente"
|
|
||||||
></kendo-textbox>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Botão Pesquisar -->
|
<!-- Botão Pesquisar -->
|
||||||
<div class="mt-3 text-center">
|
<div class="mt-3 text-center">
|
||||||
<button kendoButton [disabled]="isLoading" [icon]="loadingIcon" (click)="getOrders()">Pesquisar</button>
|
<button kendoButton [disabled]="isLoading" [icon]="loadingIcon" (click)="getOrders()">Pesquisar</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Grid -->
|
<!-- Grid -->
|
||||||
<div class="col-12 mt-4 flex-fill">
|
<div class="col-12 mt-4 flex-fill">
|
||||||
<kendo-grid
|
<kendo-grid [kendoGridBinding]="orders" [sortable]="true" [loading]="isLoading" [height]="280"
|
||||||
[kendoGridBinding]="orders"
|
(edit)="selectedOrder($event)" (remove)="showItensOrder($event)">
|
||||||
[sortable]="true"
|
|
||||||
[loading]="isLoading"
|
|
||||||
[height]="280"
|
|
||||||
(edit)="selectedOrder($event)"
|
|
||||||
(remove)="showItensOrder($event)"
|
|
||||||
>
|
|
||||||
<kendo-grid-command-column title="Ações" width="190">
|
<kendo-grid-command-column title="Ações" width="190">
|
||||||
<ng-template kendoGridCellTemplate let-dataItem>
|
<ng-template kendoGridCellTemplate let-dataItem>
|
||||||
<div style="display: flex; align-items: center; gap: 10px;">
|
<div style="display: flex; align-items: center; gap: 10px;">
|
||||||
<button kendoGridEditCommand icon="edit"></button>
|
<button kendoGridEditCommand icon="edit"></button>
|
||||||
<button kendoGridRemoveCommand icon="binoculars"></button>
|
<button kendoGridRemoveCommand icon="binoculars"></button>
|
||||||
<button
|
<button kendoButton icon="printer" (click)="showItensOrder2(dataItem)"></button>
|
||||||
kendoButton
|
<!-- <button
|
||||||
icon="printer"
|
|
||||||
(click)="showItensOrder2(dataItem)"
|
|
||||||
></button>
|
|
||||||
<button
|
|
||||||
kendoButton
|
kendoButton
|
||||||
class="p-1"
|
class="p-1"
|
||||||
(click)="openReceivePix(true, dataItem)"
|
(click)="openReceivePix(true, dataItem)"
|
||||||
>
|
>
|
||||||
<div class="logo-pix"></div>
|
<div class="logo-pix"></div>
|
||||||
</button>
|
</button> -->
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</kendo-grid-command-column>
|
</kendo-grid-command-column>
|
||||||
<kendo-grid-column
|
<kendo-grid-column *ngFor="let col of columns" [field]="col.field" [title]="col.title" [width]="col.width"
|
||||||
*ngFor="let col of columns"
|
[class]="{ 'text-end': col.textEnd }">
|
||||||
[field]="col.field"
|
<ng-template *ngIf="col.field == 'orderValue'" kendoGridCellTemplate let-dataItem>
|
||||||
[title]="col.title"
|
|
||||||
[width]="col.width"
|
|
||||||
[class]="{ 'text-end': col.textEnd }"
|
|
||||||
>
|
|
||||||
<ng-template
|
|
||||||
*ngIf="col.field == 'orderValue'"
|
|
||||||
kendoGridCellTemplate
|
|
||||||
let-dataItem
|
|
||||||
>
|
|
||||||
<span>{{ dataItem.orderValue | currency }}</span>
|
<span>{{ dataItem.orderValue | currency }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
@@ -129,57 +94,29 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="showInformation">
|
<div *ngIf="showInformation">
|
||||||
<app-message-information
|
<app-message-information opened="true" title="Pedido de venda" [message]="messageInformation"
|
||||||
opened="true"
|
[information]="informationDescription" (resultEvent)="closeInformation($event)"></app-message-information>
|
||||||
title="Pedido de venda"
|
|
||||||
[message]="messageInformation"
|
|
||||||
[information]="informationDescription"
|
|
||||||
(resultEvent)="closeInformation($event)"
|
|
||||||
></app-message-information>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="showInformationSeller">
|
<div *ngIf="showInformationSeller">
|
||||||
<app-message-information
|
<app-message-information opened="true" title="Pedido de venda" message="Pedido não pode ser alterado!"
|
||||||
opened="true"
|
|
||||||
title="Pedido de venda"
|
|
||||||
message="Pedido não pode ser alterado!"
|
|
||||||
information="Pedido de outro vendedor, somente o vendedor responsável da venda poderá alterar o pedido."
|
information="Pedido de outro vendedor, somente o vendedor responsável da venda poderá alterar o pedido."
|
||||||
(resultEvent)="closeInformationSeller($event)"
|
(resultEvent)="closeInformationSeller($event)"></app-message-information>
|
||||||
></app-message-information>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="k-loading-panel" *ngIf="loadingPanelVisible">
|
<div class="k-loading-panel" *ngIf="loadingPanelVisible">
|
||||||
<div class="k-loading-panel-mask"></div>
|
<div class="k-loading-panel-mask"></div>
|
||||||
<div class="k-loading-panel-wrapper">
|
<div class="k-loading-panel-wrapper">
|
||||||
<kendo-loader
|
<kendo-loader type="infinite-spinner" themeColor="primary" size="large"></kendo-loader>
|
||||||
type="infinite-spinner"
|
|
||||||
themeColor="primary"
|
|
||||||
size="large"
|
|
||||||
></kendo-loader>
|
|
||||||
<div class="k-loading-panel-text">Loading...</div>
|
<div class="k-loading-panel-text">Loading...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<kendo-dialog
|
<kendo-dialog title="Itens do pedido" animation="zoom" *ngIf="openedItensOrder"
|
||||||
title="Itens do pedido"
|
(close)="closeModelItensOrder('Cancelar')" [minWidth]="250" [width]="1200" [height]="450">
|
||||||
animation="zoom"
|
<kendo-grid [kendoGridBinding]="orderItens" style="width: 1150px" [scrollable]="true">
|
||||||
*ngIf="openedItensOrder"
|
<kendo-grid-column field="productId" title="Código" [width]="70"></kendo-grid-column>
|
||||||
(close)="closeModelItensOrder('Cancelar')"
|
|
||||||
[minWidth]="250"
|
|
||||||
[width]="1200"
|
|
||||||
[height]="450"
|
|
||||||
>
|
|
||||||
<kendo-grid
|
|
||||||
[kendoGridBinding]="orderItens"
|
|
||||||
style="width: 1150px"
|
|
||||||
[scrollable]="true"
|
|
||||||
>
|
|
||||||
<kendo-grid-column
|
|
||||||
field="productId"
|
|
||||||
title="Código"
|
|
||||||
[width]="70"
|
|
||||||
></kendo-grid-column>
|
|
||||||
<kendo-grid-column field="description" title="Descrição" [width]="250">
|
<kendo-grid-column field="description" title="Descrição" [width]="250">
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column field="package" title="Embalagem" [width]="80">
|
<kendo-grid-column field="package" title="Embalagem" [width]="80">
|
||||||
@@ -188,32 +125,17 @@
|
|||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column field="local" title="Ambiente" [width]="100">
|
<kendo-grid-column field="local" title="Ambiente" [width]="100">
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column
|
<kendo-grid-column [class]="{ 'text-end': true }" field="price" title="P.Venda" [width]="80">
|
||||||
[class]="{ 'text-end': true }"
|
|
||||||
field="price"
|
|
||||||
title="P.Venda"
|
|
||||||
[width]="80"
|
|
||||||
>
|
|
||||||
<ng-template kendoGridCellTemplate let-dataItem>
|
<ng-template kendoGridCellTemplate let-dataItem>
|
||||||
<span>{{ dataItem.price | currency }}</span>
|
<span>{{ dataItem.price | currency }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column
|
<kendo-grid-column [class]="{ 'text-end': true }" field="quantity" title="Qtde" [width]="60">
|
||||||
[class]="{ 'text-end': true }"
|
|
||||||
field="quantity"
|
|
||||||
title="Qtde"
|
|
||||||
[width]="60"
|
|
||||||
>
|
|
||||||
<ng-template kendoGridCellTemplate let-dataItem>
|
<ng-template kendoGridCellTemplate let-dataItem>
|
||||||
<span>{{ dataItem.quantity | number : "1.0-3" }}</span>
|
<span>{{ dataItem.quantity | number : "1.0-3" }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</kendo-grid-column>
|
</kendo-grid-column>
|
||||||
<kendo-grid-column
|
<kendo-grid-column [class]="{ 'text-end': true }" field="subTotal" title="Valor Total" [width]="80">
|
||||||
[class]="{ 'text-end': true }"
|
|
||||||
field="subTotal"
|
|
||||||
title="Valor Total"
|
|
||||||
[width]="80"
|
|
||||||
>
|
|
||||||
<ng-template kendoGridCellTemplate let-dataItem>
|
<ng-template kendoGridCellTemplate let-dataItem>
|
||||||
<span>{{ dataItem.subTotal | currency }}</span>
|
<span>{{ dataItem.subTotal | currency }}</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@@ -221,39 +143,21 @@
|
|||||||
</kendo-grid>
|
</kendo-grid>
|
||||||
</kendo-dialog>
|
</kendo-dialog>
|
||||||
|
|
||||||
<kendo-dialog
|
<kendo-dialog title="Selecione o modelo do pedido" animation="zoom" *ngIf="openedModelPrintOrder"
|
||||||
title="Selecione o modelo do pedido"
|
(close)="closeModelPrintOrder('Cancelar')" [minWidth]="250" [width]="450">
|
||||||
animation="zoom"
|
|
||||||
*ngIf="openedModelPrintOrder"
|
|
||||||
(close)="closeModelPrintOrder('Cancelar')"
|
|
||||||
[minWidth]="250"
|
|
||||||
[width]="450"
|
|
||||||
>
|
|
||||||
<form class="k-form" [formGroup]="formModelOrder">
|
<form class="k-form" [formGroup]="formModelOrder">
|
||||||
<kendo-formfield showHints="initial">
|
<kendo-formfield showHints="initial">
|
||||||
<label class="k-label">Selecione o modelo de pedido</label>
|
<label class="k-label">Selecione o modelo de pedido</label>
|
||||||
<ul class="k-radio-list">
|
<ul class="k-radio-list">
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #bobina value="B" kendoRadioButton formControlName="model" />
|
||||||
type="radio"
|
|
||||||
#bobina
|
|
||||||
value="B"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="model"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Bobina</span>
|
<span class="ms-2">Bobina</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="k-radio-item">
|
<li class="k-radio-item">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input type="radio" #bobina value="A" kendoRadioButton formControlName="model" />
|
||||||
type="radio"
|
|
||||||
#bobina
|
|
||||||
value="A"
|
|
||||||
kendoRadioButton
|
|
||||||
formControlName="model"
|
|
||||||
/>
|
|
||||||
<span class="ms-2">Formulário A4</span>
|
<span class="ms-2">Formulário A4</span>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@@ -262,56 +166,26 @@
|
|||||||
</form>
|
</form>
|
||||||
<kendo-dialog-actions>
|
<kendo-dialog-actions>
|
||||||
<button kendoButton (click)="closeModelPrintOrder('Não')">Cancelar</button>
|
<button kendoButton (click)="closeModelPrintOrder('Não')">Cancelar</button>
|
||||||
<button
|
<button kendoButton (click)="closeModelPrintOrder('Sim')" themeColor="primary">
|
||||||
kendoButton
|
|
||||||
(click)="closeModelPrintOrder('Sim')"
|
|
||||||
themeColor="primary"
|
|
||||||
>
|
|
||||||
Imprimir
|
Imprimir
|
||||||
</button>
|
</button>
|
||||||
</kendo-dialog-actions>
|
</kendo-dialog-actions>
|
||||||
</kendo-dialog>
|
</kendo-dialog>
|
||||||
|
|
||||||
<kendo-window
|
<kendo-window [top]="100" [left]="50" title="Pedido de venda" [(state)]="windowState" *ngIf="openedPrintOrder"
|
||||||
[top]="100"
|
(close)="openClosePrintOrder(false)">
|
||||||
[left]="50"
|
<stimulsoft-viewer-angular [requestUrl]="urlPrintOrder" [action]="'InitViewerOrder'" [width]="'95%'"
|
||||||
title="Pedido de venda"
|
[height]="'800px'"></stimulsoft-viewer-angular>
|
||||||
[(state)]="windowState"
|
|
||||||
*ngIf="openedPrintOrder"
|
|
||||||
(close)="openClosePrintOrder(false)"
|
|
||||||
>
|
|
||||||
<stimulsoft-viewer-angular
|
|
||||||
[requestUrl]="urlPrintOrder"
|
|
||||||
[action]="'InitViewerOrder'"
|
|
||||||
[width]="'95%'"
|
|
||||||
[height]="'800px'"
|
|
||||||
></stimulsoft-viewer-angular>
|
|
||||||
</kendo-window>
|
</kendo-window>
|
||||||
|
|
||||||
<kendo-window
|
<kendo-window [top]="100" [left]="50" title="Recibo de PIX" [(state)]="windowState" *ngIf="openedPrintReceivePix"
|
||||||
[top]="100"
|
(close)="closePrintReceivePix('Não')">
|
||||||
[left]="50"
|
<stimulsoft-viewer-angular [requestUrl]="urlPrintCreditPix" [action]="'InitViewerComprovantePix'" [width]="'95%'"
|
||||||
title="Recibo de PIX"
|
[height]="'800px'"></stimulsoft-viewer-angular>
|
||||||
[(state)]="windowState"
|
|
||||||
*ngIf="openedPrintReceivePix"
|
|
||||||
(close)="closePrintReceivePix('Não')"
|
|
||||||
>
|
|
||||||
<stimulsoft-viewer-angular
|
|
||||||
[requestUrl]="urlPrintCreditPix"
|
|
||||||
[action]="'InitViewerComprovantePix'"
|
|
||||||
[width]="'95%'"
|
|
||||||
[height]="'800px'"
|
|
||||||
></stimulsoft-viewer-angular>
|
|
||||||
</kendo-window>
|
</kendo-window>
|
||||||
|
|
||||||
<kendo-dialog
|
<kendo-dialog title="Recebimento via PIX" animation="zoom" *ngIf="showReceivePix" (close)="closeReceivePix('Cancelar')"
|
||||||
title="Recebimento via PIX"
|
[minWidth]="250" [width]="450">
|
||||||
animation="zoom"
|
|
||||||
*ngIf="showReceivePix"
|
|
||||||
(close)="closeReceivePix('Cancelar')"
|
|
||||||
[minWidth]="250"
|
|
||||||
[width]="450"
|
|
||||||
>
|
|
||||||
<div *ngIf="!showQrCode">
|
<div *ngIf="!showQrCode">
|
||||||
<form class="k-form" [formGroup]="formReceivePix">
|
<form class="k-form" [formGroup]="formReceivePix">
|
||||||
<kendo-formfield showHints="initial">
|
<kendo-formfield showHints="initial">
|
||||||
@@ -364,11 +238,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row w-100 mb-3">
|
<div class="row w-100 mb-3">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<kendo-textbox
|
<kendo-textbox readonly="true" [value]="qrCodePix" [selectOnFocus]="true"></kendo-textbox>
|
||||||
readonly="true"
|
|
||||||
[value]="qrCodePix"
|
|
||||||
[selectOnFocus]="true"
|
|
||||||
></kendo-textbox>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<kendo-dialog-actions>
|
<kendo-dialog-actions>
|
||||||
|
|||||||
@@ -239,7 +239,9 @@ export class OrdersComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openPrintOrder() {
|
openPrintOrder() {
|
||||||
this.urlPrintOrder = 'http://10.1.1.205:8068/Viewer/{action}?orderId=' +
|
//this.urlPrintOrder = 'http://localhost:52986/Viewer/{action}?orderId=' +
|
||||||
|
//'http://172.35.0.219:8068/Viewer/{action}?orderId=' +
|
||||||
|
this.urlPrintOrder = 'http://172.35.0.219:8068/Viewer/{action}?orderId=' +
|
||||||
this.orderNumber + '&model=' + this.modelPrintOrder;
|
this.orderNumber + '&model=' + this.modelPrintOrder;
|
||||||
this.titleInformation = 'Gravar pedido de venda';
|
this.titleInformation = 'Gravar pedido de venda';
|
||||||
this.openedPrintOrder = true;
|
this.openedPrintOrder = true;
|
||||||
@@ -258,7 +260,7 @@ export class OrdersComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openPrintReceivePix() {
|
openPrintReceivePix() {
|
||||||
this.urlPrintCreditPix = 'http://10.1.1.205:8068/Viewer/{action}?order=' +
|
this.urlPrintCreditPix = 'http://172.35.0.219:8068/Viewer/{action}?order=' +
|
||||||
this.orderNumber;
|
this.orderNumber;
|
||||||
this.titleInformation = 'Recibo pagamento via PIX';
|
this.titleInformation = 'Recibo pagamento via PIX';
|
||||||
this.openedPrintReceivePix = true;
|
this.openedPrintReceivePix = true;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class PreorderComponent implements OnInit {
|
|||||||
formModelPreOrder: FormGroup;
|
formModelPreOrder: FormGroup;
|
||||||
preOrderNumber: number;
|
preOrderNumber: number;
|
||||||
openedModelPrintOrder = false;
|
openedModelPrintOrder = false;
|
||||||
urlPrintPreOrder = 'http://10.1.1.205:8068/Viewer/{action}?order=';
|
urlPrintPreOrder = 'http://172.35.0.219:8068/Viewer/{action}?order=';
|
||||||
showInformationCreateOrder = false;
|
showInformationCreateOrder = false;
|
||||||
openedPrintPreOrder = false;
|
openedPrintPreOrder = false;
|
||||||
public windowState: WindowState = 'maximized';
|
public windowState: WindowState = 'maximized';
|
||||||
@@ -125,11 +125,11 @@ export class PreorderComponent implements OnInit {
|
|||||||
public selectedPreOrder({ sender, rowIndex, dataItem }: EditEvent): void {
|
public selectedPreOrder({ sender, rowIndex, dataItem }: EditEvent): void {
|
||||||
|
|
||||||
if (dataItem.status === "ORÇAMENTO UTILIZADO") {
|
if (dataItem.status === "ORÇAMENTO UTILIZADO") {
|
||||||
this.showInformation = true;
|
this.showInformation = true;
|
||||||
this.titleInformation = "Alterar Orçamento"
|
this.titleInformation = "Alterar Orçamento"
|
||||||
this.messageInformation = "Orçamento não pode ser editado."
|
this.messageInformation = "Orçamento não pode ser editado."
|
||||||
this.informationDescription = "Orçamento já foi convertido em pedido de venda, alteração não permitida."
|
this.informationDescription = "Orçamento já foi convertido em pedido de venda, alteração não permitida."
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.preOrderService.getCartId(dataItem.idPreOrder).pipe(
|
this.preOrderService.getCartId(dataItem.idPreOrder).pipe(
|
||||||
@@ -207,7 +207,7 @@ export class PreorderComponent implements OnInit {
|
|||||||
|
|
||||||
openPrintPreOrder() {
|
openPrintPreOrder() {
|
||||||
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
// this.urlPrintPreOrder = 'http://localhost:52986//Viewer/{action}?order=' +
|
||||||
this.urlPrintPreOrder = 'http://10.1.1.205:8068/Viewer/{action}?order=' +
|
this.urlPrintPreOrder = 'http://172.35.0.219:8068/Viewer/{action}?order=' +
|
||||||
this.preOrderNumber + '&model=' + this.modelPrintPreOrder;
|
this.preOrderNumber + '&model=' + this.modelPrintPreOrder;
|
||||||
this.openedPrintPreOrder = true;
|
this.openedPrintPreOrder = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class LookupService {
|
|||||||
constructor(
|
constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
getStore(): Observable<StoreERP[]> {
|
getStore(): Observable<StoreERP[]> {
|
||||||
const url = environment.url + `lists/store/user/${this.authService.getUser()}`;
|
const url = environment.url + `lists/store/user/${this.authService.getUser()}`;
|
||||||
@@ -60,8 +60,8 @@ export class LookupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getPaymentPlan(billingId: string = '9999'): Observable<PaymentPlan[]> {
|
getPaymentPlan(billingId: string = '9999', customerId: number = 1): Observable<PaymentPlan[]> {
|
||||||
const url = environment.url + `lists/paymentplan/${billingId}`;
|
const url = environment.url + `lists/paymentplan/${billingId}/${customerId}`;
|
||||||
try {
|
try {
|
||||||
const response = this.http.get<PaymentPlan[]>(url);
|
const response = this.http.get<PaymentPlan[]>(url);
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class ShoppingService {
|
|||||||
constructor(
|
constructor(
|
||||||
private httpClient: HttpClient,
|
private httpClient: HttpClient,
|
||||||
private messageService: MessageService
|
private messageService: MessageService
|
||||||
) {}
|
) { }
|
||||||
|
|
||||||
getShoppingItems(idCart: string): Observable<ShoppingItem[]> {
|
getShoppingItems(idCart: string): Observable<ShoppingItem[]> {
|
||||||
if (idCart == null || idCart === '') {
|
if (idCart == null || idCart === '') {
|
||||||
@@ -72,7 +72,7 @@ export class ShoppingService {
|
|||||||
|
|
||||||
updateShopping(shopping: Shopping) {
|
updateShopping(shopping: Shopping) {
|
||||||
const resp = this.httpClient
|
const resp = this.httpClient
|
||||||
.put<Shopping>(`${environment.url}shopping/${shopping.id}`, shopping)
|
.put<Shopping>(`${environment.url}shopping/cart`, shopping)
|
||||||
.pipe(
|
.pipe(
|
||||||
map((response) => {
|
map((response) => {
|
||||||
console.log('Retorno atualização item: ' + response);
|
console.log('Retorno atualização item: ' + response);
|
||||||
@@ -115,11 +115,11 @@ export class ShoppingService {
|
|||||||
const url = `${environment.url}shopping/update/payment/${idCart}`;
|
const url = `${environment.url}shopping/update/payment/${idCart}`;
|
||||||
console.log(
|
console.log(
|
||||||
'Url: ' +
|
'Url: ' +
|
||||||
url +
|
url +
|
||||||
' - cart: ' +
|
' - cart: ' +
|
||||||
idCart +
|
idCart +
|
||||||
' - payment: ' +
|
' - payment: ' +
|
||||||
JSON.stringify(payment)
|
JSON.stringify(payment)
|
||||||
);
|
);
|
||||||
const resp = this.httpClient.put<ResultApi>(url, payment).pipe(
|
const resp = this.httpClient.put<ResultApi>(url, payment).pipe(
|
||||||
map((response) => {
|
map((response) => {
|
||||||
|
|||||||
BIN
src/assets/img/Background.jpeg
Normal file
BIN
src/assets/img/Background.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 921 KiB After Width: | Height: | Size: 2.9 MiB |
BIN
src/assets/img/Background_jurunense.png
Normal file
BIN
src/assets/img/Background_jurunense.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 921 KiB |
@@ -11,8 +11,8 @@ export const environment = {
|
|||||||
// url: 'http://10.1.1.210:8065/api/v1/',
|
// url: 'http://10.1.1.210:8065/api/v1/',
|
||||||
// url: 'http://172.35.0.216:8065/api/v1/',
|
// url: 'http://172.35.0.216:8065/api/v1/',
|
||||||
//url: 'http://10.1.1.23:8065/api/v1/',
|
//url: 'http://10.1.1.23:8065/api/v1/',
|
||||||
url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/',
|
//url: 'https://api.vendaweb.simplifiquehc.com.br/api/v1/',
|
||||||
// url: 'http://10.1.1.124:8065/api/v1/',
|
url: 'http://localhost:8067/api/v1/',
|
||||||
|
|
||||||
// URL_PIX: 'http://10.1.1.205:8078/api/v1/',
|
// URL_PIX: 'http://10.1.1.205:8078/api/v1/',
|
||||||
URL_PIX: 'http://10.1.1.205:8078/api/v1/',
|
URL_PIX: 'http://10.1.1.205:8078/api/v1/',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
<script src="assets/env.js"></script>
|
<script src="assets/env.js"></script>
|
||||||
<title>Plataforma Smart</title>
|
<title>Plataforma Smarts</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
|
|||||||
Reference in New Issue
Block a user