@things-factory/operato-wms 3.7.10 → 3.7.11
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.
|
@@ -519,71 +519,75 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
519
519
|
let columnName = e.detail.column.name
|
|
520
520
|
let packageUomValue = 0
|
|
521
521
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
const result = this._calculateQtyAndUom(
|
|
527
|
-
packageUomValue,
|
|
528
|
-
columnName,
|
|
529
|
-
e.detail.record.uomValue,
|
|
530
|
-
e.detail.record.qty,
|
|
531
|
-
e.detail.record.__origin__.releaseUomValue,
|
|
532
|
-
e.detail.record.__origin__.releaseQty,
|
|
533
|
-
e.detail.record.__origin__.addableUomValue,
|
|
534
|
-
e.detail.record.__origin__.addableQty,
|
|
535
|
-
e.detail.record.__origin__.remainUomValue,
|
|
536
|
-
e.detail.record.__origin__.remainQty,
|
|
537
|
-
e.detail.after
|
|
538
|
-
)
|
|
522
|
+
try {
|
|
523
|
+
if (e.details?.after && e.details?.after !== 0) {
|
|
524
|
+
throw new Error(i18next.t('text.invalid_form_value'))
|
|
525
|
+
}
|
|
539
526
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
527
|
+
const result = this._calculateQtyAndUom(
|
|
528
|
+
packageUomValue,
|
|
529
|
+
columnName,
|
|
530
|
+
e.detail.record.uomValue,
|
|
531
|
+
e.detail.record.qty,
|
|
532
|
+
e.detail.record.__origin__.releaseUomValue,
|
|
533
|
+
e.detail.record.__origin__.releaseQty,
|
|
534
|
+
e.detail.record.__origin__.addableUomValue,
|
|
535
|
+
e.detail.record.__origin__.addableQty,
|
|
536
|
+
e.detail.record.__origin__.remainUomValue,
|
|
537
|
+
e.detail.record.__origin__.remainQty,
|
|
538
|
+
e.detail.after
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
this.existingInventoryData = {
|
|
542
|
+
...this.existingInventoryGrist.dirtyData,
|
|
543
|
+
records: this.existingInventoryGrist.dirtyData.records.map((record, idx) => {
|
|
544
|
+
if (result.releaseQty >= 0 && result.roundedUom >= 0) {
|
|
545
|
+
if ((columnName == 'releaseUomValue' || columnName == 'releaseQty') && idx === e.detail.row) {
|
|
546
|
+
if (columnName == 'releaseUomValue') {
|
|
547
|
+
record.releaseQty = result.releaseQty
|
|
548
|
+
}
|
|
549
|
+
record.releaseUomValue = result.roundedUom
|
|
550
|
+
record.addableQty = record.__origin__.releaseQty + record.__origin__.addableQty - result.releaseQty
|
|
551
|
+
if (record.addableQty <= 0) {
|
|
552
|
+
record.addableQty = 0
|
|
553
|
+
}
|
|
554
|
+
if (record.addableUomValue == 0) {
|
|
555
|
+
record.addableUomValue =
|
|
556
|
+
record.addableQty * (record.__origin__.releaseUomValue / record.__origin__.releaseQty)
|
|
559
557
|
} else {
|
|
560
|
-
if (
|
|
561
|
-
record.addableUomValue =
|
|
562
|
-
record.addableQty *
|
|
563
|
-
(e.detail.record.__origin__.addableUomValue / e.detail.record.__origin__.addableQty)
|
|
558
|
+
if (record.addableQty == 0) {
|
|
559
|
+
record.addableUomValue = 0
|
|
564
560
|
} else {
|
|
565
|
-
record.
|
|
566
|
-
record.
|
|
567
|
-
|
|
561
|
+
if (e.detail.record.__origin__.releaseQty == 0 || e.detail.record.__origin__.releaseUomValue == 0) {
|
|
562
|
+
record.addableUomValue =
|
|
563
|
+
record.addableQty *
|
|
564
|
+
(e.detail.record.__origin__.addableUomValue / e.detail.record.__origin__.addableQty)
|
|
565
|
+
} else {
|
|
566
|
+
record.addableUomValue =
|
|
567
|
+
record.addableQty *
|
|
568
|
+
(e.detail.record.__origin__.releaseUomValue / e.detail.record.__origin__.releaseQty)
|
|
569
|
+
}
|
|
568
570
|
}
|
|
569
571
|
}
|
|
570
572
|
}
|
|
571
573
|
}
|
|
572
|
-
}
|
|
573
574
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
let returnObj = {
|
|
576
|
+
...record
|
|
577
|
+
}
|
|
577
578
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
579
|
+
if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
|
|
580
|
+
returnObj.product = {
|
|
581
|
+
id: record.inventory.productId,
|
|
582
|
+
name: record.inventory.productName
|
|
583
|
+
}
|
|
582
584
|
}
|
|
583
|
-
}
|
|
584
585
|
|
|
585
|
-
|
|
586
|
-
|
|
586
|
+
return returnObj
|
|
587
|
+
})
|
|
588
|
+
}
|
|
589
|
+
} catch (e) {
|
|
590
|
+
this._showToast(e)
|
|
587
591
|
}
|
|
588
592
|
}
|
|
589
593
|
|
|
@@ -605,18 +609,14 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
605
609
|
|
|
606
610
|
if (afterValue >= 0) {
|
|
607
611
|
if (columnName == 'releaseUomValue' || columnName == 'releaseQty') {
|
|
608
|
-
if (
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
if (originQty) {
|
|
612
|
-
if (originQty == 0 || originUom == 0) {
|
|
613
|
-
packageUom = originAddableUom / originAddableQty
|
|
614
|
-
} else {
|
|
615
|
-
packageUom = originUom / originQty
|
|
616
|
-
}
|
|
612
|
+
if (originQty) {
|
|
613
|
+
if (originQty == 0 || originUom == 0) {
|
|
614
|
+
packageUom = originAddableUom / originAddableQty
|
|
617
615
|
} else {
|
|
618
|
-
packageUom =
|
|
616
|
+
packageUom = originUom / originQty
|
|
619
617
|
}
|
|
618
|
+
} else {
|
|
619
|
+
packageUom = originRemainUom / originRemainQty
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
if (columnName === 'releaseQty') {
|
|
@@ -785,9 +785,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
785
785
|
|
|
786
786
|
this.roType = releaseOrder.type
|
|
787
787
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
788
|
-
let roundedUomValue =
|
|
789
|
-
inventoryInfo.releaseQty *
|
|
790
|
-
((inventoryInfo.uomValue + inventoryInfo.releaseUomValue) / (inventoryInfo.qty + inventoryInfo.releaseQty))
|
|
788
|
+
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(2))
|
|
791
789
|
return {
|
|
792
790
|
...inventoryInfo,
|
|
793
791
|
productSKU: inventoryInfo?.product?.sku || '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@things-factory/print-ui": "^3.7.5",
|
|
72
72
|
"@things-factory/product-base": "^3.7.8",
|
|
73
73
|
"@things-factory/resource-ui": "^3.7.7",
|
|
74
|
-
"@things-factory/sales-ui": "^3.7.
|
|
74
|
+
"@things-factory/sales-ui": "^3.7.11",
|
|
75
75
|
"@things-factory/scene-chartjs": "^3.7.5",
|
|
76
76
|
"@things-factory/scene-clock": "^3.7.5",
|
|
77
77
|
"@things-factory/scene-clone": "^3.7.5",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"@things-factory/system-ui": "^3.7.5",
|
|
103
103
|
"@things-factory/transport-base": "^3.7.5",
|
|
104
104
|
"@things-factory/tutorial-ui": "^3.7.5",
|
|
105
|
-
"@things-factory/warehouse-base": "^3.7.
|
|
106
|
-
"@things-factory/worksheet-base": "^3.7.
|
|
105
|
+
"@things-factory/warehouse-base": "^3.7.11",
|
|
106
|
+
"@things-factory/worksheet-base": "^3.7.11"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@things-factory/builder": "^3.7.5"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "fea83ab8a7f82df4d78e69a504a4877c3b93248e"
|
|
112
112
|
}
|