@hitsoft/smart-warehouse 1.0.3 → 1.0.5
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/esm2020/lib/components/bin-location-picker/bin-location-picker.component.mjs +114 -0
- package/esm2020/lib/components/connector-params/connector-params.component.mjs +22 -31
- package/esm2020/lib/components/connector-params/connector-params.module.mjs +9 -4
- package/esm2020/lib/components/orders/orders.component.mjs +80 -4
- package/esm2020/lib/hit-proxy/quantity-correction/quantity-correction.service.mjs +3 -2
- package/esm2020/lib/hit-proxy/warehouse/warehouse.service.mjs +19 -5
- package/fesm2015/hitsoft-smart-warehouse.mjs +240 -49
- package/fesm2015/hitsoft-smart-warehouse.mjs.map +1 -1
- package/fesm2020/hitsoft-smart-warehouse.mjs +234 -49
- package/fesm2020/hitsoft-smart-warehouse.mjs.map +1 -1
- package/lib/components/bin-location-picker/bin-location-picker.component.d.ts +40 -0
- package/lib/components/connector-params/connector-params.component.d.ts +9 -6
- package/lib/components/connector-params/connector-params.module.d.ts +8 -6
- package/lib/components/orders/orders.component.d.ts +25 -2
- package/lib/hit-proxy/warehouse/warehouse.service.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ToasterService } from '@abp/ng.theme.shared';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import DataSource from 'devextreme/data/data_source';
|
|
4
|
+
import { BinLocationDto, WarehouseService } from '../../hit-proxy/warehouse/warehouse.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Dummy Kasa (depo yeri) seçim modalı.
|
|
8
|
+
*
|
|
9
|
+
* Depo yeri sayısı bir selectbox'a sığmayacak kadar çok olabildiği için grid ile çalışır ve
|
|
10
|
+
* sayfalama SUNUCU tarafındadır: grid her sayfa değişiminde yalnızca o sayfayı ister. Bu sayede
|
|
11
|
+
* "kaynak depo seçilince tüm depo yerlerini combobox'a doldur" davranışının yarattığı donma
|
|
12
|
+
* ortadan kalkar — veriler yalnızca modal açıldığında ve sayfa sayfa yüklenir.
|
|
13
|
+
*/
|
|
14
|
+
export declare class BinLocationPickerComponent {
|
|
15
|
+
private readonly warehouseService;
|
|
16
|
+
private readonly toaster;
|
|
17
|
+
/** Seçim yapılacak kaynak depo kodu; sahibi bileşen ngModel ile geçirir. */
|
|
18
|
+
warehouseCode: string;
|
|
19
|
+
/** İki yönlü bağlanır; sahibi bileşen modalı bunu true yaparak açar. */
|
|
20
|
+
visible: boolean;
|
|
21
|
+
visibleChange: EventEmitter<boolean>;
|
|
22
|
+
selected: EventEmitter<BinLocationDto>;
|
|
23
|
+
readonly pageSize = 50;
|
|
24
|
+
readonly allowedPageSizes: number[];
|
|
25
|
+
searchTerm: string;
|
|
26
|
+
isSearching: boolean;
|
|
27
|
+
readonly dataSource: DataSource;
|
|
28
|
+
/** Her tuş vuruşunda sunucuya gitmemek için arama debounce edilir. */
|
|
29
|
+
private readonly searchInput;
|
|
30
|
+
constructor(warehouseService: WarehouseService, toaster: ToasterService);
|
|
31
|
+
/** Sahibi bileşen modalı açmadan hemen önce çağırır. */
|
|
32
|
+
open(): void;
|
|
33
|
+
onSearchTermChange(term: string): void;
|
|
34
|
+
onRowDoubleClick(event: any): void;
|
|
35
|
+
select(bin: BinLocationDto): void;
|
|
36
|
+
close(): void;
|
|
37
|
+
private loadPage;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BinLocationPickerComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BinLocationPickerComponent, "lib-bin-location-picker", never, { "warehouseCode": "warehouseCode"; "visible": "visible"; }, { "visibleChange": "visibleChange"; "selected": "selected"; }, never, never, false>;
|
|
40
|
+
}
|
|
@@ -4,6 +4,7 @@ import { ToasterService } from '@abp/ng.theme.shared';
|
|
|
4
4
|
import { ConnectorParamsService, SaveConnectorParamsDto } from '../../hit-proxy/connector-params/connector-params.service';
|
|
5
5
|
import { ConnectorParamsGuard } from '../../guards/connector-params.guard';
|
|
6
6
|
import { WarehouseService, WarehouseDto, BinLocationDto } from '../../hit-proxy/warehouse/warehouse.service';
|
|
7
|
+
import { BinLocationPickerComponent } from '../bin-location-picker/bin-location-picker.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
interface ErpOption {
|
|
9
10
|
value: string;
|
|
@@ -17,9 +18,9 @@ export declare class ConnectorParamsComponent implements OnInit {
|
|
|
17
18
|
private route;
|
|
18
19
|
private warehouseService;
|
|
19
20
|
erpOptions: ErpOption[];
|
|
21
|
+
dummyBoxPicker: BinLocationPickerComponent;
|
|
20
22
|
warehouses: WarehouseDto[];
|
|
21
|
-
|
|
22
|
-
isLoadingBinLocations: boolean;
|
|
23
|
+
isDummyBoxPickerOpen: boolean;
|
|
23
24
|
form: SaveConnectorParamsDto;
|
|
24
25
|
passwordSet: boolean;
|
|
25
26
|
beeCellPasswordSet: boolean;
|
|
@@ -30,13 +31,15 @@ export declare class ConnectorParamsComponent implements OnInit {
|
|
|
30
31
|
loadData(): void;
|
|
31
32
|
get isCurrentFromWhsInList(): boolean;
|
|
32
33
|
get isCurrentWhsInList(): boolean;
|
|
33
|
-
get isCurrentDummyBoxInList(): boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Kaynak Depo seçimi değiştiğinde çalışır
|
|
36
|
-
*
|
|
35
|
+
* Kaynak Depo seçimi değiştiğinde çalışır. Depo değiştiği için önceki depoya ait Dummy Kasa
|
|
36
|
+
* seçimi artık geçerli değil — temizlenir. Depo yerleri artık burada YÜKLENMEZ; kullanıcı
|
|
37
|
+
* "Seç" ile modalı açtığında sunucudan sayfa sayfa gelir (çok fazla veri combobox'ı kilitliyordu).
|
|
37
38
|
*/
|
|
38
39
|
onFromWarehouseChange(whsCode: string): void;
|
|
39
|
-
|
|
40
|
+
/** Dummy Kasa seçim modalını açar. Kaynak depo seçilmeden açılamaz. */
|
|
41
|
+
openDummyBoxPicker(): void;
|
|
42
|
+
onDummyBoxSelected(bin: BinLocationDto): void;
|
|
40
43
|
save(): void;
|
|
41
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConnectorParamsComponent, never>;
|
|
42
45
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConnectorParamsComponent, "lib-connector-params", never, {}, {}, never, never, false>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./connector-params.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "@abp/ng.
|
|
5
|
-
import * as i4 from "@
|
|
6
|
-
import * as i5 from "@
|
|
7
|
-
import * as i6 from "@
|
|
3
|
+
import * as i2 from "../bin-location-picker/bin-location-picker.component";
|
|
4
|
+
import * as i3 from "@abp/ng.core";
|
|
5
|
+
import * as i4 from "@abp/ng.theme.shared";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@abp/ng.components/page";
|
|
8
|
+
import * as i7 from "devextreme-angular";
|
|
9
|
+
import * as i8 from "@angular/router";
|
|
8
10
|
export declare class ConnectorParamsModule {
|
|
9
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConnectorParamsModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ConnectorParamsModule, [typeof i1.ConnectorParamsComponent], [typeof
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConnectorParamsModule, [typeof i1.ConnectorParamsComponent, typeof i2.BinLocationPickerComponent], [typeof i3.CoreModule, typeof i4.ThemeSharedModule, typeof i5.FormsModule, typeof i6.PageModule, typeof i7.DxDataGridModule, typeof i8.RouterModule], never>;
|
|
11
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<ConnectorParamsModule>;
|
|
12
14
|
}
|
|
13
15
|
export declare function loadConnectorParamsModuleAsChild(): Promise<typeof ConnectorParamsModule>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { DxDataGridComponent } from 'devextreme-angular';
|
|
3
3
|
import { OrderService } from '../../hit-proxy/orders/order.service';
|
|
4
4
|
import { SapOrderDto } from '../../hit-proxy/orders/model';
|
|
@@ -6,7 +6,7 @@ import { WarehouseService, WarehouseDto } from '../../hit-proxy/warehouse/wareho
|
|
|
6
6
|
import { ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
|
|
7
7
|
import DataSource from 'devextreme/data/data_source';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class OrdersComponent implements OnInit {
|
|
9
|
+
export declare class OrdersComponent implements OnInit, OnDestroy {
|
|
10
10
|
private readonly orderService;
|
|
11
11
|
private readonly warehouseService;
|
|
12
12
|
private readonly toasterService;
|
|
@@ -14,6 +14,9 @@ export declare class OrdersComponent implements OnInit {
|
|
|
14
14
|
dxOrdersInstance: DxDataGridComponent;
|
|
15
15
|
ordersDataSource: DataSource;
|
|
16
16
|
selectedOrders: SapOrderDto[];
|
|
17
|
+
private static readonly AUTO_REFRESH_MS;
|
|
18
|
+
private autoRefreshHandle;
|
|
19
|
+
private readonly onVisibilityChange;
|
|
17
20
|
selectedWarehouse: string;
|
|
18
21
|
selectedDate: string;
|
|
19
22
|
activeListType: string | null;
|
|
@@ -32,6 +35,15 @@ export declare class OrdersComponent implements OnInit {
|
|
|
32
35
|
bosKasaMode: 'empty' | 'half';
|
|
33
36
|
constructor(orderService: OrderService, warehouseService: WarehouseService, toasterService: ToasterService, confirmationService: ConfirmationService);
|
|
34
37
|
ngOnInit(): void;
|
|
38
|
+
ngOnDestroy(): void;
|
|
39
|
+
private startAutoRefresh;
|
|
40
|
+
private stopAutoRefresh;
|
|
41
|
+
/**
|
|
42
|
+
* Kullanıcıyı rahatsız etmeyecek durumdaysak grid'i tazeler. Şu hallerde tur atlanır:
|
|
43
|
+
* sekme arka planda, kullanıcı satır seçmiş (toplu işlem yapmak üzere olabilir),
|
|
44
|
+
* bir istek/işlem sürüyor ya da bir popup açık.
|
|
45
|
+
*/
|
|
46
|
+
private autoRefreshTick;
|
|
35
47
|
private loadWarehouses;
|
|
36
48
|
private setupDataSource;
|
|
37
49
|
private buildCombinedFilter;
|
|
@@ -44,6 +56,17 @@ export declare class OrdersComponent implements OnInit {
|
|
|
44
56
|
onRowClick(e: any): void;
|
|
45
57
|
onRowPrepared(e: any): void;
|
|
46
58
|
onGorevBaslat(): void;
|
|
59
|
+
/**
|
|
60
|
+
* "Görevi Tamamla" yalnızca "İşleniyor" (2) durumundaki siparişlerde anlamlı — backend
|
|
61
|
+
* (ApproveTaskAsync) bu şartı arıyor. Normal akışta artık gerekmiyor: görev bitince stok nakli
|
|
62
|
+
* de fatura da otomatik yazılıyor ve sipariş kendiliğinden "Tamamlandı" oluyor. Buton yalnızca
|
|
63
|
+
* fatura hatası, BeeCell'e gitmemiş/iptal olmuş görev ve Depo Talepleri akışı için kalıyor.
|
|
64
|
+
*/
|
|
65
|
+
get canOnayVer(): boolean;
|
|
66
|
+
get onayVerTooltip(): string;
|
|
67
|
+
/** "Sipariş Kapat" aktif görevi olan (2) siparişte çalışmaz — CloseOrderAsync reddediyor. */
|
|
68
|
+
get canSiparisKapat(): boolean;
|
|
69
|
+
get siparisKapatTooltip(): string;
|
|
47
70
|
onOnayVer(): void;
|
|
48
71
|
onSiparisKapat(): void;
|
|
49
72
|
onBosKasaGetir(): void;
|
|
@@ -22,6 +22,10 @@ export interface ItemInfoDto {
|
|
|
22
22
|
ItemCode: string;
|
|
23
23
|
ItemName: string;
|
|
24
24
|
}
|
|
25
|
+
export interface BinLocationLookupResultDto {
|
|
26
|
+
Items: BinLocationDto[];
|
|
27
|
+
TotalCount: number;
|
|
28
|
+
}
|
|
25
29
|
export declare class WarehouseService {
|
|
26
30
|
private restService;
|
|
27
31
|
apiName: string;
|
|
@@ -33,6 +37,11 @@ export declare class WarehouseService {
|
|
|
33
37
|
* Seçilen depoya ait depo yerlerini (bin locations) getirir
|
|
34
38
|
*/
|
|
35
39
|
getBinLocationsByWarehouse: (whsCode: string) => Observable<BinLocationDto[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Depo yeri seçim modalı için sayfalı depo yeri araması.
|
|
42
|
+
* search boş bırakılabilir — o zaman deponun tüm depo yerleri sayfa sayfa gezilir.
|
|
43
|
+
*/
|
|
44
|
+
searchBinLocationsByWarehouse: (warehouseCode: string, search: string, skip: number, take: number) => Observable<BinLocationLookupResultDto>;
|
|
36
45
|
/**
|
|
37
46
|
* Tüm akıllı depolardaki depo yerlerini getirir
|
|
38
47
|
*/
|