@seniorsistemas/yms-integration 1.37.0 → 1.38.0-591f5730-03b4-4f60-9cea-dcdc8ef07f02
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 +88 -27
- 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 +10 -5
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +41 -16
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +35 -4
- package/esm2015/src/wms/components/document-list/document-list.component.js +6 -3
- package/esm2015/src/wms/entities/document/document.service.js +4 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +10 -8
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +42 -16
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +36 -4
- package/esm5/src/wms/components/document-list/document-list.component.js +6 -3
- package/esm5/src/wms/entities/document/document.service.js +4 -1
- package/fesm2015/seniorsistemas-yms-integration.js +86 -24
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +88 -27
- 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 +1 -0
- package/src/wms/components/document-grid/insert-key/insert-key.component.d.ts +6 -2
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +8 -1
- package/src/wms/entities/document/document.service.d.ts +1 -0
|
@@ -3037,6 +3037,9 @@ let DocumentService = class DocumentService extends EntityService {
|
|
|
3037
3037
|
getSystemIntegration() {
|
|
3038
3038
|
return this.http.get('yms_int/wms/queries/getSystemIntegration');
|
|
3039
3039
|
}
|
|
3040
|
+
getPlanta(plantaId) {
|
|
3041
|
+
return this.http.get('yms/patio/entities/planta/' + plantaId);
|
|
3042
|
+
}
|
|
3040
3043
|
};
|
|
3041
3044
|
DocumentService = __decorate([
|
|
3042
3045
|
Injectable(),
|
|
@@ -3312,8 +3315,8 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3312
3315
|
const columns = [
|
|
3313
3316
|
{ field: "key", header: this.translate.instant("yms.int.wms_purchaseOrder") },
|
|
3314
3317
|
...this.getColumnPartner(),
|
|
3318
|
+
...this.getColumnlogistcUnit()
|
|
3315
3319
|
];
|
|
3316
|
-
this.addInvoiceSituationIfNotClienteExterno(columns);
|
|
3317
3320
|
return columns;
|
|
3318
3321
|
}
|
|
3319
3322
|
wmsWisIntegration() {
|
|
@@ -3341,8 +3344,7 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3341
3344
|
{ field: "invoiceNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_number") },
|
|
3342
3345
|
{ field: "invoiceSerialNumber", header: this.translate.instant("yms.int.wms_register_document_invoice_serial_number") },
|
|
3343
3346
|
...this.getColumnPartner(),
|
|
3344
|
-
|
|
3345
|
-
{ field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
|
|
3347
|
+
...this.getColumnlogistcUnit()
|
|
3346
3348
|
];
|
|
3347
3349
|
}
|
|
3348
3350
|
getColumnPartner() {
|
|
@@ -3351,6 +3353,12 @@ let DocumentGridComponent = class DocumentGridComponent {
|
|
|
3351
3353
|
{ field: "partnerDocument", header: this.translate.instant("yms.int.wms_register_document_partner_document") },
|
|
3352
3354
|
];
|
|
3353
3355
|
}
|
|
3356
|
+
getColumnlogistcUnit() {
|
|
3357
|
+
return [
|
|
3358
|
+
{ field: "logistcUnitName", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_name") },
|
|
3359
|
+
{ field: "logistcUnitDocument", header: this.translate.instant("yms.int.wms_register_document_logistc_unit_document") },
|
|
3360
|
+
];
|
|
3361
|
+
}
|
|
3354
3362
|
addInvoiceSituationIfNotClienteExterno(columns) {
|
|
3355
3363
|
if (!this.isClienteExterno) {
|
|
3356
3364
|
columns.push(this.getColumninvoiceCondition());
|
|
@@ -3416,7 +3424,7 @@ __decorate([
|
|
|
3416
3424
|
DocumentGridComponent = __decorate([
|
|
3417
3425
|
Component({
|
|
3418
3426
|
selector: 'document-grid',
|
|
3419
|
-
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 [disabled]=\"notSavedDocuments()\"\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\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n [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\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\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]=\"getFilteredInvoiceConditions(rowData?.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]=\"'yms.main.total_records'\" \n [translateParams]=\"{ value: documentTotalRecords }\">\n </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>",
|
|
3427
|
+
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 [disabled]=\"notSavedDocuments()\"\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\" [scrollable]=\"true\" [resizableColumns]=\"true\"\n [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\" pResizableColumn>\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\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() || isWmsSeniorConnect()\" (click)=\"selection = [rowData]\">\n <span>{{rowData[\"logistcUnitName\"]}}</span>\n </td>\n <td *ngIf=\"isWmsWIS() || isWmsSilt() || isWmsSeniorConnect()\" (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 && isWmsWIS()\" (click)=\"selection = [rowData]\">\n <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"getFilteredInvoiceConditions(rowData?.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]=\"'yms.main.total_records'\" \n [translateParams]=\"{ value: documentTotalRecords }\">\n </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 [agenda]=\"agenda\"\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>",
|
|
3420
3428
|
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}"]
|
|
3421
3429
|
}),
|
|
3422
3430
|
__metadata("design:paramtypes", [TranslateService,
|
|
@@ -3467,9 +3475,11 @@ class Document {
|
|
|
3467
3475
|
}
|
|
3468
3476
|
|
|
3469
3477
|
let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
3470
|
-
constructor(fb, translate) {
|
|
3478
|
+
constructor(fb, translate, utils, documentService) {
|
|
3471
3479
|
this.fb = fb;
|
|
3472
3480
|
this.translate = translate;
|
|
3481
|
+
this.utils = utils;
|
|
3482
|
+
this.documentService = documentService;
|
|
3473
3483
|
this.document = new EventEmitter();
|
|
3474
3484
|
this.visible = new EventEmitter();
|
|
3475
3485
|
this.visibleChange = new EventEmitter();
|
|
@@ -3477,12 +3487,22 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3477
3487
|
this.invoiceCondition = getInvoiceConditions(this.translate);
|
|
3478
3488
|
}
|
|
3479
3489
|
ngOnInit() {
|
|
3490
|
+
this.getYard();
|
|
3480
3491
|
this.getFormGroup();
|
|
3481
3492
|
this.watchFormChanges();
|
|
3482
3493
|
}
|
|
3483
3494
|
ngOnChanges() {
|
|
3484
3495
|
this.visibilityConfig();
|
|
3485
3496
|
}
|
|
3497
|
+
getYard() {
|
|
3498
|
+
this.documentService.getPlanta(this.agenda.planta.id)
|
|
3499
|
+
.pipe(catchError(err => {
|
|
3500
|
+
return throwError(err);
|
|
3501
|
+
}))
|
|
3502
|
+
.subscribe((content) => {
|
|
3503
|
+
this.planta = content;
|
|
3504
|
+
});
|
|
3505
|
+
}
|
|
3486
3506
|
visibilityConfig() {
|
|
3487
3507
|
if (!this.edit && this.visible) {
|
|
3488
3508
|
this.formGroup.disable();
|
|
@@ -3533,12 +3553,24 @@ let RegisterDocumentComponent = class RegisterDocumentComponent {
|
|
|
3533
3553
|
});
|
|
3534
3554
|
}
|
|
3535
3555
|
save() {
|
|
3556
|
+
if (!this.planta.codigo) {
|
|
3557
|
+
this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
|
|
3558
|
+
return;
|
|
3559
|
+
}
|
|
3560
|
+
const logistcUnitDocument = this.formGroup.get("logistcUnitDocument").value;
|
|
3561
|
+
if (logistcUnitDocument !== this.planta.codigo) {
|
|
3562
|
+
this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3563
|
+
return;
|
|
3564
|
+
}
|
|
3536
3565
|
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3537
3566
|
this.formGroup.reset();
|
|
3538
3567
|
}
|
|
3539
3568
|
isWmsWis() {
|
|
3540
3569
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3541
3570
|
}
|
|
3571
|
+
isWmsSenior() {
|
|
3572
|
+
return this.wmsSystem === WmsSystem.SENIOR;
|
|
3573
|
+
}
|
|
3542
3574
|
isWmsSeniorConnect() {
|
|
3543
3575
|
return this.wmsSystem === WmsSystem.SENIOR_CONNECT;
|
|
3544
3576
|
}
|
|
@@ -3584,9 +3616,12 @@ __decorate([
|
|
|
3584
3616
|
RegisterDocumentComponent = __decorate([
|
|
3585
3617
|
Component({
|
|
3586
3618
|
selector: "register-document",
|
|
3587
|
-
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>"
|
|
3619
|
+
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\" *ngIf=\"isWmsSenior() || isWmsWis()\">\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 && isWmsWis()\">\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>"
|
|
3588
3620
|
}),
|
|
3589
|
-
__metadata("design:paramtypes", [FormBuilder,
|
|
3621
|
+
__metadata("design:paramtypes", [FormBuilder,
|
|
3622
|
+
TranslateService,
|
|
3623
|
+
UtilsMessageService,
|
|
3624
|
+
DocumentService])
|
|
3590
3625
|
], RegisterDocumentComponent);
|
|
3591
3626
|
|
|
3592
3627
|
let RegisterDocumentModule = class RegisterDocumentModule {
|
|
@@ -3632,14 +3667,15 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3632
3667
|
this.confirmationService = confirmationService;
|
|
3633
3668
|
this.translate = translate;
|
|
3634
3669
|
this.externalTenantService = externalTenantService;
|
|
3635
|
-
this.document = new EventEmitter();
|
|
3636
3670
|
this.visible = new EventEmitter();
|
|
3671
|
+
this.document = new EventEmitter();
|
|
3637
3672
|
this.visibleChange = new EventEmitter();
|
|
3638
3673
|
this.isLoading = false;
|
|
3639
3674
|
this.isPartnerloading = false;
|
|
3640
3675
|
this.ngUnsubscribe = new Subject();
|
|
3641
3676
|
}
|
|
3642
3677
|
ngOnInit() {
|
|
3678
|
+
this.getYard();
|
|
3643
3679
|
this.formGroup = this.formBuilder.group({
|
|
3644
3680
|
key: [undefined],
|
|
3645
3681
|
purchaseOrder: [undefined],
|
|
@@ -3651,6 +3687,15 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3651
3687
|
this.validateKeyDetails(nf);
|
|
3652
3688
|
});
|
|
3653
3689
|
}
|
|
3690
|
+
getYard() {
|
|
3691
|
+
this.documentService.getPlanta(this.agenda.planta.id)
|
|
3692
|
+
.pipe(catchError(err => {
|
|
3693
|
+
return throwError(err);
|
|
3694
|
+
}))
|
|
3695
|
+
.subscribe((content) => {
|
|
3696
|
+
this.planta = content;
|
|
3697
|
+
});
|
|
3698
|
+
}
|
|
3654
3699
|
isWmsWis() {
|
|
3655
3700
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3656
3701
|
}
|
|
@@ -3680,7 +3725,7 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3680
3725
|
this.utils.message("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_search_document_not_found_message_content");
|
|
3681
3726
|
}
|
|
3682
3727
|
else {
|
|
3683
|
-
this.utils.translateMessage("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_unknown_search_document_message_content" + err.error.message);
|
|
3728
|
+
this.utils.translateMessage("error", "yms.int.wms_error_search_document_message_header", "yms.int.wms_error_unknown_search_document_message_content " + err.error.message);
|
|
3684
3729
|
}
|
|
3685
3730
|
this.confirmInvoiceDialog();
|
|
3686
3731
|
return throwError(err);
|
|
@@ -3693,6 +3738,14 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3693
3738
|
return;
|
|
3694
3739
|
}
|
|
3695
3740
|
const document = content.contents[0];
|
|
3741
|
+
if (!this.planta.codigo) {
|
|
3742
|
+
this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
|
|
3743
|
+
return;
|
|
3744
|
+
}
|
|
3745
|
+
if (document.logistcUnitDocument !== this.planta.codigo) {
|
|
3746
|
+
this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3747
|
+
return;
|
|
3748
|
+
}
|
|
3696
3749
|
document.invoiceKey = this.formGroup.get('key').value;
|
|
3697
3750
|
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
3698
3751
|
this.document.emit(document);
|
|
@@ -3700,13 +3753,15 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3700
3753
|
});
|
|
3701
3754
|
}
|
|
3702
3755
|
confirmInvoiceDialog() {
|
|
3703
|
-
this.
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3756
|
+
if (this.isWmsWis()) {
|
|
3757
|
+
this.confirmationService.confirm({
|
|
3758
|
+
message: this.translate.instant("yms.int.wms_message_confirm_invoice_dialog"),
|
|
3759
|
+
acceptLabel: this.translate.instant("yms.int.wms_accept_confirm_invoice_dialog"),
|
|
3760
|
+
rejectLabel: this.translate.instant("yms.int.wms_reject_confirm_invoice_dialog"),
|
|
3761
|
+
header: this.translate.instant("yms.int.wms_header_content_confirm_invoice_dialog"),
|
|
3762
|
+
accept: () => this.buildInvoice()
|
|
3763
|
+
});
|
|
3764
|
+
}
|
|
3710
3765
|
}
|
|
3711
3766
|
buildInvoice() {
|
|
3712
3767
|
this.isPartnerloading = true;
|
|
@@ -3779,18 +3834,22 @@ let InsertKeyComponent = class InsertKeyComponent {
|
|
|
3779
3834
|
this.formGroup.reset();
|
|
3780
3835
|
}
|
|
3781
3836
|
};
|
|
3782
|
-
__decorate([
|
|
3783
|
-
Output(),
|
|
3784
|
-
__metadata("design:type", EventEmitter)
|
|
3785
|
-
], InsertKeyComponent.prototype, "document", void 0);
|
|
3786
3837
|
__decorate([
|
|
3787
3838
|
Input(),
|
|
3788
|
-
__metadata("design:type",
|
|
3789
|
-
], InsertKeyComponent.prototype, "
|
|
3839
|
+
__metadata("design:type", Agenda)
|
|
3840
|
+
], InsertKeyComponent.prototype, "agenda", void 0);
|
|
3790
3841
|
__decorate([
|
|
3791
3842
|
Input(),
|
|
3792
3843
|
__metadata("design:type", String)
|
|
3793
3844
|
], InsertKeyComponent.prototype, "wmsSystem", void 0);
|
|
3845
|
+
__decorate([
|
|
3846
|
+
Input(),
|
|
3847
|
+
__metadata("design:type", EventEmitter)
|
|
3848
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
3849
|
+
__decorate([
|
|
3850
|
+
Output(),
|
|
3851
|
+
__metadata("design:type", EventEmitter)
|
|
3852
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
3794
3853
|
__decorate([
|
|
3795
3854
|
Output(),
|
|
3796
3855
|
__metadata("design:type", Object)
|
|
@@ -3953,6 +4012,9 @@ let DocumentListComponent = class DocumentListComponent extends DocumentListDesc
|
|
|
3953
4012
|
{ field: "key", label: 'yms.int.wms_purchaseOrder' },
|
|
3954
4013
|
{ field: "partnerName", label: 'yms.int.wms_register_document_invoice_partner_name' },
|
|
3955
4014
|
{ field: "partnerDocument", label: 'yms.int.wms_register_document_invoice_partner_document' },
|
|
4015
|
+
{ field: "logistcUnitName", label: 'yms.int.wms_register_document_logistc_unit_name' },
|
|
4016
|
+
{ field: "logistcUnitDocument", label: 'yms.int.wms_register_document_logistc_unit_document' },
|
|
4017
|
+
{ field: "notes", label: 'yms.int.wms_register_document_notes' },
|
|
3956
4018
|
];
|
|
3957
4019
|
}
|
|
3958
4020
|
return [
|
|
@@ -4045,8 +4107,8 @@ __decorate([
|
|
|
4045
4107
|
], DocumentListComponent.prototype, "wmsSystem", void 0);
|
|
4046
4108
|
DocumentListComponent = __decorate([
|
|
4047
4109
|
Component({
|
|
4048
|
-
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\"
|
|
4049
|
-
styles: [".
|
|
4110
|
+
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\" [style.width]=\"col.field === 'notes' ? '400px' : '250px'\">\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?.invoiceKey || '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 <p-dropdown\n inputId=\"invoiceCondition\"\n name=\"invoiceCondition\"\n [autoWidth]=\"false\"\n [options]=\"getFilteredInvoiceConditions(rowData?.invoiceCondition)\"\n appendTo=\"body\"\n [(ngModel)]=\"rowData.invoiceCondition\"\n [disabled]=\"isAuthorized(rowData.invoiceCondition)\"\n (onChange)=\"onInvoiceConditionChange($event, rowData)\">\n </p-dropdown>\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 <td>{{rowData?.logistcUnitName}}</td>\n <td>{{rowData?.logistcUnitDocument}}</td>\n <td>{{rowData?.notes}}</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 class=\"button-save\">\n <s-button priority=\"primary\" [label]=\"'save' | translate\"\n [disabled]=\"!disabled || !this.documents\"\n (click)=\"save()\">\n </s-button>\n </div>\n </div>\n</div>",
|
|
4111
|
+
styles: [".button-save{margin:5px 0}"]
|
|
4050
4112
|
}),
|
|
4051
4113
|
__metadata("design:paramtypes", [DocumentService,
|
|
4052
4114
|
TranslateService,
|