@seniorsistemas/yms-integration 1.32.0 → 1.34.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 +182 -54
- 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/wms/components/document-grid/document-grid.component.js +69 -17
- 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 +20 -7
- package/esm2015/src/wms/components/document-grid/register-document/register-document.module.js +4 -3
- package/esm2015/src/wms/components/document-list/document-list.component.js +48 -28
- 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/wms/components/document-grid/document-grid.component.js +66 -16
- 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 +20 -7
- package/esm5/src/wms/components/document-grid/register-document/register-document.module.js +4 -3
- package/esm5/src/wms/components/document-list/document-list.component.js +51 -30
- 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 +181 -53
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +182 -54
- 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 +17 -8
- 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 +9 -3
- package/src/wms/components/document-list/document-list.component.d.ts +10 -5
- 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.DEVOLUTION },
|
|
3377
|
+
];
|
|
3362
3378
|
this.selection = [];
|
|
3363
3379
|
}
|
|
3364
3380
|
DocumentGridComponent.prototype.ngOnInit = function () {
|
|
@@ -3366,14 +3382,12 @@
|
|
|
3366
3382
|
this.getProcessTypeByScheduling();
|
|
3367
3383
|
this.listDocuments(false);
|
|
3368
3384
|
};
|
|
3369
|
-
DocumentGridComponent.prototype.ngAfterContentChecked = function () {
|
|
3370
|
-
this.gridColumns = this.getGridColumns();
|
|
3371
|
-
};
|
|
3372
3385
|
DocumentGridComponent.prototype.verifyClienteExterno = function () {
|
|
3373
3386
|
var _this = this;
|
|
3374
3387
|
this.agendaService.isClienteExterno()
|
|
3375
3388
|
.subscribe(function (result) {
|
|
3376
3389
|
_this.isClienteExterno = result.isClienteExterno;
|
|
3390
|
+
_this.gridColumns = _this.getGridColumns();
|
|
3377
3391
|
_this.cantEditStatus();
|
|
3378
3392
|
});
|
|
3379
3393
|
};
|
|
@@ -3395,7 +3409,7 @@
|
|
|
3395
3409
|
}
|
|
3396
3410
|
this.gridData.push(document);
|
|
3397
3411
|
this.disabled = false;
|
|
3398
|
-
this.utils.message("success",
|
|
3412
|
+
this.utils.message("success", this.summary, "yms.int.wms_success_message_description");
|
|
3399
3413
|
this.visibleDocumentRegister = false;
|
|
3400
3414
|
this.visibleInvoiceKey = false;
|
|
3401
3415
|
};
|
|
@@ -3475,11 +3489,17 @@
|
|
|
3475
3489
|
}
|
|
3476
3490
|
data.key = _this.updateKeyByWms(data);
|
|
3477
3491
|
_this.documentService.insert(data).subscribe(function () {
|
|
3478
|
-
_this.
|
|
3492
|
+
_this.sucessMessage();
|
|
3479
3493
|
});
|
|
3480
3494
|
_this.disabled = true;
|
|
3481
3495
|
_this.listDocuments(false);
|
|
3482
3496
|
}
|
|
3497
|
+
else {
|
|
3498
|
+
_this.documentService.update(data.id, data).subscribe(function () {
|
|
3499
|
+
_this.sucessMessage();
|
|
3500
|
+
_this.disabled = true;
|
|
3501
|
+
});
|
|
3502
|
+
}
|
|
3483
3503
|
});
|
|
3484
3504
|
}
|
|
3485
3505
|
};
|
|
@@ -3543,20 +3563,46 @@
|
|
|
3543
3563
|
});
|
|
3544
3564
|
};
|
|
3545
3565
|
DocumentGridComponent.prototype.getGridColumns = function () {
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3566
|
+
var result;
|
|
3567
|
+
switch (this.wmsSystem) {
|
|
3568
|
+
case WmsSystem.SENIOR_CONNECT:
|
|
3569
|
+
result = this.wmsSeniorConnectIntegration();
|
|
3570
|
+
break;
|
|
3571
|
+
case WmsSystem.WIS:
|
|
3572
|
+
result = this.wmsWisIntegration();
|
|
3573
|
+
break;
|
|
3574
|
+
case WmsSystem.SENIOR:
|
|
3575
|
+
result = this.wmsSiltIntegration();
|
|
3576
|
+
break;
|
|
3577
|
+
default:
|
|
3578
|
+
result = [];
|
|
3579
|
+
}
|
|
3580
|
+
return result;
|
|
3581
|
+
};
|
|
3582
|
+
DocumentGridComponent.prototype.wmsSeniorConnectIntegration = function () {
|
|
3583
|
+
var columns = __spread([
|
|
3584
|
+
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") }
|
|
3585
|
+
], this.getColumnPartner());
|
|
3586
|
+
this.addInvoiceSituationIfNotClienteExterno(columns);
|
|
3587
|
+
return columns;
|
|
3588
|
+
};
|
|
3589
|
+
DocumentGridComponent.prototype.wmsWisIntegration = function () {
|
|
3590
|
+
var columns = __spread(this.getColumnInvoiceAndlogistcUnit());
|
|
3591
|
+
this.addInvoiceSituationIfNotClienteExterno(columns);
|
|
3592
|
+
return columns;
|
|
3593
|
+
};
|
|
3594
|
+
DocumentGridComponent.prototype.wmsSiltIntegration = function () {
|
|
3595
|
+
var columns = __spread([
|
|
3555
3596
|
{ field: "invoiceKey", header: this.translate.instant("yms.int.wms_register_document_invoice_key") }
|
|
3556
3597
|
], this.getColumnInvoiceAndlogistcUnit(), [
|
|
3557
3598
|
{ field: "ownerName", header: this.translate.instant("yms.int.wms_register_document_owner_name") },
|
|
3558
3599
|
{ field: "ownerDocument", header: this.translate.instant("yms.int.wms_register_document_owner_document") },
|
|
3559
3600
|
]);
|
|
3601
|
+
this.addInvoiceSituationIfNotClienteExterno(columns);
|
|
3602
|
+
return columns;
|
|
3603
|
+
};
|
|
3604
|
+
DocumentGridComponent.prototype.getColumninvoiceCondition = function () {
|
|
3605
|
+
return { field: "invoiceCondition", header: this.translate.instant("yms.int.wms_grid_document_invoice_condition") };
|
|
3560
3606
|
};
|
|
3561
3607
|
DocumentGridComponent.prototype.getColumnInvoiceAndlogistcUnit = function () {
|
|
3562
3608
|
return __spread([
|
|
@@ -3573,12 +3619,23 @@
|
|
|
3573
3619
|
{ field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
|
|
3574
3620
|
];
|
|
3575
3621
|
};
|
|
3622
|
+
DocumentGridComponent.prototype.addInvoiceSituationIfNotClienteExterno = function (columns) {
|
|
3623
|
+
if (!this.isClienteExterno) {
|
|
3624
|
+
columns.push(this.getColumninvoiceCondition());
|
|
3625
|
+
}
|
|
3626
|
+
};
|
|
3576
3627
|
DocumentGridComponent.prototype.isWmsSeniorConnect = function () {
|
|
3577
3628
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3578
3629
|
};
|
|
3579
3630
|
DocumentGridComponent.prototype.isWmsWIS = function () {
|
|
3580
3631
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3581
3632
|
};
|
|
3633
|
+
DocumentGridComponent.prototype.isWmsSilt = function () {
|
|
3634
|
+
return this.wmsSystem === WmsSystem.SENIOR;
|
|
3635
|
+
};
|
|
3636
|
+
DocumentGridComponent.prototype.sucessMessage = function () {
|
|
3637
|
+
return this.utils.message("success", this.summary, "saved_message_content");
|
|
3638
|
+
};
|
|
3582
3639
|
__decorate([
|
|
3583
3640
|
core.Input(),
|
|
3584
3641
|
__metadata("design:type", Object)
|
|
@@ -3626,8 +3683,8 @@
|
|
|
3626
3683
|
DocumentGridComponent = __decorate([
|
|
3627
3684
|
core.Component({
|
|
3628
3685
|
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}"]
|
|
3686
|
+
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 *ngIf=\"!isClienteExterno\" (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 [isClienteExterno]=\"isClienteExterno\">\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>",
|
|
3687
|
+
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
3688
|
}),
|
|
3632
3689
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
3633
3690
|
DocumentService,
|
|
@@ -3661,6 +3718,7 @@
|
|
|
3661
3718
|
"ownerDocument",
|
|
3662
3719
|
"partnerName",
|
|
3663
3720
|
"partnerDocument",
|
|
3721
|
+
"invoiceCondition",
|
|
3664
3722
|
"notes",
|
|
3665
3723
|
"code",
|
|
3666
3724
|
"createdBy",
|
|
@@ -3681,13 +3739,20 @@
|
|
|
3681
3739
|
}());
|
|
3682
3740
|
|
|
3683
3741
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3684
|
-
function RegisterDocumentComponent(fb,
|
|
3742
|
+
function RegisterDocumentComponent(fb, translate) {
|
|
3685
3743
|
this.fb = fb;
|
|
3686
|
-
this.
|
|
3744
|
+
this.translate = translate;
|
|
3687
3745
|
this.document = new core.EventEmitter();
|
|
3688
3746
|
this.visible = new core.EventEmitter();
|
|
3689
3747
|
this.visibleChange = new core.EventEmitter();
|
|
3690
3748
|
this.isSaveFormValid = false;
|
|
3749
|
+
this.invoiceCondition = [
|
|
3750
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_no_way"), value: null },
|
|
3751
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_authorized"), value: InvoiceCondition.AUTHORIZED },
|
|
3752
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_manual_authorized"), value: InvoiceCondition.MANUAL_AUTHORIZED },
|
|
3753
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_partial_authorized"), value: InvoiceCondition.PARTIAL_AUTHORIZED },
|
|
3754
|
+
{ label: this.translate.instant("yms.int.wms_grid_document_invoice_condition_devolucion"), value: InvoiceCondition.DEVOLUTION },
|
|
3755
|
+
];
|
|
3691
3756
|
}
|
|
3692
3757
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3693
3758
|
this.getFormGroup();
|
|
@@ -3725,6 +3790,7 @@
|
|
|
3725
3790
|
this.formGroup.get('partnerDocument').setValue(document.partnerDocument);
|
|
3726
3791
|
this.formGroup.get('ownerDocument').setValue(document.ownerDocument);
|
|
3727
3792
|
this.formGroup.get('ownerName').setValue(document.ownerName);
|
|
3793
|
+
this.formGroup.get('invoiceCondition').setValue(document.invoiceCondition);
|
|
3728
3794
|
};
|
|
3729
3795
|
RegisterDocumentComponent.prototype.getFormGroup = function () {
|
|
3730
3796
|
this.formGroup = this.fb.group({
|
|
@@ -3741,6 +3807,7 @@
|
|
|
3741
3807
|
partnerDocument: [undefined],
|
|
3742
3808
|
notes: [undefined],
|
|
3743
3809
|
code: [undefined],
|
|
3810
|
+
invoiceCondition: [undefined],
|
|
3744
3811
|
});
|
|
3745
3812
|
};
|
|
3746
3813
|
RegisterDocumentComponent.prototype.save = function () {
|
|
@@ -3772,6 +3839,10 @@
|
|
|
3772
3839
|
core.Input(),
|
|
3773
3840
|
__metadata("design:type", Agenda)
|
|
3774
3841
|
], RegisterDocumentComponent.prototype, "agenda", void 0);
|
|
3842
|
+
__decorate([
|
|
3843
|
+
core.Input(),
|
|
3844
|
+
__metadata("design:type", Boolean)
|
|
3845
|
+
], RegisterDocumentComponent.prototype, "isClienteExterno", void 0);
|
|
3775
3846
|
__decorate([
|
|
3776
3847
|
core.Output(),
|
|
3777
3848
|
__metadata("design:type", core.EventEmitter)
|
|
@@ -3791,10 +3862,9 @@
|
|
|
3791
3862
|
RegisterDocumentComponent = __decorate([
|
|
3792
3863
|
core.Component({
|
|
3793
3864
|
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>"
|
|
3865
|
+
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\" *ngIf=\"!isClienteExterno\">\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
3866
|
}),
|
|
3796
|
-
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3797
|
-
UtilsMessageService])
|
|
3867
|
+
__metadata("design:paramtypes", [forms.FormBuilder, core$1.TranslateService])
|
|
3798
3868
|
], RegisterDocumentComponent);
|
|
3799
3869
|
return RegisterDocumentComponent;
|
|
3800
3870
|
}());
|
|
@@ -3814,7 +3884,8 @@
|
|
|
3814
3884
|
primeng.InputTextModule,
|
|
3815
3885
|
angularComponents.ControlErrorsModule,
|
|
3816
3886
|
primeng.InputTextareaModule,
|
|
3817
|
-
forms.ReactiveFormsModule
|
|
3887
|
+
forms.ReactiveFormsModule,
|
|
3888
|
+
primeng.DropdownModule,
|
|
3818
3889
|
],
|
|
3819
3890
|
exports: [RegisterDocumentComponent],
|
|
3820
3891
|
declarations: [RegisterDocumentComponent],
|
|
@@ -3835,6 +3906,7 @@
|
|
|
3835
3906
|
this.isLoading = false;
|
|
3836
3907
|
}
|
|
3837
3908
|
InsertKeyComponent.prototype.ngOnInit = function () {
|
|
3909
|
+
var _this = this;
|
|
3838
3910
|
this.formGroup = this.formBuilder.group({
|
|
3839
3911
|
key: [undefined],
|
|
3840
3912
|
purchaseOrder: [undefined],
|
|
@@ -3842,6 +3914,9 @@
|
|
|
3842
3914
|
invoiceSerie: [undefined],
|
|
3843
3915
|
partnerDocument: [undefined]
|
|
3844
3916
|
});
|
|
3917
|
+
this.formGroup.get('key').valueChanges.subscribe(function (nf) {
|
|
3918
|
+
_this.validateKeyDetails(nf);
|
|
3919
|
+
});
|
|
3845
3920
|
};
|
|
3846
3921
|
InsertKeyComponent.prototype.isWmsWis = function () {
|
|
3847
3922
|
return this.wmsSystem === WmsSystem.WIS;
|
|
@@ -3887,6 +3962,38 @@
|
|
|
3887
3962
|
_this.formGroup.reset();
|
|
3888
3963
|
});
|
|
3889
3964
|
};
|
|
3965
|
+
InsertKeyComponent.prototype.validateKeyDetails = function (nf) {
|
|
3966
|
+
if (!nf) {
|
|
3967
|
+
this.keyErrorMessage = null;
|
|
3968
|
+
this.setValuesOfKey(undefined, undefined, undefined);
|
|
3969
|
+
return;
|
|
3970
|
+
}
|
|
3971
|
+
var nfLength = 44;
|
|
3972
|
+
if (nf.length === nfLength) {
|
|
3973
|
+
this.keyErrorMessage = null;
|
|
3974
|
+
this.extractKeyDetails(nf);
|
|
3975
|
+
}
|
|
3976
|
+
else {
|
|
3977
|
+
this.keyErrorMessage = "yms.int.wms_error_key_message";
|
|
3978
|
+
}
|
|
3979
|
+
};
|
|
3980
|
+
InsertKeyComponent.prototype.extractKeyDetails = function (nf) {
|
|
3981
|
+
var startCnpj = 6;
|
|
3982
|
+
var endCnpj = 20;
|
|
3983
|
+
var cnpj = nf.substring(startCnpj, endCnpj);
|
|
3984
|
+
var startSerie = 22;
|
|
3985
|
+
var endSerie = 25;
|
|
3986
|
+
var serie = nf.substring(startSerie, endSerie);
|
|
3987
|
+
var startInvoice = 25;
|
|
3988
|
+
var endInvoice = 34;
|
|
3989
|
+
var invoice = nf.substring(startInvoice, endInvoice);
|
|
3990
|
+
this.setValuesOfKey(invoice, serie, cnpj);
|
|
3991
|
+
};
|
|
3992
|
+
InsertKeyComponent.prototype.setValuesOfKey = function (invoiceNumber, invoiceSerie, partnerDocument) {
|
|
3993
|
+
this.formGroup.get('invoiceNumber').setValue(invoiceNumber);
|
|
3994
|
+
this.formGroup.get('invoiceSerie').setValue(invoiceSerie);
|
|
3995
|
+
this.formGroup.get('partnerDocument').setValue(partnerDocument);
|
|
3996
|
+
};
|
|
3890
3997
|
InsertKeyComponent.prototype.cancel = function () {
|
|
3891
3998
|
this.visibleChange.emit(false);
|
|
3892
3999
|
};
|
|
@@ -3912,8 +4019,8 @@
|
|
|
3912
4019
|
InsertKeyComponent = __decorate([
|
|
3913
4020
|
core.Component({
|
|
3914
4021
|
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}"]
|
|
4022
|
+
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",
|
|
4023
|
+
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
4024
|
}),
|
|
3918
4025
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3919
4026
|
DocumentService,
|
|
@@ -3961,7 +4068,9 @@
|
|
|
3961
4068
|
InsertKeyModule,
|
|
3962
4069
|
button.ButtonModule,
|
|
3963
4070
|
ymsComponents.ComponentsModule,
|
|
3964
|
-
angularComponents.EmptyStateModule
|
|
4071
|
+
angularComponents.EmptyStateModule,
|
|
4072
|
+
primeng.DropdownModule,
|
|
4073
|
+
forms.FormsModule
|
|
3965
4074
|
],
|
|
3966
4075
|
})
|
|
3967
4076
|
], DocumentGridModule);
|
|
@@ -4040,42 +4149,30 @@
|
|
|
4040
4149
|
_this.getColumns = [];
|
|
4041
4150
|
_this.documents = [];
|
|
4042
4151
|
_this.labels = [];
|
|
4152
|
+
_this.selected = [];
|
|
4153
|
+
_this.gridLoading = true;
|
|
4154
|
+
_this.ngUnsubscribe = new rxjs.Subject();
|
|
4043
4155
|
return _this;
|
|
4044
4156
|
}
|
|
4045
|
-
DocumentListComponent.prototype.ngOnInit = function () {
|
|
4046
|
-
this.getSystemIntegration();
|
|
4047
|
-
};
|
|
4048
|
-
DocumentListComponent.prototype.getSystemIntegration = function () {
|
|
4049
|
-
var _this = this;
|
|
4050
|
-
this.documentService.getSystemIntegration().subscribe(function (system) {
|
|
4051
|
-
_this.wmsSystem = system.system;
|
|
4052
|
-
_this.getDocumentBySchedulingId();
|
|
4053
|
-
});
|
|
4054
|
-
};
|
|
4055
|
-
DocumentListComponent.prototype.getDocumentBySchedulingId = function () {
|
|
4056
|
-
var _this = this;
|
|
4057
|
-
this.documentService.list({
|
|
4058
|
-
filterQuery: "schedulingId eq '" + this.agenda.id + "'"
|
|
4059
|
-
}).subscribe(function (contents) {
|
|
4060
|
-
if (contents.totalElements > 0) {
|
|
4061
|
-
_this.documents = contents.contents;
|
|
4062
|
-
_this.getColumns = _this.getColumnLabels();
|
|
4063
|
-
}
|
|
4064
|
-
});
|
|
4065
|
-
};
|
|
4066
4157
|
DocumentListComponent.prototype.getColumnLabels = function () {
|
|
4067
4158
|
if (this.isWmsWIS()) {
|
|
4068
|
-
return __spread(this.getLabelsInvoice()
|
|
4159
|
+
return __spread(this.getLabelsInvoice(), [
|
|
4160
|
+
{ field: "partnerName", label: 'yms.int.wms_register_document_invoice_partnerName' },
|
|
4161
|
+
{ field: "partnerDocument", label: 'yms.int.wms_register_document_invoice_partnerDocument' },
|
|
4162
|
+
{ field: "code", label: 'yms.int.wms_register_document_invoice_code' },
|
|
4163
|
+
{ field: "invoiceCondition", label: 'yms.int.wms_register_document_invoice_condition' },
|
|
4164
|
+
{ field: "notes", label: 'yms.int.wms_register_document_invoice_notes' },
|
|
4165
|
+
]);
|
|
4069
4166
|
}
|
|
4070
4167
|
if (this.isWmsSeniorConnect()) {
|
|
4071
4168
|
return [
|
|
4072
|
-
{ label: 'yms.int.wms_purchaseOrder' },
|
|
4073
|
-
{ label: 'yms.int.
|
|
4074
|
-
{ label: 'yms.int.
|
|
4169
|
+
{ field: "key", label: 'yms.int.wms_purchaseOrder' },
|
|
4170
|
+
{ field: "partnerName", label: 'yms.int.wms_register_document_invoice_partnerName' },
|
|
4171
|
+
{ field: "partnerDocument", label: 'yms.int.wms_register_document_invoice_partnerDocument' },
|
|
4075
4172
|
];
|
|
4076
4173
|
}
|
|
4077
4174
|
return __spread([
|
|
4078
|
-
{ label: 'yms.int.wms_register_document_invoice_key' }
|
|
4175
|
+
{ field: "invoiceKey", label: 'yms.int.wms_register_document_invoice_key' }
|
|
4079
4176
|
], this.getLabelsInvoice());
|
|
4080
4177
|
};
|
|
4081
4178
|
DocumentListComponent.prototype.isWmsSeniorConnect = function () {
|
|
@@ -4086,10 +4183,40 @@
|
|
|
4086
4183
|
};
|
|
4087
4184
|
DocumentListComponent.prototype.getLabelsInvoice = function () {
|
|
4088
4185
|
return [
|
|
4089
|
-
{ label: 'yms.int.wms_register_document_invoice_number' },
|
|
4090
|
-
{ label: 'yms.int.wms_register_document_invoice_serial_number' }
|
|
4186
|
+
{ field: "invoiceNumber", label: 'yms.int.wms_register_document_invoice_number' },
|
|
4187
|
+
{ field: "invoiceSerialNumber", label: 'yms.int.wms_register_document_invoice_serial_number' },
|
|
4091
4188
|
];
|
|
4092
4189
|
};
|
|
4190
|
+
DocumentListComponent.prototype.getInvoiceConditionTranslation = function (invoiceCondition) {
|
|
4191
|
+
return invoiceCondition ? "yms.int.wms_document_invoice_condition_" + invoiceCondition : 'N/A';
|
|
4192
|
+
};
|
|
4193
|
+
DocumentListComponent.prototype.updateGridData = function (event) {
|
|
4194
|
+
var _this = this;
|
|
4195
|
+
this.documentService.getSystemIntegration().subscribe(function (system) {
|
|
4196
|
+
_this.wmsSystem = system.system;
|
|
4197
|
+
_this.searchDocument(event);
|
|
4198
|
+
});
|
|
4199
|
+
};
|
|
4200
|
+
DocumentListComponent.prototype.searchDocument = function (event) {
|
|
4201
|
+
var _this = this;
|
|
4202
|
+
var size = event.rows;
|
|
4203
|
+
var page = event.first / size;
|
|
4204
|
+
var sort = event.multiSortMeta;
|
|
4205
|
+
this.gridLoading = true;
|
|
4206
|
+
this.documentService.list({ page: page, size: size, sort: sort,
|
|
4207
|
+
filterQuery: "schedulingId eq '" + this.agenda.id + "'"
|
|
4208
|
+
})
|
|
4209
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.finalize(function () {
|
|
4210
|
+
_this.gridLoading = false;
|
|
4211
|
+
}))
|
|
4212
|
+
.subscribe(function (contents) {
|
|
4213
|
+
if (contents.totalElements > 0) {
|
|
4214
|
+
_this.documents = contents.contents;
|
|
4215
|
+
_this.getColumns = _this.getColumnLabels();
|
|
4216
|
+
_this.gridTotalRecords = contents.totalElements;
|
|
4217
|
+
}
|
|
4218
|
+
});
|
|
4219
|
+
};
|
|
4093
4220
|
__decorate([
|
|
4094
4221
|
core.Input(),
|
|
4095
4222
|
__metadata("design:type", Object)
|
|
@@ -4100,7 +4227,8 @@
|
|
|
4100
4227
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4101
4228
|
DocumentListComponent = __decorate([
|
|
4102
4229
|
core.Component({
|
|
4103
|
-
template: "<div
|
|
4230
|
+
template: "<div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n selectionMode=\"single\"\n [(selection)]=\"selected\"\n [value]=\"documents\"\n [columns]=\"getColumns\"\n dataKey=\"id\"\n rows=\"10\"\n [paginator]=\"true\"\n [totalRecords]=\"gridTotalRecords\"\n [lazy]=\"true\"\n [resizableColumns]=\"true\"\n (onLazyLoad)=\"updateGridData($event)\"\n *sLoadingState=\"gridLoading\"\n sortMode=\"multiple\"\n styleClass=\"sds-table-scrollable\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100, 200]\"\n paginatorDropdownScrollHeight=\"250px\"\n [scrollable]=\"true\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\" class=\"table-col-width\">\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\" pResizableColumn [pSortableColumn]=\"col.field\" scope=\"col\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label | translate }}</span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr *ngIf=\"isWmsWIS()\">\n <td>{{ rowData?.invoiceNumber || 'N/A' }}</td>\n <td>{{ rowData?.invoiceSerialNumber || 'N/A' }}</td>\n <td>{{ rowData?.partnerName || 'N/A' }}</td>\n <td>{{ rowData?.partnerDocument || 'N/A' }}</td>\n <td>{{ rowData?.code || 'N/A' }}</td>\n <td>\n {{ getInvoiceConditionTranslation(rowData?.invoiceCondition) | translate }}\n </td>\n <td>{{ rowData?.notes || 'N/A' }}</td>\n </tr>\n <tr *ngIf=\"isWmsSeniorConnect()\">\n <td>{{rowData?.key}}</td>\n <td>{{rowData?.partnerName}}</td>\n <td>{{rowData?.partnerDocument}}</td>\n </tr>\n <tr *ngIf=\"!isWmsWIS() && !isWmsSeniorConnect()\">\n <td>{{rowData?.invoiceKey}}</td>\n <td>{{rowData?.invoiceNumber}}</td>\n <td>{{rowData?.invoiceSerialNumber}}</td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <span>\n {{ gridTotalRecords + \" \" + \n ('yms.int.wms_register_document_total_elements' | translate:{value: gridTotalRecords}) }}\n </span>\n </ng-template>\n </p-table>\n </div>\n</div>",
|
|
4231
|
+
styles: [".table-col-width{width:250px}"]
|
|
4104
4232
|
}),
|
|
4105
4233
|
__metadata("design:paramtypes", [DocumentService])
|
|
4106
4234
|
], DocumentListComponent);
|