@hitsoft/uretim-yonetimi 1.0.12 → 1.0.14

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.
Files changed (137) hide show
  1. package/config/enums/route-names.d.ts +3 -0
  2. package/config/index.d.ts +5 -0
  3. package/config/providers/create-barcode-route.provider.d.ts +9 -0
  4. package/config/providers/issues-for-production-route.provider.d.ts +9 -0
  5. package/config/providers/production-order-route.provider.d.ts +9 -0
  6. package/config/providers/receipt-from-production-route.provider.d.ts +9 -0
  7. package/config/providers/route.provider.d.ts +8 -0
  8. package/config/uretim-yonetimi-config.module.d.ts +8 -0
  9. package/esm2020/config/enums/index.mjs +2 -0
  10. package/esm2020/config/enums/route-names.mjs +2 -0
  11. package/esm2020/config/hitsoft-uretim-yonetimi-config.mjs +5 -0
  12. package/esm2020/config/providers/create-barcode-route.provider.mjs +19 -0
  13. package/esm2020/config/providers/index.mjs +2 -0
  14. package/esm2020/config/providers/issues-for-production-route.provider.mjs +19 -0
  15. package/esm2020/config/providers/production-order-route.provider.mjs +19 -0
  16. package/esm2020/config/providers/receipt-from-production-route.provider.mjs +19 -0
  17. package/esm2020/config/providers/route.provider.mjs +24 -0
  18. package/esm2020/config/public-api.mjs +4 -0
  19. package/esm2020/config/uretim-yonetimi-config.module.mjs +28 -0
  20. package/esm2020/hitsoft-uretim-yonetimi.mjs +5 -0
  21. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.mjs +26 -0
  22. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.component.mjs +186 -0
  23. package/esm2020/lib/components/hit-create-barcodes/hit-create-barcodes.module.mjs +65 -0
  24. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.mjs +26 -0
  25. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.mjs +252 -0
  26. package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.mjs +68 -0
  27. package/esm2020/lib/components/hit-production-orders/hit-production-orders-routing.module.mjs +26 -0
  28. package/esm2020/lib/components/hit-production-orders/hit-production-orders.component.mjs +153 -0
  29. package/esm2020/lib/components/hit-production-orders/hit-production-orders.module.mjs +65 -0
  30. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.mjs +26 -0
  31. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.mjs +217 -0
  32. package/esm2020/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.mjs +62 -0
  33. package/esm2020/lib/components/uretim-yonetimi.component.mjs +11 -0
  34. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.mjs +2 -0
  35. package/esm2020/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.mjs +54 -0
  36. package/esm2020/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.mjs +35 -0
  37. package/esm2020/lib/hit-proxy/hit-create-barcodes/models.mjs +3 -0
  38. package/esm2020/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.mjs +35 -0
  39. package/esm2020/lib/hit-proxy/hit-issues-for-productions/models.mjs +24 -0
  40. package/esm2020/lib/hit-proxy/hit-production-orders/hit-production-orders.service.mjs +44 -0
  41. package/esm2020/lib/hit-proxy/hit-production-orders/models.mjs +65 -0
  42. package/esm2020/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.mjs +30 -0
  43. package/esm2020/lib/hit-proxy/hit-receipt-from-productions/models.mjs +20 -0
  44. package/esm2020/lib/hit-proxy/models.mjs +80 -0
  45. package/esm2020/lib/uretim-yonetimi-routing.module.mjs +33 -0
  46. package/esm2020/lib/uretim-yonetimi.module.mjs +55 -0
  47. package/esm2020/public-api.mjs +6 -0
  48. package/fesm2015/hitsoft-uretim-yonetimi-config.mjs +121 -0
  49. package/fesm2015/hitsoft-uretim-yonetimi-config.mjs.map +1 -0
  50. package/fesm2015/hitsoft-uretim-yonetimi.mjs +1543 -0
  51. package/fesm2015/hitsoft-uretim-yonetimi.mjs.map +1 -0
  52. package/fesm2020/hitsoft-uretim-yonetimi-config.mjs +121 -0
  53. package/fesm2020/hitsoft-uretim-yonetimi-config.mjs.map +1 -0
  54. package/fesm2020/hitsoft-uretim-yonetimi.mjs +1521 -0
  55. package/fesm2020/hitsoft-uretim-yonetimi.mjs.map +1 -0
  56. package/index.d.ts +5 -0
  57. package/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.d.ts +7 -0
  58. package/lib/components/hit-create-barcodes/hit-create-barcodes.component.d.ts +45 -0
  59. package/lib/components/hit-create-barcodes/hit-create-barcodes.module.d.ts +16 -0
  60. package/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.d.ts +7 -0
  61. package/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.d.ts +48 -0
  62. package/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.d.ts +16 -0
  63. package/lib/components/hit-production-orders/hit-production-orders-routing.module.d.ts +7 -0
  64. package/lib/components/hit-production-orders/hit-production-orders.component.d.ts +44 -0
  65. package/lib/components/hit-production-orders/hit-production-orders.module.d.ts +16 -0
  66. package/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.d.ts +7 -0
  67. package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.d.ts +57 -0
  68. package/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.d.ts +16 -0
  69. package/lib/components/uretim-yonetimi.component.d.ts +5 -0
  70. package/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.d.ts +17 -0
  71. package/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.d.ts +18 -0
  72. package/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.d.ts +23 -0
  73. package/lib/hit-proxy/hit-create-barcodes/models.d.ts +6 -0
  74. package/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.d.ts +17 -0
  75. package/lib/hit-proxy/hit-issues-for-productions/models.d.ts +30 -0
  76. package/lib/hit-proxy/hit-production-orders/hit-production-orders.service.d.ts +19 -0
  77. package/lib/hit-proxy/hit-production-orders/models.d.ts +85 -0
  78. package/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.d.ts +16 -0
  79. package/lib/hit-proxy/hit-receipt-from-productions/models.d.ts +39 -0
  80. package/lib/hit-proxy/models.d.ts +21 -0
  81. package/lib/uretim-yonetimi-routing.module.d.ts +7 -0
  82. package/lib/uretim-yonetimi.module.d.ts +17 -0
  83. package/package.json +42 -14
  84. package/{src/public-api.ts → public-api.d.ts} +0 -4
  85. package/.eslintrc.json +0 -44
  86. package/config/ng-package.json +0 -7
  87. package/config/src/enums/route-names.ts +0 -3
  88. package/config/src/providers/create-barcode-route.provider.ts +0 -21
  89. package/config/src/providers/issues-for-production-route.provider.ts +0 -21
  90. package/config/src/providers/production-order-route.provider.ts +0 -21
  91. package/config/src/providers/receipt-from-production-route.provider.ts +0 -21
  92. package/config/src/providers/route.provider.ts +0 -26
  93. package/config/src/uretim-yonetimi-config.module.ts +0 -22
  94. package/karma.conf.js +0 -44
  95. package/ng-package.json +0 -7
  96. package/src/lib/components/hit-create-barcodes/hit-create-barcodes-component.css +0 -10
  97. package/src/lib/components/hit-create-barcodes/hit-create-barcodes-routing.module.ts +0 -19
  98. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.html +0 -80
  99. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.component.ts +0 -219
  100. package/src/lib/components/hit-create-barcodes/hit-create-barcodes.module.ts +0 -39
  101. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions-routing.module.ts +0 -19
  102. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.componenet.css +0 -7
  103. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.html +0 -96
  104. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.ts +0 -274
  105. package/src/lib/components/hit-issues-for-productions/hit-issues-for-productions.module.ts +0 -46
  106. package/src/lib/components/hit-production-orders/hit-production-orders-routing.module.ts +0 -19
  107. package/src/lib/components/hit-production-orders/hit-production-orders.component.html +0 -79
  108. package/src/lib/components/hit-production-orders/hit-production-orders.component.ts +0 -214
  109. package/src/lib/components/hit-production-orders/hit-production-orders.module.ts +0 -39
  110. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-component.css +0 -10
  111. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-production-routing.module.ts +0 -19
  112. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.html +0 -101
  113. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.component.ts +0 -258
  114. package/src/lib/components/hit-receipt-from-productions/hit-receipt-from-productions.module.ts +0 -38
  115. package/src/lib/components/uretim-yonetimi.component.ts +0 -9
  116. package/src/lib/hit-proxy/devexpress-query-builder/devexpress-load-options.model.ts +0 -20
  117. package/src/lib/hit-proxy/devexpress-query-builder/devexpress-query-builder.ts +0 -51
  118. package/src/lib/hit-proxy/hit-create-barcodes/hit-create-barcodes.service.ts +0 -41
  119. package/src/lib/hit-proxy/hit-create-barcodes/models.ts +0 -6
  120. package/src/lib/hit-proxy/hit-issues-for-productions/hit-issues-for-productions.service.ts +0 -39
  121. package/src/lib/hit-proxy/hit-issues-for-productions/models.ts +0 -42
  122. package/src/lib/hit-proxy/hit-production-orders/hit-production-orders.service.ts +0 -60
  123. package/src/lib/hit-proxy/hit-production-orders/models.ts +0 -137
  124. package/src/lib/hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service.ts +0 -32
  125. package/src/lib/hit-proxy/hit-receipt-from-productions/models.ts +0 -43
  126. package/src/lib/hit-proxy/models.ts +0 -105
  127. package/src/lib/uretim-yonetimi-routing.module.ts +0 -30
  128. package/src/lib/uretim-yonetimi.component.spec.ts +0 -24
  129. package/src/lib/uretim-yonetimi.module.ts +0 -52
  130. package/src/lib/uretim-yonetimi.service.spec.ts +0 -15
  131. package/src/test.ts +0 -29
  132. package/tsconfig.lib.json +0 -20
  133. package/tsconfig.lib.prod.json +0 -10
  134. package/tsconfig.spec.json +0 -17
  135. /package/config/{src/enums/index.ts → enums/index.d.ts} +0 -0
  136. /package/config/{src/providers/index.ts → providers/index.d.ts} +0 -0
  137. /package/config/{src/public-api.ts → public-api.d.ts} +0 -0
@@ -1,19 +0,0 @@
1
- import {AuthGuard, PermissionGuard} from '@abp/ng.core';
2
- import {NgModule} from '@angular/core';
3
- import {RouterModule, Routes} from '@angular/router';
4
- import {HitReceiptFromProductionsComponent} from "./hit-receipt-from-productions.component";
5
-
6
- const routes: Routes = [
7
- {
8
- path: '',
9
- component: HitReceiptFromProductionsComponent,
10
- canActivate: [AuthGuard, PermissionGuard],
11
- },
12
- ];
13
-
14
- @NgModule({
15
- imports: [RouterModule.forChild(routes)],
16
- exports: [RouterModule],
17
- })
18
- export class HitReceiptFromProductionRoutingModule {
19
- }
@@ -1,101 +0,0 @@
1
- <abp-page [breadcrumb]="false" style="padding: 0;">
2
- <abp-page-toolbar-container class="col">
3
- <div class="row">
4
- <h3 class="page-title">
5
- {{ 'UretimYonetimi::ReceiptFromProductions.Title' | abpLocalization }}
6
- </h3>
7
- </div>
8
- <div class="row text-lg-end pt-2">
9
- <div class="col-8">
10
- <button class="btn btn-success btn-sm" type="button"
11
- (click)="postReceiptFromProductions()"
12
- [disabled]="!isProductionOrderValid">
13
- <i class="fa fa-plus me-1" aria-hidden="true"></i>
14
- {{ 'UretimYonetimi::ReceiptFromProductions.Create' | abpLocalization }}
15
- </button>
16
- </div>
17
- <div class="col-4">
18
- <button class="btn btn-warning btn-sm" type="button" (click)="clearAll()">
19
- <i class="fa fa-broom me-1" aria-hidden="true"></i>
20
- {{ 'UretimYonetimi::ReceiptFromProductions.Clean' | abpLocalization }}
21
- </button>
22
- </div>
23
- </div>
24
- </abp-page-toolbar-container>
25
- <div class="card">
26
- <div class="card-body">
27
- <div style="display: flex; align-items: center;">
28
- <dx-number-box class="me-1 w-100"
29
- #barkodNumarasiRef
30
- [label]="'UretimYonetimi::ReceiptFromProductions.WorkOrderNo' | abpLocalization"
31
- [(value)]="barkodNumarasi"
32
- (onChange)="getProductionOrder()"
33
- (onEnterKey)="getProductionOrder()"
34
- [disabled]="searcheBasildiMi || isProductionOrderValid">
35
- </dx-number-box>
36
- <dx-button style="margin-top: 7.5px;" icon="search" type="default"
37
- (onClick)="getProductionOrder()"
38
- [disabled]="searcheBasildiMi || isProductionOrderValid">
39
- </dx-button>
40
- </div>
41
- <div *ngIf="isProductionOrderValid">
42
- <dx-text-box [label]="'UretimYonetimi::ReceiptFromProductions.StokCode' | abpLocalization"
43
- [(value)]="productionOrder.itemNo"
44
- [disabled]="true">
45
- </dx-text-box>
46
-
47
- <dx-text-box [label]="'UretimYonetimi::ReceiptFromProductions.StokDesc' | abpLocalization"
48
- [(value)]="productionOrder.productDescription"
49
- [maxLength]="128" [disabled]="true">
50
- </dx-text-box>
51
-
52
- <dx-text-box [label]="'UretimYonetimi::ReceiptFromProductions.ToWhs' | abpLocalization" [maxLength]="128"
53
- [value]="getWarehouseName(receiptFromProductionsPostDtoDocumentLine.warehouseCode)"
54
- [disabled]="true">
55
- </dx-text-box>
56
-
57
- <dx-text-box [label]="'UretimYonetimi::ReceiptFromProductions.BatchNumber' | abpLocalization"
58
- [(value)]="receiptFromProductionsPostDtoBatchNumber.batchNumber"
59
- [maxLength]="128" [disabled]="true">
60
- </dx-text-box>
61
-
62
- <dx-number-box [label]="'UretimYonetimi::ReceiptFromProductions.PlannedQty' | abpLocalization"
63
- [(value)]="productionOrder.plannedQuantity"
64
- [format]="HitHelper.getMeasurementFormatted(unitOfMeasure)"
65
- [disabled]="true">
66
- </dx-number-box>
67
-
68
- <dx-number-box [label]="'UretimYonetimi::ReceiptFromProductions.CompletedQty' | abpLocalization"
69
- [(value)]="productionOrder.completedQuantity"
70
- [format]="HitHelper.getMeasurementFormatted(unitOfMeasure)"
71
- [disabled]="true">
72
- </dx-number-box>
73
-
74
- <dx-number-box [label]="'UretimYonetimi::ReceiptFromProductions.Quantity' | abpLocalization"
75
- [(value)]="receiptFromProductionsPostDtoBatchNumber.quantity"
76
- (onValueChanged)="quantityChanged($event)"
77
- [format]="HitHelper.getMeasurementFormatted(unitOfMeasure)"
78
- [showSpinButtons]="true" [min]="0" #toplananMiktarRef>
79
- </dx-number-box>
80
- </div>
81
- </div>
82
- </div>
83
- </abp-page>
84
-
85
- <abp-modal [(visible)]="showModal" (appear)="generateReport()" (disappear)="clearAll()">
86
- <ng-template #abpHeader>
87
- <h3>{{ 'UretimYonetimi::CreateBarcodes.BarcodePreview' | abpLocalization }}</h3>
88
- </ng-template>
89
- <ng-template #abpBody>
90
- <iframe *ngIf="pdfSrc" [src]="pdfSrc" width="100%" height="300"
91
- webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
92
- </ng-template>
93
- <ng-template #abpFooter>
94
- <button (click)="downloadPdf(blobUrl)" type="button"
95
- class="btn btn-secondary mobilde-gorunur" abpClose> İndir
96
- </button>
97
- <button type="button"
98
- class="btn btn-secondary" abpClose> {{ 'UretimYonetimi::CreateBarcodes.Close' | abpLocalization }}
99
- </button>
100
- </ng-template>
101
- </abp-modal>
@@ -1,258 +0,0 @@
1
- import { ListService, TrackByService } from '@abp/ng.core';
2
- import { ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
3
- import { DateAdapter } from '@abp/ng.theme.shared/extensions';
4
- import {
5
- AfterViewInit,
6
- ChangeDetectionStrategy,
7
- Component,
8
- NgZone,
9
- OnInit,
10
- ViewChild,
11
- } from '@angular/core';
12
- import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap';
13
- import { HitReceiptFromProductionsService } from '../../hit-proxy/hit-receipt-from-productions/hit-receipt-from-productions.service';
14
- import {
15
- GetProductionOrderDto,
16
- ReceiptFromProductionsBatchNumbers,
17
- ReceiptFromProductionsLines,
18
- ReceiptFromProductionsPostDto,
19
- } from '../../hit-proxy/hit-receipt-from-productions/models';
20
- import { HitProductionOrdersService } from '../../hit-proxy/hit-production-orders/hit-production-orders.service';
21
- import { HitHelper } from '../../hit-proxy/models';
22
- import { DxNumberBoxComponent, DxTextBoxComponent } from 'devextreme-angular';
23
- import { Warehouse } from '../../hit-proxy/hit-production-orders/models';
24
- import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
25
-
26
- @Component({
27
- selector: 'lib-hit-receipt-from-productions',
28
- changeDetection: ChangeDetectionStrategy.Default,
29
- providers: [ListService, { provide: NgbDateAdapter, useClass: DateAdapter }],
30
- templateUrl: './hit-receipt-from-productions.component.html',
31
- styles: [],
32
- styleUrls: ['./hit-receipt-from-production-component.css'],
33
- })
34
- export class HitReceiptFromProductionsComponent implements OnInit, AfterViewInit {
35
- protected readonly HitHelper = HitHelper;
36
- @ViewChild('barkodNumarasiRef', { static: false }) nmbBoxBarkodNumarasi: DxTextBoxComponent;
37
- @ViewChild('toplananMiktarRef', { static: false }) nmbBoxToplananMiktar: DxNumberBoxComponent;
38
- isLoading = false;
39
- options: Partial<Confirmation.Options> = {
40
- hideYesBtn: true,
41
- cancelText: 'Kapat',
42
- dismissible: false,
43
- };
44
-
45
- constructor(
46
- private ngZone: NgZone,
47
- public readonly list: ListService,
48
- public readonly track: TrackByService,
49
- public readonly service: HitReceiptFromProductionsService,
50
- private confirmation: ConfirmationService,
51
- private productionOrdersService: HitProductionOrdersService,
52
- private sanitizer: DomSanitizer
53
- ) {}
54
-
55
- ngOnInit(): void {
56
- this.clearAll();
57
- this.getWarehouses();
58
- }
59
-
60
- ngAfterViewInit() {
61
- this.focusOnBarkodNumarasi();
62
- }
63
-
64
- barkodNumarasi: number;
65
- isProductionOrderValid: boolean = false;
66
- searcheBasildiMi: boolean = false;
67
- unitOfMeasure: string;
68
- blobUrl: string;
69
- showModal: boolean = false;
70
- pdfSrc: SafeResourceUrl | null = null;
71
- newRecordDocEntry: number;
72
- isEmriNumarasiForBarcode: number;
73
-
74
- generateReport() {
75
- this.service
76
- .getBarcodeInfo(this.isEmriNumarasiForBarcode, this.newRecordDocEntry, 1)
77
- .subscribe({
78
- next: response => {
79
- const base64Data = response.base64; // base64 string (sadece veri kısmı, "data:application/pdf;base64,..." değilse)
80
-
81
- // Base64'ü decode edip binary veriye çeviriyoruz
82
- const byteCharacters = atob(base64Data);
83
- const byteNumbers = new Array(byteCharacters.length);
84
- for (let i = 0; i < byteCharacters.length; i++) {
85
- byteNumbers[i] = byteCharacters.charCodeAt(i);
86
- }
87
- const byteArray = new Uint8Array(byteNumbers);
88
-
89
- // Blob oluşturuyoruz
90
- const blob = new Blob([byteArray], { type: 'application/pdf' });
91
-
92
- // Blob'tan URL oluşturup yeni sekmede açıyoruz (veya download edebilirsin)
93
- this.blobUrl = URL.createObjectURL(blob);
94
- this.pdfSrc = this.bypassAndSanitize(this.blobUrl);
95
- },
96
- });
97
- }
98
-
99
- bypassAndSanitize(url): SafeResourceUrl {
100
- return this.sanitizer.bypassSecurityTrustResourceUrl(url);
101
- }
102
-
103
- downloadPdf(blobUrl) {
104
- const a = document.createElement('a');
105
- a.href = blobUrl;
106
- const parts = blobUrl.split('/');
107
- const lastPart = parts.pop(); // "myfile.pdf"
108
- a.download = lastPart + '.pdf'; // Kaydedilecek dosya adı
109
- a.style.display = 'none';
110
-
111
- // iOS'ta desteklenmesi için target=_blank eklenebilir
112
- a.target = '_blank';
113
-
114
- // DOM'a ekleyip tıklat
115
- document.body.appendChild(a);
116
- a.click();
117
- document.body.removeChild(a);
118
- }
119
-
120
- productionOrder: GetProductionOrderDto = new GetProductionOrderDto();
121
-
122
- async getProductionOrder() {
123
- this.clearForm();
124
- this.isLoading = true;
125
- this.searcheBasildiMi = true;
126
- this.productionOrdersService.get(this.barkodNumarasi).subscribe({
127
- next: result => {
128
- if (result.isSuccessful) {
129
- this.productionOrder = result.items;
130
- this.receiptFromProductionsPostDtoQuantity =
131
- result.items.plannedQuantity - result.items.completedQuantity;
132
-
133
- this.receiptFromProductionsPostDtoDocumentLine.baseEntry = this.barkodNumarasi;
134
- this.receiptFromProductionsPostDtoDocumentLine.baseType = 202;
135
- this.receiptFromProductionsPostDtoDocumentLine.quantity =
136
- this.receiptFromProductionsPostDtoQuantity;
137
- this.receiptFromProductionsPostDtoDocumentLine.warehouseCode = result.items.warehouse;
138
- this.receiptFromProductionsPostDtoBatchNumber.batchNumber = result.items.u_trkBatch;
139
- this.receiptFromProductionsPostDtoBatchNumber.quantity =
140
- this.receiptFromProductionsPostDtoQuantity;
141
-
142
- this.unitOfMeasure = result.items.unitOfMeasurement;
143
- this.isProductionOrderValid = true;
144
- this.focusOnToplananMiktar();
145
- } else {
146
- if (result?.isSuccessful == false) {
147
- this.confirmation.status$.subscribe({
148
- next: () => {
149
- this.clearAll();
150
- },
151
- });
152
- }
153
- }
154
- },
155
- });
156
-
157
- this.isLoading = false;
158
- }
159
-
160
- receiptFromProductionsPostDtoQuantity: number = 0;
161
- receiptFromProductionsPostDto: ReceiptFromProductionsPostDto =
162
- new ReceiptFromProductionsPostDto();
163
- receiptFromProductionsPostDtoDocumentLine: ReceiptFromProductionsLines =
164
- new ReceiptFromProductionsLines();
165
- receiptFromProductionsPostDtoBatchNumber: ReceiptFromProductionsBatchNumbers =
166
- new ReceiptFromProductionsBatchNumbers();
167
-
168
- async postReceiptFromProductions() {
169
- this.isLoading = true;
170
-
171
- this.receiptFromProductionsPostDtoDocumentLine.batchNumbers = [
172
- this.receiptFromProductionsPostDtoBatchNumber,
173
- ];
174
- this.receiptFromProductionsPostDto.documentLines = [
175
- this.receiptFromProductionsPostDtoDocumentLine,
176
- ];
177
-
178
- this.service.create(this.receiptFromProductionsPostDto).subscribe({
179
- next: result => {
180
- if (result.isSuccessful) {
181
- this.confirmation.success('İşlem Başarılı', '', this.options).subscribe(() => {
182
- this.newRecordDocEntry = result.items.docEntry;
183
- this.isEmriNumarasiForBarcode = this.barkodNumarasi;
184
- this.showModal = true;
185
- this.clearAll();
186
- });
187
- } else {
188
- this.confirmation.status$.subscribe(() => {
189
- this.focusOnToplananMiktar();
190
- });
191
- }
192
- },
193
- error: () => {
194
- this.confirmation.status$.subscribe(() => {
195
- this.focusOnToplananMiktar();
196
- });
197
- },
198
- });
199
-
200
- this.isLoading = false;
201
- }
202
-
203
- clearAll() {
204
- this.barkodNumarasi = null;
205
- this.clearForm();
206
- }
207
-
208
- clearForm() {
209
- this.productionOrder = new GetProductionOrderDto();
210
- this.receiptFromProductionsPostDto = new ReceiptFromProductionsPostDto();
211
- this.receiptFromProductionsPostDtoDocumentLine = new ReceiptFromProductionsLines();
212
- this.receiptFromProductionsPostDtoBatchNumber = new ReceiptFromProductionsBatchNumbers();
213
- this.unitOfMeasure = null;
214
- this.isProductionOrderValid = false;
215
- this.searcheBasildiMi = false;
216
- this.focusOnBarkodNumarasi();
217
- }
218
-
219
- warehouses: Warehouse[] = [];
220
-
221
- async getWarehouses() {
222
- this.isLoading = true;
223
- this.productionOrdersService.getWarehouses().subscribe({
224
- next: result => {
225
- if (result.items) {
226
- this.warehouses = result.items.slice();
227
- }
228
- },
229
- });
230
- this.isLoading = false;
231
- }
232
-
233
- focusOnBarkodNumarasi() {
234
- this.ngZone.run(() => {
235
- setTimeout(() => {
236
- this.nmbBoxBarkodNumarasi.instance.focus();
237
- }, 0);
238
- });
239
- }
240
-
241
- focusOnToplananMiktar() {
242
- this.ngZone.run(() => {
243
- setTimeout(() => {
244
- this.nmbBoxToplananMiktar.instance.focus();
245
- }, 0);
246
- });
247
- }
248
-
249
- getWarehouseName(code: string): string {
250
- const match = this.warehouses.find(x => x.whsCode === code);
251
- return match ? match.whsName : '';
252
- }
253
-
254
- quantityChanged(e: any) {
255
- this.receiptFromProductionsPostDtoBatchNumber.quantity = e.value;
256
- this.receiptFromProductionsPostDtoDocumentLine.quantity = e.value;
257
- }
258
- }
@@ -1,38 +0,0 @@
1
- import {CoreModule} from '@abp/ng.core';
2
- import {ThemeSharedModule} from '@abp/ng.theme.shared';
3
- import {NgModule} from '@angular/core';
4
- import {
5
- NgbCollapseModule,
6
- NgbDatepickerModule,
7
- NgbDropdownModule,
8
- } from '@ng-bootstrap/ng-bootstrap';
9
- import {NgxValidateCoreModule} from '@ngx-validate/core';
10
- import {CommercialUiModule} from '@volo/abp.commercial.ng.ui';
11
- import {PageModule} from '@abp/ng.components/page';
12
- import {HitReceiptFromProductionsComponent} from "./hit-receipt-from-productions.component";
13
- import {HitReceiptFromProductionRoutingModule} from "./hit-receipt-from-production-routing.module";
14
- import {DevExtremeModule, DxButtonModule, DxNumberBoxModule} from "devextreme-angular";
15
-
16
- @NgModule({
17
- declarations: [HitReceiptFromProductionsComponent],
18
- imports: [
19
- HitReceiptFromProductionRoutingModule,
20
- CoreModule,
21
- ThemeSharedModule,
22
- CommercialUiModule,
23
- NgxValidateCoreModule,
24
- NgbCollapseModule,
25
- NgbDatepickerModule,
26
- NgbDropdownModule,
27
- PageModule,
28
- DxButtonModule,
29
- DxNumberBoxModule,
30
- DevExtremeModule,
31
- ],
32
- })
33
- export class HitReceiptFromProductionsModule {
34
- }
35
-
36
- export function loadHitReceiptFromProductionsAsChild() {
37
- return Promise.resolve(HitReceiptFromProductionsModule);
38
- }
@@ -1,9 +0,0 @@
1
- import {Component} from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-uretim-yonetimi',
5
- template: ` <p>uretim-yonetimi works!</p> `,
6
- styles: [],
7
- })
8
- export class UretimYonetimiComponent {
9
- }
@@ -1,20 +0,0 @@
1
- export interface LoadOptions{
2
- key: string,
3
- loadUrl: string,
4
- params?: any,
5
- insertUrl?: string,
6
- updateUrl?: string,
7
- deleteUrl?:string
8
- }
9
-
10
- export interface AbpSessionInfo {
11
- language: string
12
- tenant: Tenant
13
- }
14
-
15
- export interface Tenant {
16
- id: any
17
- name: any
18
- isAvailable: boolean
19
- }
20
-
@@ -1,51 +0,0 @@
1
- import { EnvironmentService, LocalizationService } from "@abp/ng.core";
2
- import { ToasterService } from "@abp/ng.theme.shared";
3
- import { Injectable } from "@angular/core";
4
- import * as AspNetData from 'devextreme-aspnet-data-nojquery';
5
- import { AbpSessionInfo,LoadOptions } from "./devexpress-load-options.model";
6
- @Injectable({
7
- providedIn: 'root'
8
- })
9
- export class DevexpressRestService {
10
-
11
- localizationKey: any = 'tr'
12
- createStore = (options: LoadOptions) => AspNetData.createStore({
13
- key: options.key,
14
- loadParams: options.params,
15
- loadUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.loadUrl}`,
16
- insertUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.insertUrl}`,
17
- insertMethod: 'POST',
18
- updateUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.updateUrl}`,
19
- updateMethod: 'PUT',
20
- deleteUrl: `${this.envService.getEnvironment().apis.eDonusum.url + '/' + options.deleteUrl}`,
21
- deleteMethod: 'DELETE',
22
- onLoading(loadOptions) {
23
- },
24
- onBeforeSend(operation, ajaxSettings) {
25
-
26
- let languages={} as AbpSessionInfo
27
- languages= JSON.parse(localStorage.getItem('abpSession')) as AbpSessionInfo
28
-
29
- if (operation === "insert" || operation === "update" || operation === "delete") {
30
- console.log(ajaxSettings);
31
- if (operation == "delete") {
32
- ajaxSettings.url = ajaxSettings.url + "/" + localStorage.getItem("appointment-deleted-id")
33
- }
34
- ajaxSettings.contentType = "application/json"
35
- ajaxSettings.data = ajaxSettings.data.values
36
- }
37
- ajaxSettings.headers = {
38
- Authorization: 'Bearer ' + localStorage.getItem('access_token'),
39
- 'Accept-Language': languages.language
40
- };
41
- }, onAjaxError: this.onAjaxError
42
- });
43
- onAjaxError(e: { xhr, error }) {
44
- let jsonObj = e.xhr.responseJSON || JSON.parse(e.xhr.responseText);
45
- e.error = jsonObj ? ` ${jsonObj.error.message} : ${jsonObj.error.details}` : 'null text';
46
- }
47
- constructor(private envService: EnvironmentService, private toaster: ToasterService) {
48
-
49
-
50
- }
51
- }
@@ -1,41 +0,0 @@
1
- import {RestService} from '@abp/ng.core';
2
- import {Injectable} from '@angular/core';
3
- import {ResultBase} from "../models";
4
- import {ReceiptFromProductions} from "./models";
5
- import { HttpClient } from '@angular/common/http';
6
- import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
7
-
8
- @Injectable({
9
- providedIn: 'root',
10
- })
11
- export class HitCreateBarcodesService {
12
- apiName = 'UretimYonetimi';
13
- protected readonly resourceEndpoint: string;
14
-
15
- constructor(private restService: RestService) {
16
- this.resourceEndpoint = '/api/uretim-yonetimi/create-barcodes';
17
- }
18
-
19
- getReceiptFromProductions = (orderNo: string) =>
20
- this.restService.request<any, ResultBase<ReceiptFromProductions[]>>({
21
- method: 'GET',
22
- url: `${this.resourceEndpoint}/get-receipt-from-productions?productionOrderId=${orderNo}`,
23
- },
24
- {apiName: this.apiName});
25
-
26
- getBarcodeInfo = (productionOrderId, receiptId, barcodeNumber) =>
27
- this.restService.request<any, any>({
28
- method: 'POST',
29
- url: `${this.resourceEndpoint}/get-barcode?productionOrderId=${productionOrderId}&receiptId=${receiptId}&barcodeNumber=${barcodeNumber}`,
30
- },
31
- {apiName: this.apiName});
32
- }
33
-
34
- export class BarcodeViewerComponent {
35
- pdfSrc: SafeResourceUrl | null = null;
36
- protected readonly resourceEndpoint: string;
37
-
38
- constructor(private http: HttpClient, private sanitizer: DomSanitizer) {
39
- this.resourceEndpoint = '/api/uretim-yonetimi/create-barcodes';
40
- }
41
- }
@@ -1,6 +0,0 @@
1
- export class ReceiptFromProductions {
2
- docEntry: number;
3
- quantity: number;
4
- docDate: Date;
5
- docDateString: string;
6
- }
@@ -1,39 +0,0 @@
1
- import {RestService} from '@abp/ng.core';
2
- import {Injectable} from '@angular/core';
3
- import {DevexpressRestService} from '../devexpress-query-builder/devexpress-query-builder';
4
- import {ResultBase} from "../models";
5
- import {IssuesForProductionGetDto, IssuesForProductionPatchDto, IssuesForProductionPostDto} from "./models";
6
-
7
- @Injectable({
8
- providedIn: 'root',
9
- })
10
- export class HitIssuesForProductionsService {
11
- apiName = 'UretimYonetimi';
12
- protected readonly resourceEndpoint: string;
13
-
14
- constructor(private restService: RestService, private devexService: DevexpressRestService) {
15
- this.resourceEndpoint = '/api/uretim-yonetimi/issues-for-productions';
16
- }
17
-
18
- post = (input: IssuesForProductionPostDto) =>
19
- this.restService.request<IssuesForProductionPostDto, ResultBase<IssuesForProductionPostDto>>({
20
- method: 'POST',
21
- url: `${this.resourceEndpoint}`,
22
- body: input,
23
- },
24
- {apiName: this.apiName});
25
- patch = (input: IssuesForProductionPatchDto) =>
26
- this.restService.request<IssuesForProductionPatchDto, ResultBase<IssuesForProductionPatchDto>>({
27
- method: 'POST',
28
- url: `${this.resourceEndpoint}`,
29
- body: input,
30
- },
31
- {apiName: this.apiName});
32
-
33
- get = (itemCode: string, orderNo: string) =>
34
- this.restService.request<string, ResultBase<IssuesForProductionGetDto>>({
35
- method: 'GET',
36
- url: `${this.resourceEndpoint}?itemCode=${itemCode}&orderNo=${orderNo}`,
37
- },
38
- {apiName: this.apiName});
39
- }
@@ -1,42 +0,0 @@
1
- export class IssuesForProductionPostDto {
2
- DocumentLines: IssueLine[];
3
-
4
- constructor(issueLines: IssueLine[] = []) {
5
- this.DocumentLines = issueLines;
6
- }
7
- }
8
-
9
- export class IssueLine {
10
- ItemCode: string; // For mapping
11
- IsQRReady: boolean = false;
12
- WarehouseCode: string;
13
- Quantity: number = 0;
14
- BaseType: number = 202;
15
- BaseEntry: number;
16
- BaseLine: number;
17
- BatchNumbers: BatchNumber[] = [];
18
- }
19
-
20
- export class BatchNumber {
21
- BatchNumber: string;
22
- Quantity: number;
23
-
24
- constructor(batchNumber: string, quantity: number) {
25
- this.BatchNumber = batchNumber;
26
- this.Quantity = quantity;
27
- }
28
- }
29
-
30
- export class IssuesForProductionPatchDto {
31
-
32
- }
33
-
34
- export class IssuesForProductionGetDto {
35
- orderNo: string;
36
- itemCode: string;
37
- itemName: string;
38
- warehouse: string;
39
- lineNum: number;
40
- plannedQty: number;
41
- unitOfMeasurement: string;
42
- }