@hitsoft/uretim-yonetimi 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/components/hit-filling-control/hit-filling-control.component.mjs +1 -19
- package/esm2020/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.mjs +1 -18
- package/esm2020/lib/hit-proxy/models.mjs +13 -38
- package/fesm2015/hitsoft-uretim-yonetimi.mjs +12 -72
- package/fesm2015/hitsoft-uretim-yonetimi.mjs.map +1 -1
- package/fesm2020/hitsoft-uretim-yonetimi.mjs +12 -72
- package/fesm2020/hitsoft-uretim-yonetimi.mjs.map +1 -1
- package/lib/components/hit-filling-control/hit-filling-control.component.d.ts +0 -1
- package/lib/components/hit-issues-for-productions/hit-issues-for-productions.component.d.ts +0 -1
- package/lib/hit-proxy/models.d.ts +1 -3
- package/package.json +1 -1
|
@@ -125,14 +125,12 @@ class HitHelper {
|
|
|
125
125
|
.join('\n');
|
|
126
126
|
}
|
|
127
127
|
static parseQR(barkod) {
|
|
128
|
-
//
|
|
128
|
+
// Yeni barkod yapısı: (240)itemcode(10)partiNo(17)sonKullanmaTarihi(3103)miktar(21)elTerminalKodu
|
|
129
129
|
const marker240 = '(240)';
|
|
130
130
|
const marker10 = '(10)';
|
|
131
131
|
const marker17 = '(17)';
|
|
132
|
-
const
|
|
132
|
+
const marker3103 = '(3103)';
|
|
133
133
|
const marker21 = '(21)';
|
|
134
|
-
const marker92 = '(92)';
|
|
135
|
-
const marker93 = '(93)';
|
|
136
134
|
// 240 ile başlıyor
|
|
137
135
|
if (!barkod.startsWith(marker240))
|
|
138
136
|
return null;
|
|
@@ -147,36 +145,17 @@ class HitHelper {
|
|
|
147
145
|
return null;
|
|
148
146
|
const lotNo = barkod.substring(pos, idx17);
|
|
149
147
|
pos = idx17 + marker17.length;
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
148
|
+
const idx3103 = barkod.indexOf(marker3103, pos);
|
|
149
|
+
if (idx3103 === -1)
|
|
152
150
|
return null;
|
|
153
|
-
const expDateRaw = barkod.substring(pos,
|
|
154
|
-
pos =
|
|
151
|
+
const expDateRaw = barkod.substring(pos, idx3103);
|
|
152
|
+
pos = idx3103 + marker3103.length;
|
|
155
153
|
const idx21 = barkod.indexOf(marker21, pos);
|
|
156
154
|
if (idx21 === -1)
|
|
157
155
|
return null;
|
|
158
156
|
const weightRaw = barkod.substring(pos, idx21);
|
|
159
157
|
pos = idx21 + marker21.length;
|
|
160
|
-
|
|
161
|
-
const idx92 = barkod.indexOf(marker92, pos);
|
|
162
|
-
let terminalCode;
|
|
163
|
-
let workOrderNo = '';
|
|
164
|
-
let weighingSequenceNo = '';
|
|
165
|
-
if (idx92 !== -1) {
|
|
166
|
-
terminalCode = barkod.substring(pos, idx92);
|
|
167
|
-
pos = idx92 + marker92.length;
|
|
168
|
-
const idx93 = barkod.indexOf(marker93, pos);
|
|
169
|
-
if (idx93 !== -1) {
|
|
170
|
-
workOrderNo = barkod.substring(pos, idx93);
|
|
171
|
-
weighingSequenceNo = barkod.substring(idx93 + marker93.length);
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
workOrderNo = barkod.substring(pos);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
terminalCode = barkod.substring(pos);
|
|
179
|
-
}
|
|
158
|
+
const terminalCode = barkod.substring(pos);
|
|
180
159
|
// Tarihi formatla: YYMMDD -> YYYY-MM-DD
|
|
181
160
|
let expirationDate = '';
|
|
182
161
|
if (/^\d{6}$/.test(expDateRaw)) {
|
|
@@ -185,22 +164,18 @@ class HitHelper {
|
|
|
185
164
|
else {
|
|
186
165
|
expirationDate = expDateRaw;
|
|
187
166
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const weightGr = isNaN(weightRawInt) ? 0 : weightRawInt / 1000000;
|
|
191
|
-
return new Hammadde(itemCode, lotNo, expirationDate, weightGr, terminalCode, workOrderNo, weighingSequenceNo);
|
|
167
|
+
const weight = parseInt(weightRaw, 10);
|
|
168
|
+
return new Hammadde(itemCode, lotNo, expirationDate, weight, terminalCode);
|
|
192
169
|
}
|
|
193
170
|
}
|
|
194
171
|
class Hammadde {
|
|
195
|
-
constructor(chemicalCode, lotNumber, expirationDate,
|
|
172
|
+
constructor(chemicalCode, lotNumber, expirationDate, weight, terminalCode) {
|
|
196
173
|
this.chemicalCode = chemicalCode;
|
|
197
174
|
this.lotNumber = lotNumber;
|
|
198
175
|
this.expirationDate = expirationDate;
|
|
199
|
-
this.weightGr =
|
|
200
|
-
this.weightKg =
|
|
176
|
+
this.weightGr = weight; // Gram cinsinden
|
|
177
|
+
this.weightKg = weight ? weight / 1000 : 0; // Kilogram cinsine dönüştürülmüş hali
|
|
201
178
|
this.terminalCode = terminalCode;
|
|
202
|
-
this.workOrderNo = workOrderNo;
|
|
203
|
-
this.weighingSequenceNo = weighingSequenceNo;
|
|
204
179
|
}
|
|
205
180
|
}
|
|
206
181
|
|
|
@@ -901,7 +876,6 @@ class HitIssuesForProductionsComponent {
|
|
|
901
876
|
this.isEmriBarkoduGecerliMi = false;
|
|
902
877
|
this.searcheBasildiMi = false;
|
|
903
878
|
this.hammaddeQR = '';
|
|
904
|
-
this.scannedBarcodeKeys = new Set();
|
|
905
879
|
this.warehouses = [];
|
|
906
880
|
this.HitHelper = HitHelper;
|
|
907
881
|
}
|
|
@@ -978,21 +952,6 @@ class HitIssuesForProductionsComponent {
|
|
|
978
952
|
});
|
|
979
953
|
return;
|
|
980
954
|
}
|
|
981
|
-
// Mükerrer barkod kontrolü: aynı iş emri + tartım sıra no kombinasyonu tekrar okutulamaz
|
|
982
|
-
if (parsed.workOrderNo && parsed.weighingSequenceNo) {
|
|
983
|
-
const barcodeKey = `${parsed.workOrderNo}_${parsed.weighingSequenceNo}`;
|
|
984
|
-
if (this.scannedBarcodeKeys.has(barcodeKey)) {
|
|
985
|
-
this.confirmation.error('', 'Aynı barkod tekrar okutulamaz!', this.options).subscribe({
|
|
986
|
-
next: () => {
|
|
987
|
-
this.hammaddeQR = '';
|
|
988
|
-
this.focusQRInput();
|
|
989
|
-
}
|
|
990
|
-
});
|
|
991
|
-
this.isLoading = false;
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
this.scannedBarcodeKeys.add(barcodeKey);
|
|
995
|
-
}
|
|
996
955
|
this.service.get(parsed.chemicalCode, this.productionOrder.absoluteEntry.toString()).subscribe({
|
|
997
956
|
next: (response) => {
|
|
998
957
|
if (response.isSuccessful) {
|
|
@@ -1081,7 +1040,6 @@ class HitIssuesForProductionsComponent {
|
|
|
1081
1040
|
this.productionOrder = null;
|
|
1082
1041
|
this.focusBarkodInput();
|
|
1083
1042
|
this.unitOfMeasure = null;
|
|
1084
|
-
this.scannedBarcodeKeys.clear();
|
|
1085
1043
|
}
|
|
1086
1044
|
getWarehouses() {
|
|
1087
1045
|
this.isLoading = true;
|
|
@@ -1541,7 +1499,6 @@ class HitFillingControlComponent {
|
|
|
1541
1499
|
this.qrCode = '';
|
|
1542
1500
|
this.lines = [];
|
|
1543
1501
|
this.isDataLoadedFromDb = false; // DB'den veri mi geldi yoksa yeni mi
|
|
1544
|
-
this.scannedBarcodeKeys = new Set();
|
|
1545
1502
|
}
|
|
1546
1503
|
ngOnInit() {
|
|
1547
1504
|
// Initialization logic
|
|
@@ -1613,21 +1570,6 @@ class HitFillingControlComponent {
|
|
|
1613
1570
|
this.focusQRInput();
|
|
1614
1571
|
return;
|
|
1615
1572
|
}
|
|
1616
|
-
// Mükerrer barkod kontrolü: aynı iş emri + tartım sıra no kombinasyonu tekrar okutulamaz
|
|
1617
|
-
if (parsed.workOrderNo && parsed.weighingSequenceNo) {
|
|
1618
|
-
const barcodeKey = `${parsed.workOrderNo}_${parsed.weighingSequenceNo}`;
|
|
1619
|
-
if (this.scannedBarcodeKeys.has(barcodeKey)) {
|
|
1620
|
-
this.confirmation.error('', 'Aynı barkod tekrar okutulamaz!', {
|
|
1621
|
-
hideYesBtn: true,
|
|
1622
|
-
cancelText: 'Kapat',
|
|
1623
|
-
dismissible: false,
|
|
1624
|
-
});
|
|
1625
|
-
this.qrCode = '';
|
|
1626
|
-
this.focusQRInput();
|
|
1627
|
-
return;
|
|
1628
|
-
}
|
|
1629
|
-
this.scannedBarcodeKeys.add(barcodeKey);
|
|
1630
|
-
}
|
|
1631
1573
|
// Grid'de bu item'ı bul
|
|
1632
1574
|
const line = this.lines.find(x => x.itemCode === parsed.chemicalCode);
|
|
1633
1575
|
if (!line) {
|
|
@@ -1800,7 +1742,6 @@ class HitFillingControlComponent {
|
|
|
1800
1742
|
this.lines = [];
|
|
1801
1743
|
this.isDataLoadedFromDb = false;
|
|
1802
1744
|
this.isSaving = false;
|
|
1803
|
-
this.scannedBarcodeKeys.clear();
|
|
1804
1745
|
this.focusOnIsEmriNo();
|
|
1805
1746
|
}
|
|
1806
1747
|
get showKazanDegisimiButton() {
|
|
@@ -1845,7 +1786,6 @@ class HitFillingControlComponent {
|
|
|
1845
1786
|
// Grid'i refresh et
|
|
1846
1787
|
this.dataGrid.instance.refresh();
|
|
1847
1788
|
this.isDataLoadedFromDb = false; // Artık yeni veri girilecek
|
|
1848
|
-
this.scannedBarcodeKeys.clear(); // Yeni kazan için okutulmuş barkodları sıfırla
|
|
1849
1789
|
// QR input'a focus et
|
|
1850
1790
|
this.focusOnQrCode();
|
|
1851
1791
|
}
|