mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1304: Merge Develop -> Release/2.0
Merge Develop -> Release/2.0 Related work items: #905, #2737, #2790, #3040, #3150, #3157, #3158, #3175, #3179, #3189, #3212, #3234
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
ReceiptDTO,
|
||||
ReturnDTO,
|
||||
ReturnQueryTokenDTO,
|
||||
BatchResponseArgsOfReturnItemDTOAndReturnItemDTO,
|
||||
} from '@swagger/remi';
|
||||
import { memorize } from '@utils/common';
|
||||
import { Observable, of, throwError } from 'rxjs';
|
||||
@@ -200,7 +201,7 @@ export class DomainRemissionService {
|
||||
);
|
||||
}
|
||||
|
||||
getStockInformation(items: RemissionListItem[]) {
|
||||
getStockInformation(items: RemissionListItem[], recalculate: boolean = false) {
|
||||
return this.getCurrentStock().pipe(
|
||||
switchMap((stock) =>
|
||||
this._stockService
|
||||
@@ -230,14 +231,17 @@ export class DomainRemissionService {
|
||||
|
||||
let { remainingQuantity, remissionQuantity } = item;
|
||||
|
||||
remissionQuantity = inStock - (remainingQuantity || 0);
|
||||
if (remissionQuantity < 0) {
|
||||
remissionQuantity = 0;
|
||||
if (!remissionQuantity || recalculate) {
|
||||
remissionQuantity = inStock - (remainingQuantity || 0);
|
||||
if (remissionQuantity < 0) {
|
||||
remissionQuantity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
remainingQuantity = inStock - (remissionQuantity || 0);
|
||||
if (remainingQuantity < 0) {
|
||||
remainingQuantity = 0;
|
||||
if (!remainingQuantity || recalculate) {
|
||||
remainingQuantity = inStock - (remissionQuantity || 0);
|
||||
if (remainingQuantity < 0) {
|
||||
remainingQuantity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return { ...item, remainingQuantity, remissionQuantity, inStock };
|
||||
@@ -295,6 +299,12 @@ export class DomainRemissionService {
|
||||
);
|
||||
}
|
||||
|
||||
canAddReturnItem(item: ReturnItemDTO): Observable<BatchResponseArgsOfReturnItemDTOAndReturnItemDTO> {
|
||||
return this._remiService.RemiCanAddReturnItem({
|
||||
data: [item],
|
||||
});
|
||||
}
|
||||
|
||||
async createReturn(supplierId: number, returnGroup?: string): Promise<ReturnDTO> {
|
||||
const response = await this._returnService
|
||||
.ReturnCreateReturn({
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
(search)="search()"
|
||||
[hint]="message"
|
||||
[scanner]="true"
|
||||
></ui-filter-input-group-main>
|
||||
(queryChange)="queryChange()"
|
||||
>
|
||||
</ui-filter-input-group-main>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Component, ChangeDetectionStrategy, OnInit, OnDestroy, ChangeDetectorRe
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { BreadcrumbService } from '@core/breadcrumb';
|
||||
import { OrderItemListItemDTO } from '@swagger/oms';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { distinctUntilChanged, first, map } from 'rxjs/operators';
|
||||
import { combineLatest, Subscription } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, first, map } from 'rxjs/operators';
|
||||
import { GoodsOutSearchStore } from '../goods-out-search.store';
|
||||
|
||||
@Component({
|
||||
@@ -19,6 +19,8 @@ export class GoodsOutSearchMainComponent implements OnInit, OnDestroy {
|
||||
|
||||
message: string;
|
||||
|
||||
lastProcessId: number | undefined;
|
||||
|
||||
private _subscriptions = new Subscription();
|
||||
|
||||
get processId() {
|
||||
@@ -43,11 +45,12 @@ export class GoodsOutSearchMainComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
this._subscriptions.add(
|
||||
this.processId$.pipe(distinctUntilChanged()).subscribe((processId) => {
|
||||
this._goodsOutSearchStore.setQueryParams(this._activatedRoute.snapshot.queryParams);
|
||||
// this.updateBreadcrumb(processId);
|
||||
this.removeBreadcrumbs(processId);
|
||||
})
|
||||
combineLatest([this.processId$, this._activatedRoute.queryParams])
|
||||
.pipe(debounceTime(50))
|
||||
.subscribe(([processId, queryParams]) => {
|
||||
this._goodsOutSearchStore.setQueryParams(queryParams);
|
||||
this.removeBreadcrumbs(processId);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -102,20 +105,22 @@ export class GoodsOutSearchMainComponent implements OnInit, OnDestroy {
|
||||
this._goodsOutSearchStore.search({});
|
||||
}
|
||||
|
||||
async updateBreadcrumb(processId: number) {
|
||||
async updateBreadcrumb(processId: number, params: Record<string, string>) {
|
||||
await this._breadcrumb.addOrUpdateBreadcrumbIfNotExists({
|
||||
key: this.processId,
|
||||
key: processId,
|
||||
name: 'Warenausgabe',
|
||||
path: `/kunde/${this.processId}/goods/out`,
|
||||
path: `/kunde/${processId}/goods/out`,
|
||||
tags: ['goods-out', 'main', 'filter'],
|
||||
section: 'customer',
|
||||
params: this._goodsOutSearchStore.filter?.getQueryParams(),
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
async updateQueryParams(processId: number) {
|
||||
await this._router.navigate([], { queryParams: this._goodsOutSearchStore.filter?.getQueryParams() });
|
||||
this.updateBreadcrumb(processId);
|
||||
const queryParams = { ...this._goodsOutSearchStore.filter?.getQueryParams() };
|
||||
queryParams.main_qs = queryParams.main_qs ?? '';
|
||||
await this._router.navigate([], { queryParams });
|
||||
this.updateBreadcrumb(processId, queryParams);
|
||||
}
|
||||
|
||||
getDetailsPath(item: OrderItemListItemDTO, processId: number) {
|
||||
@@ -123,4 +128,8 @@ export class GoodsOutSearchMainComponent implements OnInit, OnDestroy {
|
||||
? `/kunde/${processId}/goods/out/details/compartment/${encodeURIComponent(item?.compartmentCode)}/${item?.processingStatus}`
|
||||
: `/kunde/${processId}/goods/out/details/order/${encodeURIComponent(item?.orderNumber)}/${item?.processingStatus}`;
|
||||
}
|
||||
|
||||
queryChange() {
|
||||
this.updateQueryParams(this.processId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,9 +89,6 @@ export class GoodsOutSearchResultsComponent extends ComponentStore<GoodsOutSearc
|
||||
this.processId$
|
||||
.pipe(takeUntil(this._onDestroy$), debounceTime(1), withLatestFrom(this._activatedRoute.queryParams))
|
||||
.subscribe(([processId, params]) => {
|
||||
console.log('processId', processId);
|
||||
console.log('params', params);
|
||||
|
||||
this._goodsOutSearchStore.setQueryParams(params);
|
||||
this.updateBreadcrumb(processId, params);
|
||||
|
||||
|
||||
@@ -55,5 +55,5 @@
|
||||
</div>
|
||||
<hr />
|
||||
<div class="actions">
|
||||
<button class="cta-add" (click)="addClick()">Hinzufügen</button>
|
||||
<button class="cta-add" (click)="addClick()" [disabled]="!(canAdd$ | async)">Hinzufügen</button>
|
||||
</div>
|
||||
|
||||
@@ -13,5 +13,9 @@ hr {
|
||||
|
||||
.cta-add {
|
||||
@apply border-2 border-solid border-brand rounded-full py-3 px-6 font-bold text-lg outline-none self-end whitespace-nowrap bg-brand text-white no-underline;
|
||||
|
||||
&[disabled] {
|
||||
@apply cursor-not-allowed bg-inactive-branch border-inactive-branch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Component, ChangeDetectionStrategy, OnDestroy } from '@angular/core';
|
||||
import { Component, ChangeDetectionStrategy, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { CacheService } from '@core/cache';
|
||||
import { Config } from '@core/config';
|
||||
import { DomainRemissionService } from '@domain/remission';
|
||||
import { ReturnItemDTO } from '@swagger/remi';
|
||||
import { UiErrorModalComponent, UiModalRef, UiModalService } from '@ui/modal';
|
||||
import { UiErrorModalComponent, UiMessageModalComponent, UiModalRef, UiModalService } from '@ui/modal';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { first, map, takeUntil } from 'rxjs/operators';
|
||||
import { AddProductModalData } from './add-product-modal.data';
|
||||
@@ -15,7 +15,7 @@ import { AddProductModalData } from './add-product-modal.data';
|
||||
styleUrls: ['add-product-modal.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AddProductModalComponent implements OnDestroy {
|
||||
export class AddProductModalComponent implements OnInit, OnDestroy {
|
||||
private _onDestroy$ = new Subject();
|
||||
|
||||
get processId() {
|
||||
@@ -30,6 +30,8 @@ export class AddProductModalComponent implements OnDestroy {
|
||||
|
||||
selectedReason: string;
|
||||
|
||||
canAdd$ = new BehaviorSubject<boolean>(false);
|
||||
|
||||
get title() {
|
||||
return [this.item.product.contributors, this.item.product.name].filter((f) => !!f).join(' - ');
|
||||
}
|
||||
@@ -60,6 +62,13 @@ export class AddProductModalComponent implements OnDestroy {
|
||||
reasonChanged(reason: string) {
|
||||
this.selectedReason = reason;
|
||||
this.message$.next(undefined);
|
||||
this.checkCanAdd();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.checkCanAdd();
|
||||
|
||||
this.form.valueChanges.pipe(takeUntil(this._onDestroy$)).subscribe(() => this.checkCanAdd());
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@@ -67,6 +76,31 @@ export class AddProductModalComponent implements OnDestroy {
|
||||
this._onDestroy$.complete();
|
||||
}
|
||||
|
||||
async checkCanAdd() {
|
||||
try {
|
||||
const canAdd = await this._remiService
|
||||
.canAddReturnItem({
|
||||
...this.item,
|
||||
returnReason: this.selectedReason,
|
||||
predefinedReturnQuantity: this.form.value.quantity,
|
||||
})
|
||||
.pipe(first())
|
||||
.toPromise();
|
||||
|
||||
if (canAdd.failed?.length > 0) {
|
||||
const message = canAdd.failed.map((f) => Object.values(f.invalidProperties).join('\n')).join('\n');
|
||||
this.message$.next(message);
|
||||
} else {
|
||||
this.canAdd$.next(true);
|
||||
}
|
||||
} catch (err) {
|
||||
this._modal.open({
|
||||
content: UiErrorModalComponent,
|
||||
data: err,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async addClick() {
|
||||
if (!this.selectedReason) {
|
||||
this.message$.next('Bitte wählen Sie einen Remigrund');
|
||||
@@ -74,9 +108,22 @@ export class AddProductModalComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
try {
|
||||
await this._remiService.addProductToRemit(this.item, this.selectedReason, this.form.value.quantity).pipe(first()).toPromise();
|
||||
this._cache.delete({ processId: String(this.processId) });
|
||||
this._modalRef.close(true);
|
||||
const result = await this._remiService
|
||||
.addProductToRemit(this.item, this.selectedReason, this.form.value.quantity)
|
||||
.pipe(first())
|
||||
.toPromise();
|
||||
|
||||
if (result.failed?.length > 0) {
|
||||
const message = result.failed.map((f) => Object.values(f.invalidProperties).join('\n')).join('\n');
|
||||
this._modal.open({
|
||||
content: UiMessageModalComponent,
|
||||
data: { message },
|
||||
// title: 'Artikel kann nicht remittiert werden',
|
||||
});
|
||||
} else {
|
||||
this._cache.delete({ processId: String(this.processId) });
|
||||
this._modalRef.close(true);
|
||||
}
|
||||
} catch (err) {
|
||||
this._modalRef.close();
|
||||
this._modal.open({
|
||||
|
||||
@@ -178,7 +178,7 @@ export class RemissionListItemComponent implements OnDestroy {
|
||||
);
|
||||
|
||||
if (itemsByEan?.length > 0) {
|
||||
const updatedItems = await this.updateStockInformation(itemsByEan);
|
||||
const updatedItems = await this.updateStockInformation(itemsByEan, true);
|
||||
updatedItems.forEach((i) => this._store.updateItem(i));
|
||||
}
|
||||
}
|
||||
@@ -254,14 +254,14 @@ export class RemissionListItemComponent implements OnDestroy {
|
||||
}
|
||||
|
||||
// Anzeige der Remi-Menge und des aktuellen Bestands aktualisieren
|
||||
const items = await this.updateStockInformation([item]);
|
||||
const items = await this.updateStockInformation([item], false);
|
||||
|
||||
this._store.addItems(items);
|
||||
}
|
||||
|
||||
async updateStockInformation(items: RemissionListItem[]) {
|
||||
async updateStockInformation(items: RemissionListItem[], recalculate: boolean) {
|
||||
try {
|
||||
const res = await this._remissionService.getStockInformation(items).toPromise();
|
||||
const res = await this._remissionService.getStockInformation(items, recalculate).toPromise();
|
||||
items.forEach((item) => {
|
||||
const resForItem = res.find((r) => r.dto.id === item.dto.id);
|
||||
item.remissionQuantity = resForItem?.remissionQuantity;
|
||||
|
||||
@@ -166,7 +166,8 @@ export class SharedGoodsInOutOrderDetailsComponent extends SharedGoodsInOutOrder
|
||||
let commandData: OrderItemsContext = {
|
||||
items: this.getitemsToUpdate(),
|
||||
compartmentInfo: compartmentInfo || this.compartmentInfo,
|
||||
compartmentCode,
|
||||
compartmentCode:
|
||||
action.command.includes('PRINT_PRICEDIFFQRCODELABEL') && !compartmentCode ? this.orderItems[0]?.compartmentCode : compartmentCode,
|
||||
itemQuantity: this.getItemQuantityMap(),
|
||||
receipts: this.receipts,
|
||||
};
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
export { ResponseArgsOfSDVFilialdatenDTO } from './models/response-args-of-sdvfilialdaten-dto';
|
||||
export { SDVFilialdatenDTO } from './models/sdvfilialdaten-dto';
|
||||
export { ResponseArgs } from './models/response-args';
|
||||
export { DialogOfString } from './models/dialog-of-string';
|
||||
export { DialogSettings } from './models/dialog-settings';
|
||||
export { DialogContentType } from './models/dialog-content-type';
|
||||
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
|
||||
export { IPublicUserInfo } from './models/ipublic-user-info';
|
||||
export { ProblemDetails } from './models/problem-details';
|
||||
export { ListResponseArgsOfPackageDTO } from './models/list-response-args-of-package-dto';
|
||||
export { ResponseArgsOfIEnumerableOfPackageDTO } from './models/response-args-of-ienumerable-of-package-dto';
|
||||
export { PackageDTO } from './models/package-dto';
|
||||
@@ -24,9 +33,6 @@ export { GeoLocation } from './models/geo-location';
|
||||
export { CommunicationDetailsDTO } from './models/communication-details-dto';
|
||||
export { EntityDTOOfPackageDTOAndIPackage } from './models/entity-dtoof-package-dtoand-ipackage';
|
||||
export { ReadOnlyEntityDTOOfPackageDTOAndIPackage } from './models/read-only-entity-dtoof-package-dtoand-ipackage';
|
||||
export { ResponseArgs } from './models/response-args';
|
||||
export { IPublicUserInfo } from './models/ipublic-user-info';
|
||||
export { ProblemDetails } from './models/problem-details';
|
||||
export { ResponseArgsOfPackageDTO } from './models/response-args-of-package-dto';
|
||||
export { ResponseArgsOfNullableBoolean } from './models/response-args-of-nullable-boolean';
|
||||
export { ListResponseArgsOfReturnItemDTO } from './models/list-response-args-of-return-item-dto';
|
||||
@@ -149,7 +155,6 @@ export { InputOptionsDTO } from './models/input-options-dto';
|
||||
export { OptionDTO } from './models/option-dto';
|
||||
export { ResponseArgsOfIEnumerableOfInputDTO } from './models/response-args-of-ienumerable-of-input-dto';
|
||||
export { ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndString } from './models/response-args-of-ienumerable-of-key-value-dtoof-string-and-string';
|
||||
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
|
||||
export { ResponseArgsOfIEnumerableOfValueTupleOfStringAndIntegerAndIntegerAndNullableIntegerAndString } from './models/response-args-of-ienumerable-of-value-tuple-of-string-and-integer-and-integer-and-nullable-integer-and-string';
|
||||
export { ValueTupleOfStringAndIntegerAndIntegerAndNullableIntegerAndString } from './models/value-tuple-of-string-and-integer-and-integer-and-nullable-integer-and-string';
|
||||
export { CapacityRequest } from './models/capacity-request';
|
||||
@@ -174,6 +179,8 @@ export { ResponseArgsOfIEnumerableOfReceiptDTO } from './models/response-args-of
|
||||
export { ResponseArgsOfReceiptItemDTO } from './models/response-args-of-receipt-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfStockInfoDTO } from './models/response-args-of-ienumerable-of-stock-info-dto';
|
||||
export { StockInfoDTO } from './models/stock-info-dto';
|
||||
export { StockStatus } from './models/stock-status';
|
||||
export { StocksRequestValues } from './models/stocks-request-values';
|
||||
export { StockRequestValues } from './models/stock-request-values';
|
||||
export { ResponseArgsOfIEnumerableOfReturnInfoDTO } from './models/response-args-of-ienumerable-of-return-info-dto';
|
||||
export { ReturnInfoDTO } from './models/return-info-dto';
|
||||
|
||||
2
apps/swagger/remi/src/lib/models/dialog-content-type.ts
Normal file
2
apps/swagger/remi/src/lib/models/dialog-content-type.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
/* tslint:disable */
|
||||
export type DialogContentType = 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128;
|
||||
16
apps/swagger/remi/src/lib/models/dialog-of-string.ts
Normal file
16
apps/swagger/remi/src/lib/models/dialog-of-string.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/* tslint:disable */
|
||||
import { KeyValueDTOOfStringAndString } from './key-value-dtoof-string-and-string';
|
||||
import { DialogContentType } from './dialog-content-type';
|
||||
import { DialogSettings } from './dialog-settings';
|
||||
export interface DialogOfString {
|
||||
actions?: Array<KeyValueDTOOfStringAndString>;
|
||||
actionsRequired?: number;
|
||||
area?: string;
|
||||
content?: string;
|
||||
contentType: DialogContentType;
|
||||
description?: string;
|
||||
displayTimeout?: number;
|
||||
settings: DialogSettings;
|
||||
subtitle?: string;
|
||||
title?: string;
|
||||
}
|
||||
2
apps/swagger/remi/src/lib/models/dialog-settings.ts
Normal file
2
apps/swagger/remi/src/lib/models/dialog-settings.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
/* tslint:disable */
|
||||
export type DialogSettings = 0 | 1 | 2 | 4;
|
||||
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { ResponseArgs } from './response-args';
|
||||
import { SDVFilialdatenDTO } from './sdvfilialdaten-dto';
|
||||
export interface ResponseArgsOfSDVFilialdatenDTO extends ResponseArgs{
|
||||
result?: SDVFilialdatenDTO;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
/* tslint:disable */
|
||||
import { DialogOfString } from './dialog-of-string';
|
||||
import { IPublicUserInfo } from './ipublic-user-info';
|
||||
export interface ResponseArgs {
|
||||
dialog?: DialogOfString;
|
||||
error: boolean;
|
||||
invalidProperties?: {[key: string]: string};
|
||||
message?: string;
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface ReturnInfoDTO {
|
||||
productgroup?: string;
|
||||
|
||||
/**
|
||||
* Zu remittieren
|
||||
* Remittierbar
|
||||
*/
|
||||
return: boolean;
|
||||
}
|
||||
|
||||
18
apps/swagger/remi/src/lib/models/sdvfilialdaten-dto.ts
Normal file
18
apps/swagger/remi/src/lib/models/sdvfilialdaten-dto.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/* tslint:disable */
|
||||
export interface SDVFilialdatenDTO {
|
||||
city?: string;
|
||||
costUnit?: string;
|
||||
country?: string;
|
||||
district?: string;
|
||||
email?: string;
|
||||
fax?: string;
|
||||
hvk?: string;
|
||||
info?: string;
|
||||
key?: string;
|
||||
name?: string;
|
||||
phone?: string;
|
||||
region?: string;
|
||||
state?: string;
|
||||
street?: string;
|
||||
zipCode?: string;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
/* tslint:disable */
|
||||
import { PriceDTO } from './price-dto';
|
||||
import { StockStatus } from './stock-status';
|
||||
|
||||
/**
|
||||
* Bestandsinformation
|
||||
@@ -55,6 +57,17 @@ export interface StockInfoDTO {
|
||||
*/
|
||||
removedFromStock?: number;
|
||||
|
||||
/**
|
||||
* Verkaufspreis (VK)
|
||||
*/
|
||||
retailPrice?: PriceDTO;
|
||||
|
||||
/**
|
||||
* Dispositionsstatus
|
||||
* 1:rot = nicht bewirtschaftet (Sortiment inaktiv, Dispo aus); 2:gelb = Abverkauf (Sortiment aktiv, Dispo aus); 3:grün = Autodispo, (Sortiment aktiv, Dispo aktiv); 4:schwarz = "gesperrt" (Dispo gesperrt)
|
||||
*/
|
||||
status?: StockStatus;
|
||||
|
||||
/**
|
||||
* Lager PK
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
* Lagerabfrage
|
||||
* Lagerabfragedaten
|
||||
*/
|
||||
export interface StockRequestValues {
|
||||
|
||||
|
||||
6
apps/swagger/remi/src/lib/models/stock-status.ts
Normal file
6
apps/swagger/remi/src/lib/models/stock-status.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
* Dispositionsstatus
|
||||
*/
|
||||
export type StockStatus = 0 | 1 | 2 | 3 | 4;
|
||||
17
apps/swagger/remi/src/lib/models/stocks-request-values.ts
Normal file
17
apps/swagger/remi/src/lib/models/stocks-request-values.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/* tslint:disable */
|
||||
|
||||
/**
|
||||
* Lagerabfragedaten
|
||||
*/
|
||||
export interface StocksRequestValues {
|
||||
|
||||
/**
|
||||
* Artikel PKs
|
||||
*/
|
||||
eaNs?: Array<string>;
|
||||
|
||||
/**
|
||||
* Filial PKs
|
||||
*/
|
||||
wwsStockIds?: Array<number>;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RemiConfiguration, RemiConfigurationInterface } from './remi-configuration';
|
||||
|
||||
import { SDVService } from './services/sdv.service';
|
||||
import { PackageService } from './services/package.service';
|
||||
import { RemiService } from './services/remi.service';
|
||||
import { ReturnService } from './services/return.service';
|
||||
@@ -22,6 +23,7 @@ import { SupplierService } from './services/supplier.service';
|
||||
declarations: [],
|
||||
providers: [
|
||||
RemiConfiguration,
|
||||
SDVService,
|
||||
PackageService,
|
||||
RemiService,
|
||||
ReturnService,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export { SDVService } from './services/sdv.service';
|
||||
export { PackageService } from './services/package.service';
|
||||
export { RemiService } from './services/remi.service';
|
||||
export { ReturnService } from './services/return.service';
|
||||
|
||||
@@ -25,6 +25,7 @@ import { CapacityRequest } from '../models/capacity-request';
|
||||
})
|
||||
class RemiService extends __BaseService {
|
||||
static readonly RemiPflichtremissionsartikelPath = '/remi/pflichtremission';
|
||||
static readonly RemiCanAddReturnItemPath = '/inventory/pflichtremission/item/canadd';
|
||||
static readonly RemiCreateReturnItemPath = '/inventory/pflichtremission/item';
|
||||
static readonly RemiDeleteNullgutschriftenPath = '/remi/stock/{stockId}/nullgutschriften';
|
||||
static readonly RemiUeberlaufPath = '/remi/ueberlauf';
|
||||
@@ -88,6 +89,51 @@ class RemiService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüfen, ob Remittenden angelegt werden kann
|
||||
* @param params The `RemiService.RemiCanAddReturnItemParams` containing the following parameters:
|
||||
*
|
||||
* - `data`: Daten
|
||||
*
|
||||
* - `locale`: Lokalisiserung
|
||||
*/
|
||||
RemiCanAddReturnItemResponse(params: RemiService.RemiCanAddReturnItemParams): __Observable<__StrictHttpResponse<BatchResponseArgsOfReturnItemDTOAndReturnItemDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.data;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/inventory/pflichtremission/item/canadd`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<BatchResponseArgsOfReturnItemDTOAndReturnItemDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Prüfen, ob Remittenden angelegt werden kann
|
||||
* @param params The `RemiService.RemiCanAddReturnItemParams` containing the following parameters:
|
||||
*
|
||||
* - `data`: Daten
|
||||
*
|
||||
* - `locale`: Lokalisiserung
|
||||
*/
|
||||
RemiCanAddReturnItem(params: RemiService.RemiCanAddReturnItemParams): __Observable<BatchResponseArgsOfReturnItemDTOAndReturnItemDTO> {
|
||||
return this.RemiCanAddReturnItemResponse(params).pipe(
|
||||
__map(_r => _r.body as BatchResponseArgsOfReturnItemDTOAndReturnItemDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remittenden anlegen/aktualisieren
|
||||
* @param params The `RemiService.RemiCreateReturnItemParams` containing the following parameters:
|
||||
@@ -592,6 +638,22 @@ module RemiService {
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for RemiCanAddReturnItem
|
||||
*/
|
||||
export interface RemiCanAddReturnItemParams {
|
||||
|
||||
/**
|
||||
* Daten
|
||||
*/
|
||||
data: Array<ReturnItemDTO>;
|
||||
|
||||
/**
|
||||
* Lokalisiserung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for RemiCreateReturnItem
|
||||
*/
|
||||
|
||||
89
apps/swagger/remi/src/lib/services/sdv.service.ts
Normal file
89
apps/swagger/remi/src/lib/services/sdv.service.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
/* tslint:disable */
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { BaseService as __BaseService } from '../base-service';
|
||||
import { RemiConfiguration as __Configuration } from '../remi-configuration';
|
||||
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
|
||||
import { Observable as __Observable } from 'rxjs';
|
||||
import { map as __map, filter as __filter } from 'rxjs/operators';
|
||||
|
||||
import { ResponseArgsOfSDVFilialdatenDTO } from '../models/response-args-of-sdvfilialdaten-dto';
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
class SDVService extends __BaseService {
|
||||
static readonly SDVGetFilialstammdatenPath = '/inventory/stock/{stockId}/filialstammdaten';
|
||||
|
||||
constructor(
|
||||
config: __Configuration,
|
||||
http: HttpClient
|
||||
) {
|
||||
super(config, http);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filialstammdaten
|
||||
* @param params The `SDVService.SDVGetFilialstammdatenParams` containing the following parameters:
|
||||
*
|
||||
* - `stockId`: Lager PK
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
*/
|
||||
SDVGetFilialstammdatenResponse(params: SDVService.SDVGetFilialstammdatenParams): __Observable<__StrictHttpResponse<ResponseArgsOfSDVFilialdatenDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'GET',
|
||||
this.rootUrl + `/inventory/stock/${encodeURIComponent(String(params.stockId))}/filialstammdaten`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfSDVFilialdatenDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Filialstammdaten
|
||||
* @param params The `SDVService.SDVGetFilialstammdatenParams` containing the following parameters:
|
||||
*
|
||||
* - `stockId`: Lager PK
|
||||
*
|
||||
* - `locale`: Lokalisierung
|
||||
*/
|
||||
SDVGetFilialstammdaten(params: SDVService.SDVGetFilialstammdatenParams): __Observable<ResponseArgsOfSDVFilialdatenDTO> {
|
||||
return this.SDVGetFilialstammdatenResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfSDVFilialdatenDTO)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module SDVService {
|
||||
|
||||
/**
|
||||
* Parameters for SDVGetFilialstammdaten
|
||||
*/
|
||||
export interface SDVGetFilialstammdatenParams {
|
||||
|
||||
/**
|
||||
* Lager PK
|
||||
*/
|
||||
stockId: number;
|
||||
|
||||
/**
|
||||
* Lokalisierung
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
}
|
||||
|
||||
export { SDVService }
|
||||
@@ -8,6 +8,7 @@ import { Observable as __Observable } from 'rxjs';
|
||||
import { map as __map, filter as __filter } from 'rxjs/operators';
|
||||
|
||||
import { ResponseArgsOfIEnumerableOfStockInfoDTO } from '../models/response-args-of-ienumerable-of-stock-info-dto';
|
||||
import { StocksRequestValues } from '../models/stocks-request-values';
|
||||
import { StockRequestValues } from '../models/stock-request-values';
|
||||
import { ResponseArgsOfIEnumerableOfReturnInfoDTO } from '../models/response-args-of-ienumerable-of-return-info-dto';
|
||||
import { ResponseArgsOfDBHBranchExtensionDTO } from '../models/response-args-of-dbhbranch-extension-dto';
|
||||
@@ -24,6 +25,7 @@ import { ResponseArgsOfIEnumerableOfStockReservationDTO } from '../models/respon
|
||||
})
|
||||
class StockService extends __BaseService {
|
||||
static readonly StockInStockPath = '/remi/stock/{stockId}/instock';
|
||||
static readonly StockStocksRequestPath = '/remi/stocks/instock';
|
||||
static readonly StockStockRequestPath = '/remi/stock/instock';
|
||||
static readonly StockCheckItemsForReturnPath = '/remi/branch/{branchNumber}/checkitemsforreturn';
|
||||
static readonly StockInStockByEANPath = '/remi/stock/{stockId}/instockbyean';
|
||||
@@ -95,6 +97,51 @@ class StockService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lagerbestandsabfrage
|
||||
* @param params The `StockService.StockStocksRequestParams` containing the following parameters:
|
||||
*
|
||||
* - `stocksRequest`: Abfragedaten
|
||||
*
|
||||
* - `locale`: Lokalisierung (optional)
|
||||
*/
|
||||
StockStocksRequestResponse(params: StockService.StockStocksRequestParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfStockInfoDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.stocksRequest;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/remi/stocks/instock`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfStockInfoDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Lagerbestandsabfrage
|
||||
* @param params The `StockService.StockStocksRequestParams` containing the following parameters:
|
||||
*
|
||||
* - `stocksRequest`: Abfragedaten
|
||||
*
|
||||
* - `locale`: Lokalisierung (optional)
|
||||
*/
|
||||
StockStocksRequest(params: StockService.StockStocksRequestParams): __Observable<ResponseArgsOfIEnumerableOfStockInfoDTO> {
|
||||
return this.StockStocksRequestResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfIEnumerableOfStockInfoDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lagerbestandsabfrage
|
||||
* @param params The `StockService.StockStockRequestParams` containing the following parameters:
|
||||
@@ -619,6 +666,22 @@ module StockService {
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for StockStocksRequest
|
||||
*/
|
||||
export interface StockStocksRequestParams {
|
||||
|
||||
/**
|
||||
* Abfragedaten
|
||||
*/
|
||||
stocksRequest: StocksRequestValues;
|
||||
|
||||
/**
|
||||
* Lokalisierung (optional)
|
||||
*/
|
||||
locale?: null | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for StockStockRequest
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ui-searchbox
|
||||
[placeholder]="uiInput?.placeholder"
|
||||
[query]="uiInput?.value"
|
||||
(queryChange)="uiInput?.setValue($event)"
|
||||
(queryChange)="onQueryChange($event)"
|
||||
(complete)="complete.next($event)"
|
||||
(search)="emitSearch($event)"
|
||||
(scan)="emitSearch($event)"
|
||||
|
||||
@@ -28,6 +28,9 @@ export class UiFilterInputGroupMainComponent implements OnInit, OnDestroy, After
|
||||
@ViewChild(UiAutocompleteComponent, { read: UiAutocompleteComponent, static: false })
|
||||
autocompleteComponent: UiAutocompleteComponent;
|
||||
|
||||
@Output()
|
||||
queryChange = new EventEmitter<string>();
|
||||
|
||||
@Output()
|
||||
search = new EventEmitter<string>();
|
||||
|
||||
@@ -80,6 +83,11 @@ export class UiFilterInputGroupMainComponent implements OnInit, OnDestroy, After
|
||||
this._autocompleteProvider = this.autocompleteProviders?.find((provider) => !!provider);
|
||||
}
|
||||
|
||||
onQueryChange(query: string) {
|
||||
this.uiInput?.setValue(query);
|
||||
this.queryChange.emit(query);
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.initAutocomplete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user