@seniorsistemas/yms-integration 1.31.1-f472999f-36a6-412f-af44-e2024a57be58 → 1.32.0-7a92407d-4195-45d3-80d8-96605c56a35a
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 +108 -22
- 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/src/erp-senior/recebimento/form/recebimento-form.component.js +1 -1
- package/esm2015/src/wms/components/document-grid/document-grid.component.js +45 -14
- package/esm2015/src/wms/components/document-grid/document-grid.module.js +6 -3
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +38 -3
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +16 -7
- package/esm2015/src/wms/components/document-grid/register-document/register-document.module.js +4 -3
- package/esm2015/src/wms/entities/document/document-dto.js +1 -1
- package/esm2015/src/wms/entities/document/document.js +2 -1
- package/esm2015/src/wms/entities/invoice-condition/invoice-condition.js +8 -0
- package/esm5/src/erp-senior/recebimento/form/recebimento-form.component.js +1 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +45 -14
- package/esm5/src/wms/components/document-grid/document-grid.module.js +6 -3
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +39 -3
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +16 -7
- package/esm5/src/wms/components/document-grid/register-document/register-document.module.js +4 -3
- package/esm5/src/wms/entities/document/document-dto.js +1 -1
- package/esm5/src/wms/entities/document/document.js +2 -1
- package/esm5/src/wms/entities/invoice-condition/invoice-condition.js +8 -0
- package/fesm2015/seniorsistemas-yms-integration.js +107 -22
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +108 -22
- package/fesm5/seniorsistemas-yms-integration.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-yms-integration.metadata.json +1 -1
- package/src/wms/components/document-grid/document-grid.component.d.ts +9 -0
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +4 -0
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +8 -3
- package/src/wms/entities/document/document-dto.d.ts +1 -0
- package/src/wms/entities/document/document.d.ts +2 -0
- package/src/wms/entities/invoice-condition/invoice-condition.d.ts +6 -0
|
@@ -3347,6 +3347,14 @@
|
|
|
3347
3347
|
ProcessType["RECEBIMENTO_WMS"] = "RECEBIMENTO_WMS";
|
|
3348
3348
|
})(ProcessType || (ProcessType = {}));
|
|
3349
3349
|
|
|
3350
|
+
var InvoiceCondition;
|
|
3351
|
+
(function (InvoiceCondition) {
|
|
3352
|
+
InvoiceCondition["AUTHORIZED"] = "AUTHORIZED";
|
|
3353
|
+
InvoiceCondition["PARTIAL_AUTHORIZED"] = "PARTIAL_AUTHORIZED";
|
|
3354
|
+
InvoiceCondition["MANUAL_AUTHORIZED"] = "MANUAL_AUTHORIZED";
|
|
3355
|
+
InvoiceCondition["DEVOLUTION"] = "DEVOLUTION";
|
|
3356
|
+
})(InvoiceCondition || (InvoiceCondition = {}));
|
|
3357
|
+
|
|
3350
3358
|
var DocumentGridComponent = /** @class */ (function () {
|
|
3351
3359
|
function DocumentGridComponent(translate, documentService, confirmationService, integrationService, agendaService, utils) {
|
|
3352
3360
|
this.translate = translate;
|
|
@@ -3358,7 +3366,15 @@
|
|
|
3358
3366
|
this.viewDocument = new core.EventEmitter();
|
|
3359
3367
|
this.gridData = [];
|
|
3360
3368
|
this.enableButtonIsClienteExterno = true;
|
|
3369
|
+
this.summary = "yms.int.wms_saved_document_message_title";
|
|
3361
3370
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
3371
|
+
this.invoiceCondition = [
|
|
3372
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3373
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3374
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3375
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3376
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolucion"), value: InvoiceCondition.AUTHORIZED },
|
|
3377
|
+
];
|
|
3362
3378
|
this.selection = [];
|
|
3363
3379
|
}
|
|
3364
3380
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
@@ -3395,7 +3411,7 @@
|
|
|
3395
3411
|
}
|
|
3396
3412
|
this.gridData.push(document);
|
|
3397
3413
|
this.disabled = false;
|
|
3398
|
-
this.utils.message("success",
|
|
3414
|
+
this.utils.message("success", this.summary, "yms.int.wms_success_message_description");
|
|
3399
3415
|
this.visibleDocumentRegister = false;
|
|
3400
3416
|
this.visibleInvoiceKey = false;
|
|
3401
3417
|
};
|
|
@@ -3475,11 +3491,17 @@
|
|
|
3475
3491
|
}
|
|
3476
3492
|
data.key = _this.updateKeyByWms(data);
|
|
3477
3493
|
_this.documentService.insert(data).subscribe(function () {
|
|
3478
|
-
_this.
|
|
3494
|
+
_this.sucessMessage();
|
|
3479
3495
|
});
|
|
3480
3496
|
_this.disabled = true;
|
|
3481
3497
|
_this.listDocuments(false);
|
|
3482
3498
|
}
|
|
3499
|
+
else {
|
|
3500
|
+
_this.documentService.update(data.id, data).subscribe(function () {
|
|
3501
|
+
_this.sucessMessage();
|
|
3502
|
+
_this.disabled = true;
|
|
3503
|
+
});
|
|
3504
|
+
}
|
|
3483
3505
|
});
|
|
3484
3506
|
}
|
|
3485
3507
|
};
|
|
@@ -3546,17 +3568,27 @@
|
|
|
3546
3568
|
if (this.isWmsSeniorConnect()) {
|
|
3547
3569
|
return __spread([
|
|
3548
3570
|
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") }
|
|
3549
|
-
], this.getColumnPartner()
|
|
3571
|
+
], this.getColumnPartner(), [
|
|
3572
|
+
this.getColumninvoiceCondition(),
|
|
3573
|
+
]);
|
|
3550
3574
|
}
|
|
3551
|
-
if (this.isWmsWIS()) {
|
|
3552
|
-
return this.getColumnInvoiceAndlogistcUnit()
|
|
3575
|
+
else if (this.isWmsWIS()) {
|
|
3576
|
+
return __spread(this.getColumnInvoiceAndlogistcUnit(), [
|
|
3577
|
+
this.getColumninvoiceCondition(),
|
|
3578
|
+
]);
|
|
3553
3579
|
}
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3580
|
+
else {
|
|
3581
|
+
return __spread([
|
|
3582
|
+
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") }
|
|
3583
|
+
], this.getColumnInvoiceAndlogistcUnit(), [
|
|
3584
|
+
{ field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
|
|
3585
|
+
{ field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
|
|
3586
|
+
this.getColumninvoiceCondition(),
|
|
3587
|
+
]);
|
|
3588
|
+
}
|
|
3589
|
+
};
|
|
3590
|
+
DocumentGridComponent.prototype.getColumninvoiceCondition = function () {
|
|
3591
|
+
return { field: "invoiceCondition", header: this.translate.instant("yms.int.wms_grid_document_invoice_condition") };
|
|
3560
3592
|
};
|
|
3561
3593
|
DocumentGridComponent.prototype.getColumnInvoiceAndlogistcUnit = function () {
|
|
3562
3594
|
return __spread([
|
|
@@ -3579,6 +3611,12 @@
|
|
|
3579
3611
|
DocumentGridComponent.prototype.isWmsWIS = function () {
|
|
3580
3612
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3581
3613
|
};
|
|
3614
|
+
DocumentGridComponent.prototype.isWmsSilt = function () {
|
|
3615
|
+
return this.wmsSystem === WmsSystem.SENIOR;
|
|
3616
|
+
};
|
|
3617
|
+
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3618
|
+
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3619
|
+
};
|
|
3582
3620
|
__decorate([
|
|
3583
3621
|
core.Input(),
|
|
3584
3622
|
__metadata("design:type", Object)
|
|
@@ -3626,8 +3664,8 @@
|
|
|
3626
3664
|
DocumentGridComponent = __decorate([
|
|
3627
3665
|
core.Component({
|
|
3628
3666
|
selector: 'document-grid',
|
|
3629
|
-
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <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 [disabled]=\"!enableButtonIsClienteExterno\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length || !enableButtonIsClienteExterno\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments(false)\"\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=\"key\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [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=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\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 class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *
|
|
3630
|
-
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}.table-checkbox{width:50px}"]
|
|
3667
|
+
template: "<div *ngIf=\"this.processType === 'RECEBIMENTO_WMS'; else processNotConfigured\">\n <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 [disabled]=\"!enableButtonIsClienteExterno\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_view_button' | translate}}\"\n priority=\"secondary\"\n [auxiliary]=\"false\"\n [disabled]=\"!selection || selection.length !== 1\"\n (onClick)=\"view()\">\n </s-button>\n <s-button\n label=\"{{'yms.wms_delete_button' | translate}}\"\n priority=\"secondary\"\n [disabled]=\"!selection || !selection.length || !enableButtonIsClienteExterno\"\n (click)=\"onDelete()\">\n </s-button>\n </div>\n <s-button\n id=\"refresh-button\"\n priority=\"default\"\n iconClass=\"fa fa-refresh\"\n (onClick)=\"listDocuments(false)\"\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=\"key\" [lazy]=\"true\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n sortMode=\"multiple\" [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=\"checkbox\" class=\"table-checkbox\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\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 class=\"table-checkbox\">\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"key\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceKey\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"invoiceSerialNumber\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSeniorConnect() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"partnerDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitDocument\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsSilt()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"ownerDocument\"]}}</span>\n </td>\n <td (click)=\"selection = [rowData]\">\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"invoiceCondition\"\n appendTo=\"body\"\n [(ngModel)]=\"rowData.invoiceCondition\"\n (onChange)=\"disabled = false\">\n </p-dropdown>\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 [wmsSystem]=\"wmsSystem\"\n [edit]=\"edit\"\n [viewDocument]=\"selection\"\n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleDocumentRegister\"\n [agenda]=\"agenda\">\n </register-document> \n <insert-key\n [wmsSystem]=\"wmsSystem\" \n (document)=\"onChangeDocument($event)\"\n [(visible)]=\"visibleInvoiceKey\">\n </insert-key>\n </p-panel>\n</div>\n <div class=\"button-save\">\n <s-button \n priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"disabled || !this.gridData || !enableButtonIsClienteExterno\"\n (click)=\"save()\">\n </s-button>\n </div>\n\n<ng-template #emptyList>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\" [title]=\"'detail_empty_state_title' | translate\"\n [description]=\"'detail_empty_state_description' | translate\">\n </s-empty-state>\n </div>\n</ng-template>\n\n<ng-template #processNotConfigured>\n <div class=\"center\">\n <s-empty-state\n iconClass=\"fa fa-exclamation-triangle\"\n [title]=\"'yms.int.wms_there_no_process_type_configured_for_this_type_scheduling' | translate\">\n </s-empty-state>\n </div>\n</ng-template>",
|
|
3668
|
+
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}.table-checkbox{width:50px}.invoice-condition .p-dropdown{position:relative;z-index:1000}"]
|
|
3631
3669
|
}),
|
|
3632
3670
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
3633
3671
|
DocumentService,
|
|
@@ -3661,6 +3699,7 @@
|
|
|
3661
3699
|
"ownerDocument",
|
|
3662
3700
|
"partnerName",
|
|
3663
3701
|
"partnerDocument",
|
|
3702
|
+
"invoiceCondition",
|
|
3664
3703
|
"notes",
|
|
3665
3704
|
"code",
|
|
3666
3705
|
"createdBy",
|
|
@@ -3681,13 +3720,20 @@
|
|
|
3681
3720
|
}());
|
|
3682
3721
|
|
|
3683
3722
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3684
|
-
function RegisterDocumentComponent(fb,
|
|
3723
|
+
function RegisterDocumentComponent(fb, translate) {
|
|
3685
3724
|
this.fb = fb;
|
|
3686
|
-
this.
|
|
3725
|
+
this.translate = translate;
|
|
3687
3726
|
this.document = new core.EventEmitter();
|
|
3688
3727
|
this.visible = new core.EventEmitter();
|
|
3689
3728
|
this.visibleChange = new core.EventEmitter();
|
|
3690
3729
|
this.isSaveFormValid = false;
|
|
3730
|
+
this.invoiceCondition = [
|
|
3731
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3732
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3733
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3734
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3735
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolucion"), value: InvoiceCondition.AUTHORIZED },
|
|
3736
|
+
];
|
|
3691
3737
|
}
|
|
3692
3738
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3693
3739
|
this.getFormGroup();
|
|
@@ -3725,6 +3771,7 @@
|
|
|
3725
3771
|
this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
|
|
3726
3772
|
this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
|
|
3727
3773
|
this.formGroup.get('ownerName').setValue(document.ownerName);
|
|
3774
|
+
this.formGroup.get('invoiceCondition').setValue(document.invoiceCondition);
|
|
3728
3775
|
};
|
|
3729
3776
|
RegisterDocumentComponent.prototype.getFormGroup = function () {
|
|
3730
3777
|
this.formGroup = this.fb.group({
|
|
@@ -3741,6 +3788,7 @@
|
|
|
3741
3788
|
partnerDocument: [undefined],
|
|
3742
3789
|
notes: [undefined],
|
|
3743
3790
|
code: [undefined],
|
|
3791
|
+
invoiceCondition: [undefined],
|
|
3744
3792
|
});
|
|
3745
3793
|
};
|
|
3746
3794
|
RegisterDocumentComponent.prototype.save = function () {
|
|
@@ -3791,10 +3839,9 @@
|
|
|
3791
3839
|
RegisterDocumentComponent = __decorate([
|
|
3792
3840
|
core.Component({
|
|
3793
3841
|
selector: "register-document",
|
|
3794
|
-
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate }} {{ wmsSystem }}\"\n (visibleChange)=\"close()\"\n (onclose)=\"close()\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-6\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"key\">{{'yms.int.wms_purchaseOrder' | translate}}</label>\n <input id=\"key\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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\" *ngIf=\"!isWmsSeniorConnect()\">\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\" *ngIf=\"!isWmsSeniorConnect()\">\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-8\">\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-4\">\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-8\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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-4\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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-8\">\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-4\">\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=\"4\" pInputTextarea autoResize=\"autoResize\" formControlName=\"notes\"></textarea>\n </div>\n <div class=\"ui-g-4\">\n <label for=\"code\">\n {{'yms.int.wms_register_document_order_receiving_code' | translate}}\n </label>\n <input id=\"code\" pInputText type=\"text\" formControlName=\"code\">\n </div>\n </div>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\"\n (click)=\"save()\"\n [attr.data-hidden]=\"hideSaveButton\"\n [disabled]=\"!isSaveFormValid\">\n </button>\n <button\n type=\"button\" class=\"ui-button-link\" pButton label=\"{{'cancel' | translate}}\" (click)=\"close()\">\n </button>\n </div>\n</s-sidebar>"
|
|
3842
|
+
template: "<s-sidebar\n [visible]=\"visible\"\n header=\"{{ 'yms.int.wms_register_document_add_document' | translate }} {{ wmsSystem }}\"\n (visibleChange)=\"close()\"\n (onclose)=\"close()\">\n <form [formGroup]=\"formGroup\">\n <div class=\"ui-g ui-fluid\">\n <div class=\"ui-g-6\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"key\">{{'yms.int.wms_purchaseOrder' | translate}}</label>\n <input id=\"key\" pInputText type=\"text\" formControlName=\"key\">\n </div>\n <div class=\"ui-g-6\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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\" *ngIf=\"!isWmsSeniorConnect()\">\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\" *ngIf=\"!isWmsSeniorConnect()\">\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-8\">\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-4\">\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-8\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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-4\" *ngIf=\"!isWmsSeniorConnect() && !isWmsWis()\">\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-8\">\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-4\">\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=\"4\" pInputTextarea autoResize=\"autoResize\" formControlName=\"notes\"></textarea>\n </div>\n <div class=\"ui-g-4\">\n <label for=\"code\">\n {{'yms.int.wms_register_document_order_receiving_code' | translate}}\n </label>\n <input id=\"code\" pInputText type=\"text\" formControlName=\"code\">\n </div>\n <div class=\"ui-g-4\">\n <label for=\"invoiceCondition\" id=\"invoiceCondition\">\n {{'yms.int.wms_grid_document_invoice_condition' | translate}}\n </label>\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"invoiceCondition\"\n formControlName=\"invoiceCondition\"\n ></p-dropdown>\n </div>\n </div>\n </form>\n <div class=\"space-between\">\n <button\n pButton label=\"{{'save' | translate}}\"\n (click)=\"save()\"\n [attr.data-hidden]=\"hideSaveButton\"\n [disabled]=\"!isSaveFormValid\">\n </button>\n <button\n type=\"button\" class=\"ui-button-link\" pButton label=\"{{'cancel' | translate}}\" (click)=\"close()\">\n </button>\n </div>\n</s-sidebar>"
|
|
3795
3843
|
}),
|
|
3796
|
-
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3797
|
-
UtilsMessageService])
|
|
3844
|
+
__metadata("design:paramtypes", [forms.FormBuilder, core$1.TranslateService])
|
|
3798
3845
|
], RegisterDocumentComponent);
|
|
3799
3846
|
return RegisterDocumentComponent;
|
|
3800
3847
|
}());
|
|
@@ -3814,7 +3861,8 @@
|
|
|
3814
3861
|
primeng.InputTextModule,
|
|
3815
3862
|
angularComponents.ControlErrorsModule,
|
|
3816
3863
|
primeng.InputTextareaModule,
|
|
3817
|
-
forms.ReactiveFormsModule
|
|
3864
|
+
forms.ReactiveFormsModule,
|
|
3865
|
+
primeng.DropdownModule,
|
|
3818
3866
|
],
|
|
3819
3867
|
exports: [RegisterDocumentComponent],
|
|
3820
3868
|
declarations: [RegisterDocumentComponent],
|
|
@@ -3835,6 +3883,7 @@
|
|
|
3835
3883
|
this.isLoading = false;
|
|
3836
3884
|
}
|
|
3837
3885
|
InsertKeyComponent.prototype.ngOnInit = function () {
|
|
3886
|
+
var _this = this;
|
|
3838
3887
|
this.formGroup = this.formBuilder.group({
|
|
3839
3888
|
key: [undefined],
|
|
3840
3889
|
purchaseOrder: [undefined],
|
|
@@ -3842,6 +3891,9 @@
|
|
|
3842
3891
|
invoiceSerie: [undefined],
|
|
3843
3892
|
partnerDocument: [undefined]
|
|
3844
3893
|
});
|
|
3894
|
+
this.formGroup.get('key').valueChanges.subscribe(function (nf) {
|
|
3895
|
+
_this.validateKeyDetails(nf);
|
|
3896
|
+
});
|
|
3845
3897
|
};
|
|
3846
3898
|
InsertKeyComponent.prototype.isWmsWis = function () {
|
|
3847
3899
|
return this.wmsSystem === WmsSystem.WIS;
|
|
@@ -3887,6 +3939,38 @@
|
|
|
3887
3939
|
_this.formGroup.reset();
|
|
3888
3940
|
});
|
|
3889
3941
|
};
|
|
3942
|
+
InsertKeyComponent.prototype.validateKeyDetails = function (nf) {
|
|
3943
|
+
if (!nf) {
|
|
3944
|
+
this.keyErrorMessage = null;
|
|
3945
|
+
this.setValuesOfKey(undefined, undefined, undefined);
|
|
3946
|
+
return;
|
|
3947
|
+
}
|
|
3948
|
+
var nfLength = 44;
|
|
3949
|
+
if (nf.length === nfLength) {
|
|
3950
|
+
this.keyErrorMessage = null;
|
|
3951
|
+
this.extractKeyDetails(nf);
|
|
3952
|
+
}
|
|
3953
|
+
else {
|
|
3954
|
+
this.keyErrorMessage = "yms.int.wms_error_key_message";
|
|
3955
|
+
}
|
|
3956
|
+
};
|
|
3957
|
+
InsertKeyComponent.prototype.extractKeyDetails = function (nf) {
|
|
3958
|
+
var startCnpj = 6;
|
|
3959
|
+
var endCnpj = 20;
|
|
3960
|
+
var cnpj = nf.substring(startCnpj, endCnpj);
|
|
3961
|
+
var startSerie = 22;
|
|
3962
|
+
var endSerie = 25;
|
|
3963
|
+
var serie = nf.substring(startSerie, endSerie);
|
|
3964
|
+
var startInvoice = 25;
|
|
3965
|
+
var endInvoice = 34;
|
|
3966
|
+
var invoice = nf.substring(startInvoice, endInvoice);
|
|
3967
|
+
this.setValuesOfKey(invoice, serie, cnpj);
|
|
3968
|
+
};
|
|
3969
|
+
InsertKeyComponent.prototype.setValuesOfKey = function (invoiceNumber, invoiceSerie, partnerDocument) {
|
|
3970
|
+
this.formGroup.get('invoiceNumber').setValue(invoiceNumber);
|
|
3971
|
+
this.formGroup.get('invoiceSerie').setValue(invoiceSerie);
|
|
3972
|
+
this.formGroup.get('partnerDocument').setValue(partnerDocument);
|
|
3973
|
+
};
|
|
3890
3974
|
InsertKeyComponent.prototype.cancel = function () {
|
|
3891
3975
|
this.visibleChange.emit(false);
|
|
3892
3976
|
};
|
|
@@ -3912,8 +3996,8 @@
|
|
|
3912
3996
|
InsertKeyComponent = __decorate([
|
|
3913
3997
|
core.Component({
|
|
3914
3998
|
selector: "insert-key",
|
|
3915
|
-
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <s-loading-state [loading]=\"isLoading\">\n <div class=\"flex py-2 justify-content-center spacing-bottom\"
|
|
3916
|
-
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:480px}"]
|
|
3999
|
+
template: "<form [formGroup]=\"formGroup\">\n <p-dialog [(visible)]=\"visible\" [modal]=\"true\" \n [draggable]=\"false\" (visibleChange)=\"cancel()\" (onShow)=\"onDialogShow()\">\n <p-header>{{'yms.int.wms_search_document' | translate}} {{ wmsSystem }}</p-header>\n <s-loading-state [loading]=\"isLoading\">\n <div class=\"flex py-2 justify-content-center spacing-bottom\"\n *ngIf=\"!isWmsSeniorConnect()\">\n <label for=\"key\">{{'yms.int.wms_insert_key_label' | translate}}</label>\n <input id=\"key\" class=\"size-input\" pInputText type=\"text\" formControlName=\"key\">\n <span class=\"error-message\">{{keyErrorMessage | translate}}</span>\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsSeniorConnect()\">\n <label for=\"purchaseOrder\">{{'yms.int.wms_purchaseOrder' | translate}} </label>\n <input id=\"purchaseOrder\" class=\"size-input\" pInputText type=\"text\" formControlName=\"purchaseOrder\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceNumber\">{{'yms.int.wms_invoice_number' | translate}}</label>\n <input id=\"invoiceNumber\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceNumber\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"invoiceSerie\">{{'yms.int.wms_invoice_serie' | translate}}</label>\n <input id=\"invoiceSerie\" class=\"size-input\" pInputText type=\"text\" formControlName=\"invoiceSerie\">\n </div>\n <div class=\"flex py-2 justify-content-center spacing-bottom\" *ngIf=\"isWmsWis()\">\n <label for=\"partnerDocument\">{{'yms.int.wms_partner_document' | translate}}</label>\n <input id=\"partnerDocument\" class=\"size-input\" pInputText type=\"text\" formControlName=\"partnerDocument\">\n </div>\n <div class=\"separator\"></div>\n <div class=\"spacing-top\">\n <s-button pButton label=\"{{'yms.int.wms_search' | 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 </s-loading-state>\n </p-dialog>\n\n</form>\n",
|
|
4000
|
+
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:480px}.error-message{color:#c13018;display:flex}"]
|
|
3917
4001
|
}),
|
|
3918
4002
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3919
4003
|
DocumentService,
|
|
@@ -3961,7 +4045,9 @@
|
|
|
3961
4045
|
InsertKeyModule,
|
|
3962
4046
|
button.ButtonModule,
|
|
3963
4047
|
ymsComponents.ComponentsModule,
|
|
3964
|
-
angularComponents.EmptyStateModule
|
|
4048
|
+
angularComponents.EmptyStateModule,
|
|
4049
|
+
primeng.DropdownModule,
|
|
4050
|
+
forms.FormsModule
|
|
3965
4051
|
],
|
|
3966
4052
|
})
|
|
3967
4053
|
], DocumentGridModule);
|