@seniorsistemas/yms-integration 1.38.0 → 1.39.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 +64 -10
- 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 +2 -2
- package/esm2015/src/wms/components/document-grid/insert-key/insert-key.component.js +33 -8
- package/esm2015/src/wms/components/document-grid/register-document/register-document.component.js +32 -3
- package/esm2015/src/wms/entities/document/document.service.js +4 -1
- package/esm5/src/wms/components/document-grid/document-grid.component.js +2 -2
- package/esm5/src/wms/components/document-grid/insert-key/insert-key.component.js +34 -8
- package/esm5/src/wms/components/document-grid/register-document/register-document.component.js +33 -3
- package/esm5/src/wms/entities/document/document.service.js +4 -1
- package/fesm2015/seniorsistemas-yms-integration.js +62 -10
- package/fesm2015/seniorsistemas-yms-integration.js.map +1 -1
- package/fesm5/seniorsistemas-yms-integration.js +64 -10
- 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/insert-key/insert-key.component.d.ts +6 -2
- package/src/wms/components/document-grid/register-document/register-document.component.d.ts +7 -1
- package/src/wms/entities/document/document.service.d.ts +1 -0
|
@@ -3316,6 +3316,9 @@
|
|
|
3316
3316
|
DocumentService.prototype.getSystemIntegration = function () {
|
|
3317
3317
|
return this.http.get('yms_int/wms/queries/getSystemIntegration');
|
|
3318
3318
|
};
|
|
3319
|
+
DocumentService.prototype.getPlanta = function (plantaId) {
|
|
3320
|
+
return this.http.get('yms/patio/entities/planta/' + plantaId);
|
|
3321
|
+
};
|
|
3319
3322
|
DocumentService = __decorate([
|
|
3320
3323
|
core.Injectable(),
|
|
3321
3324
|
__metadata("design:paramtypes", [http.HttpClient, api.MessageService])
|
|
@@ -3703,7 +3706,7 @@
|
|
|
3703
3706
|
DocumentGridComponent = __decorate([
|
|
3704
3707
|
core.Component({
|
|
3705
3708
|
selector: 'document-grid',
|
|
3706
|
-
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 [(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>",
|
|
3709
|
+
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>",
|
|
3707
3710
|
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}"]
|
|
3708
3711
|
}),
|
|
3709
3712
|
__metadata("design:paramtypes", [core$1.TranslateService,
|
|
@@ -3759,9 +3762,11 @@
|
|
|
3759
3762
|
}());
|
|
3760
3763
|
|
|
3761
3764
|
var RegisterDocumentComponent = /** @class */ (function () {
|
|
3762
|
-
function RegisterDocumentComponent(fb, translate) {
|
|
3765
|
+
function RegisterDocumentComponent(fb, translate, utils, documentService) {
|
|
3763
3766
|
this.fb = fb;
|
|
3764
3767
|
this.translate = translate;
|
|
3768
|
+
this.utils = utils;
|
|
3769
|
+
this.documentService = documentService;
|
|
3765
3770
|
this.document = new core.EventEmitter();
|
|
3766
3771
|
this.visible = new core.EventEmitter();
|
|
3767
3772
|
this.visibleChange = new core.EventEmitter();
|
|
@@ -3769,12 +3774,23 @@
|
|
|
3769
3774
|
this.invoiceCondition = getInvoiceConditions(this.translate);
|
|
3770
3775
|
}
|
|
3771
3776
|
RegisterDocumentComponent.prototype.ngOnInit = function () {
|
|
3777
|
+
this.getYard();
|
|
3772
3778
|
this.getFormGroup();
|
|
3773
3779
|
this.watchFormChanges();
|
|
3774
3780
|
};
|
|
3775
3781
|
RegisterDocumentComponent.prototype.ngOnChanges = function () {
|
|
3776
3782
|
this.visibilityConfig();
|
|
3777
3783
|
};
|
|
3784
|
+
RegisterDocumentComponent.prototype.getYard = function () {
|
|
3785
|
+
var _this = this;
|
|
3786
|
+
this.documentService.getPlanta(this.agenda.planta.id)
|
|
3787
|
+
.pipe(operators.catchError(function (err) {
|
|
3788
|
+
return rxjs.throwError(err);
|
|
3789
|
+
}))
|
|
3790
|
+
.subscribe(function (content) {
|
|
3791
|
+
_this.planta = content;
|
|
3792
|
+
});
|
|
3793
|
+
};
|
|
3778
3794
|
RegisterDocumentComponent.prototype.visibilityConfig = function () {
|
|
3779
3795
|
if (!this.edit && this.visible) {
|
|
3780
3796
|
this.formGroup.disable();
|
|
@@ -3825,6 +3841,17 @@
|
|
|
3825
3841
|
});
|
|
3826
3842
|
};
|
|
3827
3843
|
RegisterDocumentComponent.prototype.save = function () {
|
|
3844
|
+
if (this.isWmsSeniorConnect()) {
|
|
3845
|
+
if (!this.planta.codigo) {
|
|
3846
|
+
this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
|
|
3847
|
+
return;
|
|
3848
|
+
}
|
|
3849
|
+
var logistcUnitDocument = this.formGroup.get("logistcUnitDocument").value;
|
|
3850
|
+
if (logistcUnitDocument !== this.planta.codigo) {
|
|
3851
|
+
this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
|
|
3852
|
+
return;
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3828
3855
|
this.document.emit(Document.fromDto(this.formGroup.getRawValue()));
|
|
3829
3856
|
this.formGroup.reset();
|
|
3830
3857
|
};
|
|
@@ -3882,7 +3909,9 @@
|
|
|
3882
3909
|
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>"
|
|
3883
3910
|
}),
|
|
3884
3911
|
__metadata("design:paramtypes", [forms.FormBuilder,
|
|
3885
|
-
core$1.TranslateService
|
|
3912
|
+
core$1.TranslateService,
|
|
3913
|
+
UtilsMessageService,
|
|
3914
|
+
DocumentService])
|
|
3886
3915
|
], RegisterDocumentComponent);
|
|
3887
3916
|
return RegisterDocumentComponent;
|
|
3888
3917
|
}());
|
|
@@ -3936,8 +3965,8 @@
|
|
|
3936
3965
|
this.confirmationService = confirmationService;
|
|
3937
3966
|
this.translate = translate;
|
|
3938
3967
|
this.externalTenantService = externalTenantService;
|
|
3939
|
-
this.document = new core.EventEmitter();
|
|
3940
3968
|
this.visible = new core.EventEmitter();
|
|
3969
|
+
this.document = new core.EventEmitter();
|
|
3941
3970
|
this.visibleChange = new core.EventEmitter();
|
|
3942
3971
|
this.isLoading = false;
|
|
3943
3972
|
this.isPartnerloading = false;
|
|
@@ -3945,6 +3974,7 @@
|
|
|
3945
3974
|
}
|
|
3946
3975
|
InsertKeyComponent.prototype.ngOnInit = function () {
|
|
3947
3976
|
var _this = this;
|
|
3977
|
+
this.getYard();
|
|
3948
3978
|
this.formGroup = this.formBuilder.group({
|
|
3949
3979
|
key: [undefined],
|
|
3950
3980
|
purchaseOrder: [undefined],
|
|
@@ -3956,6 +3986,16 @@
|
|
|
3956
3986
|
_this.validateKeyDetails(nf);
|
|
3957
3987
|
});
|
|
3958
3988
|
};
|
|
3989
|
+
InsertKeyComponent.prototype.getYard = function () {
|
|
3990
|
+
var _this = this;
|
|
3991
|
+
this.documentService.getPlanta(this.agenda.planta.id)
|
|
3992
|
+
.pipe(operators.catchError(function (err) {
|
|
3993
|
+
return rxjs.throwError(err);
|
|
3994
|
+
}))
|
|
3995
|
+
.subscribe(function (content) {
|
|
3996
|
+
_this.planta = content;
|
|
3997
|
+
});
|
|
3998
|
+
};
|
|
3959
3999
|
InsertKeyComponent.prototype.isWmsWis = function () {
|
|
3960
4000
|
return this.wmsSystem === WmsSystem.WIS;
|
|
3961
4001
|
};
|
|
@@ -3999,6 +4039,16 @@
|
|
|
3999
4039
|
return;
|
|
4000
4040
|
}
|
|
4001
4041
|
var document = content.contents[0];
|
|
4042
|
+
if (_this.isWmsSeniorConnect()) {
|
|
4043
|
+
if (!_this.planta.codigo) {
|
|
4044
|
+
_this.utils.message("warn", "yms.int.yard_code_not_found_warning_header", "yms.int.yard_code_not_found_warning_description");
|
|
4045
|
+
return;
|
|
4046
|
+
}
|
|
4047
|
+
if (document.logistcUnitDocument !== _this.planta.codigo) {
|
|
4048
|
+
_this.utils.message("warn", "yms.int.document_yard_mismatch_agenda_warning_header", "yms.int.document_yard_mismatch_agenda_warning_description");
|
|
4049
|
+
return;
|
|
4050
|
+
}
|
|
4051
|
+
}
|
|
4002
4052
|
document.invoiceKey = _this.formGroup.get('key').value;
|
|
4003
4053
|
document.invoiceCondition = InvoiceCondition.AUTHORIZED;
|
|
4004
4054
|
_this.document.emit(document);
|
|
@@ -4088,18 +4138,22 @@
|
|
|
4088
4138
|
InsertKeyComponent.prototype.onDialogShow = function () {
|
|
4089
4139
|
this.formGroup.reset();
|
|
4090
4140
|
};
|
|
4091
|
-
__decorate([
|
|
4092
|
-
core.Output(),
|
|
4093
|
-
__metadata("design:type", core.EventEmitter)
|
|
4094
|
-
], InsertKeyComponent.prototype, "document", void 0);
|
|
4095
4141
|
__decorate([
|
|
4096
4142
|
core.Input(),
|
|
4097
|
-
__metadata("design:type",
|
|
4098
|
-
], InsertKeyComponent.prototype, "
|
|
4143
|
+
__metadata("design:type", Agenda)
|
|
4144
|
+
], InsertKeyComponent.prototype, "agenda", void 0);
|
|
4099
4145
|
__decorate([
|
|
4100
4146
|
core.Input(),
|
|
4101
4147
|
__metadata("design:type", String)
|
|
4102
4148
|
], InsertKeyComponent.prototype, "wmsSystem", void 0);
|
|
4149
|
+
__decorate([
|
|
4150
|
+
core.Input(),
|
|
4151
|
+
__metadata("design:type", core.EventEmitter)
|
|
4152
|
+
], InsertKeyComponent.prototype, "visible", void 0);
|
|
4153
|
+
__decorate([
|
|
4154
|
+
core.Output(),
|
|
4155
|
+
__metadata("design:type", core.EventEmitter)
|
|
4156
|
+
], InsertKeyComponent.prototype, "document", void 0);
|
|
4103
4157
|
__decorate([
|
|
4104
4158
|
core.Output(),
|
|
4105
4159
|
__metadata("design:type", Object)
|