@things-factory/operato-wms 4.3.242 → 4.3.243

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.
@@ -1505,6 +1505,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1505
1505
  handlers: {
1506
1506
  click: (columns, data, column, record, rowIndex) => {
1507
1507
  const newData = data.records.filter((_, idx) => idx !== rowIndex)
1508
+ const vasGristId = this.vasData.records.filter(v=> v.id == rowIndex).map(v=>{return {vasGristId: v.vasGristId}})
1509
+ this.vasData = { ...this.vasData, records: this.vasData.records.filter(v => {
1510
+ return !vasGristId.some(i => {
1511
+ return i.vasGristId === v.vasGristId
1512
+ })
1513
+ })}
1508
1514
  this.inventoryData = { ...this.inventoryData, records: newData }
1509
1515
  this.inventoryGrist.dirtyData.records = newData
1510
1516
  this._updateInventoryGristConfig()
@@ -1839,7 +1845,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1839
1845
  }
1840
1846
  if (
1841
1847
  this.vasData?.records
1842
- .filter(vas => vas.sku === changeRecord.sku && vas.batchId == changeRecord.batchId && vas.qty)
1848
+ .filter(vas => vas.sku === changeRecord.sku && vas.batchId == changeRecord.batchId && vas.qty && vas.palletId == changeRecord.palletId)
1843
1849
  .map(a => a.qty)
1844
1850
  .reduce((a, b) => a + b, 0) > inventoryData.releaseQty
1845
1851
  ) {
@@ -2453,6 +2459,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2453
2459
  ...this.inventoryData,
2454
2460
  records: [...this.inventoryGrist.dirtyData.records]
2455
2461
  }
2462
+
2463
+ // if got this.vasData only, to prevent calling this function if this.vasData is unavailable
2464
+ // delete vasData if product is changed in order tab
2465
+ if (this.vasData.records.length > 0){
2466
+ this.removeVasData(rowIndex)
2467
+ }
2456
2468
  }
2457
2469
  }}"
2458
2470
  ></select-inventory-popup>
@@ -2504,8 +2516,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2504
2516
  : record.newUomValue
2505
2517
  : (record.newUomValue = null)
2506
2518
  })
2507
-
2508
- // here
2509
2519
  this.vasData = {
2510
2520
  ...this.vasData,
2511
2521
  records: [...this.vasGrist.dirtyData.records]
@@ -3679,6 +3689,15 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
3679
3689
  return items
3680
3690
  }
3681
3691
 
3692
+ removeVasData(rowIndex){
3693
+ const vasGristId = this.vasData.records.filter(v=> v.id == rowIndex).map(v=>{return {vasGristId: v.vasGristId}})
3694
+ this.vasData = { ...this.vasData, records: this.vasData.records.filter(v => {
3695
+ return !vasGristId.some(i => {
3696
+ return i.vasGristId === v.vasGristId
3697
+ })
3698
+ })}
3699
+ }
3700
+
3682
3701
  _showToast({ type, message }) {
3683
3702
  document.dispatchEvent(
3684
3703
  new CustomEvent('notify', {
@@ -76,7 +76,7 @@ class VasExecution extends connect(store)(localize(i18next)(PageView)) {
76
76
  <fieldset>
77
77
  <legend>
78
78
  ${i18next.t('title.vas')}
79
- [${this._selectedVas?.__seq__
79
+ [ ${this._selectedVas?.__seq__
80
80
  ? this._selectedVas?.__seq__
81
81
  : this.data
82
82
  ? parseFloat(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.242",
3
+ "version": "4.3.243",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.237",
109
109
  "@things-factory/tutorial-ui": "^4.3.237",
110
110
  "@things-factory/warehouse-base": "^4.3.241",
111
- "@things-factory/worksheet-base": "^4.3.242"
111
+ "@things-factory/worksheet-base": "^4.3.243"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.227",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "bed41128f2997bc35a711b1ab73d17b8334567e7"
120
+ "gitHead": "61ede3d61f5fc831fbf6278245a010aea2253065"
121
121
  }