@hitsoft/smart-warehouse 1.0.1
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/README.md +24 -0
- package/config/enums/index.d.ts +1 -0
- package/config/enums/route-names.d.ts +12 -0
- package/config/index.d.ts +5 -0
- package/config/providers/connector-params-route.provider.d.ts +8 -0
- package/config/providers/index.d.ts +7 -0
- package/config/providers/order-station-route.provider.d.ts +8 -0
- package/config/providers/orders-route.provider.d.ts +8 -0
- package/config/providers/quantity-correction-route.provider.d.ts +8 -0
- package/config/providers/route.provider.d.ts +8 -0
- package/config/providers/shelf-placement-route.provider.d.ts +8 -0
- package/config/providers/shelf-transfer-route.provider.d.ts +8 -0
- package/config/providers/shortages-route.provider.d.ts +8 -0
- package/config/providers/station.provider.d.ts +8 -0
- package/config/providers/stock-report.d.ts +8 -0
- package/config/public-api.d.ts +3 -0
- package/config/smart-warehouse-config.module.d.ts +8 -0
- package/esm2020/config/enums/index.mjs +2 -0
- package/esm2020/config/enums/route-names.mjs +2 -0
- package/esm2020/config/hitsoft-smart-warehouse-config.mjs +5 -0
- package/esm2020/config/providers/connector-params-route.provider.mjs +25 -0
- package/esm2020/config/providers/index.mjs +8 -0
- package/esm2020/config/providers/order-station-route.provider.mjs +25 -0
- package/esm2020/config/providers/orders-route.provider.mjs +25 -0
- package/esm2020/config/providers/quantity-correction-route.provider.mjs +25 -0
- package/esm2020/config/providers/route.provider.mjs +24 -0
- package/esm2020/config/providers/shelf-placement-route.provider.mjs +25 -0
- package/esm2020/config/providers/shelf-transfer-route.provider.mjs +25 -0
- package/esm2020/config/providers/shortages-route.provider.mjs +25 -0
- package/esm2020/config/providers/station.provider.mjs +25 -0
- package/esm2020/config/providers/stock-report.mjs +25 -0
- package/esm2020/config/public-api.mjs +4 -0
- package/esm2020/config/smart-warehouse-config.module.mjs +37 -0
- package/esm2020/hitsoft-smart-warehouse.mjs +5 -0
- package/esm2020/lib/components/connector-params/connector-params.component.mjs +182 -0
- package/esm2020/lib/components/connector-params/connector-params.module.mjs +41 -0
- package/esm2020/lib/components/order-station/order-station.component.mjs +160 -0
- package/esm2020/lib/components/order-station/order-station.module.mjs +57 -0
- package/esm2020/lib/components/orders/orders.component.mjs +445 -0
- package/esm2020/lib/components/orders/orders.module.mjs +75 -0
- package/esm2020/lib/components/quantity-correction/quantity-correction.component.mjs +231 -0
- package/esm2020/lib/components/quantity-correction/quantity-correction.module.mjs +41 -0
- package/esm2020/lib/components/shelf-placement/shelf-placement.component.mjs +297 -0
- package/esm2020/lib/components/shelf-placement/shelf-placement.module.mjs +66 -0
- package/esm2020/lib/components/shelf-transfer/shelf-transfer.component.mjs +146 -0
- package/esm2020/lib/components/shelf-transfer/shelf-transfer.module.mjs +41 -0
- package/esm2020/lib/components/shortages/shortages.component.mjs +75 -0
- package/esm2020/lib/components/shortages/shortages.module.mjs +42 -0
- package/esm2020/lib/components/smart-warehouse.component.mjs +18 -0
- package/esm2020/lib/components/stock-report/stock-report.component.mjs +29 -0
- package/esm2020/lib/components/stock-report/stock-report.module.mjs +42 -0
- package/esm2020/lib/guards/connector-params.guard.mjs +58 -0
- package/esm2020/lib/hit-proxy/connector-params/connector-params.service.mjs +27 -0
- package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.mjs +2 -0
- package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.mjs +62 -0
- package/esm2020/lib/hit-proxy/inventory/inventory.service.mjs +21 -0
- package/esm2020/lib/hit-proxy/order-station/order-station.service.mjs +18 -0
- package/esm2020/lib/hit-proxy/orders/model.mjs +2 -0
- package/esm2020/lib/hit-proxy/orders/order.service.mjs +81 -0
- package/esm2020/lib/hit-proxy/quantity-correction/quantity-correction.service.mjs +47 -0
- package/esm2020/lib/hit-proxy/shortages/model.mjs +2 -0
- package/esm2020/lib/hit-proxy/shortages/shortages.service.mjs +26 -0
- package/esm2020/lib/hit-proxy/stations/station.service.mjs +86 -0
- package/esm2020/lib/hit-proxy/stock-report/stock-report.service.mjs +22 -0
- package/esm2020/lib/hit-proxy/stock-transfer/stock-transfer.service.mjs +21 -0
- package/esm2020/lib/hit-proxy/warehouse/warehouse.service.mjs +65 -0
- package/esm2020/lib/services/smart-warehouse.service.mjs +21 -0
- package/esm2020/lib/smart-warehouse-routing.module.mjs +79 -0
- package/esm2020/lib/smart-warehouse.module.mjs +34 -0
- package/esm2020/lib/stations/station.component.mjs +43 -0
- package/esm2020/lib/stations/station.module.mjs +42 -0
- package/esm2020/public-api.mjs +20 -0
- package/fesm2015/hitsoft-smart-warehouse-config.mjs +264 -0
- package/fesm2015/hitsoft-smart-warehouse-config.mjs.map +1 -0
- package/fesm2015/hitsoft-smart-warehouse.mjs +2577 -0
- package/fesm2015/hitsoft-smart-warehouse.mjs.map +1 -0
- package/fesm2020/hitsoft-smart-warehouse-config.mjs +264 -0
- package/fesm2020/hitsoft-smart-warehouse-config.mjs.map +1 -0
- package/fesm2020/hitsoft-smart-warehouse.mjs +2515 -0
- package/fesm2020/hitsoft-smart-warehouse.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/connector-params/connector-params.component.d.ts +44 -0
- package/lib/components/connector-params/connector-params.module.d.ts +13 -0
- package/lib/components/order-station/order-station.component.d.ts +31 -0
- package/lib/components/order-station/order-station.module.d.ts +16 -0
- package/lib/components/orders/orders.component.d.ts +63 -0
- package/lib/components/orders/orders.module.d.ts +17 -0
- package/lib/components/quantity-correction/quantity-correction.component.d.ts +52 -0
- package/lib/components/quantity-correction/quantity-correction.module.d.ts +16 -0
- package/lib/components/shelf-placement/shelf-placement.component.d.ts +93 -0
- package/lib/components/shelf-placement/shelf-placement.module.d.ts +17 -0
- package/lib/components/shelf-transfer/shelf-transfer.component.d.ts +26 -0
- package/lib/components/shelf-transfer/shelf-transfer.module.d.ts +16 -0
- package/lib/components/shortages/shortages.component.d.ts +25 -0
- package/lib/components/shortages/shortages.module.d.ts +17 -0
- package/lib/components/smart-warehouse.component.d.ts +10 -0
- package/lib/components/stock-report/stock-report.component.d.ts +16 -0
- package/lib/components/stock-report/stock-report.module.d.ts +17 -0
- package/lib/guards/connector-params.guard.d.ts +21 -0
- package/lib/hit-proxy/connector-params/connector-params.service.d.ts +46 -0
- package/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.d.ts +8 -0
- package/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.d.ts +17 -0
- package/lib/hit-proxy/inventory/inventory.service.d.ts +22 -0
- package/lib/hit-proxy/order-station/order-station.service.d.ts +24 -0
- package/lib/hit-proxy/orders/model.d.ts +74 -0
- package/lib/hit-proxy/orders/order.service.d.ts +26 -0
- package/lib/hit-proxy/quantity-correction/quantity-correction.service.d.ts +88 -0
- package/lib/hit-proxy/shortages/model.d.ts +17 -0
- package/lib/hit-proxy/shortages/shortages.service.d.ts +13 -0
- package/lib/hit-proxy/stations/station.service.d.ts +25 -0
- package/lib/hit-proxy/stock-report/stock-report.service.d.ts +12 -0
- package/lib/hit-proxy/stock-transfer/stock-transfer.service.d.ts +19 -0
- package/lib/hit-proxy/warehouse/warehouse.service.d.ts +59 -0
- package/lib/services/smart-warehouse.service.d.ts +10 -0
- package/lib/smart-warehouse-routing.module.d.ts +7 -0
- package/lib/smart-warehouse.module.d.ts +13 -0
- package/lib/stations/station.component.d.ts +14 -0
- package/lib/stations/station.module.d.ts +17 -0
- package/package.json +45 -0
- package/public-api.d.ts +16 -0
|
@@ -0,0 +1,2577 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, ViewChild, NgModule, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import * as i1 from '@abp/ng.core';
|
|
4
|
+
import { CoreModule, LazyModuleFactory } from '@abp/ng.core';
|
|
5
|
+
import * as i2 from '@abp/ng.theme.shared';
|
|
6
|
+
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
7
|
+
import { locale } from 'devextreme/localization';
|
|
8
|
+
import * as i1$1 from '@angular/router';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import * as i5 from '@angular/forms';
|
|
11
|
+
import { FormsModule } from '@angular/forms';
|
|
12
|
+
import { NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
13
|
+
import { NgxValidateCoreModule } from '@ngx-validate/core';
|
|
14
|
+
import { CommercialUiModule } from '@volo/abp.commercial.ng.ui';
|
|
15
|
+
import * as i5$1 from '@abp/ng.components/page';
|
|
16
|
+
import { PageModule } from '@abp/ng.components/page';
|
|
17
|
+
import DataSource from 'devextreme/data/data_source';
|
|
18
|
+
import * as AspNetData from 'devextreme-aspnet-data-nojquery';
|
|
19
|
+
import * as i4 from '@angular/common';
|
|
20
|
+
import * as i6 from 'devextreme-angular';
|
|
21
|
+
import { DxDataGridModule, DxPopupModule, DxNumberBoxModule, DxButtonModule, DxSelectBoxModule } from 'devextreme-angular';
|
|
22
|
+
import * as i7 from 'devextreme-angular/ui/nested';
|
|
23
|
+
import * as i8 from 'devextreme-angular/core';
|
|
24
|
+
import { __awaiter } from 'tslib';
|
|
25
|
+
import CustomStore from 'devextreme/data/custom_store';
|
|
26
|
+
import { firstValueFrom, of, forkJoin } from 'rxjs';
|
|
27
|
+
import { map, catchError } from 'rxjs/operators';
|
|
28
|
+
|
|
29
|
+
class SmartWarehouseService {
|
|
30
|
+
constructor(restService) {
|
|
31
|
+
this.restService = restService;
|
|
32
|
+
this.apiName = 'SmartWarehouse';
|
|
33
|
+
}
|
|
34
|
+
sample() {
|
|
35
|
+
return this.restService.request({ method: 'GET', url: '/api/SmartWarehouse/sample' }, { apiName: this.apiName });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
SmartWarehouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
39
|
+
SmartWarehouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, providedIn: 'root' });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseService, decorators: [{
|
|
41
|
+
type: Injectable,
|
|
42
|
+
args: [{
|
|
43
|
+
providedIn: 'root',
|
|
44
|
+
}]
|
|
45
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
46
|
+
|
|
47
|
+
class SmartWarehouseComponent {
|
|
48
|
+
constructor(service) {
|
|
49
|
+
this.service = service;
|
|
50
|
+
}
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
this.service.sample().subscribe(console.log);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
SmartWarehouseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseComponent, deps: [{ token: SmartWarehouseService }], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
SmartWarehouseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartWarehouseComponent, selector: "lib-smart-warehouse", ngImport: i0, template: ` <p>smart-warehouse works!</p> `, isInline: true });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseComponent, decorators: [{
|
|
58
|
+
type: Component,
|
|
59
|
+
args: [{ selector: 'lib-smart-warehouse', template: ` <p>smart-warehouse works!</p> ` }]
|
|
60
|
+
}], ctorParameters: function () { return [{ type: SmartWarehouseService }]; } });
|
|
61
|
+
|
|
62
|
+
class DevexpressRestService {
|
|
63
|
+
constructor(envService, toaster) {
|
|
64
|
+
this.envService = envService;
|
|
65
|
+
this.toaster = toaster;
|
|
66
|
+
this.createStore = (options) => AspNetData.createStore({
|
|
67
|
+
key: options.key,
|
|
68
|
+
loadParams: options.params,
|
|
69
|
+
loadUrl: `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.loadUrl}`,
|
|
70
|
+
insertUrl: options.insertUrl
|
|
71
|
+
? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.insertUrl}`
|
|
72
|
+
: undefined,
|
|
73
|
+
insertMethod: 'POST',
|
|
74
|
+
updateUrl: options.updateUrl
|
|
75
|
+
? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.updateUrl}`
|
|
76
|
+
: undefined,
|
|
77
|
+
updateMethod: 'PUT',
|
|
78
|
+
deleteUrl: options.deleteUrl
|
|
79
|
+
? `${this.envService.getEnvironment().apis.SmartWarehouse.url + '/' + options.deleteUrl}`
|
|
80
|
+
: undefined,
|
|
81
|
+
deleteMethod: 'DELETE',
|
|
82
|
+
onBeforeSend(operation, ajaxSettings) {
|
|
83
|
+
if (operation === 'insert' || operation === 'update' || operation === 'delete') {
|
|
84
|
+
if (operation === 'delete') {
|
|
85
|
+
ajaxSettings.url =
|
|
86
|
+
ajaxSettings.url + '/' + localStorage.getItem('appointment-deleted-id');
|
|
87
|
+
}
|
|
88
|
+
ajaxSettings.contentType = 'application/json';
|
|
89
|
+
ajaxSettings.data = ajaxSettings.data.values;
|
|
90
|
+
}
|
|
91
|
+
ajaxSettings.headers = {
|
|
92
|
+
Authorization: 'Bearer ' + localStorage.getItem('access_token'),
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
onAjaxError: this.onAjaxError,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
onAjaxError(e) {
|
|
99
|
+
var _a;
|
|
100
|
+
try {
|
|
101
|
+
let jsonObj = e.xhr.responseJSON || JSON.parse(e.xhr.responseText);
|
|
102
|
+
e.error = ((_a = jsonObj === null || jsonObj === void 0 ? void 0 : jsonObj.error) === null || _a === void 0 ? void 0 : _a.message)
|
|
103
|
+
? `${jsonObj.error.message}${jsonObj.error.details ? ' : ' + jsonObj.error.details : ''}`
|
|
104
|
+
: (jsonObj === null || jsonObj === void 0 ? void 0 : jsonObj.error) || `Server error: ${e.xhr.status} ${e.xhr.statusText}`;
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
e.error = `Server error: ${e.xhr.status} ${e.xhr.statusText}`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
DevexpressRestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, deps: [{ token: i1.EnvironmentService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
112
|
+
DevexpressRestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, providedIn: 'root' });
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DevexpressRestService, decorators: [{
|
|
114
|
+
type: Injectable,
|
|
115
|
+
args: [{
|
|
116
|
+
providedIn: 'root',
|
|
117
|
+
}]
|
|
118
|
+
}], ctorParameters: function () { return [{ type: i1.EnvironmentService }, { type: i2.ToasterService }]; } });
|
|
119
|
+
|
|
120
|
+
class OrderService {
|
|
121
|
+
constructor(restService, devexService) {
|
|
122
|
+
this.restService = restService;
|
|
123
|
+
this.devexService = devexService;
|
|
124
|
+
this.apiName = 'SmartWarehouse';
|
|
125
|
+
this.loadOrders = this.devexService.createStore({
|
|
126
|
+
key: 'DocEntry',
|
|
127
|
+
loadUrl: 'api/smart-warehouse/sap-orders/load-orders',
|
|
128
|
+
});
|
|
129
|
+
this.getAllOrders = () => this.restService.request({
|
|
130
|
+
method: 'GET',
|
|
131
|
+
url: '/api/smart-warehouse/sap-orders/get-all-orders',
|
|
132
|
+
}, { apiName: this.apiName });
|
|
133
|
+
this.getOrderByDocEntry = (docEntry) => this.restService.request({
|
|
134
|
+
method: 'GET',
|
|
135
|
+
url: `/api/smart-warehouse/sap-orders/get-order/${docEntry}`,
|
|
136
|
+
}, { apiName: this.apiName });
|
|
137
|
+
this.startTask = (docEntries) => this.restService.request({
|
|
138
|
+
method: 'POST',
|
|
139
|
+
url: '/api/smart-warehouse/sap-orders/start-task',
|
|
140
|
+
body: { docEntries },
|
|
141
|
+
}, { apiName: this.apiName });
|
|
142
|
+
this.approveTask = (docEntries, orderType) => this.restService.request({
|
|
143
|
+
method: 'POST',
|
|
144
|
+
url: '/api/smart-warehouse/sap-orders/approve-task',
|
|
145
|
+
body: { docEntries, orderType },
|
|
146
|
+
}, { apiName: this.apiName });
|
|
147
|
+
this.closeOrder = (docEntries) => this.restService.request({
|
|
148
|
+
method: 'POST',
|
|
149
|
+
url: '/api/smart-warehouse/sap-orders/close-order',
|
|
150
|
+
body: { docEntries },
|
|
151
|
+
}, { apiName: this.apiName });
|
|
152
|
+
// ── Reservation Methods ──
|
|
153
|
+
this.reserveOrders = (docEntries, warehouseCode) => this.restService.request({
|
|
154
|
+
method: 'POST',
|
|
155
|
+
url: '/api/smart-warehouse/sap-reservations/reserve-orders',
|
|
156
|
+
body: { docEntries, warehouseCode },
|
|
157
|
+
}, { apiName: this.apiName });
|
|
158
|
+
this.reserveAllOrders = (warehouseCode, orderType, overwriteExisting = false) => this.restService.request({
|
|
159
|
+
method: 'POST',
|
|
160
|
+
url: '/api/smart-warehouse/sap-reservations/reserve-all-orders',
|
|
161
|
+
body: { warehouseCode, orderType: orderType || '', overwriteExisting },
|
|
162
|
+
}, { apiName: this.apiName });
|
|
163
|
+
this.cancelReservations = (docEntries) => this.restService.request({
|
|
164
|
+
method: 'POST',
|
|
165
|
+
url: '/api/smart-warehouse/sap-reservations/cancel-reservations',
|
|
166
|
+
body: { docEntries },
|
|
167
|
+
}, { apiName: this.apiName });
|
|
168
|
+
this.cancelAllReservations = (orderType) => this.restService.request({
|
|
169
|
+
method: 'POST',
|
|
170
|
+
url: '/api/smart-warehouse/sap-reservations/cancel-all-reservations',
|
|
171
|
+
body: { orderType: orderType || '' },
|
|
172
|
+
}, { apiName: this.apiName });
|
|
173
|
+
this.updateTaskStatus = (docEntries) => this.restService.request({
|
|
174
|
+
method: 'POST',
|
|
175
|
+
url: '/api/smart-warehouse/sap-orders/update-task-status',
|
|
176
|
+
body: { docEntries },
|
|
177
|
+
}, { apiName: this.apiName });
|
|
178
|
+
this.getEmptyBoxes = (stationId, shelfId, boxCount, warehouseCode) => this.restService.request({
|
|
179
|
+
method: 'POST',
|
|
180
|
+
url: '/api/smart-warehouse/sap-orders/get-empty-boxes',
|
|
181
|
+
body: { stationId, shelfId, boxCount, warehouseCode },
|
|
182
|
+
}, { apiName: this.apiName });
|
|
183
|
+
this.getHalfBoxes = (stationId, shelfId, boxCount, warehouseCode) => this.restService.request({
|
|
184
|
+
method: 'POST',
|
|
185
|
+
url: '/api/smart-warehouse/sap-orders/get-half-boxes',
|
|
186
|
+
body: { stationId, shelfId, boxCount, warehouseCode },
|
|
187
|
+
}, { apiName: this.apiName });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, deps: [{ token: i1.RestService }, { token: DevexpressRestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
191
|
+
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, providedIn: 'root' });
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderService, decorators: [{
|
|
193
|
+
type: Injectable,
|
|
194
|
+
args: [{ providedIn: 'root' }]
|
|
195
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }, { type: DevexpressRestService }]; } });
|
|
196
|
+
|
|
197
|
+
class WarehouseService {
|
|
198
|
+
constructor(restService) {
|
|
199
|
+
this.restService = restService;
|
|
200
|
+
this.apiName = 'SmartWarehouse';
|
|
201
|
+
/**
|
|
202
|
+
* U_SWSmartWhs = "Y" olan depoları getirir
|
|
203
|
+
*/
|
|
204
|
+
this.getSmartWarehouses = () => this.restService.request({
|
|
205
|
+
method: 'GET',
|
|
206
|
+
url: '/api/smart-warehouse/sap-warehouses/get-smart-warehouses',
|
|
207
|
+
}, { apiName: this.apiName });
|
|
208
|
+
/**
|
|
209
|
+
* Seçilen depoya ait depo yerlerini (bin locations) getirir
|
|
210
|
+
*/
|
|
211
|
+
this.getBinLocationsByWarehouse = (whsCode) => this.restService.request({
|
|
212
|
+
method: 'GET',
|
|
213
|
+
url: `/api/smart-warehouse/sap-warehouses/get-bin-locations/${whsCode}`,
|
|
214
|
+
}, { apiName: this.apiName });
|
|
215
|
+
/**
|
|
216
|
+
* Tüm akıllı depolardaki depo yerlerini getirir
|
|
217
|
+
*/
|
|
218
|
+
this.getAllBinLocations = () => this.restService.request({
|
|
219
|
+
method: 'GET',
|
|
220
|
+
url: '/api/smart-warehouse/sap-warehouses/get-all-bin-locations',
|
|
221
|
+
}, { apiName: this.apiName });
|
|
222
|
+
/**
|
|
223
|
+
* Belirtilen depo yerindeki stok bilgisini getirir
|
|
224
|
+
*/
|
|
225
|
+
this.getBinLocationContent = (binAbsEntry) => this.restService.request({
|
|
226
|
+
method: 'GET',
|
|
227
|
+
url: `/api/smart-warehouse/sap-warehouses/get-bin-location-content/${binAbsEntry}`,
|
|
228
|
+
}, { apiName: this.apiName });
|
|
229
|
+
/**
|
|
230
|
+
* Kalem koduna göre SAP'den kalem adını getirir
|
|
231
|
+
*/
|
|
232
|
+
this.getItemNameByCode = (itemCode) => this.restService.request({
|
|
233
|
+
method: 'GET',
|
|
234
|
+
url: `/api/smart-warehouse/sap-warehouses/get-item-name/${itemCode}`,
|
|
235
|
+
}, { apiName: this.apiName });
|
|
236
|
+
/**
|
|
237
|
+
* Barkod üzerinden SAP'den kalem bilgisini getirir
|
|
238
|
+
*/
|
|
239
|
+
this.getItemByBarcode = (barcode) => this.restService.request({
|
|
240
|
+
method: 'GET',
|
|
241
|
+
url: `/api/smart-warehouse/sap-warehouses/get-item-by-barcode/${barcode}`,
|
|
242
|
+
}, { apiName: this.apiName });
|
|
243
|
+
/**
|
|
244
|
+
* BinCode üzerinden SAP'den depo yeri bilgisini (AbsEntry) getirir
|
|
245
|
+
*/
|
|
246
|
+
this.getBinLocationByBinCode = (binCode) => this.restService.request({
|
|
247
|
+
method: 'GET',
|
|
248
|
+
url: `/api/smart-warehouse/sap-warehouses/get-bin-location-by-bincode/${binCode}`,
|
|
249
|
+
}, { apiName: this.apiName });
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
WarehouseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
253
|
+
WarehouseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, providedIn: 'root' });
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: WarehouseService, decorators: [{
|
|
255
|
+
type: Injectable,
|
|
256
|
+
args: [{ providedIn: 'root' }]
|
|
257
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
258
|
+
|
|
259
|
+
class OrdersComponent {
|
|
260
|
+
constructor(orderService, warehouseService, toasterService, confirmationService) {
|
|
261
|
+
this.orderService = orderService;
|
|
262
|
+
this.warehouseService = warehouseService;
|
|
263
|
+
this.toasterService = toasterService;
|
|
264
|
+
this.confirmationService = confirmationService;
|
|
265
|
+
this.selectedOrders = [];
|
|
266
|
+
// Toolbar filters
|
|
267
|
+
this.selectedWarehouse = '';
|
|
268
|
+
this.selectedDate = new Date().toISOString().substring(0, 10);
|
|
269
|
+
this.activeListType = null; // null = tümü, '1' | '2' | '3'
|
|
270
|
+
this.activeStatus = null; // null = tümü, 'beklemede' (0) | 'onayBekliyor' (1) | 'isleniyor' (2) | 'tamamlandi' (3)
|
|
271
|
+
this.statusMap = {
|
|
272
|
+
beklemede: '0',
|
|
273
|
+
onayBekliyor: '1',
|
|
274
|
+
isleniyor: '2',
|
|
275
|
+
tamamlandi: '3',
|
|
276
|
+
};
|
|
277
|
+
// Additional inputs
|
|
278
|
+
this.customInputValue = '';
|
|
279
|
+
this.warehouses = [];
|
|
280
|
+
this.isLoadingWarehouses = false;
|
|
281
|
+
this.isGorevBaslatLoading = false;
|
|
282
|
+
this.isReservationLoading = false;
|
|
283
|
+
this.isBeeCellLoading = false;
|
|
284
|
+
this.bosKasaPopupVisible = false;
|
|
285
|
+
this.bosKasaStationId = 1;
|
|
286
|
+
this.bosKasaShelfId = 1;
|
|
287
|
+
this.bosKasaBoxCount = 5;
|
|
288
|
+
this.bosKasaMode = 'empty';
|
|
289
|
+
}
|
|
290
|
+
ngOnInit() {
|
|
291
|
+
this.loadWarehouses();
|
|
292
|
+
this.setupDataSource();
|
|
293
|
+
}
|
|
294
|
+
loadWarehouses() {
|
|
295
|
+
this.isLoadingWarehouses = true;
|
|
296
|
+
this.warehouseService.getSmartWarehouses().subscribe({
|
|
297
|
+
next: (data) => {
|
|
298
|
+
this.warehouses = data || [];
|
|
299
|
+
if (this.warehouses.length > 0) {
|
|
300
|
+
this.selectedWarehouse = this.warehouses[0].WhsCode;
|
|
301
|
+
}
|
|
302
|
+
this.isLoadingWarehouses = false;
|
|
303
|
+
},
|
|
304
|
+
error: (err) => {
|
|
305
|
+
console.error('Depolar yüklenemedi:', err);
|
|
306
|
+
this.toasterService.error('Depolar yüklenemedi.');
|
|
307
|
+
this.isLoadingWarehouses = false;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
setupDataSource() {
|
|
312
|
+
this.ordersDataSource = new DataSource({
|
|
313
|
+
store: this.orderService.loadOrders,
|
|
314
|
+
filter: this.buildCombinedFilter(),
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
buildCombinedFilter() {
|
|
318
|
+
const statusFilter = this.buildStatusFilter();
|
|
319
|
+
const listTypeFilter = this.buildListTypeFilter();
|
|
320
|
+
if (statusFilter && listTypeFilter) {
|
|
321
|
+
return [statusFilter, 'and', listTypeFilter];
|
|
322
|
+
}
|
|
323
|
+
return statusFilter || listTypeFilter || null;
|
|
324
|
+
}
|
|
325
|
+
buildListTypeFilter() {
|
|
326
|
+
if (!this.activeListType) {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
return ['U_SWOrderType', '=', this.activeListType];
|
|
330
|
+
}
|
|
331
|
+
buildStatusFilter() {
|
|
332
|
+
if (!this.activeStatus) {
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
if (this.activeStatus === 'beklemede') {
|
|
336
|
+
// SAP'dan gelen U_SWDurum null/boş değerler backend'de '0' olarak normalize ediliyor
|
|
337
|
+
return ['U_SWDurum', '=', '0'];
|
|
338
|
+
}
|
|
339
|
+
return ['U_SWDurum', '=', this.statusMap[this.activeStatus]];
|
|
340
|
+
}
|
|
341
|
+
toggleStatus(key) {
|
|
342
|
+
this.activeStatus = this.activeStatus === key ? null : key;
|
|
343
|
+
this.applyFilters();
|
|
344
|
+
}
|
|
345
|
+
toggleListType(key) {
|
|
346
|
+
this.activeListType = this.activeListType === key ? null : key;
|
|
347
|
+
this.applyFilters();
|
|
348
|
+
}
|
|
349
|
+
applyFilters() {
|
|
350
|
+
// Depo Talepleri de dahil, üç chip de aynı SAP siparişleri kaynağını (U_SWOrderType filtresiyle) kullanır.
|
|
351
|
+
// DataSource yeniden oluşturulup grid'e atanıyor; mevcut DataSource üzerinde .filter()+.reload()
|
|
352
|
+
// çağırmak grid'e yansımıyordu çünkü Angular binding sadece referans değişince tetikleniyor.
|
|
353
|
+
this.ordersDataSource = new DataSource({
|
|
354
|
+
store: this.orderService.loadOrders,
|
|
355
|
+
filter: this.buildCombinedFilter(),
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
onSelectionChanged(e) {
|
|
359
|
+
this.selectedOrders = e.selectedRowsData || [];
|
|
360
|
+
}
|
|
361
|
+
onRowClick(e) {
|
|
362
|
+
var _a;
|
|
363
|
+
// Eğer expand/collapse icon'una veya checkbox'a tıklandıysa, DevExtreme'in kendi davranışını kullan
|
|
364
|
+
const target = (_a = e.event) === null || _a === void 0 ? void 0 : _a.target;
|
|
365
|
+
if ((target === null || target === void 0 ? void 0 : target.closest('.dx-command-expand')) || (target === null || target === void 0 ? void 0 : target.closest('.dx-master-detail-cell')) || (target === null || target === void 0 ? void 0 : target.closest('.dx-select-checkbox')) || (target === null || target === void 0 ? void 0 : target.closest('.dx-command-select'))) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
if (e.rowType === 'data') {
|
|
369
|
+
const isExpanded = e.component.isRowExpanded(e.key);
|
|
370
|
+
if (isExpanded) {
|
|
371
|
+
e.component.collapseRow(e.key);
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
e.component.expandRow(e.key);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
onRowPrepared(e) {
|
|
379
|
+
var _a;
|
|
380
|
+
if (e.rowType === 'data' && ((_a = e.data) === null || _a === void 0 ? void 0 : _a.U_SWIsError) === 'Y') {
|
|
381
|
+
e.rowElement.classList.add('order-row-error');
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
onGorevBaslat() {
|
|
385
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
386
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
// Validate: U_SWDurum must be "1" (Onay Bekliyor)
|
|
390
|
+
const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum !== '1');
|
|
391
|
+
if (invalidStatus.length > 0) {
|
|
392
|
+
const docNums = invalidStatus.map(o => o.DocNum).join(', ');
|
|
393
|
+
this.toasterService.error(`Şu siparişlerin durumu "Onay Bekliyor" değil: ${docNums}. Sadece eşlemesi yapılmış siparişler için görev başlatılabilir.`);
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
// Validate: U_SWStationCode must be filled
|
|
397
|
+
const noStation = this.selectedOrders.filter(o => !o.U_SWStationCode || o.U_SWStationCode.trim() === '');
|
|
398
|
+
if (noStation.length > 0) {
|
|
399
|
+
const docNums = noStation.map(o => o.DocNum).join(', ');
|
|
400
|
+
this.toasterService.error(`Şu siparişlerin istasyon bilgisi boş: ${docNums}. İstasyon alanı dolu olmalıdır.`);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
404
|
+
this.isGorevBaslatLoading = true;
|
|
405
|
+
this.orderService.startTask(docEntries).subscribe({
|
|
406
|
+
next: (result) => {
|
|
407
|
+
var _a, _b, _c, _d;
|
|
408
|
+
this.toasterService.success(result);
|
|
409
|
+
this.isGorevBaslatLoading = false;
|
|
410
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
411
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
412
|
+
},
|
|
413
|
+
error: (error) => {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Görev başlatılırken bir hata oluştu.';
|
|
416
|
+
this.toasterService.error(errorMessage);
|
|
417
|
+
this.isGorevBaslatLoading = false;
|
|
418
|
+
},
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
// Görevi Tamamla: İşleniyor (2) durumundaki siparişleri BeeCell görevi bitmişse doğrudan
|
|
422
|
+
// Tamamlandı'ya (3) götürür — eski "Görev Tamamla" + "Onay Ver" iki adımı, eski sistemin
|
|
423
|
+
// tek-aksiyon davranışına uygun şekilde tek butonda birleştirir.
|
|
424
|
+
onOnayVer() {
|
|
425
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
426
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
// Validate: U_SWDurum "2" (İşleniyor) olmalı
|
|
430
|
+
const invalidStatus = this.selectedOrders.filter(o => !o.U_SWDurum || o.U_SWDurum !== '2');
|
|
431
|
+
if (invalidStatus.length > 0) {
|
|
432
|
+
const docNums = invalidStatus.map(o => o.DocNum).join(', ');
|
|
433
|
+
this.toasterService.error(`Şu siparişlerin durumu "İşleniyor" değil: ${docNums}. Sadece bu durumdaki siparişler tamamlanabilir.`);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
437
|
+
this.confirmationService
|
|
438
|
+
.warn('Seçili siparişler tamamlanacak. Stok nakli ve fatura oluşturulacaktır. Emin misiniz?', 'Görevi Tamamla')
|
|
439
|
+
.subscribe((status) => {
|
|
440
|
+
if (status === 'confirm') {
|
|
441
|
+
this.orderService.approveTask(docEntries, this.activeListType).subscribe({
|
|
442
|
+
next: (result) => {
|
|
443
|
+
var _a, _b, _c, _d;
|
|
444
|
+
this.toasterService.success(result);
|
|
445
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
446
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
447
|
+
},
|
|
448
|
+
error: (error) => {
|
|
449
|
+
var _a, _b;
|
|
450
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Onay verilirken bir hata oluştu.';
|
|
451
|
+
this.toasterService.error(errorMessage);
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
// ── Sipariş(ler)i sevkiyata sokmadan doğrudan kapat ──
|
|
458
|
+
onSiparisKapat() {
|
|
459
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
460
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
// "İşleniyor" (aktif BeeCell görevi) durumundaki siparişler kapatılamaz
|
|
464
|
+
const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum === '2');
|
|
465
|
+
if (invalidStatus.length > 0) {
|
|
466
|
+
const docNums = invalidStatus.map(o => o.DocNum).join(', ');
|
|
467
|
+
this.toasterService.error(`Şu siparişler "İşleniyor" durumunda (aktif görev var): ${docNums}. Önce görevi tamamlayın ya da BeeCell'de iptal edin.`);
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
471
|
+
const docNums = this.selectedOrders.map(o => o.DocNum).join(', ');
|
|
472
|
+
this.confirmationService
|
|
473
|
+
.warn(`${docNums} numaralı siparişler sevkiyata sokulmadan doğrudan "Tamamlandı" olarak kapatılacak. ` +
|
|
474
|
+
'Hiçbir stok hareketi/irsaliye/fatura oluşturulmayacak. Emin misiniz?', 'Sipariş Kapat')
|
|
475
|
+
.subscribe((status) => {
|
|
476
|
+
if (status === 'confirm') {
|
|
477
|
+
this.orderService.closeOrder(docEntries).subscribe({
|
|
478
|
+
next: (result) => {
|
|
479
|
+
var _a, _b, _c, _d;
|
|
480
|
+
this.toasterService.success(result);
|
|
481
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
482
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
483
|
+
},
|
|
484
|
+
error: (error) => {
|
|
485
|
+
var _a, _b;
|
|
486
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Sipariş kapatılırken bir hata oluştu.';
|
|
487
|
+
this.toasterService.error(errorMessage);
|
|
488
|
+
},
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
onBosKasaGetir() {
|
|
494
|
+
this.bosKasaMode = 'empty';
|
|
495
|
+
this.bosKasaPopupVisible = true;
|
|
496
|
+
}
|
|
497
|
+
onYarimKasa() {
|
|
498
|
+
this.bosKasaMode = 'half';
|
|
499
|
+
this.bosKasaPopupVisible = true;
|
|
500
|
+
}
|
|
501
|
+
onBosKasaGonder() {
|
|
502
|
+
this.bosKasaPopupVisible = false;
|
|
503
|
+
this.isBeeCellLoading = true;
|
|
504
|
+
const call = this.bosKasaMode === 'empty'
|
|
505
|
+
? this.orderService.getEmptyBoxes(this.bosKasaStationId, this.bosKasaShelfId, this.bosKasaBoxCount, this.selectedWarehouse)
|
|
506
|
+
: this.orderService.getHalfBoxes(this.bosKasaStationId, this.bosKasaShelfId, this.bosKasaBoxCount, this.selectedWarehouse);
|
|
507
|
+
call.subscribe({
|
|
508
|
+
next: (result) => {
|
|
509
|
+
this.toasterService.success(result);
|
|
510
|
+
this.isBeeCellLoading = false;
|
|
511
|
+
},
|
|
512
|
+
error: (error) => {
|
|
513
|
+
var _a, _b;
|
|
514
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'BeeCell görevi oluşturulurken hata oluştu.';
|
|
515
|
+
this.toasterService.error(errorMessage);
|
|
516
|
+
this.isBeeCellLoading = false;
|
|
517
|
+
},
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
onDurumGuncelle() {
|
|
521
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
522
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
526
|
+
this.isBeeCellLoading = true;
|
|
527
|
+
this.orderService.updateTaskStatus(docEntries).subscribe({
|
|
528
|
+
next: (result) => {
|
|
529
|
+
var _a, _b;
|
|
530
|
+
this.toasterService.success(result);
|
|
531
|
+
this.isBeeCellLoading = false;
|
|
532
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
533
|
+
},
|
|
534
|
+
error: (error) => {
|
|
535
|
+
var _a, _b;
|
|
536
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Durum güncellenirken hata oluştu.';
|
|
537
|
+
this.toasterService.error(errorMessage);
|
|
538
|
+
this.isBeeCellLoading = false;
|
|
539
|
+
},
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
// ── Seçili siparişler için rezervasyon yap ──
|
|
543
|
+
onRezervasyonYap() {
|
|
544
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
545
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
if (!this.selectedWarehouse) {
|
|
549
|
+
this.toasterService.warn('Lütfen bir depo seçiniz.');
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
// Sadece Beklemede (0) siparişler için rezervasyon yapılabilir
|
|
553
|
+
const invalidStatus = this.selectedOrders.filter(o => o.U_SWDurum && o.U_SWDurum !== '0');
|
|
554
|
+
if (invalidStatus.length > 0) {
|
|
555
|
+
const docNums = invalidStatus.map(o => o.DocNum).join(', ');
|
|
556
|
+
this.toasterService.error(`Şu siparişlerin durumu "Beklemede" değil: ${docNums}. Sadece beklemede olan siparişler için rezervasyon yapılabilir.`);
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
560
|
+
this.isReservationLoading = true;
|
|
561
|
+
this.orderService.reserveOrders(docEntries, this.selectedWarehouse).subscribe({
|
|
562
|
+
next: (result) => {
|
|
563
|
+
var _a, _b, _c, _d;
|
|
564
|
+
this.handleReservationResult(result);
|
|
565
|
+
this.isReservationLoading = false;
|
|
566
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
567
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
568
|
+
},
|
|
569
|
+
error: (error) => {
|
|
570
|
+
var _a, _b;
|
|
571
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Rezervasyon yapılırken bir hata oluştu.';
|
|
572
|
+
this.toasterService.error(errorMessage);
|
|
573
|
+
this.isReservationLoading = false;
|
|
574
|
+
},
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
// ── Seçili siparişlerin rezervasyonlarını sil ──
|
|
578
|
+
onRezervasyonSil() {
|
|
579
|
+
if (!this.selectedOrders || this.selectedOrders.length === 0) {
|
|
580
|
+
this.toasterService.warn('Lütfen en az bir sipariş seçiniz.');
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
const docEntries = this.selectedOrders.map(o => o.DocEntry);
|
|
584
|
+
const docNums = this.selectedOrders.map(o => o.DocNum).join(', ');
|
|
585
|
+
this.confirmationService
|
|
586
|
+
.warn(`${docNums} numaralı siparişlerin rezervasyonları iptal edilecektir. Emin misiniz?`, 'Rezervasyon İptal')
|
|
587
|
+
.subscribe((status) => {
|
|
588
|
+
if (status === 'confirm') {
|
|
589
|
+
this.isReservationLoading = true;
|
|
590
|
+
this.orderService.cancelReservations(docEntries).subscribe({
|
|
591
|
+
next: (result) => {
|
|
592
|
+
var _a, _b, _c, _d;
|
|
593
|
+
this.handleReservationResult(result);
|
|
594
|
+
this.isReservationLoading = false;
|
|
595
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
596
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
597
|
+
},
|
|
598
|
+
error: (error) => {
|
|
599
|
+
var _a, _b;
|
|
600
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Rezervasyon iptal edilirken bir hata oluştu.';
|
|
601
|
+
this.toasterService.error(errorMessage);
|
|
602
|
+
this.isReservationLoading = false;
|
|
603
|
+
},
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
// ── Toplu rezervasyon yap (tüm uygun siparişler) ──
|
|
609
|
+
onTopluRezervasyonYap() {
|
|
610
|
+
if (!this.selectedWarehouse) {
|
|
611
|
+
this.toasterService.warn('Lütfen bir depo seçiniz.');
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
// Zaten rezervasyonu olan siparişler için kullanıcıya seçim sun:
|
|
615
|
+
// - "Yeniden Hesapla" (confirm) → mevcut rezervasyonları silip yeniden kurar (overwriteExisting=true)
|
|
616
|
+
// - "Sadece Yeni Siparişler" (reject) → mevcutları korur, yalnızca rezervasyonsuzları işler (false)
|
|
617
|
+
// - Diyaloğu kapatma (dismiss) → işlemi iptal eder
|
|
618
|
+
this.confirmationService
|
|
619
|
+
.warn('Zaten rezervasyonu olan siparişler için ne yapılsın? "Yeniden Hesapla" mevcut rezervasyonları silip yeniden kurar; ' +
|
|
620
|
+
'"Sadece Yeni Siparişler" mevcutları korur ve yalnızca rezervasyonsuz siparişleri işler.', 'Toplu Rezervasyon', { yesText: 'Yeniden Hesapla', cancelText: 'Sadece Yeni Siparişler', dismissible: true })
|
|
621
|
+
.subscribe((status) => {
|
|
622
|
+
if (status === 'dismiss') {
|
|
623
|
+
return; // iptal
|
|
624
|
+
}
|
|
625
|
+
const overwriteExisting = status === 'confirm';
|
|
626
|
+
this.isReservationLoading = true;
|
|
627
|
+
this.orderService.reserveAllOrders(this.selectedWarehouse, this.activeListType, overwriteExisting).subscribe({
|
|
628
|
+
next: (result) => {
|
|
629
|
+
var _a, _b, _c, _d;
|
|
630
|
+
this.handleReservationResult(result);
|
|
631
|
+
this.isReservationLoading = false;
|
|
632
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
633
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
634
|
+
},
|
|
635
|
+
error: (error) => {
|
|
636
|
+
var _a, _b;
|
|
637
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Toplu rezervasyon yapılırken bir hata oluştu.';
|
|
638
|
+
this.toasterService.error(errorMessage);
|
|
639
|
+
this.isReservationLoading = false;
|
|
640
|
+
},
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
// ── Toplu rezervasyon sil (tüm aktif rezervasyonlar) ──
|
|
645
|
+
onTumRezervasyonlariSil() {
|
|
646
|
+
this.confirmationService
|
|
647
|
+
.warn('Tüm aktif rezervasyonlar silinecektir. Emin misiniz?', 'Tüm Rezervasyonları Sil')
|
|
648
|
+
.subscribe((status) => {
|
|
649
|
+
if (status === 'confirm') {
|
|
650
|
+
this.isReservationLoading = true;
|
|
651
|
+
this.orderService.cancelAllReservations(this.activeListType).subscribe({
|
|
652
|
+
next: (result) => {
|
|
653
|
+
var _a, _b, _c, _d;
|
|
654
|
+
this.handleReservationResult(result);
|
|
655
|
+
this.isReservationLoading = false;
|
|
656
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
657
|
+
(_d = (_c = this.dxOrdersInstance) === null || _c === void 0 ? void 0 : _c.instance) === null || _d === void 0 ? void 0 : _d.clearSelection();
|
|
658
|
+
},
|
|
659
|
+
error: (error) => {
|
|
660
|
+
var _a, _b;
|
|
661
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Rezervasyonlar silinirken bir hata oluştu.';
|
|
662
|
+
this.toasterService.error(errorMessage);
|
|
663
|
+
this.isReservationLoading = false;
|
|
664
|
+
},
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
handleReservationResult(result) {
|
|
670
|
+
var _a;
|
|
671
|
+
const shortsOrders = ((_a = result.OrderResults) === null || _a === void 0 ? void 0 : _a.filter(r => r.Shorts && r.Shorts.length > 0)) || [];
|
|
672
|
+
const hasShorts = shortsOrders.length > 0;
|
|
673
|
+
if (result.FailCount === 0 && !hasShorts) {
|
|
674
|
+
this.toasterService.success(result.Summary);
|
|
675
|
+
}
|
|
676
|
+
else if (result.SuccessCount > 0) {
|
|
677
|
+
this.toasterService.warn(result.Summary);
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
this.toasterService.error(result.Summary);
|
|
681
|
+
}
|
|
682
|
+
// Eksik kalemler varsa detay göster
|
|
683
|
+
if (hasShorts) {
|
|
684
|
+
const totalShortItems = shortsOrders.reduce((sum, o) => sum + o.Shorts.length, 0);
|
|
685
|
+
const shortMessage = totalShortItems > OrdersComponent.MAX_SHORT_ITEMS_DETAILED
|
|
686
|
+
? `Kalem miktarları eksik (${shortsOrders.length} sipariş, ${totalShortItems} kalem).`
|
|
687
|
+
: `Eksik Kalemler:\n${shortsOrders
|
|
688
|
+
.map(o => `Sipariş ${o.DocNum}: ${o.Shorts.map(s => `${s.ItemCode} (eksik: ${s.ShortQty})`).join(', ')}`)
|
|
689
|
+
.join('\n')}`;
|
|
690
|
+
this.toasterService.warn(shortMessage);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
onRefresh() {
|
|
694
|
+
var _a, _b;
|
|
695
|
+
(_b = (_a = this.dxOrdersInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
696
|
+
}
|
|
697
|
+
onExportExcel() {
|
|
698
|
+
// TODO: Implement
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
OrdersComponent.MAX_SHORT_ITEMS_DETAILED = 5;
|
|
702
|
+
OrdersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersComponent, deps: [{ token: OrderService }, { token: WarehouseService }, { token: i2.ToasterService }, { token: i2.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
703
|
+
OrdersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OrdersComponent, selector: "lib-orders", viewQueries: [{ propertyName: "dxOrdersInstance", first: true, predicate: ["dxOrdersInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'SmartWarehouse::Orders' | abpLocalization\">\r\n\r\n <!-- Toolbar -->\r\n <div class=\"orders-toolbar\">\r\n <!-- Row 1: Filters -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"toolbar-group\">\r\n <label>Sipari\u015F Grubu</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip list-purchase\" [class.active]=\"activeListType === '1'\"\r\n (click)=\"toggleListType('1')\">\r\n <i class=\"fa fa-shopping-cart\"></i> Sanayi Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-distribution\" [class.active]=\"activeListType === '2'\"\r\n (click)=\"toggleListType('2')\">\r\n <i class=\"fa fa-truck\"></i> Da\u011F\u0131t\u0131m Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-warehouse\" [class.active]=\"activeListType === '3'\"\r\n (click)=\"toggleListType('3')\">\r\n <i class=\"fa fa-warehouse\"></i> Depo Talepleri\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--durum\">\r\n <label>Durum</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip pending\" [class.active]=\"activeStatus === 'beklemede'\"\r\n (click)=\"toggleStatus('beklemede')\">\r\n <i class=\"fa fa-clock\"></i> Beklemede\r\n </span>\r\n <span class=\"status-chip processing\" [class.active]=\"activeStatus === 'isleniyor'\"\r\n (click)=\"toggleStatus('isleniyor')\">\r\n <i class=\"fa fa-spinner\"></i> \u0130\u015Fleniyor\r\n </span>\r\n <span class=\"status-chip awaiting\" [class.active]=\"activeStatus === 'onayBekliyor'\"\r\n (click)=\"toggleStatus('onayBekliyor')\">\r\n <i class=\"fa fa-hourglass-half\"></i> Onay Bekliyor\r\n </span>\r\n <span class=\"status-chip completed\" [class.active]=\"activeStatus === 'tamamlandi'\"\r\n (click)=\"toggleStatus('tamamlandi')\">\r\n <i class=\"fa fa-check-circle\"></i> Tamamland\u0131\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--depo\">\r\n <label>Depo</label>\r\n <select [(ngModel)]=\"selectedWarehouse\" class=\"form-select\">\r\n <option value=\"\">T\u00FCm\u00FC</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">{{ wh.WhsName }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"toolbar-divider\" />\r\n\r\n <!-- Row 3: Action input + related buttons | Reservation | Refresh/Excel -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"action-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onGorevBaslat()\" [disabled]=\"isGorevBaslatLoading\">\r\n <i class=\"fa fa-plus-circle\"></i> G\u00F6rev Ba\u015Flat\r\n </button>\r\n <button class=\"btn btn-action-approve btn-sm\" (click)=\"onOnayVer()\">\r\n <i class=\"fa fa-thumbs-up\"></i> G\u00F6revi Tamamla\r\n </button>\r\n <button class=\"btn btn-action-danger btn-sm\" (click)=\"onSiparisKapat()\">\r\n <i class=\"fa fa-times-circle\"></i> Sipari\u015F Kapat\r\n </button>\r\n <button class=\"btn btn-action-sync btn-sm\" (click)=\"onDurumGuncelle()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-sync-alt\"></i> Durum G\u00FCncelle\r\n </button>\r\n <button class=\"btn btn-action-info btn-sm\" (click)=\"onBosKasaGetir()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box-open\"></i> Bo\u015F Kasa Getir\r\n </button>\r\n <button class=\"btn btn-action-warning btn-sm\" (click)=\"onYarimKasa()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box\"></i> Yar\u0131m Kasa Getir\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-reservation btn-sm\" (click)=\"onRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Rezervasyon Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-cancel btn-sm\" (click)=\"onRezervasyonSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Rezervasyon Sil\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk btn-sm\" (click)=\"onTopluRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Toplu Rez. Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk-cancel btn-sm\" (click)=\"onTumRezervasyonlariSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Toplu Rez. Sil\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-secondary btn-sm\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"card orders-grid-card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid\r\n #dxOrdersInstance\r\n [dataSource]=\"ordersDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [remoteOperations]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n columnResizingMode=\"widget\"\r\n [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [columnHidingEnabled]=\"true\"\r\n (onRowClick)=\"onRowClick($event)\"\r\n (onSelectionChanged)=\"onSelectionChanged($event)\"\r\n (onRowPrepared)=\"onRowPrepared($event)\"\r\n style=\"height: 60vh\"\r\n >\r\n <dxo-pager\r\n [visible]=\"true\"\r\n [showInfo]=\"true\"\r\n [allowedPageSizes]=\"[5, 10, 20]\"\r\n [showNavigationButtons]=\"true\"\r\n [showPageSizeSelector]=\"true\"\r\n >\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\r\n <dxo-column-chooser\r\n [allowSearch]=\"true\"\r\n [enabled]=\"true\"\r\n mode=\"select\"\r\n ></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxo-selection\r\n mode=\"multiple\"\r\n showCheckBoxesMode=\"always\"\r\n [allowSelectAll]=\"true\"\r\n ></dxo-selection>\r\n\r\n <dxi-column\r\n dataField=\"DocNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardName\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardName' | abpLocalization }}\"\r\n [width]=\"220\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDueDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDueDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTalepTarihi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTalepTarihi' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWDurum\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWDurum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n cellTemplate=\"swDurumTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWIsError\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWIsError' | abpLocalization }}\"\r\n [width]=\"50\"\r\n cellTemplate=\"errorTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWErrorMessage\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWErrorMessage' | abpLocalization }}\"\r\n [width]=\"260\"\r\n cellTemplate=\"errorMessageTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"OwnerCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:OwnerCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Comments\"\r\n caption=\"{{ 'SmartWarehouse::Order:Comments' | abpLocalization }}\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWGonderildi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWGonderildi' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWStationCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWStationCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWEyeCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWEyeCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWOrderType\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWOrderType' | abpLocalization }}\"\r\n [width]=\"160\"\r\n cellTemplate=\"orderTypeTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"NumAtCard\"\r\n caption=\"{{ 'SmartWarehouse::Order:NumAtCard' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocCur\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocCur' | abpLocalization }}\"\r\n [width]=\"90\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocStatus\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocStatus' | abpLocalization }}\"\r\n [width]=\"90\"\r\n cellTemplate=\"statusTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocEntry\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocEntry' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n\r\n <div *dxTemplate=\"let cell of 'statusTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-success': cell.value === 'O',\r\n 'bg-secondary': cell.value === 'C'\r\n }\"\r\n >\r\n {{ cell.value === 'O' ? 'A\u00E7\u0131k' : 'Kapal\u0131' }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'swDurumTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-warning': cell.value === '0' || !cell.value,\r\n 'bg-info': cell.value === '1',\r\n 'bg-primary': cell.value === '2',\r\n 'bg-success': cell.value === '3'\r\n }\"\r\n >\r\n {{\r\n cell.value === '1' ? 'Onay Bekliyor' :\r\n cell.value === '2' ? '\u0130\u015Fleniyor' :\r\n cell.value === '3' ? 'Tamamland\u0131' : 'Beklemede'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorTemplate'\">\r\n <i\r\n *ngIf=\"cell.value === 'Y'\"\r\n class=\"fa fa-exclamation-triangle text-danger\"\r\n [title]=\"cell.data.U_SWErrorMessage\"\r\n ></i>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorMessageTemplate'\">\r\n <span\r\n *ngIf=\"cell.data.U_SWIsError === 'Y'\"\r\n class=\"error-message-cell\"\r\n [title]=\"cell.value\"\r\n >{{ cell.value }}</span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'orderTypeTemplate'\">\r\n <span class=\"badge bg-secondary\">\r\n {{\r\n cell.value === '1' ? 'Sanayi Sipari\u015Fleri' :\r\n cell.value === '2' ? 'Da\u011F\u0131t\u0131m Sipari\u015Fleri' :\r\n cell.value === '3' ? 'Depo Talepleri' : '-'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <!-- Master-Detail: Sipari\u015F Sat\u0131rlar\u0131 -->\r\n <dxo-master-detail [enabled]=\"true\" template=\"orderLinesTemplate\"></dxo-master-detail>\r\n\r\n <div *dxTemplate=\"let detail of 'orderLinesTemplate'\">\r\n <div class=\"p-3\">\r\n <h6 class=\"mb-3\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n {{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}:\r\n {{ detail.data.DocNum }} - Sipari\u015F Sat\u0131rlar\u0131\r\n </h6>\r\n <dx-data-grid\r\n [dataSource]=\"detail.data.DocumentLines\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n >\r\n <dxi-column\r\n dataField=\"LineNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineNum' | abpLocalization }}\"\r\n [width]=\"70\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:ItemCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemDescription\"\r\n caption=\"Kalem Ad\u0131\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Quantity\"\r\n caption=\"{{ 'SmartWarehouse::Order:Quantity' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTeslimMiktar\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTeslimMiktar' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"LineTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"WarehouseCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:WhsCode' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ShipDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:ShipDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SonGorevId\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SonGorevId' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n\r\n <dxo-summary>\r\n <dxi-total-item\r\n column=\"lineTotal\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.00\"\r\n ></dxi-total-item>\r\n <dxi-total-item\r\n column=\"quantity\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.##\"\r\n ></dxi-total-item>\r\n </dxo-summary>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n <!-- Bo\u015F / Yar\u0131m Kasa Popup -->\r\n <dx-popup\r\n [visible]=\"bosKasaPopupVisible\"\r\n (onHidden)=\"bosKasaPopupVisible = false\"\r\n [width]=\"380\"\r\n [height]=\"'auto'\"\r\n [showTitle]=\"true\"\r\n [title]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa Getir' : 'Yar\u0131m Kasa Getir'\"\r\n [dragEnabled]=\"true\"\r\n [resizeEnabled]=\"false\"\r\n [showCloseButton]=\"true\"\r\n [closeOnOutsideClick]=\"false\"\r\n >\r\n <div *dxTemplate=\"let data of 'content'\" class=\"p-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">\u0130stasyon No</label>\r\n <dx-number-box [(value)]=\"bosKasaStationId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Raf No (Shelf ID)</label>\r\n <dx-number-box [(value)]=\"bosKasaShelfId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Kasa Adedi</label>\r\n <dx-number-box [(value)]=\"bosKasaBoxCount\" [min]=\"1\" [max]=\"50\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"d-flex justify-content-end gap-2 mt-3\">\r\n <dx-button text=\"\u0130ptal\" (onClick)=\"bosKasaPopupVisible = false\" type=\"normal\"></dx-button>\r\n <dx-button\r\n [text]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa G\u00F6nder' : 'Yar\u0131m Kasa G\u00F6nder'\"\r\n type=\"default\"\r\n (onClick)=\"onBosKasaGonder()\"\r\n ></dx-button>\r\n </div>\r\n </div>\r\n </dx-popup>\r\n\r\n</abp-page>\r\n", styles: [":host{display:block;max-width:100%;overflow-x:hidden}.orders-toolbar{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:16px 20px;margin-bottom:16px;box-shadow:0 1px 3px #0000000f;max-width:100%;overflow:hidden}.toolbar-divider{border:none;border-top:1px solid #eee;margin:10px 0}.toolbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-group{display:flex;flex-direction:column;gap:4px}.toolbar-group--durum{margin-left:80px}.toolbar-group--depo{margin-left:auto}.toolbar-group label{font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px}.toolbar-group select,.toolbar-group input[type=date]{height:36px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;transition:border-color .15s}.toolbar-group select:focus,.toolbar-group input[type=date]:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-group select{min-width:180px}.radio-group{display:flex;gap:12px;height:36px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:13px;cursor:pointer;white-space:nowrap}.status-group{display:flex;gap:10px;align-items:center}.status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .15s;-webkit-user-select:none;user-select:none}.status-chip.pending{background:#fff9e6;color:#c9a227;border-color:#ffe082}.status-chip.pending.active{background:#ffc107;color:#fff;border-color:#ffc107}.status-chip.processing{background:#e8f0fe;color:#7aadf5;border-color:#a8c8f7}.status-chip.processing.active{background:#0d6efd;color:#fff;border-color:#0d6efd}.status-chip.awaiting{background:#e6f9fc;color:#6ec6d8;border-color:#a0e1ed}.status-chip.awaiting.active{background:#0dcaf0;color:#fff;border-color:#0dcaf0}.status-chip.completed{background:#e8f5e9;color:#6db680;border-color:#a5d6a7}.status-chip.completed.active{background:#198754;color:#fff;border-color:#198754}.status-chip.list-purchase{background:#eef0fa;color:#9aa1d4;border-color:#b3b9e6}.status-chip.list-purchase.active{background:#5c6bc0;color:#fff;border-color:#5c6bc0}.status-chip.list-distribution{background:#fce8ee;color:#e87a9e;border-color:#f0a3bb}.status-chip.list-distribution.active{background:#e91e63;color:#fff;border-color:#e91e63}.status-chip.list-warehouse{background:#e5f5f4;color:#6db5ab;border-color:#a0d4cd}.status-chip.list-warehouse.active{background:#009688;color:#fff;border-color:#009688}.action-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.action-input{width:140px;height:32px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px}.action-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-separator{width:1px;height:28px;background:#dee2e6;align-self:center}.reservation-group{display:flex;align-items:center;gap:8px}.toolbar-actions{display:flex;gap:8px;margin-left:auto;align-items:center}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:5px 12px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-approve{background:#6f42c1;color:#fff;border:none}.btn-action-approve:hover{background:#5a32a3;color:#fff}.btn-action-warning{background:#f1b44c;color:#fff;border:none}.btn-action-warning:hover{background:#d9a043;color:#fff}.btn-action-info{background:#50a5f1;color:#fff;border:none}.btn-action-info:hover{background:#3d8ed8;color:#fff}.btn-action-danger{background:#f46a6a;color:#fff;border:none}.btn-action-danger:hover{background:#e05555;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.btn-action-secondary{background:#74788d;color:#fff;border:none}.btn-action-secondary:hover{background:#5f6373;color:#fff}.btn-action-reservation{background:#7c4dff;color:#fff;border:none}.btn-action-reservation:hover{background:#651fff;color:#fff}.btn-action-reservation:disabled{background:#b39ddb;cursor:not-allowed}.btn-action-reservation-cancel{background:#ff6e40;color:#fff;border:none}.btn-action-reservation-cancel:hover{background:#ff3d00;color:#fff}.btn-action-reservation-cancel:disabled{background:#ffab91;cursor:not-allowed}.btn-action-reservation-bulk{background:#536dfe;color:#fff;border:none}.btn-action-reservation-bulk:hover{background:#304ffe;color:#fff}.btn-action-reservation-bulk:disabled{background:#8c9eff;cursor:not-allowed}.btn-action-reservation-bulk-cancel{background:#ff5252;color:#fff;border:none}.btn-action-reservation-bulk-cancel:hover{background:#ff1744;color:#fff}.btn-action-reservation-bulk-cancel:disabled{background:#ff8a80;cursor:not-allowed}.action-divider{width:1px;height:24px;background:#dee2e6;display:inline-block;vertical-align:middle;margin:0 4px}.orders-grid-card{border-radius:8px;border:1px solid #e0e0e0;box-shadow:0 1px 3px #0000000f;overflow:hidden;max-width:100%}.orders-grid-card .card-body{padding:12px;overflow-x:auto}::ng-deep .order-row-error{background-color:#fdecea!important}::ng-deep .order-row-error:hover{background-color:#fbd9d5!important}::ng-deep .error-message-cell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b02a37;font-size:12px}@media (max-width: 1200px){.toolbar-actions{margin-left:0}.radio-group{flex-wrap:wrap;height:auto}.action-group{width:100%}.toolbar-separator{display:none}}@media (max-width: 992px){.toolbar-group--durum,.toolbar-group--depo{margin-left:0}.toolbar-row{gap:12px}.toolbar-group select{min-width:0}.status-group{flex-wrap:wrap;gap:6px}.reservation-group{flex-wrap:wrap}}@media (max-width: 768px){.orders-toolbar{padding:12px}.toolbar-row{flex-direction:column;align-items:stretch;gap:10px}.toolbar-group,.toolbar-group select,.toolbar-group input[type=date]{width:100%}.radio-group{flex-direction:column;align-items:flex-start;gap:8px}.status-group{flex-wrap:wrap;gap:6px}.status-chip{font-size:11px;padding:3px 10px}.action-group,.reservation-group,.toolbar-actions{flex-wrap:wrap;gap:6px}.action-divider{display:none}.action-input{width:100%}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{font-size:11px;padding:5px 10px}}@media (max-width: 480px){.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{flex:1 1 calc(50% - 6px);justify-content:center}.status-chip{font-size:10px;padding:2px 8px}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSelectionComponent, selector: "dxo-selection", inputs: ["allowSelectAll", "deferred", "mode", "selectAllMode", "showCheckBoxesMode", "recursive"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "component", type: i7.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i7.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }, { kind: "directive", type: i8.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i6.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "elementAttrChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i6.DxNumberBoxComponent, selector: "dx-number-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "format", "height", "hint", "hoverStateEnabled", "inputAttr", "invalidValueMessage", "isValid", "label", "labelMode", "max", "min", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showSpinButtons", "step", "stylingMode", "tabIndex", "text", "useLargeSpinButtons", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "formatChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "invalidValueMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "minChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showSpinButtonsChange", "stepChange", "stylingModeChange", "tabIndexChange", "textChange", "useLargeSpinButtonsChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersComponent, decorators: [{
|
|
705
|
+
type: Component,
|
|
706
|
+
args: [{ selector: 'lib-orders', template: "<abp-page [title]=\"'SmartWarehouse::Orders' | abpLocalization\">\r\n\r\n <!-- Toolbar -->\r\n <div class=\"orders-toolbar\">\r\n <!-- Row 1: Filters -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"toolbar-group\">\r\n <label>Sipari\u015F Grubu</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip list-purchase\" [class.active]=\"activeListType === '1'\"\r\n (click)=\"toggleListType('1')\">\r\n <i class=\"fa fa-shopping-cart\"></i> Sanayi Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-distribution\" [class.active]=\"activeListType === '2'\"\r\n (click)=\"toggleListType('2')\">\r\n <i class=\"fa fa-truck\"></i> Da\u011F\u0131t\u0131m Sipari\u015Fleri\r\n </span>\r\n <span class=\"status-chip list-warehouse\" [class.active]=\"activeListType === '3'\"\r\n (click)=\"toggleListType('3')\">\r\n <i class=\"fa fa-warehouse\"></i> Depo Talepleri\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--durum\">\r\n <label>Durum</label>\r\n <div class=\"status-group\">\r\n <span class=\"status-chip pending\" [class.active]=\"activeStatus === 'beklemede'\"\r\n (click)=\"toggleStatus('beklemede')\">\r\n <i class=\"fa fa-clock\"></i> Beklemede\r\n </span>\r\n <span class=\"status-chip processing\" [class.active]=\"activeStatus === 'isleniyor'\"\r\n (click)=\"toggleStatus('isleniyor')\">\r\n <i class=\"fa fa-spinner\"></i> \u0130\u015Fleniyor\r\n </span>\r\n <span class=\"status-chip awaiting\" [class.active]=\"activeStatus === 'onayBekliyor'\"\r\n (click)=\"toggleStatus('onayBekliyor')\">\r\n <i class=\"fa fa-hourglass-half\"></i> Onay Bekliyor\r\n </span>\r\n <span class=\"status-chip completed\" [class.active]=\"activeStatus === 'tamamlandi'\"\r\n (click)=\"toggleStatus('tamamlandi')\">\r\n <i class=\"fa fa-check-circle\"></i> Tamamland\u0131\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"toolbar-group toolbar-group--depo\">\r\n <label>Depo</label>\r\n <select [(ngModel)]=\"selectedWarehouse\" class=\"form-select\">\r\n <option value=\"\">T\u00FCm\u00FC</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">{{ wh.WhsName }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"toolbar-divider\" />\r\n\r\n <!-- Row 3: Action input + related buttons | Reservation | Refresh/Excel -->\r\n <div class=\"toolbar-row\">\r\n <div class=\"action-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onGorevBaslat()\" [disabled]=\"isGorevBaslatLoading\">\r\n <i class=\"fa fa-plus-circle\"></i> G\u00F6rev Ba\u015Flat\r\n </button>\r\n <button class=\"btn btn-action-approve btn-sm\" (click)=\"onOnayVer()\">\r\n <i class=\"fa fa-thumbs-up\"></i> G\u00F6revi Tamamla\r\n </button>\r\n <button class=\"btn btn-action-danger btn-sm\" (click)=\"onSiparisKapat()\">\r\n <i class=\"fa fa-times-circle\"></i> Sipari\u015F Kapat\r\n </button>\r\n <button class=\"btn btn-action-sync btn-sm\" (click)=\"onDurumGuncelle()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-sync-alt\"></i> Durum G\u00FCncelle\r\n </button>\r\n <button class=\"btn btn-action-info btn-sm\" (click)=\"onBosKasaGetir()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box-open\"></i> Bo\u015F Kasa Getir\r\n </button>\r\n <button class=\"btn btn-action-warning btn-sm\" (click)=\"onYarimKasa()\" [disabled]=\"isBeeCellLoading\">\r\n <i class=\"fa fa-box\"></i> Yar\u0131m Kasa Getir\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-reservation btn-sm\" (click)=\"onRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Rezervasyon Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-cancel btn-sm\" (click)=\"onRezervasyonSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Rezervasyon Sil\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk btn-sm\" (click)=\"onTopluRezervasyonYap()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-lock\"></i> Toplu Rez. Yap\r\n </button>\r\n <button class=\"btn btn-action-reservation-bulk-cancel btn-sm\" (click)=\"onTumRezervasyonlariSil()\" [disabled]=\"isReservationLoading\">\r\n <i class=\"fa fa-unlock\"></i> Toplu Rez. Sil\r\n </button>\r\n <span class=\"action-divider\"></span>\r\n <button class=\"btn btn-action-secondary btn-sm\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"card orders-grid-card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid\r\n #dxOrdersInstance\r\n [dataSource]=\"ordersDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [remoteOperations]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n columnResizingMode=\"widget\"\r\n [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [columnHidingEnabled]=\"true\"\r\n (onRowClick)=\"onRowClick($event)\"\r\n (onSelectionChanged)=\"onSelectionChanged($event)\"\r\n (onRowPrepared)=\"onRowPrepared($event)\"\r\n style=\"height: 60vh\"\r\n >\r\n <dxo-pager\r\n [visible]=\"true\"\r\n [showInfo]=\"true\"\r\n [allowedPageSizes]=\"[5, 10, 20]\"\r\n [showNavigationButtons]=\"true\"\r\n [showPageSizeSelector]=\"true\"\r\n >\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\r\n <dxo-column-chooser\r\n [allowSearch]=\"true\"\r\n [enabled]=\"true\"\r\n mode=\"select\"\r\n ></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxo-selection\r\n mode=\"multiple\"\r\n showCheckBoxesMode=\"always\"\r\n [allowSelectAll]=\"true\"\r\n ></dxo-selection>\r\n\r\n <dxi-column\r\n dataField=\"DocNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"CardName\"\r\n caption=\"{{ 'SmartWarehouse::Order:CardName' | abpLocalization }}\"\r\n [width]=\"220\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocDueDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocDueDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTalepTarihi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTalepTarihi' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWDurum\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWDurum' | abpLocalization }}\"\r\n [width]=\"110\"\r\n cellTemplate=\"swDurumTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWIsError\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWIsError' | abpLocalization }}\"\r\n [width]=\"50\"\r\n cellTemplate=\"errorTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWErrorMessage\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWErrorMessage' | abpLocalization }}\"\r\n [width]=\"260\"\r\n cellTemplate=\"errorMessageTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"OwnerCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:OwnerCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Comments\"\r\n caption=\"{{ 'SmartWarehouse::Order:Comments' | abpLocalization }}\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWGonderildi\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWGonderildi' | abpLocalization }}\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWStationCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWStationCode' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWEyeCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWEyeCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWOrderType\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWOrderType' | abpLocalization }}\"\r\n [width]=\"160\"\r\n cellTemplate=\"orderTypeTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"NumAtCard\"\r\n caption=\"{{ 'SmartWarehouse::Order:NumAtCard' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"130\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocCur\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocCur' | abpLocalization }}\"\r\n [width]=\"90\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocStatus\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocStatus' | abpLocalization }}\"\r\n [width]=\"90\"\r\n cellTemplate=\"statusTemplate\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"DocEntry\"\r\n caption=\"{{ 'SmartWarehouse::Order:DocEntry' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n\r\n <div *dxTemplate=\"let cell of 'statusTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-success': cell.value === 'O',\r\n 'bg-secondary': cell.value === 'C'\r\n }\"\r\n >\r\n {{ cell.value === 'O' ? 'A\u00E7\u0131k' : 'Kapal\u0131' }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'swDurumTemplate'\">\r\n <span\r\n class=\"badge\"\r\n [ngClass]=\"{\r\n 'bg-warning': cell.value === '0' || !cell.value,\r\n 'bg-info': cell.value === '1',\r\n 'bg-primary': cell.value === '2',\r\n 'bg-success': cell.value === '3'\r\n }\"\r\n >\r\n {{\r\n cell.value === '1' ? 'Onay Bekliyor' :\r\n cell.value === '2' ? '\u0130\u015Fleniyor' :\r\n cell.value === '3' ? 'Tamamland\u0131' : 'Beklemede'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorTemplate'\">\r\n <i\r\n *ngIf=\"cell.value === 'Y'\"\r\n class=\"fa fa-exclamation-triangle text-danger\"\r\n [title]=\"cell.data.U_SWErrorMessage\"\r\n ></i>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'errorMessageTemplate'\">\r\n <span\r\n *ngIf=\"cell.data.U_SWIsError === 'Y'\"\r\n class=\"error-message-cell\"\r\n [title]=\"cell.value\"\r\n >{{ cell.value }}</span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let cell of 'orderTypeTemplate'\">\r\n <span class=\"badge bg-secondary\">\r\n {{\r\n cell.value === '1' ? 'Sanayi Sipari\u015Fleri' :\r\n cell.value === '2' ? 'Da\u011F\u0131t\u0131m Sipari\u015Fleri' :\r\n cell.value === '3' ? 'Depo Talepleri' : '-'\r\n }}\r\n </span>\r\n </div>\r\n\r\n <!-- Master-Detail: Sipari\u015F Sat\u0131rlar\u0131 -->\r\n <dxo-master-detail [enabled]=\"true\" template=\"orderLinesTemplate\"></dxo-master-detail>\r\n\r\n <div *dxTemplate=\"let detail of 'orderLinesTemplate'\">\r\n <div class=\"p-3\">\r\n <h6 class=\"mb-3\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n {{ 'SmartWarehouse::Order:DocNum' | abpLocalization }}:\r\n {{ detail.data.DocNum }} - Sipari\u015F Sat\u0131rlar\u0131\r\n </h6>\r\n <dx-data-grid\r\n [dataSource]=\"detail.data.DocumentLines\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n >\r\n <dxi-column\r\n dataField=\"LineNum\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineNum' | abpLocalization }}\"\r\n [width]=\"70\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:ItemCode' | abpLocalization }}\"\r\n [width]=\"140\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ItemDescription\"\r\n caption=\"Kalem Ad\u0131\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"Quantity\"\r\n caption=\"{{ 'SmartWarehouse::Order:Quantity' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SWTeslimMiktar\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SWTeslimMiktar' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.##\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"LineTotal\"\r\n caption=\"{{ 'SmartWarehouse::Order:LineTotal' | abpLocalization }}\"\r\n dataType=\"number\"\r\n format=\"#,##0.00\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"WarehouseCode\"\r\n caption=\"{{ 'SmartWarehouse::Order:WhsCode' | abpLocalization }}\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"ShipDate\"\r\n caption=\"{{ 'SmartWarehouse::Order:ShipDate' | abpLocalization }}\"\r\n dataType=\"date\"\r\n format=\"dd.MM.yyyy\"\r\n [width]=\"110\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"U_SonGorevId\"\r\n caption=\"{{ 'SmartWarehouse::Order:U_SonGorevId' | abpLocalization }}\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n\r\n <dxo-summary>\r\n <dxi-total-item\r\n column=\"lineTotal\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.00\"\r\n ></dxi-total-item>\r\n <dxi-total-item\r\n column=\"quantity\"\r\n summaryType=\"sum\"\r\n displayFormat=\"Toplam: {0}\"\r\n valueFormat=\"#,##0.##\"\r\n ></dxi-total-item>\r\n </dxo-summary>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n <!-- Bo\u015F / Yar\u0131m Kasa Popup -->\r\n <dx-popup\r\n [visible]=\"bosKasaPopupVisible\"\r\n (onHidden)=\"bosKasaPopupVisible = false\"\r\n [width]=\"380\"\r\n [height]=\"'auto'\"\r\n [showTitle]=\"true\"\r\n [title]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa Getir' : 'Yar\u0131m Kasa Getir'\"\r\n [dragEnabled]=\"true\"\r\n [resizeEnabled]=\"false\"\r\n [showCloseButton]=\"true\"\r\n [closeOnOutsideClick]=\"false\"\r\n >\r\n <div *dxTemplate=\"let data of 'content'\" class=\"p-3\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">\u0130stasyon No</label>\r\n <dx-number-box [(value)]=\"bosKasaStationId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Raf No (Shelf ID)</label>\r\n <dx-number-box [(value)]=\"bosKasaShelfId\" [min]=\"1\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">Kasa Adedi</label>\r\n <dx-number-box [(value)]=\"bosKasaBoxCount\" [min]=\"1\" [max]=\"50\" [showSpinButtons]=\"true\"></dx-number-box>\r\n </div>\r\n <div class=\"d-flex justify-content-end gap-2 mt-3\">\r\n <dx-button text=\"\u0130ptal\" (onClick)=\"bosKasaPopupVisible = false\" type=\"normal\"></dx-button>\r\n <dx-button\r\n [text]=\"bosKasaMode === 'empty' ? 'Bo\u015F Kasa G\u00F6nder' : 'Yar\u0131m Kasa G\u00F6nder'\"\r\n type=\"default\"\r\n (onClick)=\"onBosKasaGonder()\"\r\n ></dx-button>\r\n </div>\r\n </div>\r\n </dx-popup>\r\n\r\n</abp-page>\r\n", styles: [":host{display:block;max-width:100%;overflow-x:hidden}.orders-toolbar{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:16px 20px;margin-bottom:16px;box-shadow:0 1px 3px #0000000f;max-width:100%;overflow:hidden}.toolbar-divider{border:none;border-top:1px solid #eee;margin:10px 0}.toolbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.toolbar-group{display:flex;flex-direction:column;gap:4px}.toolbar-group--durum{margin-left:80px}.toolbar-group--depo{margin-left:auto}.toolbar-group label{font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px}.toolbar-group select,.toolbar-group input[type=date]{height:36px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px;background:#fff;transition:border-color .15s}.toolbar-group select:focus,.toolbar-group input[type=date]:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-group select{min-width:180px}.radio-group{display:flex;gap:12px;height:36px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:13px;cursor:pointer;white-space:nowrap}.status-group{display:flex;gap:10px;align-items:center}.status-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;border:1px solid transparent;transition:all .15s;-webkit-user-select:none;user-select:none}.status-chip.pending{background:#fff9e6;color:#c9a227;border-color:#ffe082}.status-chip.pending.active{background:#ffc107;color:#fff;border-color:#ffc107}.status-chip.processing{background:#e8f0fe;color:#7aadf5;border-color:#a8c8f7}.status-chip.processing.active{background:#0d6efd;color:#fff;border-color:#0d6efd}.status-chip.awaiting{background:#e6f9fc;color:#6ec6d8;border-color:#a0e1ed}.status-chip.awaiting.active{background:#0dcaf0;color:#fff;border-color:#0dcaf0}.status-chip.completed{background:#e8f5e9;color:#6db680;border-color:#a5d6a7}.status-chip.completed.active{background:#198754;color:#fff;border-color:#198754}.status-chip.list-purchase{background:#eef0fa;color:#9aa1d4;border-color:#b3b9e6}.status-chip.list-purchase.active{background:#5c6bc0;color:#fff;border-color:#5c6bc0}.status-chip.list-distribution{background:#fce8ee;color:#e87a9e;border-color:#f0a3bb}.status-chip.list-distribution.active{background:#e91e63;color:#fff;border-color:#e91e63}.status-chip.list-warehouse{background:#e5f5f4;color:#6db5ab;border-color:#a0d4cd}.status-chip.list-warehouse.active{background:#009688;color:#fff;border-color:#009688}.action-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.action-input{width:140px;height:32px;border:1px solid #ced4da;border-radius:6px;padding:0 10px;font-size:13px}.action-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.toolbar-separator{width:1px;height:28px;background:#dee2e6;align-self:center}.reservation-group{display:flex;align-items:center;gap:8px}.toolbar-actions{display:flex;gap:8px;margin-left:auto;align-items:center}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:5px 12px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-approve{background:#6f42c1;color:#fff;border:none}.btn-action-approve:hover{background:#5a32a3;color:#fff}.btn-action-warning{background:#f1b44c;color:#fff;border:none}.btn-action-warning:hover{background:#d9a043;color:#fff}.btn-action-info{background:#50a5f1;color:#fff;border:none}.btn-action-info:hover{background:#3d8ed8;color:#fff}.btn-action-danger{background:#f46a6a;color:#fff;border:none}.btn-action-danger:hover{background:#e05555;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.btn-action-secondary{background:#74788d;color:#fff;border:none}.btn-action-secondary:hover{background:#5f6373;color:#fff}.btn-action-reservation{background:#7c4dff;color:#fff;border:none}.btn-action-reservation:hover{background:#651fff;color:#fff}.btn-action-reservation:disabled{background:#b39ddb;cursor:not-allowed}.btn-action-reservation-cancel{background:#ff6e40;color:#fff;border:none}.btn-action-reservation-cancel:hover{background:#ff3d00;color:#fff}.btn-action-reservation-cancel:disabled{background:#ffab91;cursor:not-allowed}.btn-action-reservation-bulk{background:#536dfe;color:#fff;border:none}.btn-action-reservation-bulk:hover{background:#304ffe;color:#fff}.btn-action-reservation-bulk:disabled{background:#8c9eff;cursor:not-allowed}.btn-action-reservation-bulk-cancel{background:#ff5252;color:#fff;border:none}.btn-action-reservation-bulk-cancel:hover{background:#ff1744;color:#fff}.btn-action-reservation-bulk-cancel:disabled{background:#ff8a80;cursor:not-allowed}.action-divider{width:1px;height:24px;background:#dee2e6;display:inline-block;vertical-align:middle;margin:0 4px}.orders-grid-card{border-radius:8px;border:1px solid #e0e0e0;box-shadow:0 1px 3px #0000000f;overflow:hidden;max-width:100%}.orders-grid-card .card-body{padding:12px;overflow-x:auto}::ng-deep .order-row-error{background-color:#fdecea!important}::ng-deep .order-row-error:hover{background-color:#fbd9d5!important}::ng-deep .error-message-cell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b02a37;font-size:12px}@media (max-width: 1200px){.toolbar-actions{margin-left:0}.radio-group{flex-wrap:wrap;height:auto}.action-group{width:100%}.toolbar-separator{display:none}}@media (max-width: 992px){.toolbar-group--durum,.toolbar-group--depo{margin-left:0}.toolbar-row{gap:12px}.toolbar-group select{min-width:0}.status-group{flex-wrap:wrap;gap:6px}.reservation-group{flex-wrap:wrap}}@media (max-width: 768px){.orders-toolbar{padding:12px}.toolbar-row{flex-direction:column;align-items:stretch;gap:10px}.toolbar-group,.toolbar-group select,.toolbar-group input[type=date]{width:100%}.radio-group{flex-direction:column;align-items:flex-start;gap:8px}.status-group{flex-wrap:wrap;gap:6px}.status-chip{font-size:11px;padding:3px 10px}.action-group,.reservation-group,.toolbar-actions{flex-wrap:wrap;gap:6px}.action-divider{display:none}.action-input{width:100%}.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{font-size:11px;padding:5px 10px}}@media (max-width: 480px){.action-group .btn,.reservation-group .btn,.toolbar-actions .btn{flex:1 1 calc(50% - 6px);justify-content:center}.status-chip{font-size:10px;padding:2px 8px}}\n"] }]
|
|
707
|
+
}], ctorParameters: function () { return [{ type: OrderService }, { type: WarehouseService }, { type: i2.ToasterService }, { type: i2.ConfirmationService }]; }, propDecorators: { dxOrdersInstance: [{
|
|
708
|
+
type: ViewChild,
|
|
709
|
+
args: ['dxOrdersInstance', { static: false }]
|
|
710
|
+
}] } });
|
|
711
|
+
|
|
712
|
+
const routes$9 = [
|
|
713
|
+
{
|
|
714
|
+
path: '',
|
|
715
|
+
component: OrdersComponent,
|
|
716
|
+
},
|
|
717
|
+
];
|
|
718
|
+
class OrdersModule {
|
|
719
|
+
}
|
|
720
|
+
OrdersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
721
|
+
OrdersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, declarations: [OrdersComponent], imports: [CoreModule,
|
|
722
|
+
ThemeSharedModule,
|
|
723
|
+
FormsModule,
|
|
724
|
+
CommercialUiModule,
|
|
725
|
+
NgxValidateCoreModule,
|
|
726
|
+
NgbCollapseModule,
|
|
727
|
+
NgbDatepickerModule,
|
|
728
|
+
NgbDropdownModule,
|
|
729
|
+
DxDataGridModule,
|
|
730
|
+
DxPopupModule,
|
|
731
|
+
DxNumberBoxModule,
|
|
732
|
+
DxButtonModule,
|
|
733
|
+
PageModule, i1$1.RouterModule] });
|
|
734
|
+
OrdersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, imports: [CoreModule,
|
|
735
|
+
ThemeSharedModule,
|
|
736
|
+
FormsModule,
|
|
737
|
+
CommercialUiModule,
|
|
738
|
+
NgxValidateCoreModule,
|
|
739
|
+
NgbCollapseModule,
|
|
740
|
+
NgbDatepickerModule,
|
|
741
|
+
NgbDropdownModule,
|
|
742
|
+
DxDataGridModule,
|
|
743
|
+
DxPopupModule,
|
|
744
|
+
DxNumberBoxModule,
|
|
745
|
+
DxButtonModule,
|
|
746
|
+
PageModule,
|
|
747
|
+
RouterModule.forChild(routes$9)] });
|
|
748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrdersModule, decorators: [{
|
|
749
|
+
type: NgModule,
|
|
750
|
+
args: [{
|
|
751
|
+
declarations: [OrdersComponent],
|
|
752
|
+
imports: [
|
|
753
|
+
CoreModule,
|
|
754
|
+
ThemeSharedModule,
|
|
755
|
+
FormsModule,
|
|
756
|
+
CommercialUiModule,
|
|
757
|
+
NgxValidateCoreModule,
|
|
758
|
+
NgbCollapseModule,
|
|
759
|
+
NgbDatepickerModule,
|
|
760
|
+
NgbDropdownModule,
|
|
761
|
+
DxDataGridModule,
|
|
762
|
+
DxPopupModule,
|
|
763
|
+
DxNumberBoxModule,
|
|
764
|
+
DxButtonModule,
|
|
765
|
+
PageModule,
|
|
766
|
+
RouterModule.forChild(routes$9),
|
|
767
|
+
],
|
|
768
|
+
}]
|
|
769
|
+
}] });
|
|
770
|
+
function loadOrdersModuleAsChild() {
|
|
771
|
+
return Promise.resolve(OrdersModule);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
class InventoryService {
|
|
775
|
+
constructor(restService) {
|
|
776
|
+
this.restService = restService;
|
|
777
|
+
this.apiName = 'SmartWarehouse';
|
|
778
|
+
this.processBulkOperation = (dto) => this.restService.request({
|
|
779
|
+
method: 'POST',
|
|
780
|
+
url: '/api/smart-warehouse/sap-inventory/process-bulk-operation',
|
|
781
|
+
body: dto,
|
|
782
|
+
}, { apiName: this.apiName });
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
786
|
+
InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, providedIn: 'root' });
|
|
787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InventoryService, decorators: [{
|
|
788
|
+
type: Injectable,
|
|
789
|
+
args: [{ providedIn: 'root' }]
|
|
790
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
791
|
+
|
|
792
|
+
class ShelfPlacementComponent {
|
|
793
|
+
constructor(inventoryService, warehouseService, toasterService) {
|
|
794
|
+
this.inventoryService = inventoryService;
|
|
795
|
+
this.warehouseService = warehouseService;
|
|
796
|
+
this.toasterService = toasterService;
|
|
797
|
+
this.barcode = '';
|
|
798
|
+
this.itemCode = '';
|
|
799
|
+
this.itemName = '';
|
|
800
|
+
this.batch = '';
|
|
801
|
+
this.selectedWarehouse = '';
|
|
802
|
+
this.shelf = '';
|
|
803
|
+
this.quantity = null;
|
|
804
|
+
this.operationType = 'entry';
|
|
805
|
+
this.isShelfFixed = false;
|
|
806
|
+
this.warehouses = [];
|
|
807
|
+
this.gridDataSource = [];
|
|
808
|
+
this.nextId = 1;
|
|
809
|
+
// Loading states
|
|
810
|
+
this.isLoadingWarehouses = false;
|
|
811
|
+
this.isLoadingShelf = false;
|
|
812
|
+
this.shelfAbsEntry = null;
|
|
813
|
+
// Grid button handler (arrow function to preserve context)
|
|
814
|
+
this.deleteRowHandler = (e) => {
|
|
815
|
+
if (e.event) {
|
|
816
|
+
e.event.preventDefault();
|
|
817
|
+
e.event.stopPropagation();
|
|
818
|
+
}
|
|
819
|
+
this.gridDataSource = this.gridDataSource.filter(item => item.id !== e.row.data.id);
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
ngOnInit() {
|
|
823
|
+
this.loadWarehouses();
|
|
824
|
+
}
|
|
825
|
+
ngAfterViewInit() {
|
|
826
|
+
// İlk açılışta raf alanına focus ver
|
|
827
|
+
setTimeout(() => {
|
|
828
|
+
var _a, _b;
|
|
829
|
+
(_b = (_a = this.shelfInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
830
|
+
}, 200);
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Raf okutulduğunda çağrılır.
|
|
834
|
+
* BinCode üzerinden SAP'den AbsEntry bilgisini çeker.
|
|
835
|
+
* Focus'u barkod alanına geçirir.
|
|
836
|
+
*/
|
|
837
|
+
onShelfScanned() {
|
|
838
|
+
var _a;
|
|
839
|
+
if (!((_a = this.shelf) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
this.isLoadingShelf = true;
|
|
843
|
+
this.shelfAbsEntry = null;
|
|
844
|
+
this.warehouseService.getBinLocationByBinCode(this.shelf.trim()).subscribe({
|
|
845
|
+
next: (binLocation) => {
|
|
846
|
+
if (binLocation) {
|
|
847
|
+
this.shelfAbsEntry = binLocation.AbsEntry;
|
|
848
|
+
setTimeout(() => {
|
|
849
|
+
var _a, _b;
|
|
850
|
+
(_b = (_a = this.barcodeInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
851
|
+
}, 100);
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
this.toasterService.warn(`"${this.shelf}" bin kodu ile eşleşen depo yeri bulunamadı.`);
|
|
855
|
+
}
|
|
856
|
+
this.isLoadingShelf = false;
|
|
857
|
+
},
|
|
858
|
+
error: (err) => {
|
|
859
|
+
console.error('Bin location arama hatası:', err);
|
|
860
|
+
this.toasterService.error('Depo yeri bilgisi SAP\'den alınamadı.');
|
|
861
|
+
this.isLoadingShelf = false;
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Barkod okutulduğunda çağrılır.
|
|
867
|
+
* Kalem kodu ve parti bilgisini barkoddan parse eder.
|
|
868
|
+
* Focus'u miktar alanına geçirir.
|
|
869
|
+
*/
|
|
870
|
+
onBarcodeScanned() {
|
|
871
|
+
var _a;
|
|
872
|
+
if (!((_a = this.barcode) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
this.parseBarcodeAndFill(this.barcode.trim());
|
|
876
|
+
setTimeout(() => {
|
|
877
|
+
var _a, _b;
|
|
878
|
+
(_b = (_a = this.quantityInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
879
|
+
}, 100);
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Barkodu parse eder ve kalem kodu ile parti alanlarını doldurur.
|
|
883
|
+
* İlk 13 karakter = ürün barkodu, 14. karakterden itibaren = parti numarası
|
|
884
|
+
*/
|
|
885
|
+
parseBarcodeAndFill(barcodeValue) {
|
|
886
|
+
const productBarcode = barcodeValue.substring(0, 13);
|
|
887
|
+
const batchNumber = barcodeValue.length > 13 ? barcodeValue.substring(13) : '';
|
|
888
|
+
this.itemCode = '';
|
|
889
|
+
this.itemName = '';
|
|
890
|
+
// SAP'den barkod ile kalem bilgisi getir
|
|
891
|
+
this.warehouseService.getItemByBarcode(productBarcode).subscribe({
|
|
892
|
+
next: (itemInfo) => {
|
|
893
|
+
if (itemInfo) {
|
|
894
|
+
this.itemCode = itemInfo.ItemCode || '';
|
|
895
|
+
this.itemName = itemInfo.ItemName || '';
|
|
896
|
+
this.batch = batchNumber;
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
this.itemCode = '';
|
|
900
|
+
this.itemName = '';
|
|
901
|
+
this.toasterService.warn(`Barkod "${productBarcode}" ile eşleşen kalem bulunamadı.`);
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
error: (err) => {
|
|
905
|
+
console.error('Barkod ile kalem arama hatası:', err);
|
|
906
|
+
this.itemCode = '';
|
|
907
|
+
this.itemName = '';
|
|
908
|
+
this.toasterService.error('Barkod ile kalem bilgisi SAP\'den alınamadı.');
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Kalem koduna göre SAP'den kalem adını çeker.
|
|
914
|
+
*/
|
|
915
|
+
fetchItemNameFromSAP(itemCode) {
|
|
916
|
+
if (!(itemCode === null || itemCode === void 0 ? void 0 : itemCode.trim())) {
|
|
917
|
+
this.itemName = '';
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
this.warehouseService.getItemNameByCode(itemCode.trim()).subscribe({
|
|
921
|
+
next: (itemName) => {
|
|
922
|
+
this.itemName = itemName || '';
|
|
923
|
+
},
|
|
924
|
+
error: (err) => {
|
|
925
|
+
console.error('Kalem adı alınamadı:', err);
|
|
926
|
+
this.itemName = '';
|
|
927
|
+
this.toasterService.error('Kalem adı SAP\'den alınamadı.');
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Depo seçimi değiştiğinde çağrılır.
|
|
933
|
+
* Seçilen depoya ait depo yerlerini (bin locations) yükler.
|
|
934
|
+
*/
|
|
935
|
+
onWarehouseChanged() {
|
|
936
|
+
this.shelf = '';
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Ekle butonuna basıldığında çağrılır.
|
|
940
|
+
* Form verilerini grid'e ekler.
|
|
941
|
+
*/
|
|
942
|
+
onAdd() {
|
|
943
|
+
var _a, _b, _c;
|
|
944
|
+
if (!((_a = this.itemCode) === null || _a === void 0 ? void 0 : _a.trim()) || !((_b = this.selectedWarehouse) === null || _b === void 0 ? void 0 : _b.trim()) || !((_c = this.shelf) === null || _c === void 0 ? void 0 : _c.trim()) || !this.quantity) {
|
|
945
|
+
this.toasterService.warn('Kalem kodu, depo, raf ve miktar alanları zorunludur.');
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
if (!this.shelfAbsEntry) {
|
|
949
|
+
this.toasterService.warn('Raf için geçerli bir AbsEntry bulunamadı. Lütfen rafı tekrar okutun.');
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
const newItem = {
|
|
953
|
+
id: this.nextId++,
|
|
954
|
+
barcode: this.barcode.trim(),
|
|
955
|
+
itemCode: this.itemCode.trim(),
|
|
956
|
+
itemName: this.itemName.trim(),
|
|
957
|
+
batch: this.batch.trim(),
|
|
958
|
+
warehouse: this.selectedWarehouse.trim(),
|
|
959
|
+
shelf: this.shelf.trim(),
|
|
960
|
+
shelfAbsEntry: this.shelfAbsEntry,
|
|
961
|
+
quantity: this.quantity,
|
|
962
|
+
};
|
|
963
|
+
this.gridDataSource = [...this.gridDataSource, newItem];
|
|
964
|
+
// Alanları temizle (raf sabit değilse)
|
|
965
|
+
if (!this.isShelfFixed) {
|
|
966
|
+
this.onClear();
|
|
967
|
+
}
|
|
968
|
+
else {
|
|
969
|
+
// Raf sabit ise sadece barkod, kalem kodu, kalem adı, parti ve miktarı temizle (depo ve raf kalır)
|
|
970
|
+
this.barcode = '';
|
|
971
|
+
this.itemCode = '';
|
|
972
|
+
this.itemName = '';
|
|
973
|
+
this.batch = '';
|
|
974
|
+
this.quantity = null;
|
|
975
|
+
// Raf sabit ise focus barkod alanına dönsün
|
|
976
|
+
setTimeout(() => {
|
|
977
|
+
var _a, _b;
|
|
978
|
+
(_b = (_a = this.barcodeInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
979
|
+
}, 100);
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
/**
|
|
983
|
+
* Kaydet butonuna basıldığında çağrılır.
|
|
984
|
+
* Grid'deki tüm verileri toplu olarak kaydeder.
|
|
985
|
+
*/
|
|
986
|
+
onSave() {
|
|
987
|
+
if (this.gridDataSource.length === 0) {
|
|
988
|
+
this.toasterService.warn('Kaydedilecek veri yok.');
|
|
989
|
+
return;
|
|
990
|
+
}
|
|
991
|
+
const dto = {
|
|
992
|
+
operationType: this.operationType,
|
|
993
|
+
items: this.gridDataSource.map(item => {
|
|
994
|
+
var _a;
|
|
995
|
+
return ({
|
|
996
|
+
barcode: item.itemCode,
|
|
997
|
+
batch: item.batch,
|
|
998
|
+
warehouse: item.warehouse,
|
|
999
|
+
shelf: (_a = item.shelfAbsEntry) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
1000
|
+
quantity: item.quantity
|
|
1001
|
+
});
|
|
1002
|
+
})
|
|
1003
|
+
};
|
|
1004
|
+
this.inventoryService.processBulkOperation(dto).subscribe({
|
|
1005
|
+
next: (result) => {
|
|
1006
|
+
this.toasterService.success(result);
|
|
1007
|
+
// Başarılı kayıt sonrası grid'i temizle
|
|
1008
|
+
this.gridDataSource = [];
|
|
1009
|
+
this.nextId = 1;
|
|
1010
|
+
this.onClear();
|
|
1011
|
+
},
|
|
1012
|
+
error: (error) => {
|
|
1013
|
+
var _a, _b;
|
|
1014
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'İşlem sırasında bir hata oluştu.';
|
|
1015
|
+
this.toasterService.error(errorMessage);
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Temizle butonuna basıldığında çağrılır.
|
|
1021
|
+
*/
|
|
1022
|
+
onClear() {
|
|
1023
|
+
this.barcode = '';
|
|
1024
|
+
this.itemCode = '';
|
|
1025
|
+
this.itemName = '';
|
|
1026
|
+
this.batch = '';
|
|
1027
|
+
this.quantity = null;
|
|
1028
|
+
if (!this.isShelfFixed) {
|
|
1029
|
+
this.shelf = '';
|
|
1030
|
+
this.shelfAbsEntry = null;
|
|
1031
|
+
// Raf sabit değilse focus raf alanına dönsün
|
|
1032
|
+
setTimeout(() => {
|
|
1033
|
+
var _a, _b;
|
|
1034
|
+
(_b = (_a = this.shelfInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1035
|
+
}, 100);
|
|
1036
|
+
}
|
|
1037
|
+
else {
|
|
1038
|
+
// Raf sabit ise focus barkod alanına dönsün
|
|
1039
|
+
setTimeout(() => {
|
|
1040
|
+
var _a, _b;
|
|
1041
|
+
(_b = (_a = this.barcodeInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1042
|
+
}, 100);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* U_SWSmartWhs = "Y" olan depoları yükler.
|
|
1047
|
+
* İlk depoyu otomatik olarak seçer.
|
|
1048
|
+
*/
|
|
1049
|
+
loadWarehouses() {
|
|
1050
|
+
this.isLoadingWarehouses = true;
|
|
1051
|
+
this.warehouseService.getSmartWarehouses().subscribe({
|
|
1052
|
+
next: (data) => {
|
|
1053
|
+
this.warehouses = data || [];
|
|
1054
|
+
console.log('Depolar yüklendi:', this.warehouses);
|
|
1055
|
+
// İlk depoyu otomatik seç ve bin location'ları yükle
|
|
1056
|
+
if (this.warehouses.length > 0) {
|
|
1057
|
+
this.selectedWarehouse = this.warehouses[0].WhsCode || '';
|
|
1058
|
+
this.onWarehouseChanged();
|
|
1059
|
+
}
|
|
1060
|
+
this.isLoadingWarehouses = false;
|
|
1061
|
+
},
|
|
1062
|
+
error: (err) => {
|
|
1063
|
+
console.error('Depolar yüklenemedi:', err);
|
|
1064
|
+
this.toasterService.error('Depolar yüklenemedi.');
|
|
1065
|
+
this.isLoadingWarehouses = false;
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
ShelfPlacementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementComponent, deps: [{ token: InventoryService }, { token: WarehouseService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1071
|
+
ShelfPlacementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShelfPlacementComponent, selector: "lib-shelf-placement", viewQueries: [{ propertyName: "shelfInputRef", first: true, predicate: ["shelfInput"], descendants: true }, { propertyName: "barcodeInputRef", first: true, predicate: ["barcodeInput"], descendants: true }, { propertyName: "itemCodeInputRef", first: true, predicate: ["itemCodeInput"], descendants: true }, { propertyName: "quantityInputRef", first: true, predicate: ["quantityInput"], descendants: true }, { propertyName: "gridInstance", first: true, predicate: ["gridInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Raf Yerle\u015Ftirme'\">\r\n\r\n <!-- Loading Overlay -->\r\n <div *ngIf=\"isLoadingWarehouses\" class=\"loading-overlay\">\r\n <div class=\"loading-spinner\">\r\n <i class=\"fa fa-spinner fa-spin fa-3x\"></i>\r\n <p class=\"mt-3\">Depolar y\u00FCkleniyor...</p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shelf-placement-container\">\r\n <div class=\"shelf-placement-layout\">\r\n <!-- Form Card -->\r\n <div class=\"shelf-form-card\">\r\n <!-- Radio Buttons: Giri\u015F / \u00C7\u0131k\u0131\u015F -->\r\n <!-- <div class=\"form-section\">\r\n <label class=\"section-label\">\u0130\u015Flem Tipi</label>\r\n <div class=\"radio-group\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"operationType\" id=\"opEntry\"\r\n value=\"entry\" [(ngModel)]=\"operationType\" />\r\n <label class=\"form-check-label\" for=\"opEntry\">Giri\u015F</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- <hr class=\"form-divider\" /> -->\r\n \r\n <!-- Depo -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"warehouseSelect\">Depo</label>\r\n <select class=\"form-select form-input\"\r\n id=\"warehouseSelect\"\r\n [(ngModel)]=\"selectedWarehouse\"\r\n (ngModelChange)=\"onWarehouseChanged()\">\r\n <option value=\"\">Depo se\u00E7in...</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">\r\n {{ wh.WhsCode }} - {{ wh.WhsName }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">Raf</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"shelf\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n (blur)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodu girin...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Barkod -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"barcodeInput\">Barkod</label>\r\n <input #barcodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"barcodeInput\"\r\n [(ngModel)]=\"barcode\"\r\n (keydown.enter)=\"onBarcodeScanned()\"\r\n placeholder=\"Barkod okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Kodu -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemCodeInput\">Kalem Kodu</label>\r\n <input #itemCodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemCodeInput\"\r\n [(ngModel)]=\"itemCode\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Ad\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemNameInput\">Kalem Ad\u0131</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemNameInput\"\r\n [(ngModel)]=\"itemName\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\" />\r\n </div>\r\n\r\n <!-- Parti -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"batchInput\">Parti</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"batchInput\"\r\n [(ngModel)]=\"batch\"\r\n placeholder=\"Parti numaras\u0131...\" />\r\n </div>\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input #quantityInput\r\n type=\"number\"\r\n class=\"form-control form-input\"\r\n id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\"\r\n (keydown.enter)=\"onAdd()\"\r\n placeholder=\"Miktar girin...\"\r\n min=\"0\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Checkbox: Raf Sabit -->\r\n <div class=\"form-section\">\r\n <div class=\"form-check checkbox-group\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"fixedShelf\"\r\n [(ngModel)]=\"isShelfFixed\" />\r\n <label class=\"form-check-label\" for=\"fixedShelf\">Raf Sabit</label>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onAdd()\">\r\n <i class=\"fa fa-plus\"></i> Ekle\r\n </button>\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\" [disabled]=\"gridDataSource.length === 0\">\r\n <i class=\"fa fa-save\"></i> Toplu Kaydet ({{ gridDataSource.length }})\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"grid-card\">\r\n <div class=\"grid-header\">\r\n <h6 class=\"grid-title\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n Raf Yerle\u015Ftirme Listesi ({{ gridDataSource.length }})\r\n </h6>\r\n </div>\r\n <dx-data-grid\r\n #gridInstance\r\n [dataSource]=\"gridDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n style=\"height: 65vh; min-height: 500px;\"\r\n >\r\n <dxo-paging [enabled]=\"false\"></dxo-paging>\r\n <dxo-scrolling mode=\"standard\"></dxo-scrolling>\r\n \r\n <dxi-column\r\n dataField=\"barcode\"\r\n caption=\"Barkod\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemCode\"\r\n caption=\"Kalem Kodu\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemName\"\r\n caption=\"Kalem Ad\u0131\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"batch\"\r\n caption=\"Parti\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"warehouse\"\r\n caption=\"Depo\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"shelf\"\r\n caption=\"Raf\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"quantity\"\r\n caption=\"Miktar\"\r\n dataType=\"number\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n type=\"buttons\"\r\n [width]=\"80\"\r\n >\r\n <dxi-button\r\n icon=\"trash\"\r\n hint=\"Sil\"\r\n [onClick]=\"deleteRowHandler\"\r\n ></dxi-button>\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", styles: [".shelf-placement-container{width:100%}.shelf-placement-layout{display:flex;gap:20px;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 450px;min-width:320px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.radio-group{display:flex;gap:20px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:14px;cursor:pointer;white-space:nowrap;font-weight:500}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group .form-check-label{font-size:14px;cursor:pointer;font-weight:500}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.grid-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 1px 3px #0000000f;overflow:hidden;flex:1;min-width:0;display:flex;flex-direction:column;min-height:500px}.grid-header{display:flex;justify-content:flex-start;align-items:center;padding:12px 16px;background:#f8f9fa;border-bottom:1px solid #e0e0e0}.grid-title{margin:0;font-size:14px;font-weight:600;color:#495057}.grid-card dx-data-grid{padding:0;flex:1}@media (max-width: 1200px){.shelf-placement-layout{flex-direction:column}.shelf-form-card{flex:1;width:100%}.grid-card{width:100%;min-height:400px}}@media (max-width: 768px){.shelf-placement-container{padding:0 8px}.shelf-form-card{padding:16px;min-width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxiButtonComponent, selector: "dxi-button", inputs: ["location", "name", "options", "cssClass", "disabled", "hint", "icon", "onClick", "template", "text", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
|
|
1072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementComponent, decorators: [{
|
|
1073
|
+
type: Component,
|
|
1074
|
+
args: [{ selector: 'lib-shelf-placement', template: "<abp-page [title]=\"'Raf Yerle\u015Ftirme'\">\r\n\r\n <!-- Loading Overlay -->\r\n <div *ngIf=\"isLoadingWarehouses\" class=\"loading-overlay\">\r\n <div class=\"loading-spinner\">\r\n <i class=\"fa fa-spinner fa-spin fa-3x\"></i>\r\n <p class=\"mt-3\">Depolar y\u00FCkleniyor...</p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shelf-placement-container\">\r\n <div class=\"shelf-placement-layout\">\r\n <!-- Form Card -->\r\n <div class=\"shelf-form-card\">\r\n <!-- Radio Buttons: Giri\u015F / \u00C7\u0131k\u0131\u015F -->\r\n <!-- <div class=\"form-section\">\r\n <label class=\"section-label\">\u0130\u015Flem Tipi</label>\r\n <div class=\"radio-group\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"operationType\" id=\"opEntry\"\r\n value=\"entry\" [(ngModel)]=\"operationType\" />\r\n <label class=\"form-check-label\" for=\"opEntry\">Giri\u015F</label>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n <!-- <hr class=\"form-divider\" /> -->\r\n \r\n <!-- Depo -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"warehouseSelect\">Depo</label>\r\n <select class=\"form-select form-input\"\r\n id=\"warehouseSelect\"\r\n [(ngModel)]=\"selectedWarehouse\"\r\n (ngModelChange)=\"onWarehouseChanged()\">\r\n <option value=\"\">Depo se\u00E7in...</option>\r\n <option *ngFor=\"let wh of warehouses\" [value]=\"wh.WhsCode\">\r\n {{ wh.WhsCode }} - {{ wh.WhsName }}\r\n </option>\r\n </select>\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">Raf</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"shelf\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n (blur)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodu girin...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Barkod -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"barcodeInput\">Barkod</label>\r\n <input #barcodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"barcodeInput\"\r\n [(ngModel)]=\"barcode\"\r\n (keydown.enter)=\"onBarcodeScanned()\"\r\n placeholder=\"Barkod okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Kodu -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemCodeInput\">Kalem Kodu</label>\r\n <input #itemCodeInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemCodeInput\"\r\n [(ngModel)]=\"itemCode\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Kalem Ad\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"itemNameInput\">Kalem Ad\u0131</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"itemNameInput\"\r\n [(ngModel)]=\"itemName\"\r\n [readOnly]=\"true\"\r\n placeholder=\"\" />\r\n </div>\r\n\r\n <!-- Parti -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"batchInput\">Parti</label>\r\n <input type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"batchInput\"\r\n [(ngModel)]=\"batch\"\r\n placeholder=\"Parti numaras\u0131...\" />\r\n </div>\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input #quantityInput\r\n type=\"number\"\r\n class=\"form-control form-input\"\r\n id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\"\r\n (keydown.enter)=\"onAdd()\"\r\n placeholder=\"Miktar girin...\"\r\n min=\"0\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Checkbox: Raf Sabit -->\r\n <div class=\"form-section\">\r\n <div class=\"form-check checkbox-group\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"fixedShelf\"\r\n [(ngModel)]=\"isShelfFixed\" />\r\n <label class=\"form-check-label\" for=\"fixedShelf\">Raf Sabit</label>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-primary btn-sm\" (click)=\"onAdd()\">\r\n <i class=\"fa fa-plus\"></i> Ekle\r\n </button>\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\" [disabled]=\"gridDataSource.length === 0\">\r\n <i class=\"fa fa-save\"></i> Toplu Kaydet ({{ gridDataSource.length }})\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid -->\r\n <div class=\"grid-card\">\r\n <div class=\"grid-header\">\r\n <h6 class=\"grid-title\">\r\n <i class=\"fa fa-list me-1\"></i>\r\n Raf Yerle\u015Ftirme Listesi ({{ gridDataSource.length }})\r\n </h6>\r\n </div>\r\n <dx-data-grid\r\n #gridInstance\r\n [dataSource]=\"gridDataSource\"\r\n [showRowLines]=\"true\"\r\n [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\"\r\n [columnAutoWidth]=\"true\"\r\n [rowAlternationEnabled]=\"true\"\r\n [allowColumnResizing]=\"true\"\r\n style=\"height: 65vh; min-height: 500px;\"\r\n >\r\n <dxo-paging [enabled]=\"false\"></dxo-paging>\r\n <dxo-scrolling mode=\"standard\"></dxo-scrolling>\r\n \r\n <dxi-column\r\n dataField=\"barcode\"\r\n caption=\"Barkod\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemCode\"\r\n caption=\"Kalem Kodu\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"itemName\"\r\n caption=\"Kalem Ad\u0131\"\r\n [width]=\"200\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"batch\"\r\n caption=\"Parti\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"warehouse\"\r\n caption=\"Depo\"\r\n [width]=\"120\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"shelf\"\r\n caption=\"Raf\"\r\n [width]=\"150\"\r\n ></dxi-column>\r\n <dxi-column\r\n dataField=\"quantity\"\r\n caption=\"Miktar\"\r\n dataType=\"number\"\r\n [width]=\"100\"\r\n ></dxi-column>\r\n <dxi-column\r\n type=\"buttons\"\r\n [width]=\"80\"\r\n >\r\n <dxi-button\r\n icon=\"trash\"\r\n hint=\"Sil\"\r\n [onClick]=\"deleteRowHandler\"\r\n ></dxi-button>\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", styles: [".shelf-placement-container{width:100%}.shelf-placement-layout{display:flex;gap:20px;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 450px;min-width:320px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.radio-group{display:flex;gap:20px;align-items:center}.radio-group .form-check{margin:0;padding-left:22px}.radio-group .form-check-label{font-size:14px;cursor:pointer;white-space:nowrap;font-weight:500}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group .form-check-label{font-size:14px;cursor:pointer;font-weight:500}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-primary{background:#556ee6;color:#fff;border:none}.btn-action-primary:hover{background:#4458cb;color:#fff}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.grid-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 1px 3px #0000000f;overflow:hidden;flex:1;min-width:0;display:flex;flex-direction:column;min-height:500px}.grid-header{display:flex;justify-content:flex-start;align-items:center;padding:12px 16px;background:#f8f9fa;border-bottom:1px solid #e0e0e0}.grid-title{margin:0;font-size:14px;font-weight:600;color:#495057}.grid-card dx-data-grid{padding:0;flex:1}@media (max-width: 1200px){.shelf-placement-layout{flex-direction:column}.shelf-form-card{flex:1;width:100%}.grid-card{width:100%;min-height:400px}}@media (max-width: 768px){.shelf-placement-container{padding:0 8px}.shelf-form-card{padding:16px;min-width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}\n"] }]
|
|
1075
|
+
}], ctorParameters: function () { return [{ type: InventoryService }, { type: WarehouseService }, { type: i2.ToasterService }]; }, propDecorators: { shelfInputRef: [{
|
|
1076
|
+
type: ViewChild,
|
|
1077
|
+
args: ['shelfInput', { static: false }]
|
|
1078
|
+
}], barcodeInputRef: [{
|
|
1079
|
+
type: ViewChild,
|
|
1080
|
+
args: ['barcodeInput', { static: false }]
|
|
1081
|
+
}], itemCodeInputRef: [{
|
|
1082
|
+
type: ViewChild,
|
|
1083
|
+
args: ['itemCodeInput', { static: false }]
|
|
1084
|
+
}], quantityInputRef: [{
|
|
1085
|
+
type: ViewChild,
|
|
1086
|
+
args: ['quantityInput', { static: false }]
|
|
1087
|
+
}], gridInstance: [{
|
|
1088
|
+
type: ViewChild,
|
|
1089
|
+
args: ['gridInstance', { static: false }]
|
|
1090
|
+
}] } });
|
|
1091
|
+
|
|
1092
|
+
const routes$8 = [
|
|
1093
|
+
{
|
|
1094
|
+
path: '',
|
|
1095
|
+
component: ShelfPlacementComponent,
|
|
1096
|
+
},
|
|
1097
|
+
];
|
|
1098
|
+
class ShelfPlacementModule {
|
|
1099
|
+
}
|
|
1100
|
+
ShelfPlacementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1101
|
+
ShelfPlacementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, declarations: [ShelfPlacementComponent], imports: [CoreModule,
|
|
1102
|
+
ThemeSharedModule,
|
|
1103
|
+
FormsModule,
|
|
1104
|
+
CommercialUiModule,
|
|
1105
|
+
NgxValidateCoreModule,
|
|
1106
|
+
NgbCollapseModule,
|
|
1107
|
+
NgbDatepickerModule,
|
|
1108
|
+
NgbDropdownModule,
|
|
1109
|
+
DxDataGridModule,
|
|
1110
|
+
PageModule, i1$1.RouterModule] });
|
|
1111
|
+
ShelfPlacementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, imports: [CoreModule,
|
|
1112
|
+
ThemeSharedModule,
|
|
1113
|
+
FormsModule,
|
|
1114
|
+
CommercialUiModule,
|
|
1115
|
+
NgxValidateCoreModule,
|
|
1116
|
+
NgbCollapseModule,
|
|
1117
|
+
NgbDatepickerModule,
|
|
1118
|
+
NgbDropdownModule,
|
|
1119
|
+
DxDataGridModule,
|
|
1120
|
+
PageModule,
|
|
1121
|
+
RouterModule.forChild(routes$8)] });
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfPlacementModule, decorators: [{
|
|
1123
|
+
type: NgModule,
|
|
1124
|
+
args: [{
|
|
1125
|
+
declarations: [ShelfPlacementComponent],
|
|
1126
|
+
imports: [
|
|
1127
|
+
CoreModule,
|
|
1128
|
+
ThemeSharedModule,
|
|
1129
|
+
FormsModule,
|
|
1130
|
+
CommercialUiModule,
|
|
1131
|
+
NgxValidateCoreModule,
|
|
1132
|
+
NgbCollapseModule,
|
|
1133
|
+
NgbDatepickerModule,
|
|
1134
|
+
NgbDropdownModule,
|
|
1135
|
+
DxDataGridModule,
|
|
1136
|
+
PageModule,
|
|
1137
|
+
RouterModule.forChild(routes$8),
|
|
1138
|
+
],
|
|
1139
|
+
}]
|
|
1140
|
+
}] });
|
|
1141
|
+
function loadShelfPlacementModuleAsChild() {
|
|
1142
|
+
return Promise.resolve(ShelfPlacementModule);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
class StockTransferService {
|
|
1146
|
+
constructor(restService) {
|
|
1147
|
+
this.restService = restService;
|
|
1148
|
+
this.apiName = 'SmartWarehouse';
|
|
1149
|
+
this.createShelfTransfer = (dto) => this.restService.request({
|
|
1150
|
+
method: 'POST',
|
|
1151
|
+
url: '/api/smart-warehouse/sap-stock-transfer/create-shelf-transfer',
|
|
1152
|
+
body: dto,
|
|
1153
|
+
}, { apiName: this.apiName });
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
StockTransferService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1157
|
+
StockTransferService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, providedIn: 'root' });
|
|
1158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockTransferService, decorators: [{
|
|
1159
|
+
type: Injectable,
|
|
1160
|
+
args: [{ providedIn: 'root' }]
|
|
1161
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1162
|
+
|
|
1163
|
+
class ShelfTransferComponent {
|
|
1164
|
+
constructor(warehouseService, stockTransferService, toasterService) {
|
|
1165
|
+
this.warehouseService = warehouseService;
|
|
1166
|
+
this.stockTransferService = stockTransferService;
|
|
1167
|
+
this.toasterService = toasterService;
|
|
1168
|
+
this.sourceBinCode = '';
|
|
1169
|
+
this.destinationBinCode = '';
|
|
1170
|
+
this.sourceBinAbsEntry = null;
|
|
1171
|
+
this.destinationBinAbsEntry = null;
|
|
1172
|
+
this.quantity = null;
|
|
1173
|
+
this.binContent = null;
|
|
1174
|
+
this.isLoadingContent = false;
|
|
1175
|
+
this.isLoadingDestination = false;
|
|
1176
|
+
this.isSaving = false;
|
|
1177
|
+
}
|
|
1178
|
+
onSourceBinEnter() {
|
|
1179
|
+
this.binContent = null;
|
|
1180
|
+
this.sourceBinAbsEntry = null;
|
|
1181
|
+
if (!this.sourceBinCode || this.sourceBinCode.trim() === '') {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
this.isLoadingContent = true;
|
|
1185
|
+
this.warehouseService.getBinLocationByBinCode(this.sourceBinCode.trim()).subscribe({
|
|
1186
|
+
next: (binLocation) => {
|
|
1187
|
+
if (!binLocation) {
|
|
1188
|
+
this.toasterService.warn('Depo yeri bulunamad\u0131.');
|
|
1189
|
+
this.isLoadingContent = false;
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
this.sourceBinAbsEntry = binLocation.AbsEntry;
|
|
1193
|
+
this.loadBinContent(binLocation.AbsEntry);
|
|
1194
|
+
},
|
|
1195
|
+
error: () => {
|
|
1196
|
+
this.toasterService.error('Depo yeri sorgulanamad\u0131.');
|
|
1197
|
+
this.isLoadingContent = false;
|
|
1198
|
+
},
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
onDestinationBinEnter() {
|
|
1202
|
+
this.destinationBinAbsEntry = null;
|
|
1203
|
+
if (!this.destinationBinCode || this.destinationBinCode.trim() === '') {
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
this.isLoadingDestination = true;
|
|
1207
|
+
this.warehouseService.getBinLocationByBinCode(this.destinationBinCode.trim()).subscribe({
|
|
1208
|
+
next: (binLocation) => {
|
|
1209
|
+
if (!binLocation) {
|
|
1210
|
+
this.toasterService.warn('Giri\u015f depo yeri bulunamad\u0131.');
|
|
1211
|
+
this.isLoadingDestination = false;
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
this.destinationBinAbsEntry = binLocation.AbsEntry;
|
|
1215
|
+
this.isLoadingDestination = false;
|
|
1216
|
+
},
|
|
1217
|
+
error: () => {
|
|
1218
|
+
this.toasterService.error('Giri\u015f depo yeri sorgulanamad\u0131.');
|
|
1219
|
+
this.isLoadingDestination = false;
|
|
1220
|
+
},
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
onSave() {
|
|
1224
|
+
if (!this.sourceBinAbsEntry) {
|
|
1225
|
+
this.toasterService.warn('\u00c7\u0131k\u0131\u015f raf\u0131 giriniz.');
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1228
|
+
if (!this.binContent) {
|
|
1229
|
+
this.toasterService.warn('Se\u00e7ilen rafta kalem bilgisi bulunamad\u0131.');
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
if (!this.destinationBinAbsEntry) {
|
|
1233
|
+
this.toasterService.warn('Giri\u015f raf\u0131 giriniz.');
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
if (this.sourceBinAbsEntry === this.destinationBinAbsEntry) {
|
|
1237
|
+
this.toasterService.warn('\u00c7\u0131k\u0131\u015f ve giri\u015f raf\u0131 ayn\u0131 olamaz.');
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
if (!this.quantity || this.quantity <= 0) {
|
|
1241
|
+
this.toasterService.warn('Ge\u00e7erli bir miktar giriniz.');
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
if (this.quantity > this.binContent.OnHandQty) {
|
|
1245
|
+
this.toasterService.warn(`Miktar, mevcut stoktan (${this.binContent.OnHandQty}) fazla olamaz.`);
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
const dto = {
|
|
1249
|
+
fromBinAbsEntry: this.sourceBinAbsEntry,
|
|
1250
|
+
toBinAbsEntry: this.destinationBinAbsEntry,
|
|
1251
|
+
itemCode: this.binContent.ItemCode,
|
|
1252
|
+
batchNumber: this.binContent.BatchNumber,
|
|
1253
|
+
warehouseCode: this.binContent.WarehouseCode,
|
|
1254
|
+
quantity: this.quantity,
|
|
1255
|
+
};
|
|
1256
|
+
this.isSaving = true;
|
|
1257
|
+
this.stockTransferService.createShelfTransfer(dto).subscribe({
|
|
1258
|
+
next: (result) => {
|
|
1259
|
+
this.toasterService.success(result);
|
|
1260
|
+
this.onClear();
|
|
1261
|
+
this.isSaving = false;
|
|
1262
|
+
},
|
|
1263
|
+
error: (error) => {
|
|
1264
|
+
var _a, _b;
|
|
1265
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || '\u0130\u015flem s\u0131ras\u0131nda bir hata olu\u015ftu.';
|
|
1266
|
+
this.toasterService.error(errorMessage);
|
|
1267
|
+
this.isSaving = false;
|
|
1268
|
+
},
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
onClear() {
|
|
1272
|
+
this.sourceBinCode = '';
|
|
1273
|
+
this.destinationBinCode = '';
|
|
1274
|
+
this.sourceBinAbsEntry = null;
|
|
1275
|
+
this.destinationBinAbsEntry = null;
|
|
1276
|
+
this.quantity = null;
|
|
1277
|
+
this.binContent = null;
|
|
1278
|
+
}
|
|
1279
|
+
loadBinContent(binAbsEntry) {
|
|
1280
|
+
this.warehouseService.getBinLocationContent(binAbsEntry).subscribe({
|
|
1281
|
+
next: (data) => {
|
|
1282
|
+
this.binContent = data || null;
|
|
1283
|
+
this.isLoadingContent = false;
|
|
1284
|
+
if (!data) {
|
|
1285
|
+
this.toasterService.warn('Bu depo yerinde kalem bulunamad\u0131.');
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
error: () => {
|
|
1289
|
+
this.toasterService.error('Depo yeri i\u00e7eri\u011fi y\u00fcklenemedi.');
|
|
1290
|
+
this.isLoadingContent = false;
|
|
1291
|
+
},
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
ShelfTransferComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferComponent, deps: [{ token: WarehouseService }, { token: StockTransferService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1296
|
+
ShelfTransferComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShelfTransferComponent, selector: "lib-shelf-transfer", ngImport: i0, template: "<abp-page [title]=\"'Raf Transfer'\">\r\n <div class=\"shelf-transfer-container\">\r\n <div class=\"shelf-transfer-layout\">\r\n <div class=\"shelf-form-card\">\r\n\r\n <!-- \u00C7\u0131k\u0131\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"sourceBinInput\">\u00C7\u0131k\u0131\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"sourceBinInput\"\r\n [(ngModel)]=\"sourceBinCode\"\r\n (keydown.enter)=\"onSourceBinEnter()\"\r\n (blur)=\"onSourceBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingContent\" />\r\n </div>\r\n\r\n <!-- Kalem Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isLoadingContent\">\r\n <div class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Kalem bilgisi y\u00FCkleniyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"binContent && !isLoadingContent\">\r\n <div class=\"bin-content-card\">\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Kalem Kodu:</span>\r\n <span class=\"content-value\">{{ binContent.ItemCode }}</span>\r\n </div>\r\n <div class=\"content-row\" *ngIf=\"binContent.ItemName\">\r\n <span class=\"content-label\">Kalem Ad\u0131:</span>\r\n <span class=\"content-value\">{{ binContent.ItemName }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Parti:</span>\r\n <span class=\"content-value\">{{ binContent.BatchNumber }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Mevcut Miktar:</span>\r\n <span class=\"content-value content-qty\">{{ binContent.OnHandQty }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Depo:</span>\r\n <span class=\"content-value\">{{ binContent.WarehouseCode }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"sourceBinAbsEntry && !binContent && !isLoadingContent\">\r\n <div class=\"bin-content-empty\">\r\n <i class=\"fa fa-info-circle\"></i> Bu depo yerinde kalem bulunamad\u0131.\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Giri\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"destBinInput\">Giri\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"destBinInput\"\r\n [(ngModel)]=\"destinationBinCode\"\r\n (keydown.enter)=\"onDestinationBinEnter()\"\r\n (blur)=\"onDestinationBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingDestination\" />\r\n <div *ngIf=\"isLoadingDestination\" class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Depo yeri sorgulan\u0131yor...\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input type=\"number\" class=\"form-control form-input\" id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\" (keydown.enter)=\"onSave()\"\r\n placeholder=\"Miktar girin...\" min=\"0\"\r\n [max]=\"binContent?.OnHandQty\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\"\r\n [disabled]=\"isSaving || !sourceBinAbsEntry || !destinationBinAbsEntry || !quantity || !binContent\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".shelf-transfer-container{width:100%}.shelf-transfer-layout{display:flex;justify-content:center;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;width:500px;max-width:100%}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-dx-select{width:100%}::ng-deep .form-dx-select .dx-texteditor-input{height:40px;font-size:14px}::ng-deep .form-dx-select .dx-dropdowneditor-icon{height:40px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.bin-content-card{background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;padding:12px 16px}.content-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #eee}.content-row:last-child{border-bottom:none}.content-label{font-size:12px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.3px}.content-value{font-size:14px;font-weight:500;color:#333}.content-qty{color:#34c38f;font-weight:700;font-size:16px}.content-loading{padding:12px 0;color:#6c757d;font-size:13px}.content-loading i{color:#556ee6;margin-right:6px}.bin-content-empty{background:#fff3cd;border:1px solid #ffc107;border-radius:6px;padding:10px 14px;font-size:13px;color:#856404}.bin-content-empty i{margin-right:4px}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}@media (max-width: 768px){.shelf-form-card{padding:16px;width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
|
|
1297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferComponent, decorators: [{
|
|
1298
|
+
type: Component,
|
|
1299
|
+
args: [{ selector: 'lib-shelf-transfer', template: "<abp-page [title]=\"'Raf Transfer'\">\r\n <div class=\"shelf-transfer-container\">\r\n <div class=\"shelf-transfer-layout\">\r\n <div class=\"shelf-form-card\">\r\n\r\n <!-- \u00C7\u0131k\u0131\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"sourceBinInput\">\u00C7\u0131k\u0131\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"sourceBinInput\"\r\n [(ngModel)]=\"sourceBinCode\"\r\n (keydown.enter)=\"onSourceBinEnter()\"\r\n (blur)=\"onSourceBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingContent\" />\r\n </div>\r\n\r\n <!-- Kalem Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isLoadingContent\">\r\n <div class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Kalem bilgisi y\u00FCkleniyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"binContent && !isLoadingContent\">\r\n <div class=\"bin-content-card\">\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Kalem Kodu:</span>\r\n <span class=\"content-value\">{{ binContent.ItemCode }}</span>\r\n </div>\r\n <div class=\"content-row\" *ngIf=\"binContent.ItemName\">\r\n <span class=\"content-label\">Kalem Ad\u0131:</span>\r\n <span class=\"content-value\">{{ binContent.ItemName }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Parti:</span>\r\n <span class=\"content-value\">{{ binContent.BatchNumber }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Mevcut Miktar:</span>\r\n <span class=\"content-value content-qty\">{{ binContent.OnHandQty }}</span>\r\n </div>\r\n <div class=\"content-row\">\r\n <span class=\"content-label\">Depo:</span>\r\n <span class=\"content-value\">{{ binContent.WarehouseCode }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"sourceBinAbsEntry && !binContent && !isLoadingContent\">\r\n <div class=\"bin-content-empty\">\r\n <i class=\"fa fa-info-circle\"></i> Bu depo yerinde kalem bulunamad\u0131.\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Giri\u015F Raf\u0131 -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"destBinInput\">Giri\u015F Raf\u0131</label>\r\n <input type=\"text\" class=\"form-control form-input\" id=\"destBinInput\"\r\n [(ngModel)]=\"destinationBinCode\"\r\n (keydown.enter)=\"onDestinationBinEnter()\"\r\n (blur)=\"onDestinationBinEnter()\"\r\n placeholder=\"Depo yeri kodu girin...\"\r\n [disabled]=\"isLoadingDestination\" />\r\n <div *ngIf=\"isLoadingDestination\" class=\"content-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Depo yeri sorgulan\u0131yor...\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Miktar -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"quantityInput\">Miktar</label>\r\n <input type=\"number\" class=\"form-control form-input\" id=\"quantityInput\"\r\n [(ngModel)]=\"quantity\" (keydown.enter)=\"onSave()\"\r\n placeholder=\"Miktar girin...\" min=\"0\"\r\n [max]=\"binContent?.OnHandQty\" />\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onSave()\"\r\n [disabled]=\"isSaving || !sourceBinAbsEntry || !destinationBinAbsEntry || !quantity || !binContent\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".shelf-transfer-container{width:100%}.shelf-transfer-layout{display:flex;justify-content:center;align-items:flex-start}.shelf-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;width:500px;max-width:100%}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-dx-select{width:100%}::ng-deep .form-dx-select .dx-texteditor-input{height:40px;font-size:14px}::ng-deep .form-dx-select .dx-dropdowneditor-icon{height:40px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.bin-content-card{background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;padding:12px 16px}.content-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;border-bottom:1px solid #eee}.content-row:last-child{border-bottom:none}.content-label{font-size:12px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.3px}.content-value{font-size:14px;font-weight:500;color:#333}.content-qty{color:#34c38f;font-weight:700;font-size:16px}.content-loading{padding:12px 0;color:#6c757d;font-size:13px}.content-loading i{color:#556ee6;margin-right:6px}.bin-content-empty{background:#fff3cd;border:1px solid #ffc107;border-radius:6px;padding:10px 14px;font-size:13px;color:#856404}.bin-content-empty i{margin-right:4px}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}.loading-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;justify-content:center;align-items:center;z-index:9999}.loading-spinner{background:#fff;padding:40px 60px;border-radius:8px;box-shadow:0 10px 40px #0000004d;text-align:center}.loading-spinner i{color:#556ee6}.loading-spinner p{margin:0;font-size:16px;font-weight:500;color:#495057}@media (max-width: 768px){.shelf-form-card{padding:16px;width:100%}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"] }]
|
|
1300
|
+
}], ctorParameters: function () { return [{ type: WarehouseService }, { type: StockTransferService }, { type: i2.ToasterService }]; } });
|
|
1301
|
+
|
|
1302
|
+
const routes$7 = [
|
|
1303
|
+
{ path: '', component: ShelfTransferComponent },
|
|
1304
|
+
];
|
|
1305
|
+
class ShelfTransferModule {
|
|
1306
|
+
}
|
|
1307
|
+
ShelfTransferModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1308
|
+
ShelfTransferModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, declarations: [ShelfTransferComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1309
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1310
|
+
NgbDropdownModule, PageModule, i1$1.RouterModule] });
|
|
1311
|
+
ShelfTransferModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1312
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1313
|
+
NgbDropdownModule, PageModule,
|
|
1314
|
+
RouterModule.forChild(routes$7)] });
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShelfTransferModule, decorators: [{
|
|
1316
|
+
type: NgModule,
|
|
1317
|
+
args: [{
|
|
1318
|
+
declarations: [ShelfTransferComponent],
|
|
1319
|
+
imports: [
|
|
1320
|
+
CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1321
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1322
|
+
NgbDropdownModule, PageModule,
|
|
1323
|
+
RouterModule.forChild(routes$7),
|
|
1324
|
+
],
|
|
1325
|
+
}]
|
|
1326
|
+
}] });
|
|
1327
|
+
function loadShelfTransferModuleAsChild() {
|
|
1328
|
+
return Promise.resolve(ShelfTransferModule);
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
class OrderStationService {
|
|
1332
|
+
constructor(restService) {
|
|
1333
|
+
this.restService = restService;
|
|
1334
|
+
this.apiName = 'SmartWarehouse';
|
|
1335
|
+
this.createOrderStation = (dto) => this.restService.request({ method: 'POST', url: '/api/smart-warehouse/sap-order-station/create', body: dto }, { apiName: this.apiName });
|
|
1336
|
+
this.getOrderStatus = (docEntry) => this.restService.request({ method: 'GET', url: `/api/smart-warehouse/sap-order-station/order-status/${docEntry}` }, { apiName: this.apiName });
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
OrderStationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1340
|
+
OrderStationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, providedIn: 'root' });
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationService, decorators: [{
|
|
1342
|
+
type: Injectable,
|
|
1343
|
+
args: [{ providedIn: 'root' }]
|
|
1344
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1345
|
+
|
|
1346
|
+
class OrderStationComponent {
|
|
1347
|
+
constructor(orderStationService, toasterService) {
|
|
1348
|
+
this.orderStationService = orderStationService;
|
|
1349
|
+
this.toasterService = toasterService;
|
|
1350
|
+
this.stationCode = '';
|
|
1351
|
+
this.eyeCode = '';
|
|
1352
|
+
this.absBinEntry = '';
|
|
1353
|
+
this.orderId = '';
|
|
1354
|
+
this.isSaving = false;
|
|
1355
|
+
this.isCheckingOrder = false;
|
|
1356
|
+
this.orderStatus = null;
|
|
1357
|
+
}
|
|
1358
|
+
ngAfterViewInit() {
|
|
1359
|
+
setTimeout(() => {
|
|
1360
|
+
var _a, _b;
|
|
1361
|
+
(_b = (_a = this.stationInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1362
|
+
}, 200);
|
|
1363
|
+
}
|
|
1364
|
+
onStationScanned() {
|
|
1365
|
+
var _a;
|
|
1366
|
+
if (!((_a = this.stationCode) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
1367
|
+
return;
|
|
1368
|
+
setTimeout(() => {
|
|
1369
|
+
var _a, _b;
|
|
1370
|
+
(_b = (_a = this.shelfInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1371
|
+
}, 100);
|
|
1372
|
+
}
|
|
1373
|
+
onShelfScanned() {
|
|
1374
|
+
var _a;
|
|
1375
|
+
if (!((_a = this.eyeCode) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
1376
|
+
return;
|
|
1377
|
+
setTimeout(() => {
|
|
1378
|
+
var _a, _b;
|
|
1379
|
+
(_b = (_a = this.binInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1380
|
+
}, 100);
|
|
1381
|
+
}
|
|
1382
|
+
onBinScanned() {
|
|
1383
|
+
var _a;
|
|
1384
|
+
if (!((_a = this.absBinEntry) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
1385
|
+
return;
|
|
1386
|
+
setTimeout(() => {
|
|
1387
|
+
var _a, _b;
|
|
1388
|
+
(_b = (_a = this.orderInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1389
|
+
}, 100);
|
|
1390
|
+
}
|
|
1391
|
+
onOrderChanged() {
|
|
1392
|
+
this.orderStatus = null;
|
|
1393
|
+
}
|
|
1394
|
+
onOrderScanned() {
|
|
1395
|
+
var _a;
|
|
1396
|
+
if (!((_a = this.orderId) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
1397
|
+
return;
|
|
1398
|
+
const orderIdNum = Number(this.orderId.trim());
|
|
1399
|
+
if (isNaN(orderIdNum)) {
|
|
1400
|
+
this.toasterService.warn('Sipariş alanı sayısal bir değer olmalıdır.');
|
|
1401
|
+
return;
|
|
1402
|
+
}
|
|
1403
|
+
this.checkOrderStatus(orderIdNum);
|
|
1404
|
+
}
|
|
1405
|
+
checkOrderStatus(docEntry) {
|
|
1406
|
+
this.isCheckingOrder = true;
|
|
1407
|
+
this.orderStatus = null;
|
|
1408
|
+
this.orderStationService.getOrderStatus(docEntry).subscribe({
|
|
1409
|
+
next: (result) => {
|
|
1410
|
+
console.log(result);
|
|
1411
|
+
this.orderStatus = result;
|
|
1412
|
+
this.isCheckingOrder = false;
|
|
1413
|
+
if (!result.IsEligibleForMatching) {
|
|
1414
|
+
this.toasterService.error(`Bu siparişin durumu ${result.StatusText}. Eşleştirme işlemi yapılamaz.`);
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
error: (error) => {
|
|
1418
|
+
var _a, _b;
|
|
1419
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Sipariş durumu kontrol edilemedi.';
|
|
1420
|
+
this.toasterService.error(errorMessage);
|
|
1421
|
+
this.isCheckingOrder = false;
|
|
1422
|
+
this.orderStatus = null;
|
|
1423
|
+
},
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
onSave() {
|
|
1427
|
+
var _a, _b, _c, _d;
|
|
1428
|
+
if (!((_a = this.stationCode) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
1429
|
+
this.toasterService.warn('İstasyon alanı zorunludur.');
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
if (!((_b = this.eyeCode) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
1433
|
+
this.toasterService.warn('Raf alanı zorunludur.');
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
if (!((_c = this.absBinEntry) === null || _c === void 0 ? void 0 : _c.trim())) {
|
|
1437
|
+
this.toasterService.warn('Toplanacak Kasa alanı zorunludur.');
|
|
1438
|
+
return;
|
|
1439
|
+
}
|
|
1440
|
+
if (!((_d = this.orderId) === null || _d === void 0 ? void 0 : _d.trim())) {
|
|
1441
|
+
this.toasterService.warn('Sipariş alanı zorunludur.');
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1444
|
+
const eyeCodeNum = this.eyeCode.trim();
|
|
1445
|
+
const absBinEntryNum = Number(this.absBinEntry.trim());
|
|
1446
|
+
const orderIdNum = Number(this.orderId.trim());
|
|
1447
|
+
if (isNaN(absBinEntryNum)) {
|
|
1448
|
+
this.toasterService.warn('Toplanacak Kasa alanı sayısal bir değer olmalıdır.');
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1451
|
+
if (isNaN(orderIdNum)) {
|
|
1452
|
+
this.toasterService.warn('Sipariş alanı sayısal bir değer olmalıdır.');
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
if (this.orderStatus && !this.orderStatus.IsEligibleForMatching) {
|
|
1456
|
+
this.toasterService.error(`Bu siparişin durumu ${this.orderStatus.StatusText}. Eşleştirme işlemi yapılamaz.`);
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
const dto = {
|
|
1460
|
+
orderId: orderIdNum,
|
|
1461
|
+
stationCode: this.stationCode.trim(),
|
|
1462
|
+
eyeCode: eyeCodeNum,
|
|
1463
|
+
absBinEntry: absBinEntryNum,
|
|
1464
|
+
};
|
|
1465
|
+
this.isSaving = true;
|
|
1466
|
+
this.orderStationService.createOrderStation(dto).subscribe({
|
|
1467
|
+
next: (result) => {
|
|
1468
|
+
this.toasterService.success(result);
|
|
1469
|
+
this.onClear();
|
|
1470
|
+
this.isSaving = false;
|
|
1471
|
+
},
|
|
1472
|
+
error: (error) => {
|
|
1473
|
+
var _a, _b;
|
|
1474
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'İşlem sırasında bir hata oluştu.';
|
|
1475
|
+
this.toasterService.error(errorMessage);
|
|
1476
|
+
this.isSaving = false;
|
|
1477
|
+
},
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
onClear() {
|
|
1481
|
+
this.stationCode = '';
|
|
1482
|
+
this.eyeCode = '';
|
|
1483
|
+
this.absBinEntry = '';
|
|
1484
|
+
this.orderId = '';
|
|
1485
|
+
this.orderStatus = null;
|
|
1486
|
+
setTimeout(() => {
|
|
1487
|
+
var _a, _b;
|
|
1488
|
+
(_b = (_a = this.stationInputRef) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1489
|
+
}, 100);
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
OrderStationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationComponent, deps: [{ token: OrderStationService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1493
|
+
OrderStationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OrderStationComponent, selector: "lib-order-station", viewQueries: [{ propertyName: "stationInputRef", first: true, predicate: ["stationInput"], descendants: true }, { propertyName: "shelfInputRef", first: true, predicate: ["shelfInput"], descendants: true }, { propertyName: "binInputRef", first: true, predicate: ["binInput"], descendants: true }, { propertyName: "orderInputRef", first: true, predicate: ["orderInput"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Sipari\u015F-Toplama Noktas\u0131 E\u015Fle\u015Ftirme'\">\r\n <div class=\"order-station-container\">\r\n <div class=\"order-station-layout\">\r\n <div class=\"order-station-form-card\">\r\n\r\n <!-- \u0130stasyon -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"stationInput\">\u0130stasyon</label>\r\n <input #stationInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"stationInput\"\r\n [(ngModel)]=\"stationCode\"\r\n (keydown.enter)=\"onStationScanned()\"\r\n placeholder=\"\u0130stasyon kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">G\u00F6z</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"eyeCode\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Toplanacak Kasa -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"binInput\">Toplanacak Kasa</label>\r\n <input #binInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"binInput\"\r\n [(ngModel)]=\"absBinEntry\"\r\n (keydown.enter)=\"onBinScanned()\"\r\n placeholder=\"Toplanacak kasa kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"orderInput\">Sipari\u015F</label>\r\n <input #orderInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"orderInput\"\r\n [(ngModel)]=\"orderId\"\r\n (ngModelChange)=\"onOrderChanged()\"\r\n (keydown.enter)=\"onOrderScanned()\"\r\n placeholder=\"Sipari\u015F numaras\u0131n\u0131 okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F Durum Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isCheckingOrder\">\r\n <div class=\"status-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Sipari\u015F durumu kontrol ediliyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"orderStatus && !isCheckingOrder\">\r\n <div class=\"status-card\" [ngClass]=\"{\r\n 'status-ok': orderStatus.IsEligibleForMatching,\r\n 'status-error': !orderStatus.IsEligibleForMatching\r\n }\">\r\n <i class=\"fa\" [ngClass]=\"orderStatus.IsEligibleForMatching ? 'fa-check-circle' : 'fa-times-circle'\"></i>\r\n <span *ngIf=\"orderStatus.IsEligibleForMatching\">\r\n Sipari\u015F Durumu: {{ orderStatus.StatusText }}\r\n </span>\r\n <span *ngIf=\"!orderStatus.IsEligibleForMatching\">\r\n Bu sipari\u015Fin durumu {{ orderStatus.StatusText }}. E\u015Fle\u015Ftirme i\u015Flemi yap\u0131lamaz.\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\"\r\n (click)=\"onSave()\"\r\n [disabled]=\"isSaving || isCheckingOrder || !stationCode || !eyeCode || !absBinEntry || !orderId || !orderStatus || !orderStatus.IsEligibleForMatching\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\"\r\n (click)=\"onClear()\"\r\n [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".order-station-container{width:100%}.order-station-layout{display:flex;gap:20px;align-items:flex-start;justify-content:center}.order-station-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 500px;min-width:320px;max-width:500px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.status-loading{padding:10px 14px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#6c757d}.status-loading i{margin-right:6px;color:#556ee6}.status-card{padding:10px 14px;border-radius:6px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px}.status-card i{font-size:16px}.status-ok{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32}.status-ok i{color:#2e7d32}.status-error{background:#fbe9e7;border:1px solid #ef9a9a;color:#c62828}.status-error i{color:#c62828}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}@media (max-width: 768px){.order-station-container{padding:0 8px}.order-station-form-card{padding:16px;min-width:100%;flex:1}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }] });
|
|
1494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationComponent, decorators: [{
|
|
1495
|
+
type: Component,
|
|
1496
|
+
args: [{ selector: 'lib-order-station', template: "<abp-page [title]=\"'Sipari\u015F-Toplama Noktas\u0131 E\u015Fle\u015Ftirme'\">\r\n <div class=\"order-station-container\">\r\n <div class=\"order-station-layout\">\r\n <div class=\"order-station-form-card\">\r\n\r\n <!-- \u0130stasyon -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"stationInput\">\u0130stasyon</label>\r\n <input #stationInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"stationInput\"\r\n [(ngModel)]=\"stationCode\"\r\n (keydown.enter)=\"onStationScanned()\"\r\n placeholder=\"\u0130stasyon kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Raf -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"shelfInput\">G\u00F6z</label>\r\n <input #shelfInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"shelfInput\"\r\n [(ngModel)]=\"eyeCode\"\r\n (keydown.enter)=\"onShelfScanned()\"\r\n placeholder=\"Raf kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Toplanacak Kasa -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"binInput\">Toplanacak Kasa</label>\r\n <input #binInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"binInput\"\r\n [(ngModel)]=\"absBinEntry\"\r\n (keydown.enter)=\"onBinScanned()\"\r\n placeholder=\"Toplanacak kasa kodunu okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F -->\r\n <div class=\"form-section\">\r\n <label class=\"section-label\" for=\"orderInput\">Sipari\u015F</label>\r\n <input #orderInput\r\n type=\"text\"\r\n class=\"form-control form-input\"\r\n id=\"orderInput\"\r\n [(ngModel)]=\"orderId\"\r\n (ngModelChange)=\"onOrderChanged()\"\r\n (keydown.enter)=\"onOrderScanned()\"\r\n placeholder=\"Sipari\u015F numaras\u0131n\u0131 okutun...\"\r\n autocomplete=\"off\" />\r\n </div>\r\n\r\n <!-- Sipari\u015F Durum Bilgisi -->\r\n <div class=\"form-section\" *ngIf=\"isCheckingOrder\">\r\n <div class=\"status-loading\">\r\n <i class=\"fa fa-spinner fa-spin\"></i> Sipari\u015F durumu kontrol ediliyor...\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-section\" *ngIf=\"orderStatus && !isCheckingOrder\">\r\n <div class=\"status-card\" [ngClass]=\"{\r\n 'status-ok': orderStatus.IsEligibleForMatching,\r\n 'status-error': !orderStatus.IsEligibleForMatching\r\n }\">\r\n <i class=\"fa\" [ngClass]=\"orderStatus.IsEligibleForMatching ? 'fa-check-circle' : 'fa-times-circle'\"></i>\r\n <span *ngIf=\"orderStatus.IsEligibleForMatching\">\r\n Sipari\u015F Durumu: {{ orderStatus.StatusText }}\r\n </span>\r\n <span *ngIf=\"!orderStatus.IsEligibleForMatching\">\r\n Bu sipari\u015Fin durumu {{ orderStatus.StatusText }}. E\u015Fle\u015Ftirme i\u015Flemi yap\u0131lamaz.\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <hr class=\"form-divider\" />\r\n\r\n <!-- Buttons -->\r\n <div class=\"form-section button-group\">\r\n <button class=\"btn btn-action-success btn-sm\"\r\n (click)=\"onSave()\"\r\n [disabled]=\"isSaving || isCheckingOrder || !stationCode || !eyeCode || !absBinEntry || !orderId || !orderStatus || !orderStatus.IsEligibleForMatching\">\r\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-save'\"></i>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n <button class=\"btn btn-action-outline btn-sm\"\r\n (click)=\"onClear()\"\r\n [disabled]=\"isSaving\">\r\n <i class=\"fa fa-eraser\"></i> Temizle\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>\r\n", styles: [".order-station-container{width:100%}.order-station-layout{display:flex;gap:20px;align-items:flex-start;justify-content:center}.order-station-form-card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px #0000000f;flex:0 0 500px;min-width:320px;max-width:500px}.form-divider{border:none;border-top:1px solid #eee;margin:14px 0}.form-section{margin-bottom:12px}.section-label{display:block;font-size:11px;font-weight:600;color:#6c757d;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}.form-input{height:40px;border:1px solid #ced4da;border-radius:6px;padding:0 12px;font-size:14px;background:#fff;transition:border-color .15s;width:100%}.form-input:focus{border-color:#556ee6;outline:none;box-shadow:0 0 0 2px #556ee626}.form-input[readonly]{background:#f5f5f5;color:#888}.status-loading{padding:10px 14px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#6c757d}.status-loading i{margin-right:6px;color:#556ee6}.status-card{padding:10px 14px;border-radius:6px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px}.status-card i{font-size:16px}.status-ok{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32}.status-ok i{color:#2e7d32}.status-error{background:#fbe9e7;border:1px solid #ef9a9a;color:#c62828}.status-error i{color:#c62828}.button-group{display:flex;gap:10px;margin-top:4px;flex-wrap:wrap}.button-group .btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;padding:8px 20px;border-radius:6px;font-weight:500;white-space:nowrap;transition:all .15s;flex:1 1 0;justify-content:center;min-width:120px}.btn-action-success{background:#34c38f;color:#fff;border:none}.btn-action-success:hover{background:#2ca67a;color:#fff}.btn-action-success:disabled{background:#9dd3bd;color:#fff;cursor:not-allowed}.btn-action-outline{background:transparent;color:#556ee6;border:1px solid #556ee6}.btn-action-outline:hover{background:#556ee6;color:#fff}@media (max-width: 768px){.order-station-container{padding:0 8px}.order-station-form-card{padding:16px;min-width:100%;flex:1}.button-group{flex-direction:column}.button-group .btn{font-size:12px;padding:7px 14px;width:100%;flex:1 1 auto}}\n"] }]
|
|
1497
|
+
}], ctorParameters: function () { return [{ type: OrderStationService }, { type: i2.ToasterService }]; }, propDecorators: { stationInputRef: [{
|
|
1498
|
+
type: ViewChild,
|
|
1499
|
+
args: ['stationInput', { static: false }]
|
|
1500
|
+
}], shelfInputRef: [{
|
|
1501
|
+
type: ViewChild,
|
|
1502
|
+
args: ['shelfInput', { static: false }]
|
|
1503
|
+
}], binInputRef: [{
|
|
1504
|
+
type: ViewChild,
|
|
1505
|
+
args: ['binInput', { static: false }]
|
|
1506
|
+
}], orderInputRef: [{
|
|
1507
|
+
type: ViewChild,
|
|
1508
|
+
args: ['orderInput', { static: false }]
|
|
1509
|
+
}] } });
|
|
1510
|
+
|
|
1511
|
+
const routes$6 = [{ path: '', component: OrderStationComponent }];
|
|
1512
|
+
class OrderStationModule {
|
|
1513
|
+
}
|
|
1514
|
+
OrderStationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1515
|
+
OrderStationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, declarations: [OrderStationComponent], imports: [CoreModule,
|
|
1516
|
+
ThemeSharedModule,
|
|
1517
|
+
FormsModule,
|
|
1518
|
+
CommercialUiModule,
|
|
1519
|
+
NgxValidateCoreModule,
|
|
1520
|
+
NgbCollapseModule,
|
|
1521
|
+
NgbDatepickerModule,
|
|
1522
|
+
NgbDropdownModule,
|
|
1523
|
+
PageModule, i1$1.RouterModule] });
|
|
1524
|
+
OrderStationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, imports: [CoreModule,
|
|
1525
|
+
ThemeSharedModule,
|
|
1526
|
+
FormsModule,
|
|
1527
|
+
CommercialUiModule,
|
|
1528
|
+
NgxValidateCoreModule,
|
|
1529
|
+
NgbCollapseModule,
|
|
1530
|
+
NgbDatepickerModule,
|
|
1531
|
+
NgbDropdownModule,
|
|
1532
|
+
PageModule,
|
|
1533
|
+
RouterModule.forChild(routes$6)] });
|
|
1534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OrderStationModule, decorators: [{
|
|
1535
|
+
type: NgModule,
|
|
1536
|
+
args: [{
|
|
1537
|
+
declarations: [OrderStationComponent],
|
|
1538
|
+
imports: [
|
|
1539
|
+
CoreModule,
|
|
1540
|
+
ThemeSharedModule,
|
|
1541
|
+
FormsModule,
|
|
1542
|
+
CommercialUiModule,
|
|
1543
|
+
NgxValidateCoreModule,
|
|
1544
|
+
NgbCollapseModule,
|
|
1545
|
+
NgbDatepickerModule,
|
|
1546
|
+
NgbDropdownModule,
|
|
1547
|
+
PageModule,
|
|
1548
|
+
RouterModule.forChild(routes$6),
|
|
1549
|
+
],
|
|
1550
|
+
}]
|
|
1551
|
+
}] });
|
|
1552
|
+
function loadOrderStationModuleAsChild() {
|
|
1553
|
+
return Promise.resolve(OrderStationModule);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
class StockReportService {
|
|
1557
|
+
constructor(restService, devexService) {
|
|
1558
|
+
this.restService = restService;
|
|
1559
|
+
this.devexService = devexService;
|
|
1560
|
+
this.apiName = 'SmartWarehouse';
|
|
1561
|
+
this.loadStockReports = this.devexService.createStore({
|
|
1562
|
+
key: 'ItemCode',
|
|
1563
|
+
loadUrl: 'api/smart-warehouse/stock-report/stock-reports',
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
StockReportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, deps: [{ token: i1.RestService }, { token: DevexpressRestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1568
|
+
StockReportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, providedIn: 'root' });
|
|
1569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportService, decorators: [{
|
|
1570
|
+
type: Injectable,
|
|
1571
|
+
args: [{ providedIn: 'root' }]
|
|
1572
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }, { type: DevexpressRestService }]; } });
|
|
1573
|
+
|
|
1574
|
+
class StockReportComponent {
|
|
1575
|
+
constructor(stockReportService, toasterService) {
|
|
1576
|
+
this.stockReportService = stockReportService;
|
|
1577
|
+
this.toasterService = toasterService;
|
|
1578
|
+
}
|
|
1579
|
+
ngOnInit() {
|
|
1580
|
+
this.stockDataSource = this.stockReportService.loadStockReports;
|
|
1581
|
+
}
|
|
1582
|
+
onRefresh() {
|
|
1583
|
+
var _a, _b;
|
|
1584
|
+
(_b = (_a = this.dxStockInstance) === null || _a === void 0 ? void 0 : _a.instance) === null || _b === void 0 ? void 0 : _b.refresh();
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
StockReportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportComponent, deps: [{ token: StockReportService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1588
|
+
StockReportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: StockReportComponent, selector: "lib-stock-report", viewQueries: [{ propertyName: "dxStockInstance", first: true, predicate: ["dxStockInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Depo Stok Raporu'\">\r\n\r\n <div class=\"mb-2\">\r\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxStockInstance [dataSource]=\"stockDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\"></dxi-column>\r\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\r\n <dxi-column dataField=\"WhsCode\" caption=\"Depo\"></dxi-column>\r\n <dxi-column dataField=\"BinCode\" caption=\"Depo Yeri\"></dxi-column>\r\n <dxi-column dataField=\"DistNumber\" caption=\"Parti\"></dxi-column>\r\n <dxi-column dataField=\"OnHandQty\" caption=\"Miktar\" dataType=\"number\" [format]=\"{ \r\n type: 'fixedPoint', \r\n precision: 2 \r\n }\">\r\n\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>", dependencies: [{ kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupingComponent, selector: "dxo-grouping", inputs: ["allowCollapsing", "autoExpandAll", "contextMenuEnabled", "expandMode", "texts"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }] });
|
|
1589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportComponent, decorators: [{
|
|
1590
|
+
type: Component,
|
|
1591
|
+
args: [{ selector: 'lib-stock-report', template: "<abp-page [title]=\"'Depo Stok Raporu'\">\r\n\r\n <div class=\"mb-2\">\r\n <button class=\"btn btn-sm btn-outline-primary\" (click)=\"onRefresh()\">\r\n <i class=\"fa fa-redo\"></i> Yenile\r\n </button>\r\n </div>\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxStockInstance [dataSource]=\"stockDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\"></dxi-column>\r\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\r\n <dxi-column dataField=\"WhsCode\" caption=\"Depo\"></dxi-column>\r\n <dxi-column dataField=\"BinCode\" caption=\"Depo Yeri\"></dxi-column>\r\n <dxi-column dataField=\"DistNumber\" caption=\"Parti\"></dxi-column>\r\n <dxi-column dataField=\"OnHandQty\" caption=\"Miktar\" dataType=\"number\" [format]=\"{ \r\n type: 'fixedPoint', \r\n precision: 2 \r\n }\">\r\n\r\n </dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>" }]
|
|
1592
|
+
}], ctorParameters: function () { return [{ type: StockReportService }, { type: i2.ToasterService }]; }, propDecorators: { dxStockInstance: [{
|
|
1593
|
+
type: ViewChild,
|
|
1594
|
+
args: ['dxStockInstance', { static: false }]
|
|
1595
|
+
}] } });
|
|
1596
|
+
|
|
1597
|
+
const routes$5 = [
|
|
1598
|
+
{ path: '', component: StockReportComponent },
|
|
1599
|
+
];
|
|
1600
|
+
class StockReportModule {
|
|
1601
|
+
}
|
|
1602
|
+
StockReportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1603
|
+
StockReportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, declarations: [StockReportComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1604
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1605
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
|
|
1606
|
+
StockReportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1607
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1608
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1609
|
+
RouterModule.forChild(routes$5)] });
|
|
1610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StockReportModule, decorators: [{
|
|
1611
|
+
type: NgModule,
|
|
1612
|
+
args: [{
|
|
1613
|
+
declarations: [StockReportComponent],
|
|
1614
|
+
imports: [
|
|
1615
|
+
CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1616
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1617
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1618
|
+
RouterModule.forChild(routes$5),
|
|
1619
|
+
],
|
|
1620
|
+
}]
|
|
1621
|
+
}] });
|
|
1622
|
+
function loadStockReportModuleAsChild() {
|
|
1623
|
+
return Promise.resolve(StockReportModule);
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
class ShortagesService {
|
|
1627
|
+
constructor(restService) {
|
|
1628
|
+
this.restService = restService;
|
|
1629
|
+
this.apiName = 'SmartWarehouse';
|
|
1630
|
+
this.getShortages = (orderType) => this.restService.request({
|
|
1631
|
+
method: 'GET',
|
|
1632
|
+
url: '/api/smart-warehouse/sap-reservations/shortages',
|
|
1633
|
+
params: { orderType: orderType || undefined },
|
|
1634
|
+
}, { apiName: this.apiName });
|
|
1635
|
+
this.getShortagesSummary = (orderType) => this.restService.request({
|
|
1636
|
+
method: 'GET',
|
|
1637
|
+
url: '/api/smart-warehouse/sap-reservations/shortages-summary',
|
|
1638
|
+
params: { orderType: orderType || undefined },
|
|
1639
|
+
}, { apiName: this.apiName });
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
ShortagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1643
|
+
ShortagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, providedIn: 'root' });
|
|
1644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesService, decorators: [{
|
|
1645
|
+
type: Injectable,
|
|
1646
|
+
args: [{ providedIn: 'root' }]
|
|
1647
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1648
|
+
|
|
1649
|
+
class ShortagesComponent {
|
|
1650
|
+
constructor(shortagesService, toasterService) {
|
|
1651
|
+
this.shortagesService = shortagesService;
|
|
1652
|
+
this.toasterService = toasterService;
|
|
1653
|
+
this.viewMode = 'detay';
|
|
1654
|
+
this.activeOrderType = null; // null = tümü, '1' | '2' | '3'
|
|
1655
|
+
this.detailDataSource = [];
|
|
1656
|
+
this.summaryDataSource = [];
|
|
1657
|
+
this.isLoading = false;
|
|
1658
|
+
}
|
|
1659
|
+
ngOnInit() {
|
|
1660
|
+
this.load();
|
|
1661
|
+
}
|
|
1662
|
+
toggleOrderType(key) {
|
|
1663
|
+
this.activeOrderType = this.activeOrderType === key ? null : key;
|
|
1664
|
+
this.load();
|
|
1665
|
+
}
|
|
1666
|
+
setViewMode(mode) {
|
|
1667
|
+
this.viewMode = mode;
|
|
1668
|
+
this.load();
|
|
1669
|
+
}
|
|
1670
|
+
load() {
|
|
1671
|
+
this.isLoading = true;
|
|
1672
|
+
if (this.viewMode === 'detay') {
|
|
1673
|
+
this.shortagesService.getShortages(this.activeOrderType).subscribe({
|
|
1674
|
+
next: (data) => {
|
|
1675
|
+
this.detailDataSource = data || [];
|
|
1676
|
+
this.isLoading = false;
|
|
1677
|
+
},
|
|
1678
|
+
error: (error) => {
|
|
1679
|
+
var _a, _b;
|
|
1680
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Fark listesi yüklenirken bir hata oluştu.';
|
|
1681
|
+
this.toasterService.error(errorMessage);
|
|
1682
|
+
this.isLoading = false;
|
|
1683
|
+
},
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
else {
|
|
1687
|
+
this.shortagesService.getShortagesSummary(this.activeOrderType).subscribe({
|
|
1688
|
+
next: (data) => {
|
|
1689
|
+
this.summaryDataSource = data || [];
|
|
1690
|
+
this.isLoading = false;
|
|
1691
|
+
},
|
|
1692
|
+
error: (error) => {
|
|
1693
|
+
var _a, _b;
|
|
1694
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Fark özeti yüklenirken bir hata oluştu.';
|
|
1695
|
+
this.toasterService.error(errorMessage);
|
|
1696
|
+
this.isLoading = false;
|
|
1697
|
+
},
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
onRefresh() {
|
|
1702
|
+
this.load();
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
ShortagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesComponent, deps: [{ token: ShortagesService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1706
|
+
ShortagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ShortagesComponent, selector: "lib-shortages", viewQueries: [{ propertyName: "dxDetailInstance", first: true, predicate: ["dxDetailInstance"], descendants: true }, { propertyName: "dxSummaryInstance", first: true, predicate: ["dxSummaryInstance"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Fark Listesi'\">\n\n <div class=\"mb-3 d-flex flex-wrap align-items-center gap-2\">\n <div class=\"btn-group me-3\" role=\"group\">\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'detay' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('detay')\"\n >\n Detay (Sipari\u015F Baz\u0131nda)\n </button>\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'ozet' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('ozet')\"\n >\n \u00D6zet (Kalem Baz\u0131nda)\n </button>\n </div>\n\n <span class=\"badge bg-light text-dark border\" [class.border-primary]=\"!activeOrderType\" style=\"cursor:pointer\" (click)=\"activeOrderType = null; load()\">\n T\u00FCm\u00FC\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '1' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('1')\">\n Sanayi Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '2' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('2')\">\n Da\u011F\u0131t\u0131m Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '3' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('3')\">\n Depo Talepleri\n </span>\n\n <button class=\"btn btn-sm btn-outline-secondary ms-auto\" (click)=\"onRefresh()\" [disabled]=\"isLoading\">\n <i class=\"fa fa-redo\"></i> Yenile\n </button>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'detay'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxDetailInstance\n [dataSource]=\"detailDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n [columnHidingEnabled]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"OrderDocNum\" caption=\"Belge No\" [width]=\"110\"></dxi-column>\n <dxi-column dataField=\"CardCode\" caption=\"M\u00FC\u015Fteri Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"CardName\" caption=\"M\u00FC\u015Fteri Ad\u0131\" [width]=\"220\"></dxi-column>\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"RequestedQty\" caption=\"Talep Edilen\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n <dxi-column dataField=\"ShortQty\" caption=\"Eksik Miktar\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n\n <dxo-summary>\n <dxi-total-item column=\"ShortQty\" summaryType=\"sum\" displayFormat=\"Toplam Eksik: {0}\" valueFormat=\"#,##0.##\"></dxi-total-item>\n </dxo-summary>\n </dx-data-grid>\n </div>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'ozet'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxSummaryInstance\n [dataSource]=\"summaryDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"160\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"TotalShortQty\" caption=\"Toplam Eksik\" dataType=\"number\" format=\"#,##0.##\" [width]=\"140\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"OrderCount\" caption=\"Sipari\u015F Say\u0131s\u0131\" dataType=\"number\" [width]=\"130\"></dxi-column>\n </dx-data-grid>\n </div>\n </div>\n\n</abp-page>\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }, { kind: "component", type: i7.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i7.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }] });
|
|
1707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesComponent, decorators: [{
|
|
1708
|
+
type: Component,
|
|
1709
|
+
args: [{ selector: 'lib-shortages', template: "<abp-page [title]=\"'Fark Listesi'\">\n\n <div class=\"mb-3 d-flex flex-wrap align-items-center gap-2\">\n <div class=\"btn-group me-3\" role=\"group\">\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'detay' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('detay')\"\n >\n Detay (Sipari\u015F Baz\u0131nda)\n </button>\n <button\n type=\"button\"\n class=\"btn btn-sm\"\n [ngClass]=\"viewMode === 'ozet' ? 'btn-primary' : 'btn-outline-primary'\"\n (click)=\"setViewMode('ozet')\"\n >\n \u00D6zet (Kalem Baz\u0131nda)\n </button>\n </div>\n\n <span class=\"badge bg-light text-dark border\" [class.border-primary]=\"!activeOrderType\" style=\"cursor:pointer\" (click)=\"activeOrderType = null; load()\">\n T\u00FCm\u00FC\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '1' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('1')\">\n Sanayi Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '2' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('2')\">\n Da\u011F\u0131t\u0131m Sipari\u015Fleri\n </span>\n <span class=\"badge\" [ngClass]=\"activeOrderType === '3' ? 'bg-primary' : 'bg-light text-dark border'\" style=\"cursor:pointer\" (click)=\"toggleOrderType('3')\">\n Depo Talepleri\n </span>\n\n <button class=\"btn btn-sm btn-outline-secondary ms-auto\" (click)=\"onRefresh()\" [disabled]=\"isLoading\">\n <i class=\"fa fa-redo\"></i> Yenile\n </button>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'detay'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxDetailInstance\n [dataSource]=\"detailDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n [columnHidingEnabled]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"OrderDocNum\" caption=\"Belge No\" [width]=\"110\"></dxi-column>\n <dxi-column dataField=\"CardCode\" caption=\"M\u00FC\u015Fteri Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"CardName\" caption=\"M\u00FC\u015Fteri Ad\u0131\" [width]=\"220\"></dxi-column>\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"140\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"RequestedQty\" caption=\"Talep Edilen\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n <dxi-column dataField=\"ShortQty\" caption=\"Eksik Miktar\" dataType=\"number\" format=\"#,##0.##\" [width]=\"120\"></dxi-column>\n\n <dxo-summary>\n <dxi-total-item column=\"ShortQty\" summaryType=\"sum\" displayFormat=\"Toplam Eksik: {0}\" valueFormat=\"#,##0.##\"></dxi-total-item>\n </dxo-summary>\n </dx-data-grid>\n </div>\n </div>\n\n <div class=\"card\" *ngIf=\"viewMode === 'ozet'\">\n <div class=\"card-body\">\n <dx-data-grid\n #dxSummaryInstance\n [dataSource]=\"summaryDataSource\"\n [showRowLines]=\"true\"\n [showBorders]=\"true\"\n [hoverStateEnabled]=\"true\"\n [allowColumnResizing]=\"true\"\n columnResizingMode=\"widget\"\n [allowColumnReordering]=\"true\"\n [columnAutoWidth]=\"true\"\n style=\"height: 70vh;\"\n >\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[20, 50, 100]\" [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\"></dxo-pager>\n <dxo-paging [pageSize]=\"20\"></dxo-paging>\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\n <dxo-sorting mode=\"single\"></dxo-sorting>\n <dxo-scrolling mode=\"standard\" showScrollbar=\"always\"></dxo-scrolling>\n\n <dxi-column dataField=\"ItemCode\" caption=\"Kalem Kodu\" [width]=\"160\"></dxi-column>\n <dxi-column dataField=\"ItemName\" caption=\"Kalem Ad\u0131\"></dxi-column>\n <dxi-column dataField=\"TotalShortQty\" caption=\"Toplam Eksik\" dataType=\"number\" format=\"#,##0.##\" [width]=\"140\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"OrderCount\" caption=\"Sipari\u015F Say\u0131s\u0131\" dataType=\"number\" [width]=\"130\"></dxi-column>\n </dx-data-grid>\n </div>\n </div>\n\n</abp-page>\n" }]
|
|
1710
|
+
}], ctorParameters: function () { return [{ type: ShortagesService }, { type: i2.ToasterService }]; }, propDecorators: { dxDetailInstance: [{
|
|
1711
|
+
type: ViewChild,
|
|
1712
|
+
args: ['dxDetailInstance', { static: false }]
|
|
1713
|
+
}], dxSummaryInstance: [{
|
|
1714
|
+
type: ViewChild,
|
|
1715
|
+
args: ['dxSummaryInstance', { static: false }]
|
|
1716
|
+
}] } });
|
|
1717
|
+
|
|
1718
|
+
const routes$4 = [
|
|
1719
|
+
{ path: '', component: ShortagesComponent },
|
|
1720
|
+
];
|
|
1721
|
+
class ShortagesModule {
|
|
1722
|
+
}
|
|
1723
|
+
ShortagesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1724
|
+
ShortagesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, declarations: [ShortagesComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1725
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1726
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
|
|
1727
|
+
ShortagesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1728
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1729
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1730
|
+
RouterModule.forChild(routes$4)] });
|
|
1731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ShortagesModule, decorators: [{
|
|
1732
|
+
type: NgModule,
|
|
1733
|
+
args: [{
|
|
1734
|
+
declarations: [ShortagesComponent],
|
|
1735
|
+
imports: [
|
|
1736
|
+
CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1737
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1738
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1739
|
+
RouterModule.forChild(routes$4),
|
|
1740
|
+
],
|
|
1741
|
+
}]
|
|
1742
|
+
}] });
|
|
1743
|
+
function loadShortagesModuleAsChild() {
|
|
1744
|
+
return Promise.resolve(ShortagesModule);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
class StationService {
|
|
1748
|
+
constructor(restService) {
|
|
1749
|
+
this.restService = restService;
|
|
1750
|
+
this.apiName = 'SmartWarehouse';
|
|
1751
|
+
// CustomStore.load ile doldurulan, byKey/güncellemelerin kullandığı önbellek
|
|
1752
|
+
this.cache = [];
|
|
1753
|
+
this.getAll = () => firstValueFrom(this.restService.request({ method: 'GET', url: '/api/smart-warehouse/stations/get-all-stations' }, { apiName: this.apiName }));
|
|
1754
|
+
this.createStation = (dto) => firstValueFrom(this.restService.request({ method: 'POST', url: '/api/smart-warehouse/stations/create-station', body: dto }, { apiName: this.apiName, skipHandleError: true }));
|
|
1755
|
+
this.updateStation = (dto) => firstValueFrom(this.restService.request({ method: 'PUT', url: '/api/smart-warehouse/stations/update-station', body: dto }, { apiName: this.apiName, skipHandleError: true }));
|
|
1756
|
+
this.deleteStation = (code) => firstValueFrom(this.restService.request({ method: 'DELETE', url: `/api/smart-warehouse/stations/delete-station/${code}` }, { apiName: this.apiName, skipHandleError: true }));
|
|
1757
|
+
// Ana grid için CustomStore (istemci tarafı; istasyon sayısı azdır)
|
|
1758
|
+
this.buildStore = () => new CustomStore({
|
|
1759
|
+
key: 'Code',
|
|
1760
|
+
loadMode: 'raw',
|
|
1761
|
+
load: () => __awaiter(this, void 0, void 0, function* () {
|
|
1762
|
+
const data = yield this.getAll();
|
|
1763
|
+
this.cache = (data !== null && data !== void 0 ? data : []).map(s => {
|
|
1764
|
+
var _a;
|
|
1765
|
+
return (Object.assign(Object.assign({}, s), { SWSTATIONEYECollection: (_a = s.SWSTATIONEYECollection) !== null && _a !== void 0 ? _a : [] }));
|
|
1766
|
+
});
|
|
1767
|
+
return this.cache;
|
|
1768
|
+
}),
|
|
1769
|
+
byKey: key => Promise.resolve(this.cache.find(s => s.Code === key)),
|
|
1770
|
+
insert: (values) => __awaiter(this, void 0, void 0, function* () {
|
|
1771
|
+
var _a, _b, _c;
|
|
1772
|
+
const dto = Object.assign({ SWSTATIONEYECollection: [] }, values);
|
|
1773
|
+
try {
|
|
1774
|
+
yield this.createStation(dto);
|
|
1775
|
+
}
|
|
1776
|
+
catch (error) {
|
|
1777
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 200)
|
|
1778
|
+
return dto;
|
|
1779
|
+
throw (((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ||
|
|
1780
|
+
((_c = error === null || error === void 0 ? void 0 : error.error) === null || _c === void 0 ? void 0 : _c.message) ||
|
|
1781
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
1782
|
+
'İstasyon oluşturulamadı.');
|
|
1783
|
+
}
|
|
1784
|
+
return dto;
|
|
1785
|
+
}),
|
|
1786
|
+
update: (key, values) => __awaiter(this, void 0, void 0, function* () {
|
|
1787
|
+
var _d, _e, _f, _g;
|
|
1788
|
+
const original = (_d = this.cache.find(s => s.Code === key)) !== null && _d !== void 0 ? _d : { Code: key, SWSTATIONEYECollection: [] };
|
|
1789
|
+
const merged = Object.assign(Object.assign({}, original), values);
|
|
1790
|
+
try {
|
|
1791
|
+
yield this.updateStation(merged);
|
|
1792
|
+
}
|
|
1793
|
+
catch (error) {
|
|
1794
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 200)
|
|
1795
|
+
return merged;
|
|
1796
|
+
throw (((_f = (_e = error === null || error === void 0 ? void 0 : error.error) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message) ||
|
|
1797
|
+
((_g = error === null || error === void 0 ? void 0 : error.error) === null || _g === void 0 ? void 0 : _g.message) ||
|
|
1798
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
1799
|
+
'İstasyon güncellenemedi.');
|
|
1800
|
+
}
|
|
1801
|
+
return merged;
|
|
1802
|
+
}),
|
|
1803
|
+
remove: (key) => __awaiter(this, void 0, void 0, function* () {
|
|
1804
|
+
var _h, _j, _k;
|
|
1805
|
+
try {
|
|
1806
|
+
yield this.deleteStation(key);
|
|
1807
|
+
}
|
|
1808
|
+
catch (error) {
|
|
1809
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 200)
|
|
1810
|
+
return;
|
|
1811
|
+
throw (((_j = (_h = error === null || error === void 0 ? void 0 : error.error) === null || _h === void 0 ? void 0 : _h.error) === null || _j === void 0 ? void 0 : _j.message) ||
|
|
1812
|
+
((_k = error === null || error === void 0 ? void 0 : error.error) === null || _k === void 0 ? void 0 : _k.message) ||
|
|
1813
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
1814
|
+
'İstasyon silinemedi.');
|
|
1815
|
+
}
|
|
1816
|
+
}),
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
StationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1821
|
+
StationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, providedIn: 'root' });
|
|
1822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationService, decorators: [{
|
|
1823
|
+
type: Injectable,
|
|
1824
|
+
args: [{ providedIn: 'root' }]
|
|
1825
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1826
|
+
|
|
1827
|
+
class StationComponent {
|
|
1828
|
+
constructor(toasterService, stationService) {
|
|
1829
|
+
this.toasterService = toasterService;
|
|
1830
|
+
this.stationService = stationService;
|
|
1831
|
+
}
|
|
1832
|
+
ngOnInit() {
|
|
1833
|
+
this.stationDataSource = this.stationService.buildStore();
|
|
1834
|
+
}
|
|
1835
|
+
// Gözler (alt grid) değiştiğinde istasyonun tamamı (başlık + güncel göz listesi) kaydedilir.
|
|
1836
|
+
// onSaved/onRowRemoved, in-memory dizi güncellendikten SONRA tetiklenir; station referansı günceldir.
|
|
1837
|
+
onEyesChanged(station) {
|
|
1838
|
+
var _a, _b, _c, _d;
|
|
1839
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1840
|
+
try {
|
|
1841
|
+
station.SWSTATIONEYECollection = (_a = station.SWSTATIONEYECollection) !== null && _a !== void 0 ? _a : [];
|
|
1842
|
+
const message = yield this.stationService.updateStation(station);
|
|
1843
|
+
this.toasterService.success(message);
|
|
1844
|
+
}
|
|
1845
|
+
catch (error) {
|
|
1846
|
+
if ((error === null || error === void 0 ? void 0 : error.status) === 200) {
|
|
1847
|
+
this.toasterService.success('Göz kaydı güncellendi.');
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
const detail = ((_c = (_b = error === null || error === void 0 ? void 0 : error.error) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) ||
|
|
1851
|
+
((_d = error === null || error === void 0 ? void 0 : error.error) === null || _d === void 0 ? void 0 : _d.message) ||
|
|
1852
|
+
'Göz kaydı güncellenemedi.';
|
|
1853
|
+
this.toasterService.error(detail);
|
|
1854
|
+
}
|
|
1855
|
+
});
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
StationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationComponent, deps: [{ token: i2.ToasterService }, { token: StationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1859
|
+
StationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: StationComponent, selector: "lib-station", ngImport: i0, template: "<abp-page [title]=\"'\u0130stasyonlar'\">\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxstationInstance [dataSource]=\"stationDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [remoteOperations]=\"false\" [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n\r\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\">\r\n <dxo-popup title=\"\u0130stasyon\" [showTitle]=\"true\" [width]=\"500\" [height]=\"320\"></dxo-popup>\r\n <dxo-form>\r\n <dxi-item dataField=\"Code\"></dxi-item>\r\n <dxi-item dataField=\"U_SWStationName\"></dxi-item>\r\n </dxo-form>\r\n </dxo-editing>\r\n\r\n <dxi-column dataField=\"Code\" caption=\"Kodu (BeeCell \u0130stasyon ID)\">\r\n <dxi-validation-rule type=\"required\" message=\"\u0130stasyon kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"\u0130stasyon kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWStationName\" caption=\"Ad\u0131\"></dxi-column>\r\n\r\n <dxo-master-detail [enabled]=\"true\" template=\"detailTemplate\"></dxo-master-detail>\r\n <div *dxTemplate=\"let master of 'detailTemplate'\">\r\n <div style=\"padding: 10px 0; font-weight: 600;\">\r\n G\u00D6ZLER: {{ master.data.U_SWStationName }} ({{ master.data.Code }})\r\n </div>\r\n\r\n <dx-data-grid [dataSource]=\"master.data.SWSTATIONEYECollection\" keyExpr=\"U_SWEyeCode\"\r\n [showBorders]=\"true\" [columnAutoWidth]=\"true\"\r\n (onSaved)=\"onEyesChanged(master.data)\" (onRowRemoved)=\"onEyesChanged(master.data)\">\r\n\r\n <dxo-editing mode=\"row\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\"></dxo-editing>\r\n\r\n <dxi-column dataField=\"U_SWEyeCode\" caption=\"G\u00F6z Kodu (BeeCell shelf_id)\">\r\n <dxi-validation-rule type=\"required\" message=\"G\u00F6z kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"G\u00F6z kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWEyeName\" caption=\"G\u00F6z Ad\u0131\"></dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n", dependencies: [{ kind: "component", type: i7.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { kind: "directive", type: i8.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i6.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i7.DxoColumnChooserComponent, selector: "dxo-column-chooser", inputs: ["allowSearch", "emptyPanelText", "enabled", "height", "mode", "searchTimeout", "sortOrder", "title", "width"] }, { kind: "component", type: i7.DxoColumnFixingComponent, selector: "dxo-column-fixing", inputs: ["enabled", "texts"] }, { kind: "component", type: i7.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i7.DxoHeaderFilterComponent, selector: "dxo-header-filter", inputs: ["allowSearch", "dataSource", "groupInterval", "height", "searchMode", "width", "searchTimeout", "texts", "visible", "showRelevantValues"] }, { kind: "component", type: i7.DxiValidationRuleComponent, selector: "dxi-validation-rule", inputs: ["message", "trim", "type", "ignoreEmptyValue", "max", "min", "reevaluate", "validationCallback", "comparisonTarget", "comparisonType", "pattern"] }, { kind: "component", type: i7.DxoEditingComponent, selector: "dxo-editing", inputs: ["allowAdding", "allowDeleting", "allowUpdating", "changes", "confirmDelete", "editColumnName", "editRowKey", "form", "mode", "newRowPosition", "popup", "refreshMode", "selectTextOnEditStart", "startEditAction", "texts", "useIcons", "allowAddShape", "allowChangeConnection", "allowChangeConnectorPoints", "allowChangeConnectorText", "allowChangeShapeText", "allowDeleteConnector", "allowDeleteShape", "allowMoveShape", "allowResizeShape", "allowDependencyAdding", "allowDependencyDeleting", "allowResourceAdding", "allowResourceDeleting", "allowResourceUpdating", "allowTaskAdding", "allowTaskDeleting", "allowTaskResourceUpdating", "allowTaskUpdating", "enabled", "allowDragging", "allowResizing", "allowTimeZoneEditing"], outputs: ["changesChange", "editColumnNameChange", "editRowKeyChange"] }, { kind: "component", type: i7.DxoFormComponent, selector: "dxo-form", inputs: ["accessKey", "activeStateEnabled", "alignItemLabels", "alignItemLabelsInAllGroups", "colCount", "colCountByScreen", "customizeItem", "disabled", "elementAttr", "focusStateEnabled", "formData", "height", "hint", "hoverStateEnabled", "items", "labelLocation", "labelMode", "minColWidth", "onContentReady", "onDisposing", "onEditorEnterKey", "onFieldDataChanged", "onInitialized", "onOptionChanged", "optionalMark", "readOnly", "requiredMark", "requiredMessage", "rtlEnabled", "screenByWidth", "scrollingEnabled", "showColonAfterLabel", "showOptionalMark", "showRequiredMark", "showValidationSummary", "tabIndex", "validationGroup", "visible", "width"], outputs: ["formDataChange"] }, { kind: "component", type: i7.DxoPopupComponent, selector: "dxo-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["heightChange", "positionChange", "visibleChange", "widthChange"] }, { kind: "component", type: i7.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "svgToCanvas", "allowExportSelectedData", "texts"] }, { kind: "component", type: i7.DxoFilterBuilderComponent, selector: "dxo-filter-builder", inputs: ["accessKey", "activeStateEnabled", "allowHierarchicalFields", "customOperations", "disabled", "elementAttr", "fields", "filterOperationDescriptions", "focusStateEnabled", "groupOperationDescriptions", "groupOperations", "height", "hint", "hoverStateEnabled", "maxGroupLevel", "onContentReady", "onDisposing", "onEditorPrepared", "onEditorPreparing", "onInitialized", "onOptionChanged", "onValueChanged", "rtlEnabled", "tabIndex", "value", "visible", "width"], outputs: ["valueChange"] }, { kind: "component", type: i7.DxoFilterPanelComponent, selector: "dxo-filter-panel", inputs: ["customizeText", "filterEnabled", "texts", "visible"], outputs: ["filterEnabledChange"] }, { kind: "component", type: i7.DxoFilterRowComponent, selector: "dxo-filter-row", inputs: ["applyFilter", "applyFilterText", "betweenEndText", "betweenStartText", "operationDescriptions", "resetOperationText", "showAllText", "showOperationChooser", "visible"] }, { kind: "component", type: i7.DxoGroupingComponent, selector: "dxo-grouping", inputs: ["allowCollapsing", "autoExpandAll", "contextMenuEnabled", "expandMode", "texts"] }, { kind: "component", type: i7.DxoGroupPanelComponent, selector: "dxo-group-panel", inputs: ["allowColumnDragging", "emptyPanelText", "visible"], outputs: ["visibleChange"] }, { kind: "component", type: i7.DxoMasterDetailComponent, selector: "dxo-master-detail", inputs: ["autoExpandAll", "enabled", "template"] }, { kind: "component", type: i7.DxoPagerComponent, selector: "dxo-pager", inputs: ["allowedPageSizes", "displayMode", "infoText", "label", "showInfo", "showNavigationButtons", "showPageSizeSelector", "visible"] }, { kind: "component", type: i7.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i7.DxoScrollingComponent, selector: "dxo-scrolling", inputs: ["columnRenderingMode", "mode", "preloadEnabled", "renderAsync", "rowRenderingMode", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative"] }, { kind: "component", type: i7.DxoSortingComponent, selector: "dxo-sorting", inputs: ["ascendingText", "clearText", "descendingText", "mode", "showSortIndexes"] }] });
|
|
1860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationComponent, decorators: [{
|
|
1861
|
+
type: Component,
|
|
1862
|
+
args: [{ selector: 'lib-station', template: "<abp-page [title]=\"'\u0130stasyonlar'\">\r\n\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <dx-data-grid #dxstationInstance [dataSource]=\"stationDataSource\" [showRowLines]=\"true\" [showBorders]=\"true\"\r\n [remoteOperations]=\"false\" [hoverStateEnabled]=\"true\" [repaintChangesOnly]=\"true\"\r\n [allowColumnResizing]=\"true\" columnResizingMode=\"widget\" [allowColumnReordering]=\"true\"\r\n [columnAutoWidth]=\"true\" [columnHidingEnabled]=\"true\" style=\"height: 75vh;\">\r\n <dxo-pager [visible]=\"true\" [showInfo]=\"true\" [allowedPageSizes]=\"[50,100,200]\"\r\n [showNavigationButtons]=\"true\" [showPageSizeSelector]=\"true\">\r\n </dxo-pager>\r\n <dxo-paging [pageSize]=\"50\"></dxo-paging>\r\n <dxo-column-chooser [allowSearch]=\"true\" [enabled]=\"true\" mode=\"select\"></dxo-column-chooser>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-group-panel [visible]=\"true\" [allowColumnDragging]=\"true\"></dxo-group-panel>\r\n <dxo-grouping #expand [autoExpandAll]=\"false\" [allowCollapsing]=\"true\"\r\n [contextMenuEnabled]=\"true\"></dxo-grouping>\r\n <dxo-header-filter [allowSearch]=\"true\" [visible]=\"true\"></dxo-header-filter>\r\n <dxo-filter-row [visible]=\"true\"></dxo-filter-row>\r\n <dxo-export [enabled]=\"true\" [allowExportSelectedData]=\"false\"></dxo-export>\r\n <dxo-column-fixing [enabled]=\"true\"></dxo-column-fixing>\r\n <dxo-filter-builder [allowHierarchicalFields]=\"true\"></dxo-filter-builder>\r\n <dxo-filter-panel [visible]=\"true\"></dxo-filter-panel>\r\n <dxo-sorting mode=\"single\"></dxo-sorting>\r\n <dxo-scrolling mode=\"horizontal\" showScrollbar=\"always\"></dxo-scrolling>\r\n\r\n <dxo-editing mode=\"popup\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\">\r\n <dxo-popup title=\"\u0130stasyon\" [showTitle]=\"true\" [width]=\"500\" [height]=\"320\"></dxo-popup>\r\n <dxo-form>\r\n <dxi-item dataField=\"Code\"></dxi-item>\r\n <dxi-item dataField=\"U_SWStationName\"></dxi-item>\r\n </dxo-form>\r\n </dxo-editing>\r\n\r\n <dxi-column dataField=\"Code\" caption=\"Kodu (BeeCell \u0130stasyon ID)\">\r\n <dxi-validation-rule type=\"required\" message=\"\u0130stasyon kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"\u0130stasyon kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWStationName\" caption=\"Ad\u0131\"></dxi-column>\r\n\r\n <dxo-master-detail [enabled]=\"true\" template=\"detailTemplate\"></dxo-master-detail>\r\n <div *dxTemplate=\"let master of 'detailTemplate'\">\r\n <div style=\"padding: 10px 0; font-weight: 600;\">\r\n G\u00D6ZLER: {{ master.data.U_SWStationName }} ({{ master.data.Code }})\r\n </div>\r\n\r\n <dx-data-grid [dataSource]=\"master.data.SWSTATIONEYECollection\" keyExpr=\"U_SWEyeCode\"\r\n [showBorders]=\"true\" [columnAutoWidth]=\"true\"\r\n (onSaved)=\"onEyesChanged(master.data)\" (onRowRemoved)=\"onEyesChanged(master.data)\">\r\n\r\n <dxo-editing mode=\"row\" [allowAdding]=\"true\" [allowUpdating]=\"true\" [allowDeleting]=\"true\"\r\n [useIcons]=\"true\"></dxo-editing>\r\n\r\n <dxi-column dataField=\"U_SWEyeCode\" caption=\"G\u00F6z Kodu (BeeCell shelf_id)\">\r\n <dxi-validation-rule type=\"required\" message=\"G\u00F6z kodu zorunludur\"></dxi-validation-rule>\r\n <dxi-validation-rule type=\"pattern\" pattern=\"^[0-9]+$\"\r\n message=\"G\u00F6z kodu say\u0131sal olmal\u0131d\u0131r (BeeCell ID)\"></dxi-validation-rule>\r\n </dxi-column>\r\n <dxi-column dataField=\"U_SWEyeName\" caption=\"G\u00F6z Ad\u0131\"></dxi-column>\r\n </dx-data-grid>\r\n </div>\r\n\r\n </dx-data-grid>\r\n </div>\r\n </div>\r\n\r\n</abp-page>\r\n" }]
|
|
1863
|
+
}], ctorParameters: function () { return [{ type: i2.ToasterService }, { type: StationService }]; } });
|
|
1864
|
+
|
|
1865
|
+
const routes$3 = [
|
|
1866
|
+
{ path: '', component: StationComponent },
|
|
1867
|
+
];
|
|
1868
|
+
class StationModule {
|
|
1869
|
+
}
|
|
1870
|
+
StationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1871
|
+
StationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StationModule, declarations: [StationComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1872
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1873
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule, i1$1.RouterModule] });
|
|
1874
|
+
StationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1875
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1876
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1877
|
+
RouterModule.forChild(routes$3)] });
|
|
1878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StationModule, decorators: [{
|
|
1879
|
+
type: NgModule,
|
|
1880
|
+
args: [{
|
|
1881
|
+
declarations: [StationComponent],
|
|
1882
|
+
imports: [
|
|
1883
|
+
CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
1884
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
1885
|
+
NgbDropdownModule, DxSelectBoxModule, PageModule, DxDataGridModule,
|
|
1886
|
+
RouterModule.forChild(routes$3),
|
|
1887
|
+
],
|
|
1888
|
+
}]
|
|
1889
|
+
}] });
|
|
1890
|
+
function loadStationModuleAsChild() {
|
|
1891
|
+
return Promise.resolve(StationModule);
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
class QuantityCorrectionService {
|
|
1895
|
+
constructor(restService) {
|
|
1896
|
+
this.restService = restService;
|
|
1897
|
+
this.apiName = 'SmartWarehouse';
|
|
1898
|
+
/**
|
|
1899
|
+
* Fiziksel BeeCell kutu barkoduna göre açık görev taslağı satırlarını getirir
|
|
1900
|
+
*/
|
|
1901
|
+
this.getLinesByBoxBarcode = (boxBarcode) => this.restService.request({
|
|
1902
|
+
method: 'GET',
|
|
1903
|
+
url: `/api/smart-warehouse/sap-quantity-correction/get-lines-by-box/${boxBarcode}`,
|
|
1904
|
+
}, { apiName: this.apiName });
|
|
1905
|
+
/**
|
|
1906
|
+
* "Raf ve Sipariş" modu — önizleme (hiçbir şey yazmaz)
|
|
1907
|
+
*/
|
|
1908
|
+
this.previewQuantityCorrection = (dto) => this.restService.request({
|
|
1909
|
+
method: 'POST',
|
|
1910
|
+
url: '/api/smart-warehouse/sap-quantity-correction/preview',
|
|
1911
|
+
body: dto,
|
|
1912
|
+
}, { apiName: this.apiName });
|
|
1913
|
+
/**
|
|
1914
|
+
* "Raf ve Sipariş" modu — kesin algoritmayı uygular
|
|
1915
|
+
*/
|
|
1916
|
+
this.applyQuantityCorrection = (dto) => this.restService.request({
|
|
1917
|
+
method: 'POST',
|
|
1918
|
+
url: '/api/smart-warehouse/sap-quantity-correction/apply',
|
|
1919
|
+
body: dto,
|
|
1920
|
+
}, { apiName: this.apiName });
|
|
1921
|
+
/**
|
|
1922
|
+
* "Sadece Sipariş" modu — stok hareketi yapmadan miktar düzeltme işlemini gerçekleştirir
|
|
1923
|
+
*/
|
|
1924
|
+
this.updateQuantity = (dto) => this.restService.request({
|
|
1925
|
+
method: 'POST',
|
|
1926
|
+
url: '/api/smart-warehouse/sap-quantity-correction/update-quantity',
|
|
1927
|
+
body: dto,
|
|
1928
|
+
}, { apiName: this.apiName });
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
QuantityCorrectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1932
|
+
QuantityCorrectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, providedIn: 'root' });
|
|
1933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionService, decorators: [{
|
|
1934
|
+
type: Injectable,
|
|
1935
|
+
args: [{ providedIn: 'root' }]
|
|
1936
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1937
|
+
|
|
1938
|
+
class QuantityCorrectionComponent {
|
|
1939
|
+
constructor(quantityCorrectionService, confirmationService, toasterService) {
|
|
1940
|
+
this.quantityCorrectionService = quantityCorrectionService;
|
|
1941
|
+
this.confirmationService = confirmationService;
|
|
1942
|
+
this.toasterService = toasterService;
|
|
1943
|
+
this.boxBarcode = '';
|
|
1944
|
+
this.lines = [];
|
|
1945
|
+
this.selectedLine = null;
|
|
1946
|
+
this.lastSearchedBoxBarcode = '';
|
|
1947
|
+
this.hasSearched = false;
|
|
1948
|
+
this.suppressNextBlurSearch = false;
|
|
1949
|
+
this.updateType = 'shelfAndOrder'; // default: Raf ve Sipariş
|
|
1950
|
+
this.newQuantity = null;
|
|
1951
|
+
this.isLoading = false;
|
|
1952
|
+
this.isSaving = false;
|
|
1953
|
+
}
|
|
1954
|
+
onBoxBarcodeChange(value) {
|
|
1955
|
+
this.boxBarcode = value;
|
|
1956
|
+
if (value.trim() === '') {
|
|
1957
|
+
this.resetLineState();
|
|
1958
|
+
this.hasSearched = false;
|
|
1959
|
+
this.lastSearchedBoxBarcode = '';
|
|
1960
|
+
return;
|
|
1961
|
+
}
|
|
1962
|
+
if (this.lastSearchedBoxBarcode && value.trim() !== this.lastSearchedBoxBarcode) {
|
|
1963
|
+
this.resetLineState();
|
|
1964
|
+
this.hasSearched = false;
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
onBoxBarcodeEnterKeydown() {
|
|
1968
|
+
this.suppressNextBlurSearch = true;
|
|
1969
|
+
this.onBoxBarcodeEnter();
|
|
1970
|
+
}
|
|
1971
|
+
onBoxBarcodeBlur() {
|
|
1972
|
+
if (this.suppressNextBlurSearch) {
|
|
1973
|
+
this.suppressNextBlurSearch = false;
|
|
1974
|
+
return;
|
|
1975
|
+
}
|
|
1976
|
+
this.onBoxBarcodeEnter();
|
|
1977
|
+
}
|
|
1978
|
+
/**
|
|
1979
|
+
* Kasa barkodu girilip Enter veya blur yapıldığında çalışır.
|
|
1980
|
+
* Barkoda göre açık görev taslağı satırlarını yükler.
|
|
1981
|
+
*/
|
|
1982
|
+
onBoxBarcodeEnter() {
|
|
1983
|
+
if (this.isLoading) {
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
const trimmedBarcode = this.boxBarcode.trim();
|
|
1987
|
+
this.resetLineState();
|
|
1988
|
+
if (!trimmedBarcode) {
|
|
1989
|
+
this.hasSearched = false;
|
|
1990
|
+
this.lastSearchedBoxBarcode = '';
|
|
1991
|
+
return;
|
|
1992
|
+
}
|
|
1993
|
+
this.hasSearched = true;
|
|
1994
|
+
this.lastSearchedBoxBarcode = trimmedBarcode;
|
|
1995
|
+
this.isLoading = true;
|
|
1996
|
+
this.quantityCorrectionService.getLinesByBoxBarcode(trimmedBarcode).subscribe({
|
|
1997
|
+
next: (data) => {
|
|
1998
|
+
this.lines = data || [];
|
|
1999
|
+
this.isLoading = false;
|
|
2000
|
+
if (this.lines.length === 0) {
|
|
2001
|
+
this.toasterService.warn('Bu kasada açık görev bulunamadı.');
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
error: (error) => {
|
|
2005
|
+
var _a, _b;
|
|
2006
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Kasa içeriği yüklenirken bir hata oluştu.';
|
|
2007
|
+
this.toasterService.error(errorMessage);
|
|
2008
|
+
this.isLoading = false;
|
|
2009
|
+
},
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* Grid'den satır seçildiğinde çalışır.
|
|
2014
|
+
*/
|
|
2015
|
+
onSelectLine(line) {
|
|
2016
|
+
this.selectedLine = line;
|
|
2017
|
+
this.newQuantity = line.CurrentQuantity;
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Güncelle butonuna basıldığında seçili moda göre miktar düzeltme akışını başlatır.
|
|
2021
|
+
*/
|
|
2022
|
+
onUpdate() {
|
|
2023
|
+
if (!this.selectedLine) {
|
|
2024
|
+
this.toasterService.warn('Lütfen bir satır seçiniz.');
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
if (this.newQuantity === null || this.newQuantity < 0) {
|
|
2028
|
+
this.toasterService.warn('Geçerli bir miktar giriniz.');
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2031
|
+
if (this.updateType === 'orderOnly') {
|
|
2032
|
+
this.updateOrderOnly();
|
|
2033
|
+
}
|
|
2034
|
+
else {
|
|
2035
|
+
this.previewAndApplyShelfAndOrder();
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
/**
|
|
2039
|
+
* "Sadece Sipariş": stok hareketi yok, sipariş iptali/miktar değişikliği senaryosu.
|
|
2040
|
+
*/
|
|
2041
|
+
updateOrderOnly() {
|
|
2042
|
+
const line = this.selectedLine;
|
|
2043
|
+
if (this.newQuantity === line.CurrentQuantity) {
|
|
2044
|
+
this.toasterService.warn('Yeni miktar mevcut miktar ile aynı.');
|
|
2045
|
+
return;
|
|
2046
|
+
}
|
|
2047
|
+
const dto = {
|
|
2048
|
+
ItrDocEntry: line.ItrDocEntry,
|
|
2049
|
+
ItrLineNum: line.ItrLineNum,
|
|
2050
|
+
ReservationCode: line.ReservationCode,
|
|
2051
|
+
OrderDocEntry: line.OrderDocEntry,
|
|
2052
|
+
LineNum: 0,
|
|
2053
|
+
ItemCode: line.ItemCode,
|
|
2054
|
+
NewQuantity: this.newQuantity,
|
|
2055
|
+
UpdateType: this.updateType,
|
|
2056
|
+
BinAbs: line.BinAbs,
|
|
2057
|
+
BinCode: line.BinCode,
|
|
2058
|
+
BatchNumber: line.BatchNumber,
|
|
2059
|
+
WarehouseCode: line.WarehouseCode,
|
|
2060
|
+
};
|
|
2061
|
+
this.isSaving = true;
|
|
2062
|
+
this.quantityCorrectionService.updateQuantity(dto).subscribe({
|
|
2063
|
+
next: (result) => {
|
|
2064
|
+
this.toasterService.success(result);
|
|
2065
|
+
this.isSaving = false;
|
|
2066
|
+
this.onBoxBarcodeEnter();
|
|
2067
|
+
},
|
|
2068
|
+
error: (error) => {
|
|
2069
|
+
var _a, _b;
|
|
2070
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Miktar düzeltme sırasında bir hata oluştu.';
|
|
2071
|
+
this.toasterService.error(errorMessage);
|
|
2072
|
+
this.isSaving = false;
|
|
2073
|
+
},
|
|
2074
|
+
});
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* "Raf ve Sipariş": kasada fiilen sayılan miktar farklıysa Dummy Kasa / çapraz kasa kesin algoritması.
|
|
2078
|
+
* Önce önizleme yapılır; çapraz kasa önerisi varsa kullanıcıya onay penceresi gösterilir.
|
|
2079
|
+
*/
|
|
2080
|
+
previewAndApplyShelfAndOrder() {
|
|
2081
|
+
const line = this.selectedLine;
|
|
2082
|
+
const previewDto = {
|
|
2083
|
+
TaskDraftDocEntry: line.ItrDocEntry,
|
|
2084
|
+
TaskDraftLineNum: line.ItrLineNum,
|
|
2085
|
+
BinAbs: line.BinAbs,
|
|
2086
|
+
BinCode: line.BinCode,
|
|
2087
|
+
ItemCode: line.ItemCode,
|
|
2088
|
+
WarehouseCode: line.WarehouseCode,
|
|
2089
|
+
CountedQuantity: this.newQuantity,
|
|
2090
|
+
};
|
|
2091
|
+
this.isSaving = true;
|
|
2092
|
+
this.quantityCorrectionService.previewQuantityCorrection(previewDto).subscribe({
|
|
2093
|
+
next: (preview) => {
|
|
2094
|
+
if (preview.RequiresConfirmation) {
|
|
2095
|
+
this.isSaving = false;
|
|
2096
|
+
this.confirmationService.warn(preview.ConfirmationMessage, 'Çapraz Kasa').subscribe((status) => {
|
|
2097
|
+
const accepted = status === 'confirm';
|
|
2098
|
+
this.applyShelfAndOrder(line, accepted, preview.ReplacementBinCode, preview.ReplacementBinAbs);
|
|
2099
|
+
});
|
|
2100
|
+
return;
|
|
2101
|
+
}
|
|
2102
|
+
this.applyShelfAndOrder(line, false, '', 0);
|
|
2103
|
+
},
|
|
2104
|
+
error: (error) => {
|
|
2105
|
+
var _a, _b;
|
|
2106
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Kasa düzeltmesi önizlenirken bir hata oluştu.';
|
|
2107
|
+
this.toasterService.error(errorMessage);
|
|
2108
|
+
this.isSaving = false;
|
|
2109
|
+
},
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
applyShelfAndOrder(line, useReplacementBox, replacementBinCode, replacementBinAbs) {
|
|
2113
|
+
const applyDto = {
|
|
2114
|
+
TaskDraftDocEntry: line.ItrDocEntry,
|
|
2115
|
+
TaskDraftLineNum: line.ItrLineNum,
|
|
2116
|
+
BinAbs: line.BinAbs,
|
|
2117
|
+
BinCode: line.BinCode,
|
|
2118
|
+
OrderDocEntry: line.OrderDocEntry,
|
|
2119
|
+
OrderDocNum: line.OrderDocNum,
|
|
2120
|
+
ItemCode: line.ItemCode,
|
|
2121
|
+
ItemDescription: line.ItemName,
|
|
2122
|
+
WarehouseCode: line.WarehouseCode,
|
|
2123
|
+
CountedQuantity: this.newQuantity,
|
|
2124
|
+
UseReplacementBox: useReplacementBox,
|
|
2125
|
+
ReplacementBinCode: replacementBinCode,
|
|
2126
|
+
ReplacementBinAbs: replacementBinAbs,
|
|
2127
|
+
};
|
|
2128
|
+
this.isSaving = true;
|
|
2129
|
+
this.quantityCorrectionService.applyQuantityCorrection(applyDto).subscribe({
|
|
2130
|
+
next: (result) => {
|
|
2131
|
+
this.toasterService.success(result);
|
|
2132
|
+
this.isSaving = false;
|
|
2133
|
+
this.onBoxBarcodeEnter();
|
|
2134
|
+
},
|
|
2135
|
+
error: (error) => {
|
|
2136
|
+
var _a, _b;
|
|
2137
|
+
const errorMessage = ((_b = (_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) || 'Kasa düzeltmesi uygulanırken bir hata oluştu.';
|
|
2138
|
+
this.toasterService.error(errorMessage);
|
|
2139
|
+
this.isSaving = false;
|
|
2140
|
+
},
|
|
2141
|
+
});
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* Formu temizler.
|
|
2145
|
+
*/
|
|
2146
|
+
onClear() {
|
|
2147
|
+
this.boxBarcode = '';
|
|
2148
|
+
this.resetLineState();
|
|
2149
|
+
this.hasSearched = false;
|
|
2150
|
+
this.lastSearchedBoxBarcode = '';
|
|
2151
|
+
this.updateType = 'shelfAndOrder';
|
|
2152
|
+
}
|
|
2153
|
+
resetLineState() {
|
|
2154
|
+
this.lines = [];
|
|
2155
|
+
this.selectedLine = null;
|
|
2156
|
+
this.newQuantity = null;
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
QuantityCorrectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionComponent, deps: [{ token: QuantityCorrectionService }, { token: i2.ConfirmationService }, { token: i2.ToasterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2160
|
+
QuantityCorrectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QuantityCorrectionComponent, selector: "lib-quantity-correction", ngImport: i0, template: "<abp-page [title]=\"'Al\u0131nacak Miktar D\u00FCzeltme'\">\n <div class=\"quantity-correction-container\">\n <div class=\"quantity-correction-layout\">\n <div class=\"qc-form-card\">\n\n <!-- Kasa Barkodu Giri\u015Fi -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"boxBarcodeInput\">Kasa Kodu</label>\n <input type=\"text\" class=\"form-control form-input\" id=\"boxBarcodeInput\"\n [ngModel]=\"boxBarcode\"\n (ngModelChange)=\"onBoxBarcodeChange($event)\"\n (keydown.enter)=\"onBoxBarcodeEnterKeydown()\"\n (blur)=\"onBoxBarcodeBlur()\"\n placeholder=\"Kasa barkodunu girin veya taray\u0131n...\"\n [disabled]=\"isLoading\" />\n </div>\n\n <!-- Y\u00FCkleniyor -->\n <div class=\"form-section\" *ngIf=\"isLoading\">\n <div class=\"content-loading\">\n <i class=\"fa fa-spinner fa-spin\"></i> Kasa i\u00E7eri\u011Fi y\u00FCkleniyor...\n </div>\n </div>\n\n <!-- Sat\u0131r Listesi (Grid) -->\n <div class=\"form-section reservation-section\" *ngIf=\"lines.length > 0 && !isLoading\">\n <label class=\"section-label\">Kasadaki G\u00F6rev Sat\u0131rlar\u0131</label>\n <div class=\"reservation-table-wrap\">\n <table class=\"table table-bordered table-hover table-sm\">\n <thead class=\"table-header\">\n <tr>\n <th>Sipari\u015F No</th>\n <th>\u00DCr\u00FCn Kodu</th>\n <th>\u00DCr\u00FCn Ad\u0131</th>\n <th>Parti</th>\n <th>Miktar</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let l of lines\"\n (click)=\"onSelectLine(l)\"\n [class.selected-row]=\"selectedLine?.ReservationCode === l.ReservationCode\"\n class=\"clickable-row\">\n <td>{{ l.OrderDocNum }}</td>\n <td>{{ l.ItemCode }}</td>\n <td>{{ l.ItemName }}</td>\n <td>{{ l.BatchNumber }}</td>\n <td class=\"text-end\">{{ l.CurrentQuantity }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Bo\u015F sonu\u00E7 -->\n <div class=\"form-section\" *ngIf=\"hasSearched && lastSearchedBoxBarcode && lines.length === 0 && !isLoading\">\n <div class=\"content-empty\">\n <i class=\"fa fa-info-circle\"></i> Bu kasada a\u00E7\u0131k g\u00F6rev bulunamad\u0131.\n </div>\n </div>\n\n <!-- D\u00FCzenleme Paneli (Sat\u0131r se\u00E7ilince aktif) -->\n <div *ngIf=\"selectedLine\" class=\"edit-panel\">\n <hr class=\"form-divider\" />\n\n <!-- \u00DCr\u00FCn Bilgileri (readonly) -->\n <div class=\"form-section product-info\">\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Kodu:</span>\n <span class=\"info-value\">{{ selectedLine.ItemCode }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Ad\u0131:</span>\n <span class=\"info-value\">{{ selectedLine.ItemName }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Beklenen Miktar:</span>\n <span class=\"info-value info-qty\">{{ selectedLine.CurrentQuantity }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Sipari\u015F No:</span>\n <span class=\"info-value\">{{ selectedLine.OrderDocNum }}</span>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- G\u00FCncelleme Tipi - Radio Buttons -->\n <div class=\"form-section\">\n <label class=\"section-label\">G\u00FCncelleme Tipi</label>\n <div class=\"radio-group\">\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"shelfAndOrder\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Raf ve Sipari\u015F</span>\n </label>\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"orderOnly\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Sadece Sipari\u015F</span>\n </label>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Miktar -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"newQuantityInput\">\n {{ updateType === 'orderOnly' ? 'Yeni Sipari\u015F Miktar\u0131' : 'Kasada Say\u0131lan Miktar' }}\n </label>\n <input type=\"number\" class=\"form-control form-input\" id=\"newQuantityInput\"\n [(ngModel)]=\"newQuantity\"\n (keydown.enter)=\"onUpdate()\"\n placeholder=\"Miktar\u0131 girin...\"\n min=\"0\" />\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Butonlar -->\n <div class=\"form-section button-group\">\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onUpdate()\"\n [disabled]=\"isSaving || newQuantity === null || newQuantity < 0\">\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-check'\"></i>\n {{ isSaving ? 'G\u00FCncelleniyor...' : 'G\u00FCncelle' }}\n </button>\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\n <i class=\"fa fa-eraser\"></i> Temizle\n </button>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n</abp-page>\n", styles: ["lib-quantity-correction .abp-page-content{display:block!important;flex:unset!important;min-height:unset!important;height:auto!important}lib-quantity-correction .abp-page-content>.row{display:block!important;flex:unset!important;min-height:unset!important}lib-quantity-correction .abp-page-content>.row>.col,lib-quantity-correction .abp-page-content>.row>[class*=col-]{display:block!important;flex:unset!important;min-height:unset!important}.quantity-correction-container{padding:1rem}.quantity-correction-layout{max-width:800px;margin:0 auto}.qc-form-card{background:#fff;border-radius:8px;box-shadow:0 2px 8px #00000014;padding:1.5rem}.form-section{margin-bottom:1rem}.section-label{font-weight:600;font-size:.9rem;color:#333;margin-bottom:.4rem;display:block}.form-input{font-size:1rem;padding:.5rem .75rem}.content-loading{color:#666;padding:.5rem 0;font-size:.9rem}.content-empty{background:#f8f9fa;border:1px solid #e2e6ea;border-radius:6px;padding:.75rem 1rem;color:#6c757d;font-size:.9rem}.reservation-section{margin-bottom:.25rem}.reservation-table-wrap{overflow-x:auto;width:100%}.reservation-section .table{margin-bottom:0}.table-header{background-color:#f0f2f5}.table-header th{font-weight:600;font-size:.85rem;color:#444;white-space:nowrap}.clickable-row{cursor:pointer;transition:background-color .15s}.clickable-row:hover{background-color:#e9f5ff}.selected-row{background-color:#cce5ff!important;font-weight:500}.edit-panel{margin-top:0}.product-info{background:#f8f9fa;border-radius:6px;padding:.75rem 1rem}.info-row{display:flex;gap:.5rem;margin-bottom:.3rem;align-items:baseline}.info-label{font-weight:600;font-size:.85rem;color:#555;min-width:120px}.info-value{font-size:.9rem;color:#222}.info-qty{font-weight:700;color:#0d6efd}.radio-group{display:flex;gap:1.5rem}.radio-option{display:flex;align-items:center;gap:.4rem;cursor:pointer;font-size:.9rem}.radio-text{color:#333}.form-divider{border:none;border-top:1px solid #e9ecef;margin:.75rem 0}.button-group{display:flex;gap:.5rem}.btn-action-success{background-color:#28a745;border-color:#28a745;color:#fff;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-success:hover:not(:disabled){background-color:#218838}.btn-action-success:disabled{opacity:.6}.btn-action-outline{background-color:transparent;border:1px solid #6c757d;color:#6c757d;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-outline:hover:not(:disabled){background-color:#f8f9fa}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionComponent, decorators: [{
|
|
2162
|
+
type: Component,
|
|
2163
|
+
args: [{ selector: 'lib-quantity-correction', encapsulation: ViewEncapsulation.None, template: "<abp-page [title]=\"'Al\u0131nacak Miktar D\u00FCzeltme'\">\n <div class=\"quantity-correction-container\">\n <div class=\"quantity-correction-layout\">\n <div class=\"qc-form-card\">\n\n <!-- Kasa Barkodu Giri\u015Fi -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"boxBarcodeInput\">Kasa Kodu</label>\n <input type=\"text\" class=\"form-control form-input\" id=\"boxBarcodeInput\"\n [ngModel]=\"boxBarcode\"\n (ngModelChange)=\"onBoxBarcodeChange($event)\"\n (keydown.enter)=\"onBoxBarcodeEnterKeydown()\"\n (blur)=\"onBoxBarcodeBlur()\"\n placeholder=\"Kasa barkodunu girin veya taray\u0131n...\"\n [disabled]=\"isLoading\" />\n </div>\n\n <!-- Y\u00FCkleniyor -->\n <div class=\"form-section\" *ngIf=\"isLoading\">\n <div class=\"content-loading\">\n <i class=\"fa fa-spinner fa-spin\"></i> Kasa i\u00E7eri\u011Fi y\u00FCkleniyor...\n </div>\n </div>\n\n <!-- Sat\u0131r Listesi (Grid) -->\n <div class=\"form-section reservation-section\" *ngIf=\"lines.length > 0 && !isLoading\">\n <label class=\"section-label\">Kasadaki G\u00F6rev Sat\u0131rlar\u0131</label>\n <div class=\"reservation-table-wrap\">\n <table class=\"table table-bordered table-hover table-sm\">\n <thead class=\"table-header\">\n <tr>\n <th>Sipari\u015F No</th>\n <th>\u00DCr\u00FCn Kodu</th>\n <th>\u00DCr\u00FCn Ad\u0131</th>\n <th>Parti</th>\n <th>Miktar</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let l of lines\"\n (click)=\"onSelectLine(l)\"\n [class.selected-row]=\"selectedLine?.ReservationCode === l.ReservationCode\"\n class=\"clickable-row\">\n <td>{{ l.OrderDocNum }}</td>\n <td>{{ l.ItemCode }}</td>\n <td>{{ l.ItemName }}</td>\n <td>{{ l.BatchNumber }}</td>\n <td class=\"text-end\">{{ l.CurrentQuantity }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Bo\u015F sonu\u00E7 -->\n <div class=\"form-section\" *ngIf=\"hasSearched && lastSearchedBoxBarcode && lines.length === 0 && !isLoading\">\n <div class=\"content-empty\">\n <i class=\"fa fa-info-circle\"></i> Bu kasada a\u00E7\u0131k g\u00F6rev bulunamad\u0131.\n </div>\n </div>\n\n <!-- D\u00FCzenleme Paneli (Sat\u0131r se\u00E7ilince aktif) -->\n <div *ngIf=\"selectedLine\" class=\"edit-panel\">\n <hr class=\"form-divider\" />\n\n <!-- \u00DCr\u00FCn Bilgileri (readonly) -->\n <div class=\"form-section product-info\">\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Kodu:</span>\n <span class=\"info-value\">{{ selectedLine.ItemCode }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">\u00DCr\u00FCn Ad\u0131:</span>\n <span class=\"info-value\">{{ selectedLine.ItemName }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Beklenen Miktar:</span>\n <span class=\"info-value info-qty\">{{ selectedLine.CurrentQuantity }}</span>\n </div>\n <div class=\"info-row\">\n <span class=\"info-label\">Sipari\u015F No:</span>\n <span class=\"info-value\">{{ selectedLine.OrderDocNum }}</span>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- G\u00FCncelleme Tipi - Radio Buttons -->\n <div class=\"form-section\">\n <label class=\"section-label\">G\u00FCncelleme Tipi</label>\n <div class=\"radio-group\">\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"shelfAndOrder\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Raf ve Sipari\u015F</span>\n </label>\n <label class=\"radio-option\">\n <input type=\"radio\" name=\"updateType\"\n value=\"orderOnly\"\n [(ngModel)]=\"updateType\" />\n <span class=\"radio-text\">Sadece Sipari\u015F</span>\n </label>\n </div>\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Miktar -->\n <div class=\"form-section\">\n <label class=\"section-label\" for=\"newQuantityInput\">\n {{ updateType === 'orderOnly' ? 'Yeni Sipari\u015F Miktar\u0131' : 'Kasada Say\u0131lan Miktar' }}\n </label>\n <input type=\"number\" class=\"form-control form-input\" id=\"newQuantityInput\"\n [(ngModel)]=\"newQuantity\"\n (keydown.enter)=\"onUpdate()\"\n placeholder=\"Miktar\u0131 girin...\"\n min=\"0\" />\n </div>\n\n <hr class=\"form-divider\" />\n\n <!-- Butonlar -->\n <div class=\"form-section button-group\">\n <button class=\"btn btn-action-success btn-sm\" (click)=\"onUpdate()\"\n [disabled]=\"isSaving || newQuantity === null || newQuantity < 0\">\n <i class=\"fa\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-check'\"></i>\n {{ isSaving ? 'G\u00FCncelleniyor...' : 'G\u00FCncelle' }}\n </button>\n <button class=\"btn btn-action-outline btn-sm\" (click)=\"onClear()\" [disabled]=\"isSaving\">\n <i class=\"fa fa-eraser\"></i> Temizle\n </button>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n</abp-page>\n", styles: ["lib-quantity-correction .abp-page-content{display:block!important;flex:unset!important;min-height:unset!important;height:auto!important}lib-quantity-correction .abp-page-content>.row{display:block!important;flex:unset!important;min-height:unset!important}lib-quantity-correction .abp-page-content>.row>.col,lib-quantity-correction .abp-page-content>.row>[class*=col-]{display:block!important;flex:unset!important;min-height:unset!important}.quantity-correction-container{padding:1rem}.quantity-correction-layout{max-width:800px;margin:0 auto}.qc-form-card{background:#fff;border-radius:8px;box-shadow:0 2px 8px #00000014;padding:1.5rem}.form-section{margin-bottom:1rem}.section-label{font-weight:600;font-size:.9rem;color:#333;margin-bottom:.4rem;display:block}.form-input{font-size:1rem;padding:.5rem .75rem}.content-loading{color:#666;padding:.5rem 0;font-size:.9rem}.content-empty{background:#f8f9fa;border:1px solid #e2e6ea;border-radius:6px;padding:.75rem 1rem;color:#6c757d;font-size:.9rem}.reservation-section{margin-bottom:.25rem}.reservation-table-wrap{overflow-x:auto;width:100%}.reservation-section .table{margin-bottom:0}.table-header{background-color:#f0f2f5}.table-header th{font-weight:600;font-size:.85rem;color:#444;white-space:nowrap}.clickable-row{cursor:pointer;transition:background-color .15s}.clickable-row:hover{background-color:#e9f5ff}.selected-row{background-color:#cce5ff!important;font-weight:500}.edit-panel{margin-top:0}.product-info{background:#f8f9fa;border-radius:6px;padding:.75rem 1rem}.info-row{display:flex;gap:.5rem;margin-bottom:.3rem;align-items:baseline}.info-label{font-weight:600;font-size:.85rem;color:#555;min-width:120px}.info-value{font-size:.9rem;color:#222}.info-qty{font-weight:700;color:#0d6efd}.radio-group{display:flex;gap:1.5rem}.radio-option{display:flex;align-items:center;gap:.4rem;cursor:pointer;font-size:.9rem}.radio-text{color:#333}.form-divider{border:none;border-top:1px solid #e9ecef;margin:.75rem 0}.button-group{display:flex;gap:.5rem}.btn-action-success{background-color:#28a745;border-color:#28a745;color:#fff;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-success:hover:not(:disabled){background-color:#218838}.btn-action-success:disabled{opacity:.6}.btn-action-outline{background-color:transparent;border:1px solid #6c757d;color:#6c757d;padding:.4rem 1.2rem;font-size:.9rem}.btn-action-outline:hover:not(:disabled){background-color:#f8f9fa}\n"] }]
|
|
2164
|
+
}], ctorParameters: function () { return [{ type: QuantityCorrectionService }, { type: i2.ConfirmationService }, { type: i2.ToasterService }]; } });
|
|
2165
|
+
|
|
2166
|
+
const routes$2 = [
|
|
2167
|
+
{ path: '', component: QuantityCorrectionComponent },
|
|
2168
|
+
];
|
|
2169
|
+
class QuantityCorrectionModule {
|
|
2170
|
+
}
|
|
2171
|
+
QuantityCorrectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2172
|
+
QuantityCorrectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, declarations: [QuantityCorrectionComponent], imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
2173
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
2174
|
+
NgbDropdownModule, PageModule, i1$1.RouterModule] });
|
|
2175
|
+
QuantityCorrectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, imports: [CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
2176
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
2177
|
+
NgbDropdownModule, PageModule,
|
|
2178
|
+
RouterModule.forChild(routes$2)] });
|
|
2179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QuantityCorrectionModule, decorators: [{
|
|
2180
|
+
type: NgModule,
|
|
2181
|
+
args: [{
|
|
2182
|
+
declarations: [QuantityCorrectionComponent],
|
|
2183
|
+
imports: [
|
|
2184
|
+
CoreModule, ThemeSharedModule, FormsModule, CommercialUiModule,
|
|
2185
|
+
NgxValidateCoreModule, NgbCollapseModule, NgbDatepickerModule,
|
|
2186
|
+
NgbDropdownModule, PageModule,
|
|
2187
|
+
RouterModule.forChild(routes$2),
|
|
2188
|
+
],
|
|
2189
|
+
}]
|
|
2190
|
+
}] });
|
|
2191
|
+
function loadQuantityCorrectionModuleAsChild() {
|
|
2192
|
+
return Promise.resolve(QuantityCorrectionModule);
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
class ConnectorParamsService {
|
|
2196
|
+
constructor(restService) {
|
|
2197
|
+
this.restService = restService;
|
|
2198
|
+
this.apiName = 'SmartWarehouse';
|
|
2199
|
+
/** Mevcut tek kaydı döner; kayıt yoksa null döner */
|
|
2200
|
+
this.getConnectorParams = () => this.restService.request({
|
|
2201
|
+
method: 'GET',
|
|
2202
|
+
url: '/api/smart-warehouse/connector-params/get',
|
|
2203
|
+
}, { apiName: this.apiName });
|
|
2204
|
+
/** Kayıt varsa günceller, yoksa oluşturur (upsert) */
|
|
2205
|
+
this.saveConnectorParams = (dto) => this.restService.request({
|
|
2206
|
+
method: 'POST',
|
|
2207
|
+
url: '/api/smart-warehouse/connector-params/save',
|
|
2208
|
+
body: dto,
|
|
2209
|
+
}, { apiName: this.apiName });
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
ConnectorParamsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2213
|
+
ConnectorParamsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, providedIn: 'root' });
|
|
2214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsService, decorators: [{
|
|
2215
|
+
type: Injectable,
|
|
2216
|
+
args: [{ providedIn: 'root' }]
|
|
2217
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
2218
|
+
|
|
2219
|
+
const SESSION_KEY = 'sw_params_configured';
|
|
2220
|
+
class ConnectorParamsGuard {
|
|
2221
|
+
constructor(connectorParamsService, router) {
|
|
2222
|
+
this.connectorParamsService = connectorParamsService;
|
|
2223
|
+
this.router = router;
|
|
2224
|
+
/**
|
|
2225
|
+
* true → parametreler doğrulandı, API çağrısı yapmadan geç.
|
|
2226
|
+
* null → henüz bilinmiyor, API'ye sor.
|
|
2227
|
+
* SessionStorage'a da yazılır: sayfa yenileme (token refresh sonrası reload)
|
|
2228
|
+
* durumunda geçici SAP/auth hatasını "parametre yok" olarak yorumlamaz.
|
|
2229
|
+
*/
|
|
2230
|
+
this.configured = null;
|
|
2231
|
+
// Önceki oturumda doğrulanmışsa tekrar API çağrısı yapma.
|
|
2232
|
+
if (sessionStorage.getItem(SESSION_KEY) === 'true') {
|
|
2233
|
+
this.configured = true;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
canActivate() {
|
|
2237
|
+
if (this.configured === true) {
|
|
2238
|
+
return of(true);
|
|
2239
|
+
}
|
|
2240
|
+
return this.connectorParamsService.getConnectorParams().pipe(map(data => {
|
|
2241
|
+
if (data) {
|
|
2242
|
+
this.configured = true;
|
|
2243
|
+
sessionStorage.setItem(SESSION_KEY, 'true');
|
|
2244
|
+
return true;
|
|
2245
|
+
}
|
|
2246
|
+
// Backend 200 döndü ama kayıt yok — gerçekten yapılandırılmamış.
|
|
2247
|
+
return this.router.createUrlTree(['/smart-warehouse/connector-params'], { queryParams: { reason: 'no-config' } });
|
|
2248
|
+
}), catchError((err) => {
|
|
2249
|
+
// 401 (token yenileme), 5xx (SAP session süresi dolmuş, sunucu hatası) gibi
|
|
2250
|
+
// GEÇİCİ hatalar "parametre yok" anlamına gelmiyor; yönlendirme yapma.
|
|
2251
|
+
if ((err === null || err === void 0 ? void 0 : err.status) === 401 || (err === null || err === void 0 ? void 0 : err.status) >= 500) {
|
|
2252
|
+
return of(true);
|
|
2253
|
+
}
|
|
2254
|
+
// 404 veya diğer istemci hataları → parametre gerçekten tanımlı değil.
|
|
2255
|
+
return of(this.router.createUrlTree(['/smart-warehouse/connector-params'], { queryParams: { reason: 'no-config' } }));
|
|
2256
|
+
}));
|
|
2257
|
+
}
|
|
2258
|
+
/** Kayıt silindiğinde / değiştirildiğinde cache'i temizle */
|
|
2259
|
+
invalidate() {
|
|
2260
|
+
this.configured = null;
|
|
2261
|
+
sessionStorage.removeItem(SESSION_KEY);
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
ConnectorParamsGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, deps: [{ token: ConnectorParamsService }, { token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2265
|
+
ConnectorParamsGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, providedIn: 'root' });
|
|
2266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsGuard, decorators: [{
|
|
2267
|
+
type: Injectable,
|
|
2268
|
+
args: [{ providedIn: 'root' }]
|
|
2269
|
+
}], ctorParameters: function () { return [{ type: ConnectorParamsService }, { type: i1$1.Router }]; } });
|
|
2270
|
+
|
|
2271
|
+
class ConnectorParamsComponent {
|
|
2272
|
+
constructor(connectorParamsService, toasterService, guard, router, route, warehouseService) {
|
|
2273
|
+
this.connectorParamsService = connectorParamsService;
|
|
2274
|
+
this.toasterService = toasterService;
|
|
2275
|
+
this.guard = guard;
|
|
2276
|
+
this.router = router;
|
|
2277
|
+
this.route = route;
|
|
2278
|
+
this.warehouseService = warehouseService;
|
|
2279
|
+
this.erpOptions = [
|
|
2280
|
+
{ value: 'MIKRO', label: 'Mikro ERP' },
|
|
2281
|
+
];
|
|
2282
|
+
this.warehouses = [];
|
|
2283
|
+
this.binLocations = [];
|
|
2284
|
+
this.isLoadingBinLocations = false;
|
|
2285
|
+
this.form = {
|
|
2286
|
+
erpType: 'MIKRO',
|
|
2287
|
+
baseUrl: '',
|
|
2288
|
+
apiKey: '',
|
|
2289
|
+
username: '',
|
|
2290
|
+
password: '',
|
|
2291
|
+
isActive: true,
|
|
2292
|
+
fromWarehouseCode: '',
|
|
2293
|
+
targetWarehouseCode: '',
|
|
2294
|
+
dummyBoxCode: '',
|
|
2295
|
+
beeCellUsername: '',
|
|
2296
|
+
beeCellPassword: '',
|
|
2297
|
+
};
|
|
2298
|
+
this.passwordSet = false;
|
|
2299
|
+
this.beeCellPasswordSet = false;
|
|
2300
|
+
this.isLoading = false;
|
|
2301
|
+
this.isSaving = false;
|
|
2302
|
+
}
|
|
2303
|
+
ngOnInit() {
|
|
2304
|
+
const reason = this.route.snapshot.queryParamMap.get('reason');
|
|
2305
|
+
if (reason === 'no-config') {
|
|
2306
|
+
this.toasterService.warn('Connector parametreleri yapılandırılmamış.');
|
|
2307
|
+
}
|
|
2308
|
+
this.loadData();
|
|
2309
|
+
}
|
|
2310
|
+
// İki API'yi birlikte bekle: depo listesi hazır olmadan form render edilmez,
|
|
2311
|
+
// böylece ngModel option geçişi (race condition) yaşanmaz.
|
|
2312
|
+
loadData() {
|
|
2313
|
+
this.isLoading = true;
|
|
2314
|
+
forkJoin({
|
|
2315
|
+
params: this.connectorParamsService.getConnectorParams(),
|
|
2316
|
+
warehouses: this.warehouseService.getSmartWarehouses().pipe(catchError(() => of([]))),
|
|
2317
|
+
}).subscribe({
|
|
2318
|
+
next: ({ params, warehouses }) => {
|
|
2319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2320
|
+
this.warehouses = warehouses;
|
|
2321
|
+
if (params) {
|
|
2322
|
+
this.form.erpType = (_a = params.erpType) !== null && _a !== void 0 ? _a : 'MIKRO';
|
|
2323
|
+
this.form.baseUrl = (_b = params.baseUrl) !== null && _b !== void 0 ? _b : '';
|
|
2324
|
+
this.form.apiKey = (_c = params.apiKey) !== null && _c !== void 0 ? _c : '';
|
|
2325
|
+
this.form.username = (_d = params.username) !== null && _d !== void 0 ? _d : '';
|
|
2326
|
+
this.form.isActive = params.isActive;
|
|
2327
|
+
this.form.password = '';
|
|
2328
|
+
this.form.fromWarehouseCode = (_e = params.fromWarehouseCode) !== null && _e !== void 0 ? _e : '';
|
|
2329
|
+
this.form.targetWarehouseCode = (_f = params.targetWarehouseCode) !== null && _f !== void 0 ? _f : '';
|
|
2330
|
+
this.form.dummyBoxCode = (_g = params.dummyBoxCode) !== null && _g !== void 0 ? _g : '';
|
|
2331
|
+
this.form.beeCellUsername = (_h = params.beeCellUsername) !== null && _h !== void 0 ? _h : '';
|
|
2332
|
+
this.form.beeCellPassword = '';
|
|
2333
|
+
this.passwordSet = params.passwordSet;
|
|
2334
|
+
this.beeCellPasswordSet = (_j = params.beeCellPasswordSet) !== null && _j !== void 0 ? _j : false;
|
|
2335
|
+
}
|
|
2336
|
+
this.isLoading = false;
|
|
2337
|
+
// Kayıtlı kaynak depo varsa, Dummy Kasa combobox'ının o depoya ait depo yerleriyle dolması için yükle.
|
|
2338
|
+
if (this.form.fromWarehouseCode) {
|
|
2339
|
+
this.loadBinLocations(this.form.fromWarehouseCode);
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
error: err => {
|
|
2343
|
+
var _a, _b, _c;
|
|
2344
|
+
this.toasterService.error((_c = (_b = (_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : 'Parametreler yüklenirken bir hata oluştu.');
|
|
2345
|
+
this.isLoading = false;
|
|
2346
|
+
},
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
get isCurrentFromWhsInList() {
|
|
2350
|
+
return this.warehouses.some(w => w.WhsCode === this.form.fromWarehouseCode);
|
|
2351
|
+
}
|
|
2352
|
+
get isCurrentWhsInList() {
|
|
2353
|
+
return this.warehouses.some(w => w.WhsCode === this.form.targetWarehouseCode);
|
|
2354
|
+
}
|
|
2355
|
+
get isCurrentDummyBoxInList() {
|
|
2356
|
+
return this.binLocations.some(b => b.BinCode === this.form.dummyBoxCode);
|
|
2357
|
+
}
|
|
2358
|
+
/**
|
|
2359
|
+
* Kaynak Depo seçimi değiştiğinde çalışır: Dummy Kasa combobox'ını seçilen deponun
|
|
2360
|
+
* depo yerleriyle doldurur. Depo değiştiği için önceki depoya ait seçim artık geçerli değil.
|
|
2361
|
+
*/
|
|
2362
|
+
onFromWarehouseChange(whsCode) {
|
|
2363
|
+
this.form.fromWarehouseCode = whsCode;
|
|
2364
|
+
this.form.dummyBoxCode = '';
|
|
2365
|
+
this.loadBinLocations(whsCode);
|
|
2366
|
+
}
|
|
2367
|
+
loadBinLocations(whsCode) {
|
|
2368
|
+
if (!whsCode) {
|
|
2369
|
+
this.binLocations = [];
|
|
2370
|
+
return;
|
|
2371
|
+
}
|
|
2372
|
+
this.isLoadingBinLocations = true;
|
|
2373
|
+
this.warehouseService.getBinLocationsByWarehouse(whsCode).subscribe({
|
|
2374
|
+
next: (bins) => {
|
|
2375
|
+
this.binLocations = bins || [];
|
|
2376
|
+
this.isLoadingBinLocations = false;
|
|
2377
|
+
},
|
|
2378
|
+
error: () => {
|
|
2379
|
+
this.binLocations = [];
|
|
2380
|
+
this.isLoadingBinLocations = false;
|
|
2381
|
+
},
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
save() {
|
|
2385
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2386
|
+
if (!this.form.erpType) {
|
|
2387
|
+
this.toasterService.warn('ERP Sağlayıcısı zorunludur.');
|
|
2388
|
+
return;
|
|
2389
|
+
}
|
|
2390
|
+
if (!((_a = this.form.baseUrl) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
2391
|
+
this.toasterService.warn('Base URL zorunludur.');
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
if (!((_b = this.form.apiKey) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
2395
|
+
this.toasterService.warn('API Key zorunludur.');
|
|
2396
|
+
return;
|
|
2397
|
+
}
|
|
2398
|
+
if (!((_c = this.form.username) === null || _c === void 0 ? void 0 : _c.trim())) {
|
|
2399
|
+
this.toasterService.warn('Kullanıcı Adı zorunludur.');
|
|
2400
|
+
return;
|
|
2401
|
+
}
|
|
2402
|
+
if (!this.passwordSet && !((_d = this.form.password) === null || _d === void 0 ? void 0 : _d.trim())) {
|
|
2403
|
+
this.toasterService.warn('Şifre zorunludur.');
|
|
2404
|
+
return;
|
|
2405
|
+
}
|
|
2406
|
+
if (!((_e = this.form.beeCellUsername) === null || _e === void 0 ? void 0 : _e.trim())) {
|
|
2407
|
+
this.toasterService.warn('BeeCell Kullanıcı Adı zorunludur.');
|
|
2408
|
+
return;
|
|
2409
|
+
}
|
|
2410
|
+
if (!this.beeCellPasswordSet && !((_f = this.form.beeCellPassword) === null || _f === void 0 ? void 0 : _f.trim())) {
|
|
2411
|
+
this.toasterService.warn('BeeCell Şifresi zorunludur.');
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
this.isSaving = true;
|
|
2415
|
+
this.connectorParamsService.saveConnectorParams(this.form).subscribe({
|
|
2416
|
+
next: () => {
|
|
2417
|
+
this.toasterService.success('Parametreler başarıyla kaydedildi.');
|
|
2418
|
+
if (this.form.password) {
|
|
2419
|
+
this.passwordSet = true;
|
|
2420
|
+
this.form.password = '';
|
|
2421
|
+
}
|
|
2422
|
+
if (this.form.beeCellPassword) {
|
|
2423
|
+
this.beeCellPasswordSet = true;
|
|
2424
|
+
this.form.beeCellPassword = '';
|
|
2425
|
+
}
|
|
2426
|
+
// Guard cache'ini güncelle — diğer ekranlar artık erişilebilir
|
|
2427
|
+
this.guard.invalidate();
|
|
2428
|
+
this.isSaving = false;
|
|
2429
|
+
},
|
|
2430
|
+
error: err => {
|
|
2431
|
+
var _a, _b, _c;
|
|
2432
|
+
this.toasterService.error((_c = (_b = (_a = err === null || err === void 0 ? void 0 : err.error) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) !== null && _c !== void 0 ? _c : 'Kayıt sırasında bir hata oluştu.');
|
|
2433
|
+
this.isSaving = false;
|
|
2434
|
+
},
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
ConnectorParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsComponent, deps: [{ token: ConnectorParamsService }, { token: i2.ToasterService }, { token: ConnectorParamsGuard }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: WarehouseService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2439
|
+
ConnectorParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConnectorParamsComponent, selector: "lib-connector-params", ngImport: i0, template: "<abp-page [title]=\"'Connector Parametreleri'\">\r\n <div class=\"connector-params-container\">\r\n\r\n <!-- Y\u00FCkleniyor -->\r\n <div class=\"text-center py-4\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-border text-primary\" role=\"status\">\r\n <span class=\"visually-hidden\">Y\u00FCkleniyor...</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Form -->\r\n <div class=\"card connector-params-card\" [hidden]=\"isLoading\">\r\n <div class=\"card-body\">\r\n\r\n <!-- ERP Sa\u011Flay\u0131c\u0131s\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"erpTypeSelect\">ERP Sa\u011Flay\u0131c\u0131s\u0131 <span class=\"text-danger\">*</span></label>\r\n <select id=\"erpTypeSelect\" class=\"form-select\" [(ngModel)]=\"form.erpType\" required>\r\n <option *ngFor=\"let opt of erpOptions\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n </div>\r\n\r\n <!-- Base URL -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"baseUrlInput\">Base URL <span class=\"text-danger\">*</span></label>\r\n <input id=\"baseUrlInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.baseUrl\"\r\n placeholder=\"https://erp-server:38080\" required />\r\n </div>\r\n\r\n <!-- API Key -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"apiKeyInput\">API Key <span class=\"text-danger\">*</span></label>\r\n <input id=\"apiKeyInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.apiKey\"\r\n placeholder=\"API anahtar\u0131\" required />\r\n </div>\r\n\r\n <!-- Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"usernameInput\">Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"usernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.username\"\r\n placeholder=\"Kullan\u0131c\u0131 ad\u0131\" required />\r\n </div>\r\n\r\n <!-- \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"passwordInput\">\r\n \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"passwordSet && !form.password\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"passwordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.password\"\r\n [placeholder]=\"passwordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : '\u015Eifre'\" />\r\n <small class=\"text-muted\" *ngIf=\"passwordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- BeeCell Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellUsernameInput\">BeeCell Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"beeCellUsernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellUsername\"\r\n placeholder=\"BeeCell kullan\u0131c\u0131 ad\u0131\" required />\r\n <small class=\"text-muted\">BeeCell/Orchestrator API giri\u015Fi i\u00E7in kullan\u0131l\u0131r (ERP kullan\u0131c\u0131s\u0131ndan ayr\u0131d\u0131r).</small>\r\n </div>\r\n\r\n <!-- BeeCell \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellPasswordInput\">\r\n BeeCell \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"beeCellPasswordSet && !form.beeCellPassword\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"beeCellPasswordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellPassword\"\r\n [placeholder]=\"beeCellPasswordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : 'BeeCell \u015Fifresi'\" />\r\n <small class=\"text-muted\" *ngIf=\"beeCellPasswordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- Kaynak Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"fromWhsSelect\">\r\n Kaynak Depo (Stok Transfer)\r\n </label>\r\n <select id=\"fromWhsSelect\" class=\"form-select\"\r\n [ngModel]=\"form.fromWarehouseCode\"\r\n (ngModelChange)=\"onFromWarehouseChange($event)\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.fromWarehouseCode && !isCurrentFromWhsInList\"\r\n [value]=\"form.fromWarehouseCode\">\r\n {{ form.fromWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin kaynak deposu.</small>\r\n </div>\r\n\r\n <!-- Hedef Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"targetWhsSelect\">\r\n Hedef Depo (Stok Transfer) <span class=\"text-danger\">*</span>\r\n </label>\r\n <select id=\"targetWhsSelect\" class=\"form-select\" [(ngModel)]=\"form.targetWarehouseCode\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.targetWarehouseCode && !isCurrentWhsInList\"\r\n [value]=\"form.targetWarehouseCode\">\r\n {{ form.targetWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin hedef deposu.</small>\r\n </div>\r\n\r\n <!-- Dummy Kasa -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"dummyBoxSelect\">Dummy Kasa Kodu</label>\r\n <select id=\"dummyBoxSelect\" class=\"form-select\"\r\n [(ngModel)]=\"form.dummyBoxCode\"\r\n [disabled]=\"!form.fromWarehouseCode || isLoadingBinLocations\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.dummyBoxCode && !isCurrentDummyBoxInList\"\r\n [value]=\"form.dummyBoxCode\">\r\n {{ form.dummyBoxCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let bin of binLocations\" [value]=\"bin.BinCode\">\r\n {{ bin.BinCode }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\" *ngIf=\"!form.fromWarehouseCode\">\u00D6nce Kaynak Depo se\u00E7in.</small>\r\n <small class=\"text-muted\" *ngIf=\"isLoadingBinLocations\">Depo yerleri y\u00FCkleniyor...</small>\r\n <small class=\"text-muted\" *ngIf=\"form.fromWarehouseCode && !isLoadingBinLocations\">\r\n Kasa Miktar\u0131 G\u00FCncelleme'de fiili say\u0131m fark\u0131n\u0131n muhasebele\u015Ftirildi\u011Fi SAP bin kodu \u2014 se\u00E7ilen kaynak deponun depo yeri.\r\n </small>\r\n </div>\r\n\r\n <!-- Aktif -->\r\n <div class=\"mb-4 form-check\">\r\n <input id=\"isActiveCheck\" type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.isActive\" />\r\n <label class=\"form-check-label\" for=\"isActiveCheck\">Aktif</label>\r\n </div>\r\n\r\n <!-- Kaydet Butonu -->\r\n <div class=\"d-flex gap-2\">\r\n <button class=\"btn btn-primary\" (click)=\"save()\" [disabled]=\"isSaving\">\r\n <span *ngIf=\"isSaving\" class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</abp-page>\r\n", styles: [".connector-params-container{padding:1rem 0}.connector-params-container .connector-params-card{max-width:640px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsComponent, decorators: [{
|
|
2441
|
+
type: Component,
|
|
2442
|
+
args: [{ selector: 'lib-connector-params', encapsulation: ViewEncapsulation.None, template: "<abp-page [title]=\"'Connector Parametreleri'\">\r\n <div class=\"connector-params-container\">\r\n\r\n <!-- Y\u00FCkleniyor -->\r\n <div class=\"text-center py-4\" *ngIf=\"isLoading\">\r\n <div class=\"spinner-border text-primary\" role=\"status\">\r\n <span class=\"visually-hidden\">Y\u00FCkleniyor...</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Form -->\r\n <div class=\"card connector-params-card\" [hidden]=\"isLoading\">\r\n <div class=\"card-body\">\r\n\r\n <!-- ERP Sa\u011Flay\u0131c\u0131s\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"erpTypeSelect\">ERP Sa\u011Flay\u0131c\u0131s\u0131 <span class=\"text-danger\">*</span></label>\r\n <select id=\"erpTypeSelect\" class=\"form-select\" [(ngModel)]=\"form.erpType\" required>\r\n <option *ngFor=\"let opt of erpOptions\" [value]=\"opt.value\">{{ opt.label }}</option>\r\n </select>\r\n </div>\r\n\r\n <!-- Base URL -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"baseUrlInput\">Base URL <span class=\"text-danger\">*</span></label>\r\n <input id=\"baseUrlInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.baseUrl\"\r\n placeholder=\"https://erp-server:38080\" required />\r\n </div>\r\n\r\n <!-- API Key -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"apiKeyInput\">API Key <span class=\"text-danger\">*</span></label>\r\n <input id=\"apiKeyInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.apiKey\"\r\n placeholder=\"API anahtar\u0131\" required />\r\n </div>\r\n\r\n <!-- Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"usernameInput\">Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"usernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.username\"\r\n placeholder=\"Kullan\u0131c\u0131 ad\u0131\" required />\r\n </div>\r\n\r\n <!-- \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"passwordInput\">\r\n \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"passwordSet && !form.password\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"passwordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.password\"\r\n [placeholder]=\"passwordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : '\u015Eifre'\" />\r\n <small class=\"text-muted\" *ngIf=\"passwordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- BeeCell Kullan\u0131c\u0131 Ad\u0131 -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellUsernameInput\">BeeCell Kullan\u0131c\u0131 Ad\u0131 <span class=\"text-danger\">*</span></label>\r\n <input id=\"beeCellUsernameInput\" type=\"text\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellUsername\"\r\n placeholder=\"BeeCell kullan\u0131c\u0131 ad\u0131\" required />\r\n <small class=\"text-muted\">BeeCell/Orchestrator API giri\u015Fi i\u00E7in kullan\u0131l\u0131r (ERP kullan\u0131c\u0131s\u0131ndan ayr\u0131d\u0131r).</small>\r\n </div>\r\n\r\n <!-- BeeCell \u015Eifre -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"beeCellPasswordInput\">\r\n BeeCell \u015Eifre <span class=\"text-danger\">*</span>\r\n <span class=\"badge bg-success ms-2\" *ngIf=\"beeCellPasswordSet && !form.beeCellPassword\">Kay\u0131tl\u0131</span>\r\n </label>\r\n <input id=\"beeCellPasswordInput\" type=\"password\" class=\"form-control\"\r\n [(ngModel)]=\"form.beeCellPassword\"\r\n [placeholder]=\"beeCellPasswordSet ? 'De\u011Fi\u015Ftirmek i\u00E7in yeni \u015Fifre girin, bo\u015F b\u0131rak\u0131rsan\u0131z mevcut \u015Fifre korunur' : 'BeeCell \u015Fifresi'\" />\r\n <small class=\"text-muted\" *ngIf=\"beeCellPasswordSet\">Mevcut \u015Fifreyi korumak i\u00E7in bo\u015F b\u0131rak\u0131n.</small>\r\n </div>\r\n\r\n <!-- Kaynak Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"fromWhsSelect\">\r\n Kaynak Depo (Stok Transfer)\r\n </label>\r\n <select id=\"fromWhsSelect\" class=\"form-select\"\r\n [ngModel]=\"form.fromWarehouseCode\"\r\n (ngModelChange)=\"onFromWarehouseChange($event)\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.fromWarehouseCode && !isCurrentFromWhsInList\"\r\n [value]=\"form.fromWarehouseCode\">\r\n {{ form.fromWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin kaynak deposu.</small>\r\n </div>\r\n\r\n <!-- Hedef Depo -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"targetWhsSelect\">\r\n Hedef Depo (Stok Transfer) <span class=\"text-danger\">*</span>\r\n </label>\r\n <select id=\"targetWhsSelect\" class=\"form-select\" [(ngModel)]=\"form.targetWarehouseCode\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.targetWarehouseCode && !isCurrentWhsInList\"\r\n [value]=\"form.targetWarehouseCode\">\r\n {{ form.targetWarehouseCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let whs of warehouses\" [value]=\"whs.WhsCode\">\r\n {{ whs.WhsCode }} \u2013 {{ whs.WhsName }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\">G\u00F6rev Ba\u015Flat'ta olu\u015Fturulan stok naklinin hedef deposu.</small>\r\n </div>\r\n\r\n <!-- Dummy Kasa -->\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"dummyBoxSelect\">Dummy Kasa Kodu</label>\r\n <select id=\"dummyBoxSelect\" class=\"form-select\"\r\n [(ngModel)]=\"form.dummyBoxCode\"\r\n [disabled]=\"!form.fromWarehouseCode || isLoadingBinLocations\">\r\n <option value=\"\">-- Se\u00E7iniz --</option>\r\n <option *ngIf=\"form.dummyBoxCode && !isCurrentDummyBoxInList\"\r\n [value]=\"form.dummyBoxCode\">\r\n {{ form.dummyBoxCode }} (Kay\u0131tl\u0131)\r\n </option>\r\n <option *ngFor=\"let bin of binLocations\" [value]=\"bin.BinCode\">\r\n {{ bin.BinCode }}\r\n </option>\r\n </select>\r\n <small class=\"text-muted\" *ngIf=\"!form.fromWarehouseCode\">\u00D6nce Kaynak Depo se\u00E7in.</small>\r\n <small class=\"text-muted\" *ngIf=\"isLoadingBinLocations\">Depo yerleri y\u00FCkleniyor...</small>\r\n <small class=\"text-muted\" *ngIf=\"form.fromWarehouseCode && !isLoadingBinLocations\">\r\n Kasa Miktar\u0131 G\u00FCncelleme'de fiili say\u0131m fark\u0131n\u0131n muhasebele\u015Ftirildi\u011Fi SAP bin kodu \u2014 se\u00E7ilen kaynak deponun depo yeri.\r\n </small>\r\n </div>\r\n\r\n <!-- Aktif -->\r\n <div class=\"mb-4 form-check\">\r\n <input id=\"isActiveCheck\" type=\"checkbox\" class=\"form-check-input\"\r\n [(ngModel)]=\"form.isActive\" />\r\n <label class=\"form-check-label\" for=\"isActiveCheck\">Aktif</label>\r\n </div>\r\n\r\n <!-- Kaydet Butonu -->\r\n <div class=\"d-flex gap-2\">\r\n <button class=\"btn btn-primary\" (click)=\"save()\" [disabled]=\"isSaving\">\r\n <span *ngIf=\"isSaving\" class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\r\n {{ isSaving ? 'Kaydediliyor...' : 'Kaydet' }}\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n</abp-page>\r\n", styles: [".connector-params-container{padding:1rem 0}.connector-params-container .connector-params-card{max-width:640px}\n"] }]
|
|
2443
|
+
}], ctorParameters: function () { return [{ type: ConnectorParamsService }, { type: i2.ToasterService }, { type: ConnectorParamsGuard }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: WarehouseService }]; } });
|
|
2444
|
+
|
|
2445
|
+
const routes$1 = [
|
|
2446
|
+
{ path: '', component: ConnectorParamsComponent },
|
|
2447
|
+
];
|
|
2448
|
+
class ConnectorParamsModule {
|
|
2449
|
+
}
|
|
2450
|
+
ConnectorParamsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2451
|
+
ConnectorParamsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, declarations: [ConnectorParamsComponent], imports: [CoreModule,
|
|
2452
|
+
ThemeSharedModule,
|
|
2453
|
+
FormsModule,
|
|
2454
|
+
PageModule, i1$1.RouterModule] });
|
|
2455
|
+
ConnectorParamsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, imports: [CoreModule,
|
|
2456
|
+
ThemeSharedModule,
|
|
2457
|
+
FormsModule,
|
|
2458
|
+
PageModule,
|
|
2459
|
+
RouterModule.forChild(routes$1)] });
|
|
2460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConnectorParamsModule, decorators: [{
|
|
2461
|
+
type: NgModule,
|
|
2462
|
+
args: [{
|
|
2463
|
+
declarations: [ConnectorParamsComponent],
|
|
2464
|
+
imports: [
|
|
2465
|
+
CoreModule,
|
|
2466
|
+
ThemeSharedModule,
|
|
2467
|
+
FormsModule,
|
|
2468
|
+
PageModule,
|
|
2469
|
+
RouterModule.forChild(routes$1),
|
|
2470
|
+
],
|
|
2471
|
+
}]
|
|
2472
|
+
}] });
|
|
2473
|
+
function loadConnectorParamsModuleAsChild() {
|
|
2474
|
+
return Promise.resolve(ConnectorParamsModule);
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
const routes = [
|
|
2478
|
+
{
|
|
2479
|
+
path: '',
|
|
2480
|
+
pathMatch: 'full',
|
|
2481
|
+
component: SmartWarehouseComponent,
|
|
2482
|
+
},
|
|
2483
|
+
{
|
|
2484
|
+
path: 'orders',
|
|
2485
|
+
loadChildren: loadOrdersModuleAsChild,
|
|
2486
|
+
canActivate: [ConnectorParamsGuard],
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
path: 'shelf-placement',
|
|
2490
|
+
loadChildren: loadShelfPlacementModuleAsChild,
|
|
2491
|
+
canActivate: [ConnectorParamsGuard],
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
path: 'shelf-transfer',
|
|
2495
|
+
loadChildren: loadShelfTransferModuleAsChild,
|
|
2496
|
+
canActivate: [ConnectorParamsGuard],
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
path: 'order-station',
|
|
2500
|
+
loadChildren: loadOrderStationModuleAsChild,
|
|
2501
|
+
canActivate: [ConnectorParamsGuard],
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
path: 'stock-report',
|
|
2505
|
+
loadChildren: loadStockReportModuleAsChild,
|
|
2506
|
+
canActivate: [ConnectorParamsGuard],
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
path: 'shortages',
|
|
2510
|
+
loadChildren: loadShortagesModuleAsChild,
|
|
2511
|
+
canActivate: [ConnectorParamsGuard],
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
path: 'station',
|
|
2515
|
+
loadChildren: loadStationModuleAsChild,
|
|
2516
|
+
canActivate: [ConnectorParamsGuard],
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
path: 'quantity-correction',
|
|
2520
|
+
loadChildren: loadQuantityCorrectionModuleAsChild,
|
|
2521
|
+
canActivate: [ConnectorParamsGuard],
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
path: 'connector-params',
|
|
2525
|
+
loadChildren: loadConnectorParamsModuleAsChild,
|
|
2526
|
+
},
|
|
2527
|
+
];
|
|
2528
|
+
class SmartWarehouseRoutingModule {
|
|
2529
|
+
}
|
|
2530
|
+
SmartWarehouseRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2531
|
+
SmartWarehouseRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] });
|
|
2532
|
+
SmartWarehouseRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
2533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseRoutingModule, decorators: [{
|
|
2534
|
+
type: NgModule,
|
|
2535
|
+
args: [{
|
|
2536
|
+
imports: [RouterModule.forChild(routes)],
|
|
2537
|
+
exports: [RouterModule],
|
|
2538
|
+
}]
|
|
2539
|
+
}] });
|
|
2540
|
+
|
|
2541
|
+
// DevExtreme bileşenlerinin (grid filtre satırı, tarih seçiciler, sayı formatları vb.)
|
|
2542
|
+
// varsayılan tarih/sayı formatını Türkçe'ye çevirir — tekil sütun `format`'ları bunun
|
|
2543
|
+
// üzerine gelir, ama açıkça formatlanmamış her yer de bu sayede tr formatında görünür.
|
|
2544
|
+
locale('tr');
|
|
2545
|
+
class SmartWarehouseModule {
|
|
2546
|
+
static forChild() {
|
|
2547
|
+
return {
|
|
2548
|
+
ngModule: SmartWarehouseModule,
|
|
2549
|
+
providers: [],
|
|
2550
|
+
};
|
|
2551
|
+
}
|
|
2552
|
+
static forLazy() {
|
|
2553
|
+
return new LazyModuleFactory(SmartWarehouseModule.forChild());
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
SmartWarehouseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2557
|
+
SmartWarehouseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, declarations: [SmartWarehouseComponent], imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule], exports: [SmartWarehouseComponent] });
|
|
2558
|
+
SmartWarehouseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule] });
|
|
2559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartWarehouseModule, decorators: [{
|
|
2560
|
+
type: NgModule,
|
|
2561
|
+
args: [{
|
|
2562
|
+
declarations: [SmartWarehouseComponent],
|
|
2563
|
+
imports: [CoreModule, ThemeSharedModule, SmartWarehouseRoutingModule],
|
|
2564
|
+
exports: [SmartWarehouseComponent],
|
|
2565
|
+
}]
|
|
2566
|
+
}] });
|
|
2567
|
+
|
|
2568
|
+
/*
|
|
2569
|
+
* Public API Surface of smart-warehouse
|
|
2570
|
+
*/
|
|
2571
|
+
|
|
2572
|
+
/**
|
|
2573
|
+
* Generated bundle index. Do not edit.
|
|
2574
|
+
*/
|
|
2575
|
+
|
|
2576
|
+
export { ConnectorParamsComponent, ConnectorParamsModule, ConnectorParamsService, OrderService, OrderStationComponent, OrderStationModule, OrderStationService, OrdersComponent, OrdersModule, ShelfPlacementComponent, ShelfPlacementModule, SmartWarehouseComponent, SmartWarehouseModule, SmartWarehouseService, WarehouseService, loadConnectorParamsModuleAsChild, loadOrderStationModuleAsChild, loadOrdersModuleAsChild, loadShelfPlacementModuleAsChild };
|
|
2577
|
+
//# sourceMappingURL=hitsoft-smart-warehouse.mjs.map
|