@seniorsistemas/yms-integration 1.19.1 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/seniorsistemas-yms-integration.umd.js +906 -236
- package/bundles/seniorsistemas-yms-integration.umd.js.map +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js +1 -1
- package/bundles/seniorsistemas-yms-integration.umd.min.js.map +1 -1
- package/esm2015/index.js +4 -1
- package/esm2015/seniorsistemas-yms-integration.js +49 -38
- package/esm2015/src/erp-senior/components/nota-form/nota-form.component.js +3 -3
- package/esm2015/src/erp-senior/components/nota-form/nota-form.module.js +4 -2
- package/esm2015/src/erp-senior/erp-senior.module.js +3 -1
- package/esm2015/src/erp-senior/recebimento/form/recebimento-form.component.js +3 -3
- package/esm2015/src/erp-senior/recebimento-ordem-compra/form/recebimento-ordem-compra-form.component.js +3 -3
- package/esm2015/src/utils/directives/directives.module.js +15 -0
- package/esm2015/src/utils/directives/trim.directive.js +27 -0
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +166 -0
- package/esm2015/src/wms/components/document-grid/document-grid.module.js +35 -0
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +82 -0
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.module.js +26 -0
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +125 -0
- package/esm2015/src/wms/components/document-grid/register-document/register-document.module.js +32 -0
- package/esm2015/src/wms/entities/agenda/agenda.service.js +22 -0
- package/esm2015/src/wms/entities/document/document-dto.js +1 -0
- package/esm2015/src/wms/entities/document/document.js +39 -0
- package/esm2015/src/wms/entities/document/document.service.js +21 -0
- package/esm2015/src/wms/entities/document/find-documents-input.js +1 -0
- package/esm2015/src/wms/entities/entity-service.js +4 -0
- package/esm2015/src/wms/entities/wms-system/wms-system.js +9 -0
- package/esm2015/src/wms/form/form-wms.component.js +60 -0
- package/esm2015/src/wms/wms.module.js +68 -0
- package/esm5/index.js +4 -1
- package/esm5/seniorsistemas-yms-integration.js +49 -38
- package/esm5/src/erp-senior/components/nota-form/nota-form.component.js +3 -3
- package/esm5/src/erp-senior/components/nota-form/nota-form.module.js +4 -2
- package/esm5/src/erp-senior/erp-senior.module.js +3 -1
- package/esm5/src/erp-senior/recebimento/form/recebimento-form.component.js +3 -3
- package/esm5/src/erp-senior/recebimento-ordem-compra/form/recebimento-ordem-compra-form.component.js +3 -3
- package/esm5/src/utils/directives/directives.module.js +18 -0
- package/esm5/src/utils/directives/trim.directive.js +28 -0
- package/esm5/src/wms/components/document-grid/document-grid.component.js +171 -0
- package/esm5/src/wms/components/document-grid/document-grid.module.js +38 -0
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +84 -0
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.module.js +29 -0
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +127 -0
- package/esm5/src/wms/components/document-grid/register-document/register-document.module.js +35 -0
- package/esm5/src/wms/entities/agenda/agenda.service.js +25 -0
- package/esm5/src/wms/entities/document/document-dto.js +1 -0
- package/esm5/src/wms/entities/document/document.js +44 -0
- package/esm5/src/wms/entities/document/document.service.js +24 -0
- package/esm5/src/wms/entities/document/find-documents-input.js +1 -0
- package/esm5/src/wms/entities/entity-service.js +11 -0
- package/esm5/src/wms/entities/wms-system/wms-system.js +9 -0
- package/esm5/src/wms/form/form-wms.component.js +63 -0
- package/esm5/src/wms/wms.module.js +69 -0
- package/fesm2015/seniorsistemas-yms-integration.js +808 -192
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +845 -189
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.d.ts +48 -37
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/utils/directives/directives.module.d.ts +2 -0
- package/src/utils/directives/trim.directive.d.ts +6 -0
- package/src/wms/components/document-grid/document-grid.component.d.ts +41 -0
- package/src/wms/components/document-grid/document-grid.module.d.ts +2 -0
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +22 -0
- package/src/wms/components/document-grid/insert-key/insert-key.module.d.ts +2 -0
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +31 -0
- package/src/wms/components/document-grid/register-document/register-document.module.d.ts +2 -0
- package/src/wms/entities/agenda/agenda.service.d.ts +9 -0
- package/src/wms/entities/document/document-dto.d.ts +16 -0
- package/src/wms/entities/document/document.d.ts +20 -0
- package/src/wms/entities/document/document.service.d.ts +11 -0
- package/src/wms/entities/document/find-documents-input.d.ts +7 -0
- package/src/wms/entities/entity-service.d.ts +3 -0
- package/src/wms/entities/wms-system/wms-system.d.ts +7 -0
- package/src/wms/form/form-wms.component.d.ts +18 -0
- package/src/wms/wms.module.d.ts +4 -0
|
@@ -2,9 +2,9 @@ import { Subject, throwError, BehaviorSubject, empty, ReplaySubject, NEVER, of,
|
|
|
2
2
|
import { takeUntil, catchError, finalize, map, filter, mergeMap, tap, concatMap, switchMap, debounceTime } from 'rxjs/operators';
|
|
3
3
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { Injectable, Input, Component, NgModule, Output, defineInjectable, inject, EventEmitter, InjectionToken, Inject,
|
|
5
|
+
import { Injectable, Input, Component, NgModule, Output, defineInjectable, inject, EventEmitter, ViewChild, TemplateRef, InjectionToken, Inject, HostListener, Directive, ElementRef } from '@angular/core';
|
|
6
6
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
7
|
-
import { ButtonModule, LoadingStateModule, FieldType, FormField, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, NumberInputModule, LocaleModule } from '@seniorsistemas/angular-components';
|
|
7
|
+
import { ButtonModule, LoadingStateModule, FieldType, FormField, CustomFieldsModule, ControlErrorsModule, EmptyStateModule, DynamicFormModule, TokenListModule, NumberInputModule, LocaleModule, SidebarModule } from '@seniorsistemas/angular-components';
|
|
8
8
|
import { MessageModule } from 'primeng/message';
|
|
9
9
|
import { TableModule, Table } from 'primeng/table';
|
|
10
10
|
import { HttpParams, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
@@ -16,8 +16,8 @@ import { StompConfig, StompService } from '@stomp/ng2-stompjs';
|
|
|
16
16
|
import * as SockJS from 'sockjs-client';
|
|
17
17
|
import { CookieService } from 'ngx-cookie-service';
|
|
18
18
|
import { DynamicDialogModule } from 'primeng/components/dynamicdialog/dynamicdialog';
|
|
19
|
-
import { TooltipModule, SharedModule, CardModule, DialogModule, PanelModule, InputTextModule as InputTextModule$1, DropdownModule, ConfirmDialogModule, TabViewModule, CalendarModule } from 'primeng/primeng';
|
|
20
|
-
import { SelectPlantService, SelectPlantModule } from '@seniorsistemas/yms-components';
|
|
19
|
+
import { TooltipModule, SharedModule, CardModule, DialogModule, PanelModule, InputTextModule as InputTextModule$1, DropdownModule, ConfirmDialogModule, TabViewModule, CalendarModule, InputTextareaModule } from 'primeng/primeng';
|
|
20
|
+
import { SelectPlantService, SelectPlantModule, ComponentsModule } from '@seniorsistemas/yms-components';
|
|
21
21
|
import { Router, RouterModule, ActivatedRoute } from '@angular/router';
|
|
22
22
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
23
23
|
import { InputTextModule } from 'primeng/inputtext';
|
|
@@ -2795,6 +2795,268 @@ VisitorListModule = __decorate([
|
|
|
2795
2795
|
__metadata("design:paramtypes", [IntegrationDispatcher])
|
|
2796
2796
|
], VisitorListModule);
|
|
2797
2797
|
|
|
2798
|
+
const INFORMACAOES_ADICIONAIS_HEADER = "Informações adicionais";
|
|
2799
|
+
let FormWmsDescritor = class FormWmsDescritor {
|
|
2800
|
+
};
|
|
2801
|
+
FormWmsDescritor = __decorate([
|
|
2802
|
+
ChegadaVeiculo({
|
|
2803
|
+
header: INFORMACAOES_ADICIONAIS_HEADER,
|
|
2804
|
+
name: 'yms.integracao.wms',
|
|
2805
|
+
icon: 'fa fa-plus'
|
|
2806
|
+
})
|
|
2807
|
+
], FormWmsDescritor);
|
|
2808
|
+
let FormWmsComponent = class FormWmsComponent extends FormWmsDescritor {
|
|
2809
|
+
constructor(integrationCallback) {
|
|
2810
|
+
super();
|
|
2811
|
+
this.integrationCallback = integrationCallback;
|
|
2812
|
+
this.save = [];
|
|
2813
|
+
this.header = INFORMACAOES_ADICIONAIS_HEADER;
|
|
2814
|
+
this.loading = false;
|
|
2815
|
+
this.unsubscribe$ = new Subject();
|
|
2816
|
+
this._integrationCallback = integrationCallback;
|
|
2817
|
+
}
|
|
2818
|
+
ngOnInit() {
|
|
2819
|
+
this._integrationCallback.onAgendamentoSaved()
|
|
2820
|
+
.pipe(takeUntil(this.unsubscribe$), mergeMap(agenda => {
|
|
2821
|
+
this.agenda = agenda;
|
|
2822
|
+
return empty();
|
|
2823
|
+
}))
|
|
2824
|
+
.subscribe();
|
|
2825
|
+
}
|
|
2826
|
+
ngOnDestroy() {
|
|
2827
|
+
this.unsubscribe$.next();
|
|
2828
|
+
this.unsubscribe$.complete();
|
|
2829
|
+
}
|
|
2830
|
+
};
|
|
2831
|
+
__decorate([
|
|
2832
|
+
Output(),
|
|
2833
|
+
__metadata("design:type", Agenda)
|
|
2834
|
+
], FormWmsComponent.prototype, "agenda", void 0);
|
|
2835
|
+
__decorate([
|
|
2836
|
+
Input(),
|
|
2837
|
+
__metadata("design:type", Array)
|
|
2838
|
+
], FormWmsComponent.prototype, "save", void 0);
|
|
2839
|
+
FormWmsComponent = __decorate([
|
|
2840
|
+
Component({
|
|
2841
|
+
template: `
|
|
2842
|
+
<div *ngIf="agenda">
|
|
2843
|
+
<document-grid [agenda]="agenda"></document-grid>
|
|
2844
|
+
</div>
|
|
2845
|
+
`
|
|
2846
|
+
}),
|
|
2847
|
+
__metadata("design:paramtypes", [IntegrationEventsCallback])
|
|
2848
|
+
], FormWmsComponent);
|
|
2849
|
+
|
|
2850
|
+
let DocumentService = class DocumentService extends EntityService {
|
|
2851
|
+
constructor(http, messageService) {
|
|
2852
|
+
super(http, messageService, 'yms_int/wms/entities/document', '');
|
|
2853
|
+
this.http = http;
|
|
2854
|
+
this.messageService = messageService;
|
|
2855
|
+
}
|
|
2856
|
+
findDocuments(input) {
|
|
2857
|
+
return this.http.post('yms_int/wms/queries/findDocuments', input);
|
|
2858
|
+
}
|
|
2859
|
+
};
|
|
2860
|
+
DocumentService = __decorate([
|
|
2861
|
+
Injectable(),
|
|
2862
|
+
__metadata("design:paramtypes", [HttpClient, MessageService])
|
|
2863
|
+
], DocumentService);
|
|
2864
|
+
|
|
2865
|
+
let DocumentGridComponent = class DocumentGridComponent {
|
|
2866
|
+
constructor(translate, documentService, messageService) {
|
|
2867
|
+
this.translate = translate;
|
|
2868
|
+
this.documentService = documentService;
|
|
2869
|
+
this.messageService = messageService;
|
|
2870
|
+
this.viewDocument = new EventEmitter();
|
|
2871
|
+
this.gridData = [];
|
|
2872
|
+
this.ngUnsubscribe = new Subject();
|
|
2873
|
+
}
|
|
2874
|
+
ngOnInit() {
|
|
2875
|
+
this.gridColumns = this.getGridColumns();
|
|
2876
|
+
this.listDocuments();
|
|
2877
|
+
}
|
|
2878
|
+
onChangeDocument(document) {
|
|
2879
|
+
this.gridData.push(document);
|
|
2880
|
+
this.disabled = false;
|
|
2881
|
+
}
|
|
2882
|
+
getActions() {
|
|
2883
|
+
return [
|
|
2884
|
+
{
|
|
2885
|
+
label: this.translate.instant("yms.int.wms_add_document_invoice_key"),
|
|
2886
|
+
command: () => {
|
|
2887
|
+
this.visibleInvoiceKey = true;
|
|
2888
|
+
},
|
|
2889
|
+
icon: "fa fa-search"
|
|
2890
|
+
},
|
|
2891
|
+
{
|
|
2892
|
+
label: this.translate.instant("yms.int.wms_add_document_register"),
|
|
2893
|
+
command: () => {
|
|
2894
|
+
this.edit = true;
|
|
2895
|
+
this.visibleDocumentRegister = true;
|
|
2896
|
+
},
|
|
2897
|
+
icon: "fas fa-pen-square"
|
|
2898
|
+
}
|
|
2899
|
+
];
|
|
2900
|
+
}
|
|
2901
|
+
getProp(obj, path) {
|
|
2902
|
+
return path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
|
|
2903
|
+
}
|
|
2904
|
+
view(selection) {
|
|
2905
|
+
this.viewDocument.emit(selection);
|
|
2906
|
+
this.visibleDocumentRegister = true;
|
|
2907
|
+
this.edit = false;
|
|
2908
|
+
}
|
|
2909
|
+
save() {
|
|
2910
|
+
if (this.gridData.length > 0) {
|
|
2911
|
+
this.gridData.forEach(data => {
|
|
2912
|
+
if (!data.id) {
|
|
2913
|
+
if (!data.schedulingId) {
|
|
2914
|
+
data.schedulingId = this.agenda.id;
|
|
2915
|
+
}
|
|
2916
|
+
this.documentService.insert(data).subscribe(() => {
|
|
2917
|
+
this.message("success", "saved_message_title", "saved_message_content");
|
|
2918
|
+
});
|
|
2919
|
+
this.disabled = true;
|
|
2920
|
+
}
|
|
2921
|
+
});
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
onDelete(selection) {
|
|
2925
|
+
if (!selection.id) {
|
|
2926
|
+
return;
|
|
2927
|
+
}
|
|
2928
|
+
this.documentService.delete(selection.id)
|
|
2929
|
+
.pipe(takeUntil(this.ngUnsubscribe), finalize(() => {
|
|
2930
|
+
this.gridData = [];
|
|
2931
|
+
this.listDocuments();
|
|
2932
|
+
})).
|
|
2933
|
+
subscribe(() => this.message("success", "deleted_message_title", "deleted_message_content"));
|
|
2934
|
+
}
|
|
2935
|
+
listDocuments() {
|
|
2936
|
+
this.documentService.list({
|
|
2937
|
+
filterQuery: `schedulingId eq '${this.agenda.id}'`
|
|
2938
|
+
})
|
|
2939
|
+
.subscribe((contents) => {
|
|
2940
|
+
if (contents.totalElements > 0) {
|
|
2941
|
+
this.gridData = contents.contents;
|
|
2942
|
+
this.documentTotalRecords = contents.totalElements;
|
|
2943
|
+
}
|
|
2944
|
+
else {
|
|
2945
|
+
this.disabled = true;
|
|
2946
|
+
this.documentTotalRecords = this.gridData.length;
|
|
2947
|
+
}
|
|
2948
|
+
this.loading = false;
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
getGridColumns() {
|
|
2952
|
+
return [
|
|
2953
|
+
{ field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
|
|
2954
|
+
{ field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
|
|
2955
|
+
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") },
|
|
2956
|
+
{ field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
|
|
2957
|
+
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
|
|
2958
|
+
{ field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
|
|
2959
|
+
{ field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
|
|
2960
|
+
{ field: "orderReceivingCode", header: this.translate.instant("yms.int.wms_register_document_order_receiving_code") },
|
|
2961
|
+
];
|
|
2962
|
+
}
|
|
2963
|
+
message(severity, summary, detail) {
|
|
2964
|
+
this.messageService.add({
|
|
2965
|
+
severity,
|
|
2966
|
+
summary: this.translate.instant(summary),
|
|
2967
|
+
detail: this.translate.instant(detail),
|
|
2968
|
+
});
|
|
2969
|
+
}
|
|
2970
|
+
};
|
|
2971
|
+
__decorate([
|
|
2972
|
+
Input(),
|
|
2973
|
+
__metadata("design:type", Object)
|
|
2974
|
+
], DocumentGridComponent.prototype, "agenda", void 0);
|
|
2975
|
+
__decorate([
|
|
2976
|
+
Output(),
|
|
2977
|
+
__metadata("design:type", Boolean)
|
|
2978
|
+
], DocumentGridComponent.prototype, "visibleInvoiceKey", void 0);
|
|
2979
|
+
__decorate([
|
|
2980
|
+
Output(),
|
|
2981
|
+
__metadata("design:type", Boolean)
|
|
2982
|
+
], DocumentGridComponent.prototype, "visibleDocumentRegister", void 0);
|
|
2983
|
+
__decorate([
|
|
2984
|
+
Output(),
|
|
2985
|
+
__metadata("design:type", EventEmitter)
|
|
2986
|
+
], DocumentGridComponent.prototype, "viewDocument", void 0);
|
|
2987
|
+
__decorate([
|
|
2988
|
+
ViewChild("documentTable"),
|
|
2989
|
+
__metadata("design:type", Table)
|
|
2990
|
+
], DocumentGridComponent.prototype, "table", void 0);
|
|
2991
|
+
__decorate([
|
|
2992
|
+
ViewChild("customTemplate"),
|
|
2993
|
+
__metadata("design:type", TemplateRef)
|
|
2994
|
+
], DocumentGridComponent.prototype, "customTemplate", void 0);
|
|
2995
|
+
__decorate([
|
|
2996
|
+
ViewChild("customFilterFields"),
|
|
2997
|
+
__metadata("design:type", TemplateRef)
|
|
2998
|
+
], DocumentGridComponent.prototype, "customFilterFields", void 0);
|
|
2999
|
+
__decorate([
|
|
3000
|
+
ViewChild("customGridColgroup"),
|
|
3001
|
+
__metadata("design:type", TemplateRef)
|
|
3002
|
+
], DocumentGridComponent.prototype, "customGridColgroup", void 0);
|
|
3003
|
+
__decorate([
|
|
3004
|
+
ViewChild("customGridHeader"),
|
|
3005
|
+
__metadata("design:type", TemplateRef)
|
|
3006
|
+
], DocumentGridComponent.prototype, "customGridHeader", void 0);
|
|
3007
|
+
__decorate([
|
|
3008
|
+
ViewChild("customGridBody"),
|
|
3009
|
+
__metadata("design:type", TemplateRef)
|
|
3010
|
+
], DocumentGridComponent.prototype, "customGridBody", void 0);
|
|
3011
|
+
DocumentGridComponent = __decorate([
|
|
3012
|
+
Component({
|
|
3013
|
+
selector: 'document-grid',
|
|
3014
|
+
template: "<p-panel>\n <p-header>\n <div class=\"buttons\">\n <div>\n <s-button\n label=\"{{'yms.int.wms_add_document' | translate}}\"\n priority=\"primary\"\n [model]=\"getActions()\"\n [auxiliary]=\"false\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || disabled\"\n (onClick)=\"view(selection)\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || disabled\"\n (click)=\"onDelete(selection)\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments()\"\n >\n </s-button>\n </div>\n </p-header>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\" *ngIf=\"gridData && gridData.length; else emptyList\">\n <p-table #documentTable [value]=\"gridData\"\n [columns]=\"gridColumns\" dataKey=\"id\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"single\" [paginator]=\"true\" [totalRecords]=\"documentTotalRecords\" rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\" [(selection)]=\"selection\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\"/>\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"col\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-expanded=\"expanded\">\n <tr [pSelectableRow]=\"rowData\">\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"logistcUnitName\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"logistcUnitDocument\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"invoiceKey\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"invoiceNumber\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"invoiceSerialNumber\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"ownerName\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"ownerDocument\"] }}</span>\n </td>\n <td (click)=\"selection = rowData\">\n <span>{{ rowData[\"orderReceivingCode\"] }}</span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [translate]=\"'total_records'\" [translateParams]=\"{ value: documentTotalRecords }\"></span>\n </ng-template>\n </p-table> \n </div>\n </div>\n <register-document\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document>\n <insert-key (document)=\"onChangeDocument($event)\" [(visible)]=\"visibleInvoiceKey\"></insert-key>\n</p-panel>\n<div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\" [disabled]=\"!disabled || !this.gridData\" (click)=\"save()\">\n </s-button>\n</div>\n\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'yms.dock.area_dock_empty_state_title' | translate\"\n [description]=\"'yms.dock.area_dock_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n",
|
|
3015
|
+
styles: [".buttons{display:flex;justify-content:space-between}.center{flex-direction:column;text-align:center}.ui-g{display:block}.button-save{margin:5px 0}#refresh-button{color:#fff}"]
|
|
3016
|
+
}),
|
|
3017
|
+
__metadata("design:paramtypes", [TranslateService,
|
|
3018
|
+
DocumentService,
|
|
3019
|
+
MessageService])
|
|
3020
|
+
], DocumentGridComponent);
|
|
3021
|
+
|
|
3022
|
+
const moment$4 = _moment;
|
|
3023
|
+
class Document {
|
|
3024
|
+
static fromDto(documentDto, originEntity) {
|
|
3025
|
+
const model = Object.assign({}, documentDto);
|
|
3026
|
+
model.createdDate = model.createdDate && moment$4(model.createdDate).toDate();
|
|
3027
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$4(model.lastModifiedDate).toDate();
|
|
3028
|
+
const lookupSeparator = " - ";
|
|
3029
|
+
const displayFields = [
|
|
3030
|
+
"id",
|
|
3031
|
+
"schedulingId",
|
|
3032
|
+
"invoiceKey",
|
|
3033
|
+
"invoiceNumber",
|
|
3034
|
+
"invoiceSerialNumber",
|
|
3035
|
+
"systemIntegration",
|
|
3036
|
+
"logistcUnitName",
|
|
3037
|
+
"logistcUnitDocument",
|
|
3038
|
+
"ownerName",
|
|
3039
|
+
"ownerDocument",
|
|
3040
|
+
"partnerName",
|
|
3041
|
+
"partnerDocument",
|
|
3042
|
+
"notes",
|
|
3043
|
+
"orderReceivingCode",
|
|
3044
|
+
"createdBy",
|
|
3045
|
+
"createdDate",
|
|
3046
|
+
"lastModifiedBy",
|
|
3047
|
+
"lastModifiedDate",
|
|
3048
|
+
];
|
|
3049
|
+
model.label = displayFields.map(field => model[field]).join(lookupSeparator);
|
|
3050
|
+
return model;
|
|
3051
|
+
}
|
|
3052
|
+
static toDto(document, originEntity) {
|
|
3053
|
+
const dto = Object.assign({}, document);
|
|
3054
|
+
dto.createdDate = dto.createdDate && moment$4(dto.createdDate).format();
|
|
3055
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$4(dto.lastModifiedDate).format();
|
|
3056
|
+
return dto;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
|
|
2798
3060
|
class EntityService$1 {
|
|
2799
3061
|
constructor(http, messageService, entityUrl, actionsUrl) {
|
|
2800
3062
|
this.http = http;
|
|
@@ -2885,11 +3147,329 @@ class EntityService$1 {
|
|
|
2885
3147
|
listCustomFilter(listParams, action) {
|
|
2886
3148
|
return this.http.post(`${this.actionsUrl}/${action}`, this.getBodyParams(listParams)).pipe(this.defaultCatch());
|
|
2887
3149
|
}
|
|
2888
|
-
}
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
class EntityService$2 extends EntityService$1 {
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
let AgendaService = class AgendaService extends EntityService$2 {
|
|
3156
|
+
constructor(http, messageService) {
|
|
3157
|
+
super(http, messageService, 'yms/agenda/entities/agenda', '');
|
|
3158
|
+
this.http = http;
|
|
3159
|
+
this.messageService = messageService;
|
|
3160
|
+
}
|
|
3161
|
+
};
|
|
3162
|
+
AgendaService.ngInjectableDef = defineInjectable({ factory: function AgendaService_Factory() { return new AgendaService(inject(HttpClient), inject(MessageService$1)); }, token: AgendaService, providedIn: "root" });
|
|
3163
|
+
AgendaService = __decorate([
|
|
3164
|
+
Injectable({ providedIn: 'root' }),
|
|
3165
|
+
__metadata("design:paramtypes", [HttpClient, MessageService$1])
|
|
3166
|
+
], AgendaService);
|
|
3167
|
+
|
|
3168
|
+
let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
3169
|
+
constructor(fb, messageService, translateService, agendaService) {
|
|
3170
|
+
this.fb = fb;
|
|
3171
|
+
this.messageService = messageService;
|
|
3172
|
+
this.translateService = translateService;
|
|
3173
|
+
this.agendaService = agendaService;
|
|
3174
|
+
this.document = new EventEmitter();
|
|
3175
|
+
this.visible = new EventEmitter();
|
|
3176
|
+
this.visibleChange = new EventEmitter();
|
|
3177
|
+
}
|
|
3178
|
+
ngOnInit() {
|
|
3179
|
+
this.getFormGroup();
|
|
3180
|
+
}
|
|
3181
|
+
ngOnChanges() {
|
|
3182
|
+
this.visibilityConfig();
|
|
3183
|
+
}
|
|
3184
|
+
visibilityConfig() {
|
|
3185
|
+
if (!this.edit && this.visible) {
|
|
3186
|
+
this.formGroup.disable();
|
|
3187
|
+
this.setValuesFormGroup(this.viewDocument);
|
|
3188
|
+
this.setValueForPartner();
|
|
3189
|
+
this.hideSaveButton = true;
|
|
3190
|
+
return this.visible;
|
|
3191
|
+
}
|
|
3192
|
+
return this.visible;
|
|
3193
|
+
}
|
|
3194
|
+
close() {
|
|
3195
|
+
this.visibleChange.emit(false);
|
|
3196
|
+
}
|
|
3197
|
+
setValuesFormGroup(document) {
|
|
3198
|
+
this.formGroup.get('invoiceKey').setValue(document.invoiceKey);
|
|
3199
|
+
this.formGroup.get('invoiceNumber').setValue(document.invoiceNumber);
|
|
3200
|
+
this.formGroup.get('invoiceSerialNumber').setValue(document.invoiceSerialNumber);
|
|
3201
|
+
this.formGroup.get('logistcUnitDocument').setValue(document.logistcUnitDocument);
|
|
3202
|
+
this.formGroup.get('logistcUnitName').setValue(document.logistcUnitName);
|
|
3203
|
+
this.formGroup.get('notes').setValue(document.notes);
|
|
3204
|
+
this.formGroup.get('orderReceivingCode').setValue(document.orderReceivingCode);
|
|
3205
|
+
this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
|
|
3206
|
+
this.formGroup.get('ownerName').setValue(document.ownerName);
|
|
3207
|
+
}
|
|
3208
|
+
setValueForPartner() {
|
|
3209
|
+
this.agendaService.get(this.agenda.id).subscribe((agenda) => {
|
|
3210
|
+
this.formGroup.get('partnerName').setValue(agenda.externalTenant.descricao);
|
|
3211
|
+
this.formGroup.get('partnerDocument').setValue(agenda.externalTenant.cnpj);
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
getFormGroup() {
|
|
3215
|
+
this.formGroup = this.fb.group({
|
|
3216
|
+
invoiceKey: [undefined, Validators.required],
|
|
3217
|
+
schedulingId: [undefined],
|
|
3218
|
+
invoiceNumber: [undefined],
|
|
3219
|
+
invoiceSerialNumber: [undefined],
|
|
3220
|
+
logistcUnitName: [undefined],
|
|
3221
|
+
logistcUnitDocument: [undefined],
|
|
3222
|
+
ownerName: [undefined],
|
|
3223
|
+
ownerDocument: [undefined],
|
|
3224
|
+
partnerName: [undefined],
|
|
3225
|
+
partnerDocument: [undefined],
|
|
3226
|
+
notes: [undefined],
|
|
3227
|
+
orderReceivingCode: [undefined],
|
|
3228
|
+
});
|
|
3229
|
+
}
|
|
3230
|
+
save() {
|
|
3231
|
+
const value = this.formGroup.getRawValue();
|
|
3232
|
+
if (value.id === undefined) {
|
|
3233
|
+
if (this.agenda.id !== undefined) {
|
|
3234
|
+
value.schedulingId = this.agenda.id;
|
|
3235
|
+
}
|
|
3236
|
+
this.document.emit(Document.fromDto(value));
|
|
3237
|
+
this.successMessage();
|
|
3238
|
+
this.visibleChange.emit(false);
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
successMessage() {
|
|
3242
|
+
this.messageService.add({
|
|
3243
|
+
severity: "success",
|
|
3244
|
+
summary: this.translateService.instant("saved_message_title"),
|
|
3245
|
+
detail: this.translateService.instant("saved_message_content"),
|
|
3246
|
+
});
|
|
3247
|
+
}
|
|
3248
|
+
};
|
|
3249
|
+
__decorate([
|
|
3250
|
+
Input(),
|
|
3251
|
+
__metadata("design:type", Document)
|
|
3252
|
+
], RegisterDocumentComponent.prototype, "viewDocument", void 0);
|
|
3253
|
+
__decorate([
|
|
3254
|
+
Input(),
|
|
3255
|
+
__metadata("design:type", Boolean)
|
|
3256
|
+
], RegisterDocumentComponent.prototype, "edit", void 0);
|
|
3257
|
+
__decorate([
|
|
3258
|
+
Input(),
|
|
3259
|
+
__metadata("design:type", Agenda)
|
|
3260
|
+
], RegisterDocumentComponent.prototype, "agenda", void 0);
|
|
3261
|
+
__decorate([
|
|
3262
|
+
Output(),
|
|
3263
|
+
__metadata("design:type", EventEmitter)
|
|
3264
|
+
], RegisterDocumentComponent.prototype, "document", void 0);
|
|
3265
|
+
__decorate([
|
|
3266
|
+
Input(),
|
|
3267
|
+
__metadata("design:type", EventEmitter)
|
|
3268
|
+
], RegisterDocumentComponent.prototype, "visible", void 0);
|
|
3269
|
+
__decorate([
|
|
3270
|
+
Output(),
|
|
3271
|
+
__metadata("design:type", Object)
|
|
3272
|
+
], RegisterDocumentComponent.prototype, "visibleChange", void 0);
|
|
3273
|
+
RegisterDocumentComponent = __decorate([
|
|
3274
|
+
Component({
|
|
3275
|
+
selector: "register-document",
|
|
3276
|
+
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate }}\"\n (visibleChange)=\"close()\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-6 required\">\n <label for=\"invoiceKey\">{{'yms.int.wms_register_document_invoice_key' | translate}}</label>\n <input id=\"invoiceKey\" pInputText type=\"text\" formControlName=\"invoiceKey\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_register_document_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"invoiceSerialNumber\">\n {{'yms.int.wms_register_document_invoice_serial_number' | translate}}\n </label>\n <input id=\"invoiceSerialNumber\" pInputText type=\"text\" formControlName=\"invoiceSerialNumber\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"logistcUnitName\">{{'yms.int.wms_register_document_logistc_unit_name' | translate}}</label>\n <input id=\"logistcUnitName\" pInputText type=\"text\" formControlName=\"logistcUnitName\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"logistcUnitDocument\">\n {{'yms.int.wms_register_document_logistc_unit_document' | translate}}\n </label>\n <input id=\"logistcUnitDocument\" pInputText type=\"text\" formControlName=\"logistcUnitDocument\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"documentOwnerName\">{{'yms.int.wms_register_document_owner_name' | translate}}</label>\n <input id=\"documentOwnerName\" pInputText type=\"text\" formControlName=\"ownerName\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"ownerDocument\">{{'yms.int.wms_register_document_owner_document' | translate}}</label>\n <input id=\"ownerDocument\" pInputText type=\"text\" formControlName=\"ownerDocument\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"partnerName\">{{'yms.int.wms_register_document_partner_name' | translate}}</label>\n <input id=\"partnerName\" pInputText type=\"text\" formControlName=\"partnerName\">\n </div>\n <div class=\"ui-g-6\">\n <label for=\"partnerDocument\">{{'yms.int.wms_register_document_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"notes\" id=\"notes\">{{'yms.int.wms_register_document_notes' | translate}}</label>\n <textarea id=\"notes\" rows=\"5\" pInputTextarea autoResize=\"autoResize\" formControlName=\"notes\"></textarea>\n </div>\n <div class=\"ui-g-6\">\n <label for=\"orderReceivingCode\">\n {{'yms.int.wms_register_document_order_receiving_code' | translate}}\n </label>\n <input id=\"orderReceivingCode\" pInputText type=\"text\" formControlName=\"orderReceivingCode\">\n </div>\n </div>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\" (click)=\"save()\" [attr.data-hidden]=\"hideSaveButton\">\n </button>\n <button\n type=\"button\" class=\"ui-button-link\" pButton label=\"{{'cancel' | translate}}\" (click)=\"close()\">\n </button>\n </div>\n</s-sidebar>"
|
|
3277
|
+
}),
|
|
3278
|
+
__metadata("design:paramtypes", [FormBuilder,
|
|
3279
|
+
MessageService,
|
|
3280
|
+
TranslateService,
|
|
3281
|
+
AgendaService])
|
|
3282
|
+
], RegisterDocumentComponent);
|
|
3283
|
+
|
|
3284
|
+
let RegisterDocumentModule = class RegisterDocumentModule {
|
|
3285
|
+
};
|
|
3286
|
+
RegisterDocumentModule = __decorate([
|
|
3287
|
+
NgModule({
|
|
3288
|
+
imports: [
|
|
3289
|
+
CommonModule,
|
|
3290
|
+
SidebarModule,
|
|
3291
|
+
ButtonModule,
|
|
3292
|
+
PanelModule,
|
|
3293
|
+
ConfirmDialogModule,
|
|
3294
|
+
TranslateModule,
|
|
3295
|
+
InputTextModule$1,
|
|
3296
|
+
ControlErrorsModule,
|
|
3297
|
+
InputTextareaModule,
|
|
3298
|
+
ReactiveFormsModule
|
|
3299
|
+
],
|
|
3300
|
+
exports: [RegisterDocumentComponent],
|
|
3301
|
+
declarations: [RegisterDocumentComponent],
|
|
3302
|
+
providers: [DocumentService]
|
|
3303
|
+
})
|
|
3304
|
+
], RegisterDocumentModule);
|
|
3305
|
+
|
|
3306
|
+
let InsertKeyComponent = class InsertKeyComponent {
|
|
3307
|
+
constructor(formBuilder, documentService, messageService, translate) {
|
|
3308
|
+
this.formBuilder = formBuilder;
|
|
3309
|
+
this.documentService = documentService;
|
|
3310
|
+
this.messageService = messageService;
|
|
3311
|
+
this.translate = translate;
|
|
3312
|
+
this.document = new EventEmitter();
|
|
3313
|
+
this.visible = new EventEmitter();
|
|
3314
|
+
this.visibleChange = new EventEmitter();
|
|
3315
|
+
}
|
|
3316
|
+
ngOnInit() {
|
|
3317
|
+
this.formGroup = this.formBuilder.group({
|
|
3318
|
+
key: [undefined]
|
|
3319
|
+
});
|
|
3320
|
+
}
|
|
3321
|
+
add() {
|
|
3322
|
+
this.visibleChange.emit(false);
|
|
3323
|
+
if (!this.formGroup.get('key').value) {
|
|
3324
|
+
return;
|
|
3325
|
+
}
|
|
3326
|
+
this.searchKey();
|
|
3327
|
+
}
|
|
3328
|
+
searchKey() {
|
|
3329
|
+
const key = {
|
|
3330
|
+
documentKeys: [this.formGroup.get('key').value],
|
|
3331
|
+
invoices: undefined,
|
|
3332
|
+
logistcUnitName: undefined,
|
|
3333
|
+
size: 0,
|
|
3334
|
+
offset: 0
|
|
3335
|
+
};
|
|
3336
|
+
this.documentService.findDocuments(key).subscribe((content) => {
|
|
3337
|
+
if (content.totalElements < 1) {
|
|
3338
|
+
this.message("warn", "yms.int.wms_insert_key_warning_message_header", "yms.int.wms_insert_key_warning_message_description");
|
|
3339
|
+
return;
|
|
3340
|
+
}
|
|
3341
|
+
this.document.emit(content.contents[0]);
|
|
3342
|
+
this.message("success", "yms.int.wms_insert_key_success_message_header", "yms.int.wms_insert_key_success_message_description");
|
|
3343
|
+
this.formGroup.reset();
|
|
3344
|
+
});
|
|
3345
|
+
}
|
|
3346
|
+
message(success, header, description) {
|
|
3347
|
+
this.messageService.add({
|
|
3348
|
+
severity: success,
|
|
3349
|
+
summary: this.translate.instant(header),
|
|
3350
|
+
detail: this.translate.instant(description),
|
|
3351
|
+
});
|
|
3352
|
+
}
|
|
3353
|
+
cancel() {
|
|
3354
|
+
this.visibleChange.emit(false);
|
|
3355
|
+
}
|
|
3356
|
+
};
|
|
3357
|
+
__decorate([
|
|
3358
|
+
Output(),
|
|
3359
|
+
__metadata("design:type", EventEmitter)
|
|
3360
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
3361
|
+
__decorate([
|
|
3362
|
+
Input(),
|
|
3363
|
+
__metadata("design:type", EventEmitter)
|
|
3364
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
3365
|
+
__decorate([
|
|
3366
|
+
Output(),
|
|
3367
|
+
__metadata("design:type", Object)
|
|
3368
|
+
], InsertKeyComponent.prototype, "visibleChange", void 0);
|
|
3369
|
+
InsertKeyComponent = __decorate([
|
|
3370
|
+
Component({
|
|
3371
|
+
selector: "insert-key",
|
|
3372
|
+
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" (visibleChange)=\"cancel()\">\n <p-header>{{'yms.insert_key_header' | translate}}</p-header>\n <div class=\"flex py-2 justify-content-center spacing-bottom\">\n <label for=\"key\">{{'yms.insert_key_label'}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'save' | translate}}\" (click)=\"add()\"></s-button>\n <s-button\n type=\"button\"\n class=\"ui-button-link\"\n pButton label=\"{{'cancel' | translate}}\"\n (click)=\"cancel()\">\n </s-button>\n </div>\n </p-dialog>\n</form>",
|
|
3373
|
+
styles: [".spacing-top{margin-top:10px}.spacing-bottom{margin-bottom:10px}.separator{width:100%;margin:5px 0;height:1px;background-color:#ccc}.size-input{width:550px}"]
|
|
3374
|
+
}),
|
|
3375
|
+
__metadata("design:paramtypes", [FormBuilder,
|
|
3376
|
+
DocumentService,
|
|
3377
|
+
MessageService,
|
|
3378
|
+
TranslateService])
|
|
3379
|
+
], InsertKeyComponent);
|
|
3380
|
+
|
|
3381
|
+
let InsertKeyModule = class InsertKeyModule {
|
|
3382
|
+
};
|
|
3383
|
+
InsertKeyModule = __decorate([
|
|
3384
|
+
NgModule({
|
|
3385
|
+
imports: [
|
|
3386
|
+
CommonModule,
|
|
3387
|
+
ReactiveFormsModule,
|
|
3388
|
+
ButtonModule,
|
|
3389
|
+
TranslateModule,
|
|
3390
|
+
DialogModule,
|
|
3391
|
+
InputTextModule$1
|
|
3392
|
+
],
|
|
3393
|
+
exports: [InsertKeyComponent],
|
|
3394
|
+
declarations: [InsertKeyComponent]
|
|
3395
|
+
})
|
|
3396
|
+
], InsertKeyModule);
|
|
3397
|
+
|
|
3398
|
+
let DocumentGridModule = class DocumentGridModule {
|
|
3399
|
+
};
|
|
3400
|
+
DocumentGridModule = __decorate([
|
|
3401
|
+
NgModule({
|
|
3402
|
+
declarations: [DocumentGridComponent],
|
|
3403
|
+
entryComponents: [DocumentGridComponent],
|
|
3404
|
+
exports: [DocumentGridComponent],
|
|
3405
|
+
imports: [
|
|
3406
|
+
CommonModule,
|
|
3407
|
+
TranslateModule,
|
|
3408
|
+
ButtonModule,
|
|
3409
|
+
PanelModule,
|
|
3410
|
+
TableModule,
|
|
3411
|
+
RegisterDocumentModule,
|
|
3412
|
+
InsertKeyModule,
|
|
3413
|
+
ButtonModule$1,
|
|
3414
|
+
ComponentsModule,
|
|
3415
|
+
EmptyStateModule
|
|
3416
|
+
],
|
|
3417
|
+
})
|
|
3418
|
+
], DocumentGridModule);
|
|
3419
|
+
|
|
3420
|
+
let WmsModule = class WmsModule {
|
|
3421
|
+
constructor(dispatcher) {
|
|
3422
|
+
dispatcher.dispatch(FormWmsComponent);
|
|
3423
|
+
}
|
|
3424
|
+
};
|
|
3425
|
+
WmsModule = __decorate([
|
|
3426
|
+
NgModule({
|
|
3427
|
+
declarations: [FormWmsComponent],
|
|
3428
|
+
entryComponents: [FormWmsComponent],
|
|
3429
|
+
exports: [FormWmsComponent],
|
|
3430
|
+
imports: [
|
|
3431
|
+
IntegrationModule,
|
|
3432
|
+
DocumentGridModule,
|
|
3433
|
+
CommonModule,
|
|
3434
|
+
TranslateModule,
|
|
3435
|
+
FormsModule,
|
|
3436
|
+
ButtonModule,
|
|
3437
|
+
SharedModule,
|
|
3438
|
+
CardModule,
|
|
3439
|
+
ButtonModule$1,
|
|
3440
|
+
ReactiveFormsModule,
|
|
3441
|
+
SharedModule$1,
|
|
3442
|
+
CustomFieldsModule,
|
|
3443
|
+
ControlErrorsModule,
|
|
3444
|
+
DialogModule,
|
|
3445
|
+
EmptyStateModule,
|
|
3446
|
+
DynamicFormModule,
|
|
3447
|
+
TokenListModule,
|
|
3448
|
+
PanelModule,
|
|
3449
|
+
InputTextModule$1,
|
|
3450
|
+
DropdownModule,
|
|
3451
|
+
ButtonModule,
|
|
3452
|
+
LoadingStateModule,
|
|
3453
|
+
NumberInputModule,
|
|
3454
|
+
ConfirmDialogModule,
|
|
3455
|
+
LocaleModule,
|
|
3456
|
+
PermissionsModule,
|
|
3457
|
+
DynamicDialogModule,
|
|
3458
|
+
TableModule,
|
|
3459
|
+
TabViewModule,
|
|
3460
|
+
CalendarModule,
|
|
3461
|
+
],
|
|
3462
|
+
providers: [
|
|
3463
|
+
FieldCustomizationService,
|
|
3464
|
+
FocusService
|
|
3465
|
+
]
|
|
3466
|
+
}),
|
|
3467
|
+
__metadata("design:paramtypes", [IntegrationDispatcher])
|
|
3468
|
+
], WmsModule);
|
|
2889
3469
|
|
|
2890
3470
|
const ERP_ENVIRONMENT = new InjectionToken('integration_environment');
|
|
2891
3471
|
|
|
2892
|
-
let AgendaService = class AgendaService extends EntityService$1 {
|
|
3472
|
+
let AgendaService$1 = class AgendaService extends EntityService$1 {
|
|
2893
3473
|
constructor(http, messageService, environment) {
|
|
2894
3474
|
super(http, messageService, `${environment.project.domain}/${environment.project.service}/entities/agenda`, `${environment.project.domain}/${environment.project.service}/actions`);
|
|
2895
3475
|
this.http = http;
|
|
@@ -2913,12 +3493,12 @@ let AgendaService = class AgendaService extends EntityService$1 {
|
|
|
2913
3493
|
.pipe(this.defaultCatch());
|
|
2914
3494
|
}
|
|
2915
3495
|
};
|
|
2916
|
-
AgendaService = __decorate([
|
|
3496
|
+
AgendaService$1 = __decorate([
|
|
2917
3497
|
Injectable(),
|
|
2918
3498
|
__param(2, Inject(ERP_ENVIRONMENT)),
|
|
2919
3499
|
__metadata("design:paramtypes", [HttpClient,
|
|
2920
3500
|
MessageService$1, Object])
|
|
2921
|
-
], AgendaService);
|
|
3501
|
+
], AgendaService$1);
|
|
2922
3502
|
|
|
2923
3503
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
2924
3504
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
@@ -2980,7 +3560,7 @@ let RecebimentoChegadaVeiculoOverride = class RecebimentoChegadaVeiculoOverride
|
|
|
2980
3560
|
RecebimentoChegadaVeiculoOverride = __decorate([
|
|
2981
3561
|
Injectable(),
|
|
2982
3562
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
2983
|
-
AgendaService,
|
|
3563
|
+
AgendaService$1,
|
|
2984
3564
|
RecebimentoContratoService])
|
|
2985
3565
|
], RecebimentoChegadaVeiculoOverride);
|
|
2986
3566
|
|
|
@@ -3035,7 +3615,7 @@ let ExpedicaoChegadaVeiculoOverride = class ExpedicaoChegadaVeiculoOverride {
|
|
|
3035
3615
|
ExpedicaoChegadaVeiculoOverride = __decorate([
|
|
3036
3616
|
Injectable(),
|
|
3037
3617
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
3038
|
-
AgendaService,
|
|
3618
|
+
AgendaService$1,
|
|
3039
3619
|
ExpedicaoService])
|
|
3040
3620
|
], ExpedicaoChegadaVeiculoOverride);
|
|
3041
3621
|
|
|
@@ -3258,15 +3838,15 @@ OrdemCompraService = __decorate([
|
|
|
3258
3838
|
MessageService$1, Object])
|
|
3259
3839
|
], OrdemCompraService);
|
|
3260
3840
|
|
|
3261
|
-
const moment$
|
|
3841
|
+
const moment$5 = _moment;
|
|
3262
3842
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3263
3843
|
class Empresa {
|
|
3264
3844
|
/*{CA:CLASS_ATTRIBUTES:START}*/
|
|
3265
3845
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3266
3846
|
static fromDto(empresaDto, originEntity) {
|
|
3267
3847
|
const model = Object.assign({}, empresaDto);
|
|
3268
|
-
model.createdDate = model.createdDate && moment$
|
|
3269
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3848
|
+
model.createdDate = model.createdDate && moment$5(model.createdDate).toDate();
|
|
3849
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$5(model.lastModifiedDate).toDate();
|
|
3270
3850
|
const lookupSeparator = " - ";
|
|
3271
3851
|
const displayFields = [
|
|
3272
3852
|
"codigo",
|
|
@@ -3278,8 +3858,8 @@ class Empresa {
|
|
|
3278
3858
|
}
|
|
3279
3859
|
static toDto(empresa, originEntity) {
|
|
3280
3860
|
const dto = Object.assign({}, empresa);
|
|
3281
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3282
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3861
|
+
dto.createdDate = dto.createdDate && moment$5(dto.createdDate).format();
|
|
3862
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$5(dto.lastModifiedDate).format();
|
|
3283
3863
|
delete dto.label;
|
|
3284
3864
|
return dto;
|
|
3285
3865
|
}
|
|
@@ -3287,7 +3867,7 @@ class Empresa {
|
|
|
3287
3867
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3288
3868
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3289
3869
|
|
|
3290
|
-
const moment$
|
|
3870
|
+
const moment$6 = _moment;
|
|
3291
3871
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3292
3872
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3293
3873
|
class Pessoa {
|
|
@@ -3295,8 +3875,8 @@ class Pessoa {
|
|
|
3295
3875
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3296
3876
|
static fromDto(pessoaDto, originEntity) {
|
|
3297
3877
|
const model = Object.assign({}, pessoaDto);
|
|
3298
|
-
model.createdDate = model.createdDate && moment$
|
|
3299
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3878
|
+
model.createdDate = model.createdDate && moment$6(model.createdDate).toDate();
|
|
3879
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$6(model.lastModifiedDate).toDate();
|
|
3300
3880
|
const lookupSeparator = " - ";
|
|
3301
3881
|
const displayFields = [
|
|
3302
3882
|
"codigo",
|
|
@@ -3308,8 +3888,8 @@ class Pessoa {
|
|
|
3308
3888
|
}
|
|
3309
3889
|
static toDto(pessoa, originEntity) {
|
|
3310
3890
|
const dto = Object.assign({}, pessoa);
|
|
3311
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3312
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3891
|
+
dto.createdDate = dto.createdDate && moment$6(dto.createdDate).format();
|
|
3892
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$6(dto.lastModifiedDate).format();
|
|
3313
3893
|
delete dto.label;
|
|
3314
3894
|
return dto;
|
|
3315
3895
|
}
|
|
@@ -3317,7 +3897,7 @@ class Pessoa {
|
|
|
3317
3897
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3318
3898
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3319
3899
|
|
|
3320
|
-
const moment$
|
|
3900
|
+
const moment$7 = _moment;
|
|
3321
3901
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3322
3902
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3323
3903
|
class PessoaJuridica {
|
|
@@ -3325,8 +3905,8 @@ class PessoaJuridica {
|
|
|
3325
3905
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3326
3906
|
static fromDto(pessoaJuridicaDto, originEntity) {
|
|
3327
3907
|
const model = Object.assign({}, pessoaJuridicaDto);
|
|
3328
|
-
model.createdDate = model.createdDate && moment$
|
|
3329
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3908
|
+
model.createdDate = model.createdDate && moment$7(model.createdDate).toDate();
|
|
3909
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$7(model.lastModifiedDate).toDate();
|
|
3330
3910
|
const lookupSeparator = " - ";
|
|
3331
3911
|
const displayFields = [
|
|
3332
3912
|
"id",
|
|
@@ -3353,8 +3933,8 @@ class PessoaJuridica {
|
|
|
3353
3933
|
}
|
|
3354
3934
|
static toDto(pessoaJuridica, originEntity) {
|
|
3355
3935
|
const dto = Object.assign({}, pessoaJuridica);
|
|
3356
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3357
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3936
|
+
dto.createdDate = dto.createdDate && moment$7(dto.createdDate).format();
|
|
3937
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$7(dto.lastModifiedDate).format();
|
|
3358
3938
|
delete dto.label;
|
|
3359
3939
|
if (originEntity !== "Pessoa" && dto.pessoa)
|
|
3360
3940
|
dto.pessoa = Pessoa.toDto(dto.pessoa, "PessoaJuridica");
|
|
@@ -3364,7 +3944,7 @@ class PessoaJuridica {
|
|
|
3364
3944
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3365
3945
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3366
3946
|
|
|
3367
|
-
const moment$
|
|
3947
|
+
const moment$8 = _moment;
|
|
3368
3948
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3369
3949
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3370
3950
|
class Pais {
|
|
@@ -3372,8 +3952,8 @@ class Pais {
|
|
|
3372
3952
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3373
3953
|
static fromDto(paisDto, originEntity) {
|
|
3374
3954
|
const model = Object.assign({}, paisDto);
|
|
3375
|
-
model.createdDate = model.createdDate && moment$
|
|
3376
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3955
|
+
model.createdDate = model.createdDate && moment$8(model.createdDate).toDate();
|
|
3956
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$8(model.lastModifiedDate).toDate();
|
|
3377
3957
|
const lookupSeparator = " - ";
|
|
3378
3958
|
const displayFields = ["id", "codigo", "descricao", "createdBy", "createdDate", "lastModifiedBy", "lastModifiedDate"];
|
|
3379
3959
|
model.label = displayFields.map(field => model[field]).join(lookupSeparator);
|
|
@@ -3381,8 +3961,8 @@ class Pais {
|
|
|
3381
3961
|
}
|
|
3382
3962
|
static toDto(pais, originEntity) {
|
|
3383
3963
|
const dto = Object.assign({}, pais);
|
|
3384
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3385
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
3964
|
+
dto.createdDate = dto.createdDate && moment$8(dto.createdDate).format();
|
|
3965
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$8(dto.lastModifiedDate).format();
|
|
3386
3966
|
delete dto.label;
|
|
3387
3967
|
return dto;
|
|
3388
3968
|
}
|
|
@@ -3390,7 +3970,7 @@ class Pais {
|
|
|
3390
3970
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3391
3971
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3392
3972
|
|
|
3393
|
-
const moment$
|
|
3973
|
+
const moment$9 = _moment;
|
|
3394
3974
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3395
3975
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3396
3976
|
class Estado {
|
|
@@ -3398,8 +3978,8 @@ class Estado {
|
|
|
3398
3978
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3399
3979
|
static fromDto(estadoDto, originEntity) {
|
|
3400
3980
|
const model = Object.assign({}, estadoDto);
|
|
3401
|
-
model.createdDate = model.createdDate && moment$
|
|
3402
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
3981
|
+
model.createdDate = model.createdDate && moment$9(model.createdDate).toDate();
|
|
3982
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$9(model.lastModifiedDate).toDate();
|
|
3403
3983
|
const lookupSeparator = " - ";
|
|
3404
3984
|
const displayFields = [
|
|
3405
3985
|
"id",
|
|
@@ -3421,8 +4001,8 @@ class Estado {
|
|
|
3421
4001
|
}
|
|
3422
4002
|
static toDto(estado, originEntity) {
|
|
3423
4003
|
const dto = Object.assign({}, estado);
|
|
3424
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3425
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
4004
|
+
dto.createdDate = dto.createdDate && moment$9(dto.createdDate).format();
|
|
4005
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$9(dto.lastModifiedDate).format();
|
|
3426
4006
|
delete dto.label;
|
|
3427
4007
|
if (originEntity !== "Pais" && dto.pais)
|
|
3428
4008
|
dto.pais = Pais.toDto(dto.pais, "Estado");
|
|
@@ -3432,7 +4012,7 @@ class Estado {
|
|
|
3432
4012
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3433
4013
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3434
4014
|
|
|
3435
|
-
const moment$
|
|
4015
|
+
const moment$a = _moment;
|
|
3436
4016
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3437
4017
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3438
4018
|
class Cidade {
|
|
@@ -3440,8 +4020,8 @@ class Cidade {
|
|
|
3440
4020
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3441
4021
|
static fromDto(cidadeDto, originEntity) {
|
|
3442
4022
|
const model = Object.assign({}, cidadeDto);
|
|
3443
|
-
model.createdDate = model.createdDate && moment$
|
|
3444
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
4023
|
+
model.createdDate = model.createdDate && moment$a(model.createdDate).toDate();
|
|
4024
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$a(model.lastModifiedDate).toDate();
|
|
3445
4025
|
const lookupSeparator = " - ";
|
|
3446
4026
|
const displayFields = [
|
|
3447
4027
|
"id",
|
|
@@ -3462,8 +4042,8 @@ class Cidade {
|
|
|
3462
4042
|
}
|
|
3463
4043
|
static toDto(cidade, originEntity) {
|
|
3464
4044
|
const dto = Object.assign({}, cidade);
|
|
3465
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3466
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
4045
|
+
dto.createdDate = dto.createdDate && moment$a(dto.createdDate).format();
|
|
4046
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$a(dto.lastModifiedDate).format();
|
|
3467
4047
|
delete dto.label;
|
|
3468
4048
|
if (originEntity !== "Estado" && dto.estado)
|
|
3469
4049
|
dto.estado = Estado.toDto(dto.estado, "Cidade");
|
|
@@ -3473,12 +4053,12 @@ class Cidade {
|
|
|
3473
4053
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3474
4054
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3475
4055
|
|
|
3476
|
-
const moment$
|
|
4056
|
+
const moment$b = _moment;
|
|
3477
4057
|
class PessoaEndereco {
|
|
3478
4058
|
static fromDto(pessoaEnderecoDto, originEntity) {
|
|
3479
4059
|
const model = Object.assign({}, pessoaEnderecoDto);
|
|
3480
|
-
model.createdDate = model.createdDate && moment$
|
|
3481
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
4060
|
+
model.createdDate = model.createdDate && moment$b(model.createdDate).toDate();
|
|
4061
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$b(model.lastModifiedDate).toDate();
|
|
3482
4062
|
const lookupSeparator = " - ";
|
|
3483
4063
|
const displayFields = [
|
|
3484
4064
|
"codigo",
|
|
@@ -3494,8 +4074,8 @@ class PessoaEndereco {
|
|
|
3494
4074
|
}
|
|
3495
4075
|
static toDto(pessoaEndereco, originEntity) {
|
|
3496
4076
|
const dto = Object.assign({}, pessoaEndereco);
|
|
3497
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3498
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
4077
|
+
dto.createdDate = dto.createdDate && moment$b(dto.createdDate).format();
|
|
4078
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$b(dto.lastModifiedDate).format();
|
|
3499
4079
|
delete dto.label;
|
|
3500
4080
|
if (originEntity !== "Pessoa" && dto.pessoa)
|
|
3501
4081
|
dto.pessoa = Pessoa.toDto(dto.pessoa, "PessoaEndereco");
|
|
@@ -3505,7 +4085,7 @@ class PessoaEndereco {
|
|
|
3505
4085
|
}
|
|
3506
4086
|
}
|
|
3507
4087
|
|
|
3508
|
-
const moment$
|
|
4088
|
+
const moment$c = _moment;
|
|
3509
4089
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
3510
4090
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
3511
4091
|
class Filial {
|
|
@@ -3513,8 +4093,8 @@ class Filial {
|
|
|
3513
4093
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
3514
4094
|
static fromDto(filialDto, originEntity) {
|
|
3515
4095
|
const model = Object.assign({}, filialDto);
|
|
3516
|
-
model.createdDate = model.createdDate && moment$
|
|
3517
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
4096
|
+
model.createdDate = model.createdDate && moment$c(model.createdDate).toDate();
|
|
4097
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$c(model.lastModifiedDate).toDate();
|
|
3518
4098
|
const lookupSeparator = " - ";
|
|
3519
4099
|
const displayFields = [
|
|
3520
4100
|
"codigo",
|
|
@@ -3532,8 +4112,8 @@ class Filial {
|
|
|
3532
4112
|
}
|
|
3533
4113
|
static toDto(filial, originEntity) {
|
|
3534
4114
|
const dto = Object.assign({}, filial);
|
|
3535
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3536
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
4115
|
+
dto.createdDate = dto.createdDate && moment$c(dto.createdDate).format();
|
|
4116
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$c(dto.lastModifiedDate).format();
|
|
3537
4117
|
delete dto.label;
|
|
3538
4118
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
3539
4119
|
dto.empresa = Empresa.toDto(dto.empresa, "Filial");
|
|
@@ -3547,12 +4127,12 @@ class Filial {
|
|
|
3547
4127
|
/*{CA:FILE_CONTENTS:START}*/
|
|
3548
4128
|
/*{CA:FILE_CONTENTS:END}*/
|
|
3549
4129
|
|
|
3550
|
-
const moment$
|
|
4130
|
+
const moment$d = _moment;
|
|
3551
4131
|
class OrdemCompra {
|
|
3552
4132
|
static fromDto(ordemCompraDto, originEntity) {
|
|
3553
4133
|
const model = Object.assign({}, ordemCompraDto);
|
|
3554
|
-
model.createdDate = model.createdDate && moment$
|
|
3555
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
4134
|
+
model.createdDate = model.createdDate && moment$d(model.createdDate).toDate();
|
|
4135
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$d(model.lastModifiedDate).toDate();
|
|
3556
4136
|
const lookupSeparator = " - ";
|
|
3557
4137
|
const displayFields = [
|
|
3558
4138
|
"codigo",
|
|
@@ -3568,8 +4148,8 @@ class OrdemCompra {
|
|
|
3568
4148
|
}
|
|
3569
4149
|
static toDto(ordemCompra, originEntity) {
|
|
3570
4150
|
const dto = Object.assign({}, ordemCompra);
|
|
3571
|
-
dto.createdDate = dto.createdDate && moment$
|
|
3572
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
4151
|
+
dto.createdDate = dto.createdDate && moment$d(dto.createdDate).format();
|
|
4152
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$d(dto.lastModifiedDate).format();
|
|
3573
4153
|
delete dto.label;
|
|
3574
4154
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
3575
4155
|
dto.empresa = Empresa.toDto(dto.empresa, "Produto");
|
|
@@ -3579,7 +4159,7 @@ class OrdemCompra {
|
|
|
3579
4159
|
}
|
|
3580
4160
|
}
|
|
3581
4161
|
|
|
3582
|
-
const moment$
|
|
4162
|
+
const moment$e = _moment;
|
|
3583
4163
|
let OrdemCompraFormComponent = class OrdemCompraFormComponent {
|
|
3584
4164
|
constructor(dialogRef, dialogConfig, ordemCompraService, translate, fb, route) {
|
|
3585
4165
|
this.dialogRef = dialogRef;
|
|
@@ -3648,7 +4228,7 @@ let OrdemCompraFormComponent = class OrdemCompraFormComponent {
|
|
|
3648
4228
|
if (filial && filial.empresa && filial.empresa.id) {
|
|
3649
4229
|
filter.empresaId = filial.empresa.id;
|
|
3650
4230
|
}
|
|
3651
|
-
filter.dataEmissao = filter.dataEmissao && moment$
|
|
4231
|
+
filter.dataEmissao = filter.dataEmissao && moment$e(filter.dataEmissao).format("YYYY-MM-DD");
|
|
3652
4232
|
const sort = (multiSortMeta || []).length ? { field: multiSortMeta[0].field, order: multiSortMeta[0].order === 1 ? 'Asc' : 'Desc' } : { field: 'numero', order: 'Asc' };
|
|
3653
4233
|
this.ordemCompraService
|
|
3654
4234
|
.listOrdensCompra(Object.assign({}, filter, { pessoaId: (this.fornecedor || { id: undefined }).id, filialId: (filial || { id: undefined }).id, tipoAgendamentoId: this.agenda && this.agenda.tipoAgendamento ? this.agenda.tipoAgendamento.id : null, ordensCompraSelecionados: this.ordensCompra, pagina: {
|
|
@@ -3889,7 +4469,7 @@ let NotaFormComponent = class NotaFormComponent {
|
|
|
3889
4469
|
this.removeErrorChaveNota();
|
|
3890
4470
|
this.loading = true;
|
|
3891
4471
|
this.notaValidatorService.pesquisarDocumentoValidaNotaEmUso({
|
|
3892
|
-
chaveDocumento: (chaveNotaFiscal || "").
|
|
4472
|
+
chaveDocumento: (chaveNotaFiscal || "").replace(/\s/g, ""),
|
|
3893
4473
|
filialId: this.filialId
|
|
3894
4474
|
})
|
|
3895
4475
|
.pipe(takeUntil(this.unsubscribe$), finalize(() => this.loading = false))
|
|
@@ -3950,7 +4530,7 @@ let NotaFormComponent = class NotaFormComponent {
|
|
|
3950
4530
|
};
|
|
3951
4531
|
NotaFormComponent = __decorate([
|
|
3952
4532
|
Component({
|
|
3953
|
-
template: "<form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\" *sLoadingState=\"loading\">\n <div class=\"ui-g-12\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input
|
|
4533
|
+
template: "<form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\" *sLoadingState=\"loading\">\n <div class=\"ui-g-12\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input\n id=\"chaveNotaFiscal\"\n trim\n pInputText\n type=\"text\"\n formControlName=\"chaveNotaFiscal\"\n (blur)=\"onBlurNotaFiscal()\"\n >\n <s-control-errors [control]=\"formGroup.controls.chaveNotaFiscal\" [errorMessages]=\"{ errorChaveNota: 'yms.erp.produto_nota_error_detail' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieNotaFiscal\">{{'yms.erp.recebimento_serie_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"serieLegalNotaFiscal\">{{'yms.erp.recebimento_serie_legal_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"serieLegalNotaFiscal\">\n </div>\n <div class=\"ui-g-12\">\n <label for=\"numeroNotaFiscal\">{{'yms.erp.recebimento_numero_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" formControlName=\"numeroNotaFiscal\">\n </div>\n </div>\n\n <s-control-errors [control]=\"formGroup\" [errorMessages]=\"{ erroMultiplosCampos: 'yms.erp.nota_fiscal_no_value' | translate }\"></s-control-errors>\n\n <s-button label=\"Cancelar\" (onClick)=\"close()\" priority=\"link\"></s-button>\n <s-button label=\"Salvar\" [disabled]=\"botaoDesabilitado\" (onClick)=\"save()\"></s-button>\n</form>\n\n<p-confirmDialog appendTo=\"body\"></p-confirmDialog>",
|
|
3954
4534
|
providers: [ConfirmationService]
|
|
3955
4535
|
}),
|
|
3956
4536
|
__metadata("design:paramtypes", [FormBuilder,
|
|
@@ -3963,6 +4543,40 @@ NotaFormComponent = __decorate([
|
|
|
3963
4543
|
TranslateService])
|
|
3964
4544
|
], NotaFormComponent);
|
|
3965
4545
|
|
|
4546
|
+
let TrimDirective = class TrimDirective {
|
|
4547
|
+
constructor(elementRef) {
|
|
4548
|
+
this.elementRef = elementRef;
|
|
4549
|
+
}
|
|
4550
|
+
onBlur() {
|
|
4551
|
+
const value = this.elementRef.nativeElement.value;
|
|
4552
|
+
if (value) {
|
|
4553
|
+
this.elementRef.nativeElement.value = value.replace(/\s/g, "");
|
|
4554
|
+
}
|
|
4555
|
+
}
|
|
4556
|
+
};
|
|
4557
|
+
__decorate([
|
|
4558
|
+
HostListener('blur'),
|
|
4559
|
+
__metadata("design:type", Function),
|
|
4560
|
+
__metadata("design:paramtypes", []),
|
|
4561
|
+
__metadata("design:returntype", void 0)
|
|
4562
|
+
], TrimDirective.prototype, "onBlur", null);
|
|
4563
|
+
TrimDirective = __decorate([
|
|
4564
|
+
Directive({
|
|
4565
|
+
selector: '[trim]',
|
|
4566
|
+
}),
|
|
4567
|
+
__metadata("design:paramtypes", [ElementRef])
|
|
4568
|
+
], TrimDirective);
|
|
4569
|
+
|
|
4570
|
+
let DirectivesModule = class DirectivesModule {
|
|
4571
|
+
};
|
|
4572
|
+
DirectivesModule = __decorate([
|
|
4573
|
+
NgModule({
|
|
4574
|
+
imports: [CommonModule],
|
|
4575
|
+
declarations: [TrimDirective],
|
|
4576
|
+
exports: [TrimDirective]
|
|
4577
|
+
})
|
|
4578
|
+
], DirectivesModule);
|
|
4579
|
+
|
|
3966
4580
|
let NotaFormModule = class NotaFormModule {
|
|
3967
4581
|
};
|
|
3968
4582
|
NotaFormModule = __decorate([
|
|
@@ -3976,7 +4590,8 @@ NotaFormModule = __decorate([
|
|
|
3976
4590
|
ControlErrorsModule,
|
|
3977
4591
|
TranslateModule,
|
|
3978
4592
|
LoadingStateModule,
|
|
3979
|
-
ConfirmDialogModule$1
|
|
4593
|
+
ConfirmDialogModule$1,
|
|
4594
|
+
DirectivesModule
|
|
3980
4595
|
],
|
|
3981
4596
|
declarations: [NotaFormComponent],
|
|
3982
4597
|
entryComponents: [NotaFormComponent]
|
|
@@ -3999,7 +4614,7 @@ AgendaModule = __decorate([
|
|
|
3999
4614
|
]),
|
|
4000
4615
|
],
|
|
4001
4616
|
providers: [
|
|
4002
|
-
AgendaService,
|
|
4617
|
+
AgendaService$1,
|
|
4003
4618
|
],
|
|
4004
4619
|
declarations: [
|
|
4005
4620
|
/*{CA:MODULE_DECLARATIONS:START}*/
|
|
@@ -5681,11 +6296,11 @@ let DevolucaoChegadaVeiculoOverride = class DevolucaoChegadaVeiculoOverride {
|
|
|
5681
6296
|
DevolucaoChegadaVeiculoOverride = __decorate([
|
|
5682
6297
|
Injectable(),
|
|
5683
6298
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
5684
|
-
AgendaService,
|
|
6299
|
+
AgendaService$1,
|
|
5685
6300
|
DevolucaoService])
|
|
5686
6301
|
], DevolucaoChegadaVeiculoOverride);
|
|
5687
6302
|
|
|
5688
|
-
const moment$
|
|
6303
|
+
const moment$f = _moment;
|
|
5689
6304
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
5690
6305
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
5691
6306
|
class UnidadeMedida {
|
|
@@ -5693,8 +6308,8 @@ class UnidadeMedida {
|
|
|
5693
6308
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
5694
6309
|
static fromDto(unidadeMedidaDto, originEntity) {
|
|
5695
6310
|
const model = Object.assign({}, unidadeMedidaDto);
|
|
5696
|
-
model.createdDate = model.createdDate && moment$
|
|
5697
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6311
|
+
model.createdDate = model.createdDate && moment$f(model.createdDate).toDate();
|
|
6312
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$f(model.lastModifiedDate).toDate();
|
|
5698
6313
|
const lookupSeparator = " - ";
|
|
5699
6314
|
const displayFields = [
|
|
5700
6315
|
"id",
|
|
@@ -5711,8 +6326,8 @@ class UnidadeMedida {
|
|
|
5711
6326
|
}
|
|
5712
6327
|
static toDto(unidadeMedida, originEntity) {
|
|
5713
6328
|
const dto = Object.assign({}, unidadeMedida);
|
|
5714
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5715
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6329
|
+
dto.createdDate = dto.createdDate && moment$f(dto.createdDate).format();
|
|
6330
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$f(dto.lastModifiedDate).format();
|
|
5716
6331
|
delete dto.label;
|
|
5717
6332
|
return dto;
|
|
5718
6333
|
}
|
|
@@ -5720,7 +6335,7 @@ class UnidadeMedida {
|
|
|
5720
6335
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5721
6336
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5722
6337
|
|
|
5723
|
-
const moment$
|
|
6338
|
+
const moment$g = _moment;
|
|
5724
6339
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
5725
6340
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
5726
6341
|
class Royalty {
|
|
@@ -5728,8 +6343,8 @@ class Royalty {
|
|
|
5728
6343
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
5729
6344
|
static fromDto(royaltyDto, originEntity) {
|
|
5730
6345
|
const model = Object.assign({}, royaltyDto);
|
|
5731
|
-
model.createdDate = model.createdDate && moment$
|
|
5732
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6346
|
+
model.createdDate = model.createdDate && moment$g(model.createdDate).toDate();
|
|
6347
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$g(model.lastModifiedDate).toDate();
|
|
5733
6348
|
const lookupSeparator = " - ";
|
|
5734
6349
|
const displayFields = ["id", "codigo", "descricao", "createdBy", "createdDate", "lastModifiedBy", "lastModifiedDate"];
|
|
5735
6350
|
model.label = displayFields.map(field => model[field]).join(lookupSeparator);
|
|
@@ -5739,8 +6354,8 @@ class Royalty {
|
|
|
5739
6354
|
}
|
|
5740
6355
|
static toDto(royalty, originEntity) {
|
|
5741
6356
|
const dto = Object.assign({}, royalty);
|
|
5742
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5743
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6357
|
+
dto.createdDate = dto.createdDate && moment$g(dto.createdDate).format();
|
|
6358
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$g(dto.lastModifiedDate).format();
|
|
5744
6359
|
delete dto.label;
|
|
5745
6360
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
5746
6361
|
dto.empresa = Empresa.toDto(dto.empresa, "Royalty");
|
|
@@ -5750,16 +6365,16 @@ class Royalty {
|
|
|
5750
6365
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5751
6366
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5752
6367
|
|
|
5753
|
-
const moment$
|
|
6368
|
+
const moment$h = _moment;
|
|
5754
6369
|
class FamiliaProduto {
|
|
5755
6370
|
static fromDto(familiaProdutoDto, originEntity) {
|
|
5756
6371
|
if (familiaProdutoDto.id === undefined) {
|
|
5757
6372
|
return familiaProdutoDto;
|
|
5758
6373
|
}
|
|
5759
6374
|
const model = Object.assign({}, familiaProdutoDto);
|
|
5760
|
-
model.createdDate = model.codigo && moment$
|
|
5761
|
-
model.createdDate = model.createdDate && moment$
|
|
5762
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6375
|
+
model.createdDate = model.codigo && moment$h(model.createdDate).toDate();
|
|
6376
|
+
model.createdDate = model.createdDate && moment$h(model.createdDate).toDate();
|
|
6377
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$h(model.lastModifiedDate).toDate();
|
|
5763
6378
|
const lookupSeparator = " - ";
|
|
5764
6379
|
const displayFields = ["id", "codigo", "descricao", "situacao", "createdBy", "createdDate", "lastModifiedBy", "lastModifiedDate"];
|
|
5765
6380
|
model.label = displayFields.map(field => model[field]).join(lookupSeparator);
|
|
@@ -5769,8 +6384,8 @@ class FamiliaProduto {
|
|
|
5769
6384
|
}
|
|
5770
6385
|
static toDto(familiaProduto, originEntity) {
|
|
5771
6386
|
const dto = Object.assign({}, familiaProduto);
|
|
5772
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5773
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6387
|
+
dto.createdDate = dto.createdDate && moment$h(dto.createdDate).format();
|
|
6388
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$h(dto.lastModifiedDate).format();
|
|
5774
6389
|
delete dto.label;
|
|
5775
6390
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
5776
6391
|
dto.empresa = Empresa.toDto(dto.empresa, "FamiliaProduto");
|
|
@@ -5778,7 +6393,7 @@ class FamiliaProduto {
|
|
|
5778
6393
|
}
|
|
5779
6394
|
}
|
|
5780
6395
|
|
|
5781
|
-
const moment$
|
|
6396
|
+
const moment$i = _moment;
|
|
5782
6397
|
class Produto {
|
|
5783
6398
|
constructor() {
|
|
5784
6399
|
this.produtoMisto = false;
|
|
@@ -5786,8 +6401,8 @@ class Produto {
|
|
|
5786
6401
|
}
|
|
5787
6402
|
static fromDto(produtoDto, originEntity) {
|
|
5788
6403
|
const model = Object.assign({}, produtoDto);
|
|
5789
|
-
model.createdDate = model.createdDate && moment$
|
|
5790
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6404
|
+
model.createdDate = model.createdDate && moment$i(model.createdDate).toDate();
|
|
6405
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$i(model.lastModifiedDate).toDate();
|
|
5791
6406
|
const lookupSeparator = " - ";
|
|
5792
6407
|
const displayFields = [
|
|
5793
6408
|
"codigo",
|
|
@@ -5808,8 +6423,8 @@ class Produto {
|
|
|
5808
6423
|
}
|
|
5809
6424
|
static toDto(produto, originEntity) {
|
|
5810
6425
|
const dto = Object.assign({}, produto);
|
|
5811
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5812
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6426
|
+
dto.createdDate = dto.createdDate && moment$i(dto.createdDate).format();
|
|
6427
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$i(dto.lastModifiedDate).format();
|
|
5813
6428
|
delete dto.label;
|
|
5814
6429
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
5815
6430
|
dto.empresa = Empresa.toDto(dto.empresa, "Produto");
|
|
@@ -5825,7 +6440,7 @@ class Produto {
|
|
|
5825
6440
|
}
|
|
5826
6441
|
}
|
|
5827
6442
|
|
|
5828
|
-
const moment$
|
|
6443
|
+
const moment$j = _moment;
|
|
5829
6444
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
5830
6445
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
5831
6446
|
class Derivacao {
|
|
@@ -5833,8 +6448,8 @@ class Derivacao {
|
|
|
5833
6448
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
5834
6449
|
static fromDto(derivacaoDto, originEntity) {
|
|
5835
6450
|
const model = Object.assign({}, derivacaoDto);
|
|
5836
|
-
model.createdDate = model.createdDate && moment$
|
|
5837
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6451
|
+
model.createdDate = model.createdDate && moment$j(model.createdDate).toDate();
|
|
6452
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$j(model.lastModifiedDate).toDate();
|
|
5838
6453
|
const lookupSeparator = " - ";
|
|
5839
6454
|
const displayFields = ["codigo", "descricao"];
|
|
5840
6455
|
model.label = getLookupLabel(model, displayFields, lookupSeparator);
|
|
@@ -5846,8 +6461,8 @@ class Derivacao {
|
|
|
5846
6461
|
}
|
|
5847
6462
|
static toDto(derivacao, originEntity) {
|
|
5848
6463
|
const dto = Object.assign({}, derivacao);
|
|
5849
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5850
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6464
|
+
dto.createdDate = dto.createdDate && moment$j(dto.createdDate).format();
|
|
6465
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$j(dto.lastModifiedDate).format();
|
|
5851
6466
|
delete dto.label;
|
|
5852
6467
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
5853
6468
|
dto.empresa = Empresa.toDto(dto.empresa, "Derivacao");
|
|
@@ -5859,7 +6474,7 @@ class Derivacao {
|
|
|
5859
6474
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5860
6475
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5861
6476
|
|
|
5862
|
-
const moment$
|
|
6477
|
+
const moment$k = _moment;
|
|
5863
6478
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
5864
6479
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
5865
6480
|
class Transportadora {
|
|
@@ -5867,8 +6482,8 @@ class Transportadora {
|
|
|
5867
6482
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
5868
6483
|
static fromDto(transportadoraDto, originEntity) {
|
|
5869
6484
|
const model = Object.assign({}, transportadoraDto);
|
|
5870
|
-
model.createdDate = model.createdDate && moment$
|
|
5871
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6485
|
+
model.createdDate = model.createdDate && moment$k(model.createdDate).toDate();
|
|
6486
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$k(model.lastModifiedDate).toDate();
|
|
5872
6487
|
const lookupSeparator = " - ";
|
|
5873
6488
|
const displayFields = [
|
|
5874
6489
|
"codigo", "pessoa.nome", "pessoa.cpfCnpj"
|
|
@@ -5882,8 +6497,8 @@ class Transportadora {
|
|
|
5882
6497
|
}
|
|
5883
6498
|
static toDto(transportadora, originEntity) {
|
|
5884
6499
|
const dto = Object.assign({}, transportadora);
|
|
5885
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5886
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6500
|
+
dto.createdDate = dto.createdDate && moment$k(dto.createdDate).format();
|
|
6501
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$k(dto.lastModifiedDate).format();
|
|
5887
6502
|
delete dto.label;
|
|
5888
6503
|
if (originEntity !== "Pessoa" && dto.pessoa)
|
|
5889
6504
|
dto.pessoa = Pessoa.toDto(dto.pessoa, "Transportadora");
|
|
@@ -5895,7 +6510,7 @@ class Transportadora {
|
|
|
5895
6510
|
/*{CA:FILE_CONTENTS:START}*/
|
|
5896
6511
|
/*{CA:FILE_CONTENTS:END}*/
|
|
5897
6512
|
|
|
5898
|
-
const moment$
|
|
6513
|
+
const moment$l = _moment;
|
|
5899
6514
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
5900
6515
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
5901
6516
|
class Devolucao {
|
|
@@ -5903,8 +6518,8 @@ class Devolucao {
|
|
|
5903
6518
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
5904
6519
|
static fromDto(devolucaoDto, originEntity) {
|
|
5905
6520
|
const model = Object.assign({}, devolucaoDto);
|
|
5906
|
-
model.createdDate = model.createdDate && moment$
|
|
5907
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
6521
|
+
model.createdDate = model.createdDate && moment$l(model.createdDate).toDate();
|
|
6522
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$l(model.lastModifiedDate).toDate();
|
|
5908
6523
|
const lookupSeparator = " - ";
|
|
5909
6524
|
const displayFields = [
|
|
5910
6525
|
''
|
|
@@ -5928,8 +6543,8 @@ class Devolucao {
|
|
|
5928
6543
|
}
|
|
5929
6544
|
static toDto(devolucao, originEntity) {
|
|
5930
6545
|
const dto = Object.assign({}, devolucao);
|
|
5931
|
-
dto.createdDate = dto.createdDate && moment$
|
|
5932
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
6546
|
+
dto.createdDate = dto.createdDate && moment$l(dto.createdDate).format();
|
|
6547
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$l(dto.lastModifiedDate).format();
|
|
5933
6548
|
delete dto.label;
|
|
5934
6549
|
if (originEntity !== "Pessoa" && dto.fornecedor)
|
|
5935
6550
|
dto.fornecedor = Pessoa.toDto(dto.fornecedor, "Devolucao");
|
|
@@ -6580,7 +7195,7 @@ DevolucaoFormComponent = __decorate([
|
|
|
6580
7195
|
ActivatedRoute,
|
|
6581
7196
|
DevolucaoChegadaVeiculoOverride,
|
|
6582
7197
|
ConfirmationService,
|
|
6583
|
-
AgendaService,
|
|
7198
|
+
AgendaService$1,
|
|
6584
7199
|
ErpProcessService,
|
|
6585
7200
|
ErpFormConfigService,
|
|
6586
7201
|
HasChangeService])
|
|
@@ -6667,7 +7282,7 @@ DevolucaoInfoComponent = __decorate([
|
|
|
6667
7282
|
|
|
6668
7283
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
6669
7284
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
6670
|
-
const moment$
|
|
7285
|
+
const moment$m = _moment;
|
|
6671
7286
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
6672
7287
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
6673
7288
|
class Expedicao {
|
|
@@ -6675,8 +7290,8 @@ class Expedicao {
|
|
|
6675
7290
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
6676
7291
|
static fromDto(expedicaoDto, originEntity) {
|
|
6677
7292
|
const model = Object.assign({}, expedicaoDto);
|
|
6678
|
-
model.createdDate = model.createdDate && moment$
|
|
6679
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
7293
|
+
model.createdDate = model.createdDate && moment$m(model.createdDate).toDate();
|
|
7294
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$m(model.lastModifiedDate).toDate();
|
|
6680
7295
|
const lookupSeparator = " - ";
|
|
6681
7296
|
const displayFields = [
|
|
6682
7297
|
"id",
|
|
@@ -6715,8 +7330,8 @@ class Expedicao {
|
|
|
6715
7330
|
}
|
|
6716
7331
|
static toDto(expedicao, originEntity) {
|
|
6717
7332
|
const dto = Object.assign({}, expedicao);
|
|
6718
|
-
dto.createdDate = dto.createdDate && moment$
|
|
6719
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
7333
|
+
dto.createdDate = dto.createdDate && moment$m(dto.createdDate).format();
|
|
7334
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$m(dto.lastModifiedDate).format();
|
|
6720
7335
|
delete dto.label;
|
|
6721
7336
|
if (originEntity !== "Pessoa" && dto.clienteFaturamento)
|
|
6722
7337
|
dto.clienteFaturamento = Pessoa.toDto(dto.clienteFaturamento, "Recebimento");
|
|
@@ -6732,7 +7347,7 @@ class Expedicao {
|
|
|
6732
7347
|
}
|
|
6733
7348
|
}
|
|
6734
7349
|
|
|
6735
|
-
const moment$
|
|
7350
|
+
const moment$n = _moment;
|
|
6736
7351
|
let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
6737
7352
|
constructor(expedicaoService, router, route, messageService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, pessoaService, filialService, transportadoraService, pedidoVendaService, pedidoVendaItemService, agendaService, override, confirmationService, erpProcessService, erpFormConfigService, hasChangeService) {
|
|
6738
7353
|
this.expedicaoService = expedicaoService;
|
|
@@ -7256,11 +7871,11 @@ let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
|
7256
7871
|
if (typeof value == "number")
|
|
7257
7872
|
return `${name} eq ${value}`;
|
|
7258
7873
|
else if (type == FieldType.Date)
|
|
7259
|
-
return `${name} eq '${moment$
|
|
7874
|
+
return `${name} eq '${moment$n(value).format("YYYY-MM-DD")}'`;
|
|
7260
7875
|
else if (type == FieldType.Time)
|
|
7261
|
-
return `${name} eq '${moment$
|
|
7876
|
+
return `${name} eq '${moment$n(value).format("HH:mm:ss")}'`;
|
|
7262
7877
|
else if (type == FieldType.DateTime)
|
|
7263
|
-
return `${name} eq '${moment$
|
|
7878
|
+
return `${name} eq '${moment$n(value).format()}'`;
|
|
7264
7879
|
else if (type == FieldType.Enum)
|
|
7265
7880
|
return `${name} eq '${value}'`;
|
|
7266
7881
|
else if (type == FieldType.String)
|
|
@@ -7306,11 +7921,11 @@ let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
|
7306
7921
|
if (typeof value == "number")
|
|
7307
7922
|
return `${name} eq ${value}`;
|
|
7308
7923
|
else if (type == FieldType.Date)
|
|
7309
|
-
return `${name} eq '${moment$
|
|
7924
|
+
return `${name} eq '${moment$n(value).format("YYYY-MM-DD")}'`;
|
|
7310
7925
|
else if (type == FieldType.Time)
|
|
7311
|
-
return `${name} eq '${moment$
|
|
7926
|
+
return `${name} eq '${moment$n(value).format("HH:mm:ss")}'`;
|
|
7312
7927
|
else if (type == FieldType.DateTime)
|
|
7313
|
-
return `${name} eq '${moment$
|
|
7928
|
+
return `${name} eq '${moment$n(value).format()}'`;
|
|
7314
7929
|
else if (type == FieldType.Enum)
|
|
7315
7930
|
return `${name} eq '${value}'`;
|
|
7316
7931
|
else if (type == FieldType.String)
|
|
@@ -7414,11 +8029,11 @@ let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
|
7414
8029
|
if (typeof value == "number")
|
|
7415
8030
|
return `${name} eq ${value}`;
|
|
7416
8031
|
else if (type == FieldType.Date)
|
|
7417
|
-
return `${name} eq '${moment$
|
|
8032
|
+
return `${name} eq '${moment$n(value).format("YYYY-MM-DD")}'`;
|
|
7418
8033
|
else if (type == FieldType.Time)
|
|
7419
|
-
return `${name} eq '${moment$
|
|
8034
|
+
return `${name} eq '${moment$n(value).format("HH:mm:ss")}'`;
|
|
7420
8035
|
else if (type == FieldType.DateTime)
|
|
7421
|
-
return `${name} eq '${moment$
|
|
8036
|
+
return `${name} eq '${moment$n(value).format()}'`;
|
|
7422
8037
|
else if (type == FieldType.String)
|
|
7423
8038
|
return `containing(lower(${name}), lower('${value.replace(/'/g, "\\'")}'))`;
|
|
7424
8039
|
else
|
|
@@ -7594,11 +8209,11 @@ let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
|
7594
8209
|
if (typeof value == "number")
|
|
7595
8210
|
return `${name} eq ${value}`;
|
|
7596
8211
|
else if (type == FieldType.Date)
|
|
7597
|
-
return `${name} eq '${moment$
|
|
8212
|
+
return `${name} eq '${moment$n(value).format("YYYY-MM-DD")}'`;
|
|
7598
8213
|
else if (type == FieldType.Time)
|
|
7599
|
-
return `${name} eq '${moment$
|
|
8214
|
+
return `${name} eq '${moment$n(value).format("HH:mm:ss")}'`;
|
|
7600
8215
|
else if (type == FieldType.DateTime)
|
|
7601
|
-
return `${name} eq '${moment$
|
|
8216
|
+
return `${name} eq '${moment$n(value).format()}'`;
|
|
7602
8217
|
else if (type == FieldType.String)
|
|
7603
8218
|
return `containing(lower(${name}), lower('${value.replace(/'/g, "\\'")}'))`;
|
|
7604
8219
|
else
|
|
@@ -7635,11 +8250,11 @@ let ExpedicaoFormComponent = class ExpedicaoFormComponent {
|
|
|
7635
8250
|
if (typeof value == "number")
|
|
7636
8251
|
return `${name} eq ${value}`;
|
|
7637
8252
|
else if (type == FieldType.Date)
|
|
7638
|
-
return `${name} eq '${moment$
|
|
8253
|
+
return `${name} eq '${moment$n(value).format("YYYY-MM-DD")}'`;
|
|
7639
8254
|
else if (type == FieldType.Time)
|
|
7640
|
-
return `${name} eq '${moment$
|
|
8255
|
+
return `${name} eq '${moment$n(value).format("HH:mm:ss")}'`;
|
|
7641
8256
|
else if (type == FieldType.DateTime)
|
|
7642
|
-
return `${name} eq '${moment$
|
|
8257
|
+
return `${name} eq '${moment$n(value).format()}'`;
|
|
7643
8258
|
else if (type == FieldType.Enum)
|
|
7644
8259
|
return `${name} eq '${value}'`;
|
|
7645
8260
|
else if (type == FieldType.String)
|
|
@@ -8122,7 +8737,7 @@ ExpedicaoFormComponent = __decorate([
|
|
|
8122
8737
|
TransportadoraService,
|
|
8123
8738
|
PedidoVendaService,
|
|
8124
8739
|
PedidoVendaItemService,
|
|
8125
|
-
AgendaService,
|
|
8740
|
+
AgendaService$1,
|
|
8126
8741
|
ExpedicaoChegadaVeiculoOverride,
|
|
8127
8742
|
ConfirmationService,
|
|
8128
8743
|
ErpProcessService,
|
|
@@ -8402,7 +9017,7 @@ let ProcessoAvulsoChegadaVeiculoOverride = class ProcessoAvulsoChegadaVeiculoOve
|
|
|
8402
9017
|
ProcessoAvulsoChegadaVeiculoOverride = __decorate([
|
|
8403
9018
|
Injectable(),
|
|
8404
9019
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
8405
|
-
AgendaService,
|
|
9020
|
+
AgendaService$1,
|
|
8406
9021
|
ProcessoAvulsoService])
|
|
8407
9022
|
], ProcessoAvulsoChegadaVeiculoOverride);
|
|
8408
9023
|
|
|
@@ -8682,7 +9297,7 @@ ProcessoAvulsoFormComponent = __decorate([
|
|
|
8682
9297
|
ProcessoAvulsoChegadaVeiculoOverride,
|
|
8683
9298
|
TranslateService,
|
|
8684
9299
|
ConfirmationService,
|
|
8685
|
-
AgendaService,
|
|
9300
|
+
AgendaService$1,
|
|
8686
9301
|
ErpProcessService,
|
|
8687
9302
|
ErpFormConfigService,
|
|
8688
9303
|
HasChangeService])
|
|
@@ -8729,7 +9344,7 @@ ProcessoAvulsoInfoComponent = __decorate([
|
|
|
8729
9344
|
__metadata("design:paramtypes", [ProcessoAvulsoService])
|
|
8730
9345
|
], ProcessoAvulsoInfoComponent);
|
|
8731
9346
|
|
|
8732
|
-
const moment$
|
|
9347
|
+
const moment$o = _moment;
|
|
8733
9348
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
8734
9349
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
8735
9350
|
class Safra {
|
|
@@ -8737,10 +9352,10 @@ class Safra {
|
|
|
8737
9352
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
8738
9353
|
static fromDto(safraDto, originEntity) {
|
|
8739
9354
|
const model = Object.assign({}, safraDto);
|
|
8740
|
-
model.competenciaInicial = model.competenciaInicial && moment$
|
|
8741
|
-
model.competenciaFinal = model.competenciaFinal && moment$
|
|
8742
|
-
model.createdDate = model.createdDate && moment$
|
|
8743
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
9355
|
+
model.competenciaInicial = model.competenciaInicial && moment$o(model.competenciaInicial).toDate();
|
|
9356
|
+
model.competenciaFinal = model.competenciaFinal && moment$o(model.competenciaFinal).toDate();
|
|
9357
|
+
model.createdDate = model.createdDate && moment$o(model.createdDate).toDate();
|
|
9358
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$o(model.lastModifiedDate).toDate();
|
|
8744
9359
|
const lookupSeparator = " - ";
|
|
8745
9360
|
const displayFields = [
|
|
8746
9361
|
"codigo",
|
|
@@ -8753,10 +9368,10 @@ class Safra {
|
|
|
8753
9368
|
}
|
|
8754
9369
|
static toDto(safra, originEntity) {
|
|
8755
9370
|
const dto = Object.assign({}, safra);
|
|
8756
|
-
dto.competenciaInicial = dto.competenciaInicial && moment$
|
|
8757
|
-
dto.competenciaFinal = dto.competenciaFinal && moment$
|
|
8758
|
-
dto.createdDate = dto.createdDate && moment$
|
|
8759
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
9371
|
+
dto.competenciaInicial = dto.competenciaInicial && moment$o(dto.competenciaInicial).format("YYYY-MM-DD");
|
|
9372
|
+
dto.competenciaFinal = dto.competenciaFinal && moment$o(dto.competenciaFinal).format("YYYY-MM-DD");
|
|
9373
|
+
dto.createdDate = dto.createdDate && moment$o(dto.createdDate).format();
|
|
9374
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$o(dto.lastModifiedDate).format();
|
|
8760
9375
|
delete dto.label;
|
|
8761
9376
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
8762
9377
|
dto.empresa = Empresa.toDto(dto.empresa, "Safra");
|
|
@@ -8768,7 +9383,7 @@ class Safra {
|
|
|
8768
9383
|
|
|
8769
9384
|
/*{CA:PACKAGE_IMPORTS:START}*/
|
|
8770
9385
|
/*{CA:PACKAGE_IMPORTS:END}*/
|
|
8771
|
-
const moment$
|
|
9386
|
+
const moment$p = _moment;
|
|
8772
9387
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
8773
9388
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
8774
9389
|
class RecebimentoOrdemCompra {
|
|
@@ -8776,8 +9391,8 @@ class RecebimentoOrdemCompra {
|
|
|
8776
9391
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
8777
9392
|
static fromDto(recebimentoOrdemCompraDto, originEntity) {
|
|
8778
9393
|
const model = Object.assign({}, recebimentoOrdemCompraDto);
|
|
8779
|
-
model.createdDate = model.createdDate && moment$
|
|
8780
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
9394
|
+
model.createdDate = model.createdDate && moment$p(model.createdDate).toDate();
|
|
9395
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$p(model.lastModifiedDate).toDate();
|
|
8781
9396
|
const lookupSeparator = " - ";
|
|
8782
9397
|
const displayFields = [
|
|
8783
9398
|
''
|
|
@@ -8806,8 +9421,8 @@ class RecebimentoOrdemCompra {
|
|
|
8806
9421
|
}
|
|
8807
9422
|
static toDto(recebimentoOrdemCompra, originEntity) {
|
|
8808
9423
|
const dto = Object.assign({}, recebimentoOrdemCompra);
|
|
8809
|
-
dto.createdDate = dto.createdDate && moment$
|
|
8810
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
9424
|
+
dto.createdDate = dto.createdDate && moment$p(dto.createdDate).format();
|
|
9425
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$p(dto.lastModifiedDate).format();
|
|
8811
9426
|
delete dto.label;
|
|
8812
9427
|
if (originEntity !== "Agenda" && dto.agenda)
|
|
8813
9428
|
dto.agenda = Agenda.toDto(dto.agenda, "RecebimentoOrdemCompra");
|
|
@@ -8865,7 +9480,7 @@ let RecebimentoOrdemCompraChegadaVeiculoOverride = class RecebimentoOrdemCompraC
|
|
|
8865
9480
|
RecebimentoOrdemCompraChegadaVeiculoOverride = __decorate([
|
|
8866
9481
|
Injectable(),
|
|
8867
9482
|
__metadata("design:paramtypes", [ChegadaVeiculoOverride,
|
|
8868
|
-
AgendaService,
|
|
9483
|
+
AgendaService$1,
|
|
8869
9484
|
RecebimentoOrdemCompraService])
|
|
8870
9485
|
], RecebimentoOrdemCompraChegadaVeiculoOverride);
|
|
8871
9486
|
|
|
@@ -9111,7 +9726,7 @@ let RecebimentoOrdemCompraFormComponent = class RecebimentoOrdemCompraFormCompon
|
|
|
9111
9726
|
this.mensagemBuscandoNota();
|
|
9112
9727
|
this.notaValidatorService.pesquisarDocumentoValidaNotaEmUso({
|
|
9113
9728
|
filialId: (this.formGroup.get("filial").value && this.formGroup.get("filial").value.id) || null,
|
|
9114
|
-
chaveDocumento: value.
|
|
9729
|
+
chaveDocumento: value.replace(/\s/g, "") || ""
|
|
9115
9730
|
}).pipe(takeUntil(this.ngUnsubscribe), finalize(() => this.loading = false)).subscribe((response) => {
|
|
9116
9731
|
this.addNovaNota(response);
|
|
9117
9732
|
});
|
|
@@ -9942,7 +10557,7 @@ __decorate([
|
|
|
9942
10557
|
RecebimentoOrdemCompraFormComponent = __decorate([
|
|
9943
10558
|
Component({
|
|
9944
10559
|
selector: 'recebimento-ordem-compra-form',
|
|
9945
|
-
template: "<p-confirmDialog [acceptLabel]=\"'yes' | translate\" acceptIcon=\"\" [rejectLabel]=\"'no' | translate\" rejectIcon=\"\">\n</p-confirmDialog>\n<div *sLoadingState=\"loading\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-fluid ui-g\">\n\n <div class=\"ui-g-12\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input pInputText type=\"text\" [(ngModel)]=\"chaveNotaFiscal\" [ngModelOptions]=\"{standalone: true}\" (blur)=\"onBlurChaveNotaFiscal()\">\n <!-- <input [class.ng-invalid]=\"erroChaveNota\" pInputText type=\"text\" [(ngModel)]=\"chaveNotaFiscal\" [ngModelOptions]=\"{standalone: true}\" (blur)=\"onBlurChaveNotaFiscal()\"> -->\n <!-- <span class=\"input-error\" *ngIf=\"erroChaveNota\">{{'yms.erp.produto_nota_error_detail' | translate}}</span> -->\n </div>\n\n <div class=\"ui-md-6 ui-g-12 required\">\n <label for=\"filial\">{{'yms.erp.recebimento_ordem_compra_filial' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"filial\" name=\"filial\" formControlName=\"filial\"\n [searchFields]=\"filialSearchFields\" [searchGridFields]=\"filialSearchGridFields\"\n [searchGridData]=\"filialSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"filialLookupSuggestions\" (onLookupRequest)=\"onFilialLookupRequest($event)\"\n (onSearchRequest)=\"onFilialSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"filialSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.filial_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: filialSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['filial']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n\n <div class=\"ui-md-6 ui-g-12\">\n <label for=\"transportadora\">{{'yms.erp.recebimento_ordem_compra_transportadora' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transportadora\" name=\"transportadora\" formControlName=\"transportadora\"\n [searchFields]=\"transportadoraSearchFields\" [searchGridFields]=\"transportadoraSearchFields\"\n [searchGridData]=\"transportadoraSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transportadoraLookupSuggestions\"\n (onLookupRequest)=\"onTransportadoraLookupRequest($event)\"\n (onSearchRequest)=\"onTransportadoraSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transportadoraSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.transportadora_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transportadoraSearchTotalRecords}\">\n </s-lookup>\n </div>\n\n <div class=\"ui-g-12\" style=\"text-align: right;\" *ngIf=\"totalEixosContratados || totalEixosComposicao\">\n <label for=\"totalEixosContratados\" float=\"right\" style=\"display: inline;\">\n {{totalEixosContratados}} {{'yms.erp.total_eixos_contratados' | translate}} /\n </label>\n <label for=\"totalEixosComposicao\" float=\"right\" style=\"display: inline;\">\n {{totalEixosComposicao}} {{'yms.erp.total_eixos_composicao' | translate}}\n </label>\n </div>\n\n <div class=\"ui-md-12\">\n <s-button *ngIf=\"showButtons() && !!formGroup.get('filial').value && !createdByErp\" styleClass=\"btn-erp-forms\" \n iconClass=\"fas fa-plus\" label=\"Adicionar fornecedor\" priority=\"secondary\" \n (onClick)=\"addFornecedor()\" [disabled]=\"disableButtonSave || !permissions.editar\"></s-button>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedores\">{{'Selecione ao menos um fornecedor para continuar' | translate}}</span>\n </div>\n\n <form class=\"ui-g-12\" *ngFor=\"let fornecedorForm of getFornecedoresForm().controls; let i = index;\" [formGroup]=\"fornecedorForm\">\n <p-panel [style]=\"{position: 'relative'}\" styleClass=\"form-group ui-g-12 ui-md-12\" [toggleable]=\"true\">\n\n <p-header>\n Fornecedor {{+i+1}}\n <s-button \n style=\"display: inline-block; position: absolute; right: 50px; top: 10px\" \n *ngIf=\"showButtons() && !createdByErp\"\n iconClass=\"fas fa-trash\"\n label=\"Remover\"\n priority=\"default\"\n [auxiliary]=\"true\"\n (onClick)=\"removeFornecedor(fornecedorForm)\">\n </s-button>\n </p-header>\n \n <div class=\"ui-md-6 ui-g-12 required\">\n <label for=\"fornecedor\">{{'yms.erp.recebimento_ordem_compra_fornecedor' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"fornecedor\" name=\"fornecedor\" formControlName=\"fornecedor\"\n [searchFields]=\"fornecedorSearchFields\" [searchGridFields]=\"fornecedorSearchFields\"\n [searchGridData]=\"fornecedorSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"fornecedorLookupSuggestions\"\n (onLookupRequest)=\"onFornecedorLookupRequest($event)\"\n (onSearchRequest)=\"onFornecedorSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"fornecedorSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.fornecedor_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: { value: fornecedorSearchTotalRecords }\">\n </s-lookup>\n <s-control-errors\n [control]=\"fornecedorForm.get('fornecedor')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\">\n </s-control-errors>\n </div>\n\n <div class=\"ui-md-6 ui-g-12\">\n <label for=\"origem_mercadoria\">{{'yms.erp.recebimento_ordem_compra_mercadoria' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"origem_mercadoria\" name=\"origem_mercadoria\" formControlName=\"origemMercadoria\" \n [searchFields]=\"origemMercadoriaSearchFields\" [searchGridFields]=\"origemMercadoriaSearchFields\"\n [searchGridData]=\"origemMercadoriaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"origemMercadoriaLookupSuggestions\" lookupDisplayField=\"label\"\n (onLookupRequest)=\"onOrigemMercadoriaLookupRequest(fornecedorForm, $event)\"\n (onSearchRequest)=\"onOrigemMercadoriaSearchRequest(fornecedorForm, $event)\" \n [searchTotalRecords]=\"origemMercadoriaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.origem_mercadoria_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: { value: origemMercadoriaSearchTotalRecords }\">\n </s-lookup>\n </div>\n\n <div class=\"ui-g-12\">\n <label for=\"fornecedorNotas\">Notas a serem adicionadas</label>\n <s-token-list id=\"fornecedorNotas\" [tokens]=\"fornecedorNotasTokens\" (tokenSelected)=\"addFornecedorNotasTokenEmOrdemCompra(fornecedorForm, $event)\" (tokenRemoved)=\"removeFornecedorNotasTokenDaOrdemCompra($event)\" [removableTokens]=\"true\"></s-token-list>\n </div>\n\n <div class=\"ui-g-12\">\n <s-button label=\"Adicionar nota\" *ngIf=\"showButtons()\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addNota(fornecedorForm)\" [disabled]=\"disableAdicionarNota()\"></s-button>\n <s-button label=\"Adicionar ordem de compra\" *ngIf=\"showButtons() && !createdByErp\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addOrdemCompra(fornecedorForm)\"></s-button>\n </div>\n\n <div class=\"ui-g-12\">\n <h4>Ordens de Compra</h4>\n <p-table [value]=\"getOrdensCompra(fornecedorForm).controls\" [(selection)]=\"ordemCompraSelecionado\">\n <ng-template pTemplate=\"body\" let-rowData>\n <tr [pSelectableRow]=\"rowData\">\n <td style=\"width: 50px\">\n <p-tableRadioButton [value]=\"rowData.get('ordemCompra').value\"></p-tableRadioButton>\n </td>\n <td>\n <p-accordion>\n <p-accordionTab>\n <p-header>\n Ordem {{rowData.get('ordemCompra').value.codigo}}, Filial {{rowData.get('ordemCompra').value.filial?.codigo}}\n\n <span *ngIf=\"showButtons() && !createdByErp\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerOrdemCompra(fornecedorForm, rowData)\"></span>\n </p-header>\n\n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">Notas</span>\n <span class=\"data\">\n <p-accordion>\n <p-accordionTab *ngFor=\"let nota of getNotas(rowData).controls\">\n <p-header>\n {{nota.get('chaveNotaFiscal').value || (nota.get('serieNotaFiscal').value + ' - ' + nota.get('numeroNotaFiscal').value)}}\n\n <span *ngIf=\"showButtons()\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerNota(fornecedorForm, rowData, nota)\"></span>\n </p-header>\n\n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie legal nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieLegalNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">N\u00FAmero nota fiscal</span>\n <span class=\"data\">{{nota.value?.numeroNotaFiscal}}</span>\n </div>\n </div>\n\n </p-accordionTab> \n </p-accordion>\n </span>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </p-panel>\n </form>\n </div>\n </form>\n\n <div style=\"margin: 5px 0 5px 0;\">\n <s-button *ngIf=\"showButtons()\" priority=\"primary\" [label]=\"'save' | translate\" (onClick)=\"onSave()\"\n [disabled]=\"loading || disableButtonSave\">\n </s-button>\n <s-button *ngIf=\"saveAndInitButton && showButtons()\" priority=\"primary\" [label]=\"'save_and_init' | translate\"\n (onClick)=\"onSave(true)\" [disabled]=\"loading || disableButtonSave\">\n </s-button>\n </div>\n</div>",
|
|
10560
|
+
template: "<p-confirmDialog [acceptLabel]=\"'yes' | translate\" acceptIcon=\"\" [rejectLabel]=\"'no' | translate\" rejectIcon=\"\">\n</p-confirmDialog>\n<div *sLoadingState=\"loading\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-fluid ui-g\">\n\n <div class=\"ui-g-12\">\n <label for=\"chaveNotaFiscal\">{{'yms.erp.recebimento_chave_nota_fiscal' | translate}}</label>\n <input\n id=\"chaveNotaFiscal\"\n trim\n pInputText\n type=\"text\"\n [(ngModel)]=\"chaveNotaFiscal\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onBlurChaveNotaFiscal()\"\n >\n <!-- <input [class.ng-invalid]=\"erroChaveNota\" pInputText type=\"text\" [(ngModel)]=\"chaveNotaFiscal\" [ngModelOptions]=\"{standalone: true}\" (blur)=\"onBlurChaveNotaFiscal()\"> -->\n <!-- <span class=\"input-error\" *ngIf=\"erroChaveNota\">{{'yms.erp.produto_nota_error_detail' | translate}}</span> -->\n </div>\n\n <div class=\"ui-md-6 ui-g-12 required\">\n <label for=\"filial\">{{'yms.erp.recebimento_ordem_compra_filial' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"filial\" name=\"filial\" formControlName=\"filial\"\n [searchFields]=\"filialSearchFields\" [searchGridFields]=\"filialSearchGridFields\"\n [searchGridData]=\"filialSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"filialLookupSuggestions\" (onLookupRequest)=\"onFilialLookupRequest($event)\"\n (onSearchRequest)=\"onFilialSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"filialSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.filial_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: filialSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['filial']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n\n <div class=\"ui-md-6 ui-g-12\">\n <label for=\"transportadora\">{{'yms.erp.recebimento_ordem_compra_transportadora' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transportadora\" name=\"transportadora\" formControlName=\"transportadora\"\n [searchFields]=\"transportadoraSearchFields\" [searchGridFields]=\"transportadoraSearchFields\"\n [searchGridData]=\"transportadoraSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transportadoraLookupSuggestions\"\n (onLookupRequest)=\"onTransportadoraLookupRequest($event)\"\n (onSearchRequest)=\"onTransportadoraSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transportadoraSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.transportadora_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transportadoraSearchTotalRecords}\">\n </s-lookup>\n </div>\n\n <div class=\"ui-g-12\" style=\"text-align: right;\" *ngIf=\"totalEixosContratados || totalEixosComposicao\">\n <label for=\"totalEixosContratados\" float=\"right\" style=\"display: inline;\">\n {{totalEixosContratados}} {{'yms.erp.total_eixos_contratados' | translate}} /\n </label>\n <label for=\"totalEixosComposicao\" float=\"right\" style=\"display: inline;\">\n {{totalEixosComposicao}} {{'yms.erp.total_eixos_composicao' | translate}}\n </label>\n </div>\n\n <div class=\"ui-md-12\">\n <s-button *ngIf=\"showButtons() && !!formGroup.get('filial').value && !createdByErp\" styleClass=\"btn-erp-forms\" \n iconClass=\"fas fa-plus\" label=\"Adicionar fornecedor\" priority=\"secondary\" \n (onClick)=\"addFornecedor()\" [disabled]=\"disableButtonSave || !permissions.editar\"></s-button>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedores\">{{'Selecione ao menos um fornecedor para continuar' | translate}}</span>\n </div>\n\n <form class=\"ui-g-12\" *ngFor=\"let fornecedorForm of getFornecedoresForm().controls; let i = index;\" [formGroup]=\"fornecedorForm\">\n <p-panel [style]=\"{position: 'relative'}\" styleClass=\"form-group ui-g-12 ui-md-12\" [toggleable]=\"true\">\n\n <p-header>\n Fornecedor {{+i+1}}\n <s-button \n style=\"display: inline-block; position: absolute; right: 50px; top: 10px\" \n *ngIf=\"showButtons() && !createdByErp\"\n iconClass=\"fas fa-trash\"\n label=\"Remover\"\n priority=\"default\"\n [auxiliary]=\"true\"\n (onClick)=\"removeFornecedor(fornecedorForm)\">\n </s-button>\n </p-header>\n \n <div class=\"ui-md-6 ui-g-12 required\">\n <label for=\"fornecedor\">{{'yms.erp.recebimento_ordem_compra_fornecedor' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"fornecedor\" name=\"fornecedor\" formControlName=\"fornecedor\"\n [searchFields]=\"fornecedorSearchFields\" [searchGridFields]=\"fornecedorSearchFields\"\n [searchGridData]=\"fornecedorSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"fornecedorLookupSuggestions\"\n (onLookupRequest)=\"onFornecedorLookupRequest($event)\"\n (onSearchRequest)=\"onFornecedorSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"fornecedorSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.fornecedor_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: { value: fornecedorSearchTotalRecords }\">\n </s-lookup>\n <s-control-errors\n [control]=\"fornecedorForm.get('fornecedor')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\">\n </s-control-errors>\n </div>\n\n <div class=\"ui-md-6 ui-g-12\">\n <label for=\"origem_mercadoria\">{{'yms.erp.recebimento_ordem_compra_mercadoria' | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"origem_mercadoria\" name=\"origem_mercadoria\" formControlName=\"origemMercadoria\" \n [searchFields]=\"origemMercadoriaSearchFields\" [searchGridFields]=\"origemMercadoriaSearchFields\"\n [searchGridData]=\"origemMercadoriaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"origemMercadoriaLookupSuggestions\" lookupDisplayField=\"label\"\n (onLookupRequest)=\"onOrigemMercadoriaLookupRequest(fornecedorForm, $event)\"\n (onSearchRequest)=\"onOrigemMercadoriaSearchRequest(fornecedorForm, $event)\" \n [searchTotalRecords]=\"origemMercadoriaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.origem_mercadoria_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: { value: origemMercadoriaSearchTotalRecords }\">\n </s-lookup>\n </div>\n\n <div class=\"ui-g-12\">\n <label for=\"fornecedorNotas\">Notas a serem adicionadas</label>\n <s-token-list id=\"fornecedorNotas\" [tokens]=\"fornecedorNotasTokens\" (tokenSelected)=\"addFornecedorNotasTokenEmOrdemCompra(fornecedorForm, $event)\" (tokenRemoved)=\"removeFornecedorNotasTokenDaOrdemCompra($event)\" [removableTokens]=\"true\"></s-token-list>\n </div>\n\n <div class=\"ui-g-12\">\n <s-button label=\"Adicionar nota\" *ngIf=\"showButtons()\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addNota(fornecedorForm)\" [disabled]=\"disableAdicionarNota()\"></s-button>\n <s-button label=\"Adicionar ordem de compra\" *ngIf=\"showButtons() && !createdByErp\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addOrdemCompra(fornecedorForm)\"></s-button>\n </div>\n\n <div class=\"ui-g-12\">\n <h4>Ordens de Compra</h4>\n <p-table [value]=\"getOrdensCompra(fornecedorForm).controls\" [(selection)]=\"ordemCompraSelecionado\">\n <ng-template pTemplate=\"body\" let-rowData>\n <tr [pSelectableRow]=\"rowData\">\n <td style=\"width: 50px\">\n <p-tableRadioButton [value]=\"rowData.get('ordemCompra').value\"></p-tableRadioButton>\n </td>\n <td>\n <p-accordion>\n <p-accordionTab>\n <p-header>\n Ordem {{rowData.get('ordemCompra').value.codigo}}, Filial {{rowData.get('ordemCompra').value.filial?.codigo}}\n\n <span *ngIf=\"showButtons() && !createdByErp\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerOrdemCompra(fornecedorForm, rowData)\"></span>\n </p-header>\n\n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">Notas</span>\n <span class=\"data\">\n <p-accordion>\n <p-accordionTab *ngFor=\"let nota of getNotas(rowData).controls\">\n <p-header>\n {{nota.get('chaveNotaFiscal').value || (nota.get('serieNotaFiscal').value + ' - ' + nota.get('numeroNotaFiscal').value)}}\n\n <span *ngIf=\"showButtons()\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerNota(fornecedorForm, rowData, nota)\"></span>\n </p-header>\n\n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie legal nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieLegalNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">N\u00FAmero nota fiscal</span>\n <span class=\"data\">{{nota.value?.numeroNotaFiscal}}</span>\n </div>\n </div>\n\n </p-accordionTab> \n </p-accordion>\n </span>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n </p-panel>\n </form>\n </div>\n </form>\n\n <div style=\"margin: 5px 0 5px 0;\">\n <s-button *ngIf=\"showButtons()\" priority=\"primary\" [label]=\"'save' | translate\" (onClick)=\"onSave()\"\n [disabled]=\"loading || disableButtonSave\">\n </s-button>\n <s-button *ngIf=\"saveAndInitButton && showButtons()\" priority=\"primary\" [label]=\"'save_and_init' | translate\"\n (onClick)=\"onSave(true)\" [disabled]=\"loading || disableButtonSave\">\n </s-button>\n </div>\n</div>",
|
|
9946
10561
|
providers: [ConfirmationService],
|
|
9947
10562
|
styles: [".required-h3{font-size:1.17rem;font-weight:700}.required-h3::after{content:'*';color:#c13018;font-weight:400;margin-left:5px;font-size:14px}.error-required-message{color:#c13018;margin-top:5px;font-size:12px}.separator{width:100%;margin:5px 0;height:1px;background-color:#ccc}.input-error{color:#c13018}.detail-pane{display:flex;flex-wrap:wrap;justify-content:flex-start}.detail-pane .detail-span{width:50%;padding:10px 0;display:flex;flex-direction:column}.detail-pane .detail-span .title{font-size:14px;opacity:.7;margin-bottom:4px}.detail-pane .detail-span .data{font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nota-error{color:#c13018}"]
|
|
9948
10563
|
}),
|
|
@@ -9964,7 +10579,7 @@ RecebimentoOrdemCompraFormComponent = __decorate([
|
|
|
9964
10579
|
NotaValidatorService,
|
|
9965
10580
|
ConfirmationService,
|
|
9966
10581
|
DialogService,
|
|
9967
|
-
AgendaService,
|
|
10582
|
+
AgendaService$1,
|
|
9968
10583
|
ErpProcessService,
|
|
9969
10584
|
ErpFormConfigService,
|
|
9970
10585
|
VerificaNotafiscal,
|
|
@@ -10079,7 +10694,7 @@ RecebimentoOrdemCompraInfoComponent = __decorate([
|
|
|
10079
10694
|
__metadata("design:paramtypes", [RecebimentoOrdemCompraService])
|
|
10080
10695
|
], RecebimentoOrdemCompraInfoComponent);
|
|
10081
10696
|
|
|
10082
|
-
const moment$
|
|
10697
|
+
const moment$q = _moment;
|
|
10083
10698
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
10084
10699
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
10085
10700
|
class ContratoCompra {
|
|
@@ -10087,11 +10702,11 @@ class ContratoCompra {
|
|
|
10087
10702
|
/*{CA:CLASS_ATTRIBUTES:END}*/
|
|
10088
10703
|
static fromDto(contratoCompraDto, originEntity) {
|
|
10089
10704
|
const model = Object.assign({}, contratoCompraDto);
|
|
10090
|
-
model.dataEmissao = model.dataEmissao && moment$
|
|
10091
|
-
model.dataInicioVigencia = model.dataInicioVigencia && moment$
|
|
10092
|
-
model.dataFimVigencia = model.dataFimVigencia && moment$
|
|
10093
|
-
model.createdDate = model.createdDate && moment$
|
|
10094
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
10705
|
+
model.dataEmissao = model.dataEmissao && moment$q(model.dataEmissao).toDate();
|
|
10706
|
+
model.dataInicioVigencia = model.dataInicioVigencia && moment$q(model.dataInicioVigencia).toDate();
|
|
10707
|
+
model.dataFimVigencia = model.dataFimVigencia && moment$q(model.dataFimVigencia).toDate();
|
|
10708
|
+
model.createdDate = model.createdDate && moment$q(model.createdDate).toDate();
|
|
10709
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$q(model.lastModifiedDate).toDate();
|
|
10095
10710
|
model.label = `Número: ${model.numero}, Filial: ${model.filial.codigo}`;
|
|
10096
10711
|
if (originEntity !== "Empresa" && model.empresa)
|
|
10097
10712
|
model.empresa = Empresa.fromDto(model.empresa, "ContratoCompra");
|
|
@@ -10107,11 +10722,11 @@ class ContratoCompra {
|
|
|
10107
10722
|
}
|
|
10108
10723
|
static toDto(contratoCompra, originEntity) {
|
|
10109
10724
|
const dto = Object.assign({}, contratoCompra);
|
|
10110
|
-
dto.dataEmissao = dto.dataEmissao && moment$
|
|
10111
|
-
dto.dataInicioVigencia = dto.dataInicioVigencia && moment$
|
|
10112
|
-
dto.dataFimVigencia = dto.dataFimVigencia && moment$
|
|
10113
|
-
dto.createdDate = dto.createdDate && moment$
|
|
10114
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
10725
|
+
dto.dataEmissao = dto.dataEmissao && moment$q(dto.dataEmissao).format("YYYY-MM-DD");
|
|
10726
|
+
dto.dataInicioVigencia = dto.dataInicioVigencia && moment$q(dto.dataInicioVigencia).format("YYYY-MM-DD");
|
|
10727
|
+
dto.dataFimVigencia = dto.dataFimVigencia && moment$q(dto.dataFimVigencia).format("YYYY-MM-DD");
|
|
10728
|
+
dto.createdDate = dto.createdDate && moment$q(dto.createdDate).format();
|
|
10729
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$q(dto.lastModifiedDate).format();
|
|
10115
10730
|
delete dto.label;
|
|
10116
10731
|
if (originEntity !== "Empresa" && dto.empresa)
|
|
10117
10732
|
dto.empresa = Empresa.toDto(dto.empresa, "ContratoCompra");
|
|
@@ -10131,7 +10746,7 @@ class ContratoCompra {
|
|
|
10131
10746
|
/*{CA:FILE_CONTENTS:START}*/
|
|
10132
10747
|
/*{CA:FILE_CONTENTS:END}*/
|
|
10133
10748
|
|
|
10134
|
-
const moment$
|
|
10749
|
+
const moment$r = _moment;
|
|
10135
10750
|
/*{CA:PROJECT_IMPORTS:START}*/
|
|
10136
10751
|
/*{CA:PROJECT_IMPORTS:END}*/
|
|
10137
10752
|
class ContratoCompraItem {
|
|
@@ -10140,9 +10755,9 @@ class ContratoCompraItem {
|
|
|
10140
10755
|
static fromDto(contratoCompraItemDto, originEntity) {
|
|
10141
10756
|
const model = Object.assign({}, contratoCompraItemDto);
|
|
10142
10757
|
model.sku = model.sku || {};
|
|
10143
|
-
model.dataCompetencia = model.dataCompetencia && moment$
|
|
10144
|
-
model.createdDate = model.createdDate && moment$
|
|
10145
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
10758
|
+
model.dataCompetencia = model.dataCompetencia && moment$r(model.dataCompetencia).toDate();
|
|
10759
|
+
model.createdDate = model.createdDate && moment$r(model.createdDate).toDate();
|
|
10760
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$r(model.lastModifiedDate).toDate();
|
|
10146
10761
|
model.label = `${model.sequencia} - ${model.sku.descricao} - ${model.sku.codigo}`;
|
|
10147
10762
|
if (originEntity !== "ContratoCompra" && model.contrato)
|
|
10148
10763
|
model.contrato = ContratoCompra.fromDto(model.contrato, "ContratoCompraItem");
|
|
@@ -10152,9 +10767,9 @@ class ContratoCompraItem {
|
|
|
10152
10767
|
}
|
|
10153
10768
|
static toDto(contratoCompraItem, originEntity) {
|
|
10154
10769
|
const dto = Object.assign({}, contratoCompraItem);
|
|
10155
|
-
dto.dataCompetencia = dto.dataCompetencia && moment$
|
|
10156
|
-
dto.createdDate = dto.createdDate && moment$
|
|
10157
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
10770
|
+
dto.dataCompetencia = dto.dataCompetencia && moment$r(dto.dataCompetencia).format("YYYY-MM-DD");
|
|
10771
|
+
dto.createdDate = dto.createdDate && moment$r(dto.createdDate).format();
|
|
10772
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$r(dto.lastModifiedDate).format();
|
|
10158
10773
|
delete dto.label;
|
|
10159
10774
|
if (originEntity !== "ContratoCompra" && dto.contrato)
|
|
10160
10775
|
dto.contrato = ContratoCompra.toDto(dto.contrato, "ContratoCompraItem");
|
|
@@ -10166,7 +10781,7 @@ class ContratoCompraItem {
|
|
|
10166
10781
|
/*{CA:FILE_CONTENTS:START}*/
|
|
10167
10782
|
/*{CA:FILE_CONTENTS:END}*/
|
|
10168
10783
|
|
|
10169
|
-
const moment$
|
|
10784
|
+
const moment$s = _moment;
|
|
10170
10785
|
let ContratoFormComponent = class ContratoFormComponent {
|
|
10171
10786
|
constructor(dialogRef, dialogConfig, contratoCompraService, contratoCompraItemService, translate, fb, route) {
|
|
10172
10787
|
this.dialogRef = dialogRef;
|
|
@@ -10250,7 +10865,7 @@ let ContratoFormComponent = class ContratoFormComponent {
|
|
|
10250
10865
|
if (filial && filial.empresa && filial.empresa.id) {
|
|
10251
10866
|
filter.empresaId = filial.empresa.id;
|
|
10252
10867
|
}
|
|
10253
|
-
filter.dataEmissao = filter.dataEmissao && moment$
|
|
10868
|
+
filter.dataEmissao = filter.dataEmissao && moment$s(filter.dataEmissao).format("YYYY-MM-DD");
|
|
10254
10869
|
const sort = (multiSortMeta || []).length ? { field: multiSortMeta[0].field, order: multiSortMeta[0].order === 1 ? 'Asc' : 'Desc' } : { field: 'numero', order: 'Asc' };
|
|
10255
10870
|
this.contratoCompraService
|
|
10256
10871
|
.listContratosCompra(Object.assign({}, filter, { pessoaId: (this.fornecedor || { id: undefined }).id, produtoId: (this.produto || { id: undefined }).id, filialId: (filial || { id: undefined }).id, tipoAgendamentoId: this.agenda && this.agenda.tipoAgendamento ? this.agenda.tipoAgendamento.id : null, contratosSelecionados: this.contratos, pagina: {
|
|
@@ -10472,12 +11087,12 @@ class Transgenia {
|
|
|
10472
11087
|
}
|
|
10473
11088
|
}
|
|
10474
11089
|
|
|
10475
|
-
const moment$
|
|
11090
|
+
const moment$t = _moment;
|
|
10476
11091
|
class RecebimentoContrato {
|
|
10477
11092
|
static fromDto(recebimentoDto, originEntity) {
|
|
10478
11093
|
const model = Object.assign({}, recebimentoDto);
|
|
10479
|
-
model.createdDate = model.createdDate && moment$
|
|
10480
|
-
model.lastModifiedDate = model.lastModifiedDate && moment$
|
|
11094
|
+
model.createdDate = model.createdDate && moment$t(model.createdDate).toDate();
|
|
11095
|
+
model.lastModifiedDate = model.lastModifiedDate && moment$t(model.lastModifiedDate).toDate();
|
|
10481
11096
|
const lookupSeparator = " - ";
|
|
10482
11097
|
const displayFields = [
|
|
10483
11098
|
"id",
|
|
@@ -10526,8 +11141,8 @@ class RecebimentoContrato {
|
|
|
10526
11141
|
}
|
|
10527
11142
|
static toDto(recebimento, originEntity) {
|
|
10528
11143
|
const dto = Object.assign({}, recebimento);
|
|
10529
|
-
dto.createdDate = dto.createdDate && moment$
|
|
10530
|
-
dto.lastModifiedDate = dto.lastModifiedDate && moment$
|
|
11144
|
+
dto.createdDate = dto.createdDate && moment$t(dto.createdDate).format();
|
|
11145
|
+
dto.lastModifiedDate = dto.lastModifiedDate && moment$t(dto.lastModifiedDate).format();
|
|
10531
11146
|
delete dto.label;
|
|
10532
11147
|
if (originEntity !== "Pessoa" && dto.fornecedor)
|
|
10533
11148
|
dto.fornecedor = Pessoa.toDto(dto.fornecedor, "Recebimento");
|
|
@@ -10560,7 +11175,7 @@ var Situacao;
|
|
|
10560
11175
|
Situacao["ATIVO"] = "ATIVO";
|
|
10561
11176
|
})(Situacao || (Situacao = {}));
|
|
10562
11177
|
|
|
10563
|
-
const moment$
|
|
11178
|
+
const moment$u = _moment;
|
|
10564
11179
|
let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
10565
11180
|
constructor(recebimentoService, router, route, messageService, confirmationService, formBuilder, translate, hotkeysService, fieldCustomization, focusService, filialService, transportadoraService, pessoaEnderecoService, contratoCompraService, pessoaService, produtoService, derivacaoService, recebimentoChegadaOverride, notaValidatorService, transgeniaService, dialogService, agendaService, erpProcessService, erpFormConfigService, verificaNotaFiscal, hasChangeService, buildFormField) {
|
|
10566
11181
|
this.recebimentoService = recebimentoService;
|
|
@@ -10893,7 +11508,7 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
10893
11508
|
this.mensagemBuscandoNota();
|
|
10894
11509
|
this.notaValidatorService.pesquisarDocumentoValidaNotaEmUso({
|
|
10895
11510
|
filialId: (this.formGroup.get("filial").value && this.formGroup.get("filial").value.id) || null,
|
|
10896
|
-
chaveDocumento: value.
|
|
11511
|
+
chaveDocumento: value.replace(/\s/g, "")
|
|
10897
11512
|
}).pipe(takeUntil(this.ngUnsubscribe), finalize(() => this.loading = false)).subscribe((response) => this.addNovaNota(response));
|
|
10898
11513
|
}
|
|
10899
11514
|
}
|
|
@@ -11203,11 +11818,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11203
11818
|
if (typeof value == "number")
|
|
11204
11819
|
return `${name} eq ${value}`;
|
|
11205
11820
|
else if (type == FieldType.Date)
|
|
11206
|
-
return `${name} eq '${moment$
|
|
11821
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11207
11822
|
else if (type == FieldType.Time)
|
|
11208
|
-
return `${name} eq '${moment$
|
|
11823
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11209
11824
|
else if (type == FieldType.DateTime)
|
|
11210
|
-
return `${name} eq '${moment$
|
|
11825
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11211
11826
|
else if (type == FieldType.String)
|
|
11212
11827
|
return `containing(lower(${name}), lower('${value.replace(/'/g, "\\'")}'))`;
|
|
11213
11828
|
else
|
|
@@ -11241,11 +11856,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11241
11856
|
if (typeof value == "number")
|
|
11242
11857
|
return `${name} eq ${value}`;
|
|
11243
11858
|
else if (type == FieldType.Date)
|
|
11244
|
-
return `${name} eq '${moment$
|
|
11859
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11245
11860
|
else if (type == FieldType.Time)
|
|
11246
|
-
return `${name} eq '${moment$
|
|
11861
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11247
11862
|
else if (type == FieldType.DateTime)
|
|
11248
|
-
return `${name} eq '${moment$
|
|
11863
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11249
11864
|
else if (type == FieldType.Enum)
|
|
11250
11865
|
return `${name} eq '${value}'`;
|
|
11251
11866
|
else if (type == FieldType.String)
|
|
@@ -11282,11 +11897,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11282
11897
|
if (typeof value == "number")
|
|
11283
11898
|
return `${name} eq ${value}`;
|
|
11284
11899
|
else if (type == FieldType.Date)
|
|
11285
|
-
return `${name} eq '${moment$
|
|
11900
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11286
11901
|
else if (type == FieldType.Time)
|
|
11287
|
-
return `${name} eq '${moment$
|
|
11902
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11288
11903
|
else if (type == FieldType.DateTime)
|
|
11289
|
-
return `${name} eq '${moment$
|
|
11904
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11290
11905
|
else if (type == FieldType.String)
|
|
11291
11906
|
return `containing(lower(${name}), lower('${value.replace(/'/g, "\\'")}'))`;
|
|
11292
11907
|
else
|
|
@@ -11321,11 +11936,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11321
11936
|
if (typeof value == "number")
|
|
11322
11937
|
return `${name} eq ${value}`;
|
|
11323
11938
|
else if (type == FieldType.Date)
|
|
11324
|
-
return `${name} eq '${moment$
|
|
11939
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11325
11940
|
else if (type == FieldType.Time)
|
|
11326
|
-
return `${name} eq '${moment$
|
|
11941
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11327
11942
|
else if (type == FieldType.DateTime)
|
|
11328
|
-
return `${name} eq '${moment$
|
|
11943
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11329
11944
|
else if (type == FieldType.Enum)
|
|
11330
11945
|
return `${name} eq '${value}'`;
|
|
11331
11946
|
else if (type == FieldType.String)
|
|
@@ -11410,11 +12025,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11410
12025
|
if (typeof value == "number")
|
|
11411
12026
|
return `${name} eq ${value}`;
|
|
11412
12027
|
else if (type == FieldType.Date)
|
|
11413
|
-
return `${name} eq '${moment$
|
|
12028
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11414
12029
|
else if (type == FieldType.Time)
|
|
11415
|
-
return `${name} eq '${moment$
|
|
12030
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11416
12031
|
else if (type == FieldType.DateTime)
|
|
11417
|
-
return `${name} eq '${moment$
|
|
12032
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11418
12033
|
else if (type == FieldType.String)
|
|
11419
12034
|
return `containing(lower(${name}), lower('${value.replace(/'/g, "\\'")}'))`;
|
|
11420
12035
|
else
|
|
@@ -11447,11 +12062,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11447
12062
|
if (typeof value == "number")
|
|
11448
12063
|
return `${name} eq ${value}`;
|
|
11449
12064
|
else if (type == FieldType.Date)
|
|
11450
|
-
return `${name} eq '${moment$
|
|
12065
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11451
12066
|
else if (type == FieldType.Time)
|
|
11452
|
-
return `${name} eq '${moment$
|
|
12067
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11453
12068
|
else if (type == FieldType.DateTime)
|
|
11454
|
-
return `${name} eq '${moment$
|
|
12069
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11455
12070
|
else if (type == FieldType.Enum)
|
|
11456
12071
|
return `${name} eq '${value}'`;
|
|
11457
12072
|
else if (type == FieldType.String)
|
|
@@ -11494,11 +12109,11 @@ let RecebimentoFormComponent = class RecebimentoFormComponent {
|
|
|
11494
12109
|
if (typeof value == "number")
|
|
11495
12110
|
return `${name} eq ${value}`;
|
|
11496
12111
|
else if (type == FieldType.Date)
|
|
11497
|
-
return `${name} eq '${moment$
|
|
12112
|
+
return `${name} eq '${moment$u(value).format("YYYY-MM-DD")}'`;
|
|
11498
12113
|
else if (type == FieldType.Time)
|
|
11499
|
-
return `${name} eq '${moment$
|
|
12114
|
+
return `${name} eq '${moment$u(value).format("HH:mm:ss")}'`;
|
|
11500
12115
|
else if (type == FieldType.DateTime)
|
|
11501
|
-
return `${name} eq '${moment$
|
|
12116
|
+
return `${name} eq '${moment$u(value).format()}'`;
|
|
11502
12117
|
else if (type == FieldType.Enum)
|
|
11503
12118
|
return `${name} eq '${value}'`;
|
|
11504
12119
|
else if (type == FieldType.String)
|
|
@@ -12206,7 +12821,7 @@ __decorate([
|
|
|
12206
12821
|
RecebimentoFormComponent = __decorate([
|
|
12207
12822
|
Component({
|
|
12208
12823
|
selector: 'recebimento-form',
|
|
12209
|
-
template: "<p-confirmDialog [acceptLabel]=\"'yes' | translate\" acceptIcon=\"\" [rejectLabel]=\"'no' | translate\" rejectIcon=\"\"></p-confirmDialog>\n<div *sLoadingState=\"loading\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"chaveNotaFiscal\">{{\"yms.erp.recebimento_chave_nota_fiscal\" | translate}}</label>\n <input [class.ng-invalid]=\"erroChaveNota\" [(ngModel)]=\"chaveNotaFiscal\" [ngModelOptions]=\"{ standalone: true }\" type=\"text\" id=\"chaveNotaFiscal\" name=\"chaveNotaFiscal\" pInputText autocomplete=\"off\" (blur)=\"onBlurChaveNotaFiscal()\"/>\n <span class=\"nota-error\" *ngIf=\"erroChaveNota\">{{'yms.erp.produto_nota_error_detail' | translate}}</span>\n </div>\n </div>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <div [attr.data-hidden]=\"true\" class=\"ui-g-12 ui-md-6\">\n <label for=\"id\">{{\"yms.erp.recebimento_id\" | translate}}</label>\n <input #idFormInput type=\"text\" id=\"id\" name=\"id\" pInputText formControlName=\"id\" autocomplete=\"off\" />\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"filial\">{{\"yms.erp.filial\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"filial\" name=\"filial\" formControlName=\"filial\"\n [searchFields]=\"filialSearchFields\" [searchGridFields]=\"filialSearchGridFields\"\n [searchGridData]=\"filialSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"filialLookupSuggestions\"\n (onLookupRequest)=\"onFilialLookupRequest($event)\"\n (onSearchRequest)=\"onFilialSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"filialSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.filial_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: filialSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['filial']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"produto\">{{\"yms.erp.recebimento_produto\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"produto\" name=\"produto\" formControlName=\"produto\"\n [searchFields]=\"produtoSearchFields\" [searchGridFields]=\"produtoSearchGridFields\"\n [searchGridData]=\"produtoSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"produtoLookupSuggestions\"\n (onLookupRequest)=\"onProdutoLookupRequest($event)\"\n (onSearchRequest)=\"onProdutoSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=produtoSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_produto_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: produtoSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['produto']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"derivacao\">{{\"yms.erp.recebimento_derivacao\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"derivacao\" name=\"derivacao\" formControlName=\"derivacao\"\n [searchFields]=\"derivacaoSearchFields\" [searchGridFields]=\"derivacaoSearchGridFields\"\n [searchGridData]=\"derivacaoSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"derivacaoLookupSuggestions\"\n (onLookupRequest)=\"onDerivacaoLookupRequest($event)\"\n (onSearchRequest)=\"onDerivacaoSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=derivacaoSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_derivacao_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: derivacaoSearchTotalRecords}\">\n </s-lookup>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"transportadora\">{{\"yms.erp.recebimento_transportadora\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transportadora\" name=\"transportadora\" formControlName=\"transportadora\"\n [searchFields]=\"transportadoraSearchFields\" [searchGridFields]=\"transportadoraSearchGridFields\"\n [searchGridData]=\"transportadoraSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transportadoraLookupSuggestions\"\n (onLookupRequest)=\"onTransportadoraLookupRequest($event)\"\n (onSearchRequest)=\"onTransportadoraSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transportadoraSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.transportadora_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transportadoraSearchTotalRecords}\">\n </s-lookup>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"transgenia\">{{\"yms.erp.recebimento_transgenia\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transgenia\" name=\"transgenia\"\n formControlName=\"transgenia\" [searchFields]=\"transgeniaSearchFields\"\n [searchGridFields]=\"transgeniaSearchGridFields\"\n [searchGridData]=\"transgeniaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transgeniaLookupSuggestions\"\n (onLookupRequest)=\"onTransgeniaLookupRequest($event)\"\n (onSearchRequest)=\"onTransgeniaSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transgeniaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.recebimento_transgenia_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transgeniaSearchTotalRecords}\">\n </s-lookup>\n </div>\n\n <div class=\"ui-md-12\">\n <s-button styleClass=\"btn-erp-forms\" *ngIf=\"showButtons() && !!formGroup.get('filial').value && !createdByErp\"\n iconClass=\"fas fa-plus\" label=\"Adicionar fornecedor\" priority=\"secondary\" (onClick)=\"addFornecedor()\"\n [disabled]=\"disableButtonSave || !permissions.editar\"></s-button>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedores\">{{'Selecione ao menos um fornecedor para continuar' | translate}}</span>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedoresNotaDuplicada\">{{ erroFornecedoresNotaDuplicada }}</span>\n </div>\n\n <form class=\"ui-g-12\" *ngFor=\"let fornecedorForm of getFornecedoresForm().controls; let i = index;\" [formGroup]=\"fornecedorForm\">\n <p-panel [style]=\"{position: 'relative'}\" styleClass=\"form-group ui-g-12 ui-md-12\" [toggleable]=\"true\" >\n\n <p-header>\n Fornecedor {{+i+1}}\n <s-button \n style=\"display: inline-block; position: absolute; right: 50px; top: 10px\" \n *ngIf=\"showButtons() && !createdByErp\"\n iconClass=\"fas fa-trash\"\n label=\"Remover\"\n priority=\"default\"\n [auxiliary]=\"true\"\n (onClick)=\"removeFornecedor(fornecedorForm)\"\n >\n </s-button>\n </p-header>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"fornecedor\">{{\"yms.erp.recebimento_fornecedor\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"fornecedor\" name=\"fornecedor\" formControlName=\"fornecedor\"\n [searchFields]=\"fornecedorSearchFields\" [searchGridFields]=\"fornecedorSearchGridFields\"\n [searchGridData]=\"fornecedorSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"fornecedorLookupSuggestions\"\n (onLookupRequest)=\"onFornecedorLookupRequest($event)\"\n (onSearchRequest)=\"onFornecedorSearchRequest($event)\" \n lookupDisplayField=\"label\"\n [searchTotalRecords]=fornecedorSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_fornecedor_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: fornecedorSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"fornecedorForm.get('fornecedor')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"origemMercadoria\">{{\"yms.erp.recebimento_origem_mercadoria\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"origemMercadoria\" name=\"origemMercadoria\"\n formControlName=\"origemMercadoria\" [searchFields]=\"origemMercadoriaSearchFields\"\n [searchGridFields]=\"origemMercadoriaSearchGridFields\"\n [searchGridData]=\"origemMercadoriaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"origemMercadoriaLookupSuggestions\"\n (onLookupRequest)=\"onOrigemMercadoriaLookupRequest($event, fornecedorForm)\"\n (onSearchRequest)=\"onOrigemMercadoriaSearchRequest($event, fornecedorForm)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"origemMercadoriaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.recebimento_pessoa_endereco_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: origemMercadoriaSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"fornecedorForm.get('origemMercadoria')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n\n <div class=\"ui-g-12\">\n <label for=\"fornecedorNotas\">Notas a serem adicionadas</label>\n <s-token-list id=\"fornecedorNotas\" [tokens]=\"fornecedorNotasTokens\" (tokenSelected)=\"addFornecedorNotasTokenEmContrato(fornecedorForm, $event)\" (tokenRemoved)=\"removeFornecedorNotasTokenDoContrato($event)\" [removableTokens]=\"true\"></s-token-list>\n </div>\n\n <div class=\"ui-g-12\">\n <s-button label=\"Adicionar nota\" *ngIf=\"showButtons()\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addNota(fornecedorForm)\" [disabled]=\"disableAdicionarNota()\"></s-button>\n <s-button label=\"Adicionar contrato\" *ngIf=\"showButtons() && !createdByErp\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addContrato(fornecedorForm)\"></s-button>\n </div>\n\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"tipoNotaFiscal\">{{\"yms.erp.recebimento_tipo_nota_fiscal\" | translate}}</label>\n <p-dropdown inputId=\"tipoNotaFiscal\" name=\"tipoNotaFiscal\" [options]=\"tiposNota\" formControlName=\"tipoNotaFiscal\">\n </p-dropdown>\n </div>\n\n <div class=\"ui-g-12\">\n <h4>Contratos</h4>\n <p-table [value]=\"getContratos(fornecedorForm).controls\" [(selection)]=\"contratoSelecionado\">\n <ng-template pTemplate=\"body\" let-rowData>\n <tr [pSelectableRow]=\"rowData\">\n <td style=\"width: 50px\">\n <p-tableRadioButton [value]=\"rowData.get('contrato').value\"></p-tableRadioButton>\n </td>\n <td>\n <p-accordion>\n <p-accordionTab>\n <p-header>\n Contrato {{rowData.get('contrato').value.numero}}, Filial {{rowData.get('contrato').value.filial?.codigo}}\n\n <span *ngIf=\"showButtons() && !createdByErp\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerContrato(fornecedorForm, rowData)\"></span>\n </p-header>\n \n <div class=\"detail-pane\" *ngFor=\"let item of getItensContrato(rowData).controls\">\n <div class=\"detail-span\">\n <span class=\"title\">Sequ\u00EAncia</span>\n <span class=\"data\">{{item.value?.item.sequencia}}</span>\n </div>\n </div>\n \n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">Notas</span>\n <span class=\"data\">\n <p-accordion>\n <p-accordionTab *ngFor=\"let nota of getNotas(rowData).controls\">\n <p-header>\n {{nota.get('chaveNotaFiscal').value || (nota.get('serieNotaFiscal').value + ' - ' + nota.get('numeroNotaFiscal').value)}}\n\n <span *ngIf=\"showButtons()\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerNota(fornecedorForm, rowData, nota)\"></span>\n </p-header>\n \n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie legal nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieLegalNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">N\u00FAmero nota fiscal</span>\n <span class=\"data\">{{nota.value?.numeroNotaFiscal}}</span>\n </div>\n </div>\n \n </p-accordionTab> \n </p-accordion>\n </span>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n </p-panel>\n\n <div class=\"ui-g-12\" style=\"text-align: right;\" *ngIf=\"totalEixosContratados || totalEixosComposicao\">\n <label for=\"totalEixosContratados\" float=\"right\" style=\"display: inline;\">{{totalEixosContratados}} {{'yms.erp.total_eixos_contratados' | translate}} / </label>\n <label for=\"totalEixosComposicao\" float=\"right\" style=\"display: inline;\">{{totalEixosComposicao}} {{'yms.erp.total_eixos_composicao' | translate}}</label>\n </div>\n </form>\n\n </div>\n </div>\n </form>\n\n <div style=\"margin: 5px 0 5px 0;\">\n <s-button *ngIf=\"showButtons()\" priority=\"primary\" [label]=\"'save' | translate\" (onClick)=\"onSave()\"\n [disabled]=\"disableButtonSave || !allPermissions.agenda.editar\"></s-button>\n <s-button *ngIf=\"saveAndInitButton && showButtons()\" priority=\"primary\" [label]=\"'save_and_init' | translate\"\n (onClick)=\"onSave(true)\" [disabled]=\"disableButtonSave || !allPermissions.agenda.editar\"></s-button>\n </div>\n</div>",
|
|
12824
|
+
template: "<p-confirmDialog [acceptLabel]=\"'yes' | translate\" acceptIcon=\"\" [rejectLabel]=\"'no' | translate\" rejectIcon=\"\"></p-confirmDialog>\n<div *sLoadingState=\"loading\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"chaveNotaFiscal\">{{\"yms.erp.recebimento_chave_nota_fiscal\" | translate}}</label>\n <input\n id=\"chaveNotaFiscal\"\n trim\n [class.ng-invalid]=\"erroChaveNota\"\n [(ngModel)]=\"chaveNotaFiscal\"\n [ngModelOptions]=\"{ standalone: true }\"\n type=\"text\"\n name=\"chaveNotaFiscal\"\n pInputText\n autocomplete=\"off\"\n (blur)=\"onBlurChaveNotaFiscal()\"\n />\n <span class=\"nota-error\" *ngIf=\"erroChaveNota\">{{'yms.erp.produto_nota_error_detail' | translate}}</span>\n </div>\n </div>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <div [attr.data-hidden]=\"true\" class=\"ui-g-12 ui-md-6\">\n <label for=\"id\">{{\"yms.erp.recebimento_id\" | translate}}</label>\n <input #idFormInput type=\"text\" id=\"id\" name=\"id\" pInputText formControlName=\"id\" autocomplete=\"off\" />\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"filial\">{{\"yms.erp.filial\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"filial\" name=\"filial\" formControlName=\"filial\"\n [searchFields]=\"filialSearchFields\" [searchGridFields]=\"filialSearchGridFields\"\n [searchGridData]=\"filialSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"filialLookupSuggestions\"\n (onLookupRequest)=\"onFilialLookupRequest($event)\"\n (onSearchRequest)=\"onFilialSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"filialSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.filial_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: filialSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['filial']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"produto\">{{\"yms.erp.recebimento_produto\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"produto\" name=\"produto\" formControlName=\"produto\"\n [searchFields]=\"produtoSearchFields\" [searchGridFields]=\"produtoSearchGridFields\"\n [searchGridData]=\"produtoSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"produtoLookupSuggestions\"\n (onLookupRequest)=\"onProdutoLookupRequest($event)\"\n (onSearchRequest)=\"onProdutoSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=produtoSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_produto_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: produtoSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"formGroup.controls['produto']\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"derivacao\">{{\"yms.erp.recebimento_derivacao\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"derivacao\" name=\"derivacao\" formControlName=\"derivacao\"\n [searchFields]=\"derivacaoSearchFields\" [searchGridFields]=\"derivacaoSearchGridFields\"\n [searchGridData]=\"derivacaoSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"derivacaoLookupSuggestions\"\n (onLookupRequest)=\"onDerivacaoLookupRequest($event)\"\n (onSearchRequest)=\"onDerivacaoSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=derivacaoSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_derivacao_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: derivacaoSearchTotalRecords}\">\n </s-lookup>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"transportadora\">{{\"yms.erp.recebimento_transportadora\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transportadora\" name=\"transportadora\" formControlName=\"transportadora\"\n [searchFields]=\"transportadoraSearchFields\" [searchGridFields]=\"transportadoraSearchGridFields\"\n [searchGridData]=\"transportadoraSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transportadoraLookupSuggestions\"\n (onLookupRequest)=\"onTransportadoraLookupRequest($event)\"\n (onSearchRequest)=\"onTransportadoraSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transportadoraSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.transportadora_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transportadoraSearchTotalRecords}\">\n </s-lookup>\n </div>\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"transgenia\">{{\"yms.erp.recebimento_transgenia\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"transgenia\" name=\"transgenia\"\n formControlName=\"transgenia\" [searchFields]=\"transgeniaSearchFields\"\n [searchGridFields]=\"transgeniaSearchGridFields\"\n [searchGridData]=\"transgeniaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"transgeniaLookupSuggestions\"\n (onLookupRequest)=\"onTransgeniaLookupRequest($event)\"\n (onSearchRequest)=\"onTransgeniaSearchRequest($event)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"transgeniaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.recebimento_transgenia_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: transgeniaSearchTotalRecords}\">\n </s-lookup>\n </div>\n\n <div class=\"ui-md-12\">\n <s-button styleClass=\"btn-erp-forms\" *ngIf=\"showButtons() && !!formGroup.get('filial').value && !createdByErp\"\n iconClass=\"fas fa-plus\" label=\"Adicionar fornecedor\" priority=\"secondary\" (onClick)=\"addFornecedor()\"\n [disabled]=\"disableButtonSave || !permissions.editar\"></s-button>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedores\">{{'Selecione ao menos um fornecedor para continuar' | translate}}</span>\n <span style=\"display: block;\" class=\"input-error\" *ngIf=\"erroFornecedoresNotaDuplicada\">{{ erroFornecedoresNotaDuplicada }}</span>\n </div>\n\n <form class=\"ui-g-12\" *ngFor=\"let fornecedorForm of getFornecedoresForm().controls; let i = index;\" [formGroup]=\"fornecedorForm\">\n <p-panel [style]=\"{position: 'relative'}\" styleClass=\"form-group ui-g-12 ui-md-12\" [toggleable]=\"true\" >\n\n <p-header>\n Fornecedor {{+i+1}}\n <s-button \n style=\"display: inline-block; position: absolute; right: 50px; top: 10px\" \n *ngIf=\"showButtons() && !createdByErp\"\n iconClass=\"fas fa-trash\"\n label=\"Remover\"\n priority=\"default\"\n [auxiliary]=\"true\"\n (onClick)=\"removeFornecedor(fornecedorForm)\"\n >\n </s-button>\n </p-header>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"fornecedor\">{{\"yms.erp.recebimento_fornecedor\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"fornecedor\" name=\"fornecedor\" formControlName=\"fornecedor\"\n [searchFields]=\"fornecedorSearchFields\" [searchGridFields]=\"fornecedorSearchGridFields\"\n [searchGridData]=\"fornecedorSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"fornecedorLookupSuggestions\"\n (onLookupRequest)=\"onFornecedorLookupRequest($event)\"\n (onSearchRequest)=\"onFornecedorSearchRequest($event)\" \n lookupDisplayField=\"label\"\n [searchTotalRecords]=fornecedorSearchTotalRecords\n [searchTitle]=\"'yms.erp.recebimento_fornecedor_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: fornecedorSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"fornecedorForm.get('fornecedor')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n <div class=\"ui-g-12 ui-md-6 required\">\n <label for=\"origemMercadoria\">{{\"yms.erp.recebimento_origem_mercadoria\" | translate}}</label>\n <s-lookup dataKey=\"id\" id=\"origemMercadoria\" name=\"origemMercadoria\"\n formControlName=\"origemMercadoria\" [searchFields]=\"origemMercadoriaSearchFields\"\n [searchGridFields]=\"origemMercadoriaSearchGridFields\"\n [searchGridData]=\"origemMercadoriaSearchGridData\" [multiple]=\"false\"\n [lookupSuggestions]=\"origemMercadoriaLookupSuggestions\"\n (onLookupRequest)=\"onOrigemMercadoriaLookupRequest($event, fornecedorForm)\"\n (onSearchRequest)=\"onOrigemMercadoriaSearchRequest($event, fornecedorForm)\" lookupDisplayField=\"label\"\n [searchTotalRecords]=\"origemMercadoriaSearchTotalRecords\"\n [searchTitle]=\"'yms.erp.recebimento_pessoa_endereco_search_title' | translate\"\n [searchEmptyTitle]=\"'yms.erp.nothing_found' | translate\"\n [filterLabel]=\"'yms.erp.filter' | translate\" [clearLabel]=\"'yms.erp.clear' | translate\"\n [cancelLabel]=\"'yms.erp.cancel' | translate\" [selectLabel]=\"'yms.erp.select' | translate\"\n [searchTotalRecordsLabel]=\"'yms.erp.total_records' | translate: {value: origemMercadoriaSearchTotalRecords}\">\n </s-lookup>\n <s-control-errors [control]=\"fornecedorForm.get('origemMercadoria')\"\n [errorMessages]=\"{ required: 'yms.erp.error_required' | translate }\"></s-control-errors>\n </div>\n\n <div class=\"ui-g-12\">\n <label for=\"fornecedorNotas\">Notas a serem adicionadas</label>\n <s-token-list id=\"fornecedorNotas\" [tokens]=\"fornecedorNotasTokens\" (tokenSelected)=\"addFornecedorNotasTokenEmContrato(fornecedorForm, $event)\" (tokenRemoved)=\"removeFornecedorNotasTokenDoContrato($event)\" [removableTokens]=\"true\"></s-token-list>\n </div>\n\n <div class=\"ui-g-12\">\n <s-button label=\"Adicionar nota\" *ngIf=\"showButtons()\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addNota(fornecedorForm)\" [disabled]=\"disableAdicionarNota()\"></s-button>\n <s-button label=\"Adicionar contrato\" *ngIf=\"showButtons() && !createdByErp\" styleClass=\"btn-erp-forms\" priority=\"secondary\" (onClick)=\"addContrato(fornecedorForm)\"></s-button>\n </div>\n\n <div class=\"ui-g-12 ui-md-6\">\n <label for=\"tipoNotaFiscal\">{{\"yms.erp.recebimento_tipo_nota_fiscal\" | translate}}</label>\n <p-dropdown inputId=\"tipoNotaFiscal\" name=\"tipoNotaFiscal\" [options]=\"tiposNota\" formControlName=\"tipoNotaFiscal\">\n </p-dropdown>\n </div>\n\n <div class=\"ui-g-12\">\n <h4>Contratos</h4>\n <p-table [value]=\"getContratos(fornecedorForm).controls\" [(selection)]=\"contratoSelecionado\">\n <ng-template pTemplate=\"body\" let-rowData>\n <tr [pSelectableRow]=\"rowData\">\n <td style=\"width: 50px\">\n <p-tableRadioButton [value]=\"rowData.get('contrato').value\"></p-tableRadioButton>\n </td>\n <td>\n <p-accordion>\n <p-accordionTab>\n <p-header>\n Contrato {{rowData.get('contrato').value.numero}}, Filial {{rowData.get('contrato').value.filial?.codigo}}\n\n <span *ngIf=\"showButtons() && !createdByErp\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerContrato(fornecedorForm, rowData)\"></span>\n </p-header>\n \n <div class=\"detail-pane\" *ngFor=\"let item of getItensContrato(rowData).controls\">\n <div class=\"detail-span\">\n <span class=\"title\">Sequ\u00EAncia</span>\n <span class=\"data\">{{item.value?.item.sequencia}}</span>\n </div>\n </div>\n \n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">Notas</span>\n <span class=\"data\">\n <p-accordion>\n <p-accordionTab *ngFor=\"let nota of getNotas(rowData).controls\">\n <p-header>\n {{nota.get('chaveNotaFiscal').value || (nota.get('serieNotaFiscal').value + ' - ' + nota.get('numeroNotaFiscal').value)}}\n\n <span *ngIf=\"showButtons()\" style=\"margin-left: 10px; float: right;\" class=\"fas fa-trash\" (click)=\"removerNota(fornecedorForm, rowData, nota)\"></span>\n </p-header>\n \n <div class=\"detail-pane\">\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">S\u00E9rie legal nota fiscal</span>\n <span class=\"data\">{{nota.value?.serieLegalNotaFiscal}}</span>\n </div>\n <div class=\"detail-span\">\n <span class=\"title\">N\u00FAmero nota fiscal</span>\n <span class=\"data\">{{nota.value?.numeroNotaFiscal}}</span>\n </div>\n </div>\n \n </p-accordionTab> \n </p-accordion>\n </span>\n </div>\n </div>\n </p-accordionTab>\n </p-accordion>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </div>\n\n </p-panel>\n\n <div class=\"ui-g-12\" style=\"text-align: right;\" *ngIf=\"totalEixosContratados || totalEixosComposicao\">\n <label for=\"totalEixosContratados\" float=\"right\" style=\"display: inline;\">{{totalEixosContratados}} {{'yms.erp.total_eixos_contratados' | translate}} / </label>\n <label for=\"totalEixosComposicao\" float=\"right\" style=\"display: inline;\">{{totalEixosComposicao}} {{'yms.erp.total_eixos_composicao' | translate}}</label>\n </div>\n </form>\n\n </div>\n </div>\n </form>\n\n <div style=\"margin: 5px 0 5px 0;\">\n <s-button *ngIf=\"showButtons()\" priority=\"primary\" [label]=\"'save' | translate\" (onClick)=\"onSave()\"\n [disabled]=\"disableButtonSave || !allPermissions.agenda.editar\"></s-button>\n <s-button *ngIf=\"saveAndInitButton && showButtons()\" priority=\"primary\" [label]=\"'save_and_init' | translate\"\n (onClick)=\"onSave(true)\" [disabled]=\"disableButtonSave || !allPermissions.agenda.editar\"></s-button>\n </div>\n</div>",
|
|
12210
12825
|
providers: [
|
|
12211
12826
|
ConfirmationService,
|
|
12212
12827
|
],
|
|
@@ -12233,7 +12848,7 @@ RecebimentoFormComponent = __decorate([
|
|
|
12233
12848
|
NotaValidatorService,
|
|
12234
12849
|
TransgeniaService,
|
|
12235
12850
|
DialogService,
|
|
12236
|
-
AgendaService,
|
|
12851
|
+
AgendaService$1,
|
|
12237
12852
|
ErpProcessService,
|
|
12238
12853
|
ErpFormConfigService,
|
|
12239
12854
|
VerificaNotafiscal,
|
|
@@ -12425,6 +13040,7 @@ ErpSeniorModule = __decorate([
|
|
|
12425
13040
|
languages: highlightLanguages
|
|
12426
13041
|
}),
|
|
12427
13042
|
HotkeyModule.forRoot(),
|
|
13043
|
+
DirectivesModule
|
|
12428
13044
|
],
|
|
12429
13045
|
providers: [
|
|
12430
13046
|
FieldCustomizationService,
|
|
@@ -12464,5 +13080,5 @@ DockModule = __decorate([
|
|
|
12464
13080
|
})
|
|
12465
13081
|
], DockModule);
|
|
12466
13082
|
|
|
12467
|
-
export { AgendaModule, AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, ERP_ENVIRONMENT, ERP_SENIOR_HEADER, EmpresaModule, EmpresaService, ErpFormConfigService, ErpProcessData, ErpProcessService, ErpSeniorModule, EstadoModule, EstadoService, ExpedicaoChegadaVeiculoOverride, ExpedicaoModule, ExpedicaoService, FamiliaProdutoModule, FamiliaProdutoService, FieldCustomizationService, FilialModule, FilialService, FormComponent, FormDescritor, FormSamComponent, FormSamDescritor, HasChangeService, InfoComponent, InfoDescritor, IntegrationWebSocket, LogsModule, LogsService, LprModule, LprService, PaisModule, PaisService, PedidoVendaItemModule, PedidoVendaItemService, PedidoVendaModule, PedidoVendaService, PessoaEnderecoModule, PessoaEnderecoService, PessoaFisicaModule, PessoaFisicaService, PessoaJuridicaModule, PessoaJuridicaService, PessoaModule, PessoaService, PortariasComponent, PortariasDescritor, PortariasModule, ProdutoModule, ProdutoService, RecebimentoChegadaVeiculoOverride, RecebimentoContratoModule, RecebimentoContratoService, RoyaltyModule, RoyaltyService, SAM_SENIOR_HEADER, SafraModule, SafraService, SamSeniorModule, SnapshotComponent, SnapshotDescritor, TransportadoraModule, TransportadoraService, UnidadeMedidaModule, UnidadeMedidaService, VisitorListComponent, VisitorListModule, VisitorListService, VisualizarBalancaComponent, VisualizarBalancaDescritor, highlightLanguages, Service as ɵa, CustomStompConfig as ɵb,
|
|
13083
|
+
export { AgendaModule, AgendaService$1 as AgendaService, BalancaModule, BalancasService, CamerasModule, CamerasService, CancelasModule, CidadeModule, CidadeService, ContratoCompraItemModule, ContratoCompraItemService, ContratoCompraModule, ContratoCompraService, ControladorCancelaComponent, ControladorCancelaDescritor, ControladorCancelasService, CoreModule, DockModule, DockService, ERP_ENVIRONMENT, ERP_SENIOR_HEADER, EmpresaModule, EmpresaService, ErpFormConfigService, ErpProcessData, ErpProcessService, ErpSeniorModule, EstadoModule, EstadoService, ExpedicaoChegadaVeiculoOverride, ExpedicaoModule, ExpedicaoService, FamiliaProdutoModule, FamiliaProdutoService, FieldCustomizationService, FilialModule, FilialService, FormComponent, FormDescritor, FormSamComponent, FormSamDescritor, FormWmsComponent, FormWmsDescritor, HasChangeService, INFORMACAOES_ADICIONAIS_HEADER, InfoComponent, InfoDescritor, IntegrationWebSocket, LogsModule, LogsService, LprModule, LprService, PaisModule, PaisService, PedidoVendaItemModule, PedidoVendaItemService, PedidoVendaModule, PedidoVendaService, PessoaEnderecoModule, PessoaEnderecoService, PessoaFisicaModule, PessoaFisicaService, PessoaJuridicaModule, PessoaJuridicaService, PessoaModule, PessoaService, PortariasComponent, PortariasDescritor, PortariasModule, ProdutoModule, ProdutoService, RecebimentoChegadaVeiculoOverride, RecebimentoContratoModule, RecebimentoContratoService, RoyaltyModule, RoyaltyService, SAM_SENIOR_HEADER, SafraModule, SafraService, SamSeniorModule, SnapshotComponent, SnapshotDescritor, TransportadoraModule, TransportadoraService, UnidadeMedidaModule, UnidadeMedidaService, VisitorListComponent, VisitorListModule, VisitorListService, VisualizarBalancaComponent, VisualizarBalancaDescritor, WmsModule, highlightLanguages, Service as ɵa, CustomStompConfig as ɵb, EntityService$2 as ɵba, EntityService$1 as ɵbb, InsertKeyModule as ɵbc, InsertKeyComponent as ɵbd, IntegrationService as ɵbe, RecebimentoFormComponent as ɵbf, DerivacaoService as ɵbg, NotaValidatorService as ɵbh, TransgeniaService as ɵbi, VerificaNotafiscal as ɵbj, BuildFormField as ɵbk, ExpedicaoFormComponent as ɵbl, ExpedicaoInfoComponent as ɵbm, RecebimentoInfoComponent as ɵbn, DevolucaoFormComponent as ɵbo, DevolucaoService as ɵbp, DevolucaoChegadaVeiculoOverride as ɵbq, RecebimentoOrdemCompraFormComponent as ɵbr, OrdemCompraService as ɵbs, RecebimentoOrdemCompraService as ɵbt, RecebimentoOrdemCompraChegadaVeiculoOverride as ɵbu, RecebimentoOrdemCompraInfoComponent as ɵbv, DevolucaoInfoComponent as ɵbw, ContratoFormComponent as ɵbx, OrdemCompraFormComponent as ɵby, ProcessoAvulsoFormComponent as ɵbz, ViewImageComponent as ɵc, ProcessoAvulsoService as ɵca, ProcessoAvulsoChegadaVeiculoOverride as ɵcb, ProcessoAvulsoInfoComponent as ɵcc, LogIntegracaoDescritor as ɵcd, LogIntegracaoComponent as ɵce, LogIntegracaoService as ɵcf, DerivacaoModule as ɵcg, DevolucaoModule as ɵch, OrdemCompraModule as ɵci, RecebimentoOrdemCompraModule as ɵcj, TransgeniaModule as ɵck, ProcessoAvulsoModule as ɵcl, LogIntegracaoModule as ɵcm, NotaFormModule as ɵcn, DirectivesModule as ɵco, TrimDirective as ɵcp, NotaFormComponent as ɵcq, LogDescritor as ɵd, LogsComponent as ɵe, PortariasService as ɵf, EntradaComponent as ɵg, AgendasComponent as ɵh, ConfirmacaoComponent as ɵi, VisitedInfoDescritor as ɵj, VisitedInfoComponent as ɵk, VisitedInfoService as ɵl, SchedulingComponent as ɵm, LobbyService as ɵn, EntityService as ɵo, SchedulingService as ɵp, VisitanteComponent as ɵq, VisitanteFormComponent as ɵr, CredencialFormComponent as ɵs, FocusService as ɵt, DocumentGridModule as ɵu, DocumentGridComponent as ɵv, DocumentService as ɵw, RegisterDocumentModule as ɵx, RegisterDocumentComponent as ɵy, AgendaService as ɵz };
|
|
12468
13084
|
//# sourceMappingURL=seniorsistemas-yms-integration.js.map
|