@things-factory/operato-wms 4.3.311 → 4.3.312

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.
@@ -861,7 +861,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
861
861
  if (e.keyCode === 13) {
862
862
  e.preventDefault()
863
863
  console.time('time execution for product barcode scanning')
864
+
864
865
  try {
866
+ if (this._scanning) throw new Error(i18next.t('text.previous_scan_is_executing'))
867
+ this._scanning = true
865
868
  await this.validatePacking()
866
869
 
867
870
  let response = this._enableProductScanning ? await this.productBarcodePacking() : await this.commonPacking()
@@ -871,7 +874,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
871
874
  if (!response.errors) {
872
875
  if (this._enableProductScanning) {
873
876
  this.productBarcodeInput.value = ''
874
- this._selectedOrderInventory = null
875
877
  } else {
876
878
  this.releaseQtyInput.value = ''
877
879
  this._selectedTaskStatus = null
@@ -894,7 +896,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
894
896
  this.focusOnReleaseQtyInput()
895
897
  this._selectedTaskStatus = null
896
898
  }
897
- this._selectedOrderInventory = null
899
+ //this._selectedOrderInventory = null
900
+
898
901
  this.showToast(e)
899
902
  } finally {
900
903
  if (!this._isRequireSerialNumberScanningOutbound) {
@@ -902,6 +905,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
902
905
  } else {
903
906
  if (this._isBatchPicking) this.serialInput.value = ''
904
907
  }
908
+
909
+ if (!this._selectedOrderInventory) {
910
+ this._selectedOrderInventory = this.data.records[0]
911
+ this._isRequireSerialNumberScanningOutbound =
912
+ this.data.records[0].product?.isRequireSerialNumberScanningOutbound
913
+ }
905
914
  this._scanning = false
906
915
  // time execution for product barcode scanning (without scanning machines): 308.0390625 ms
907
916
  console.timeEnd('time execution for product barcode scanning')
@@ -910,8 +919,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
910
919
  }
911
920
 
912
921
  async productBarcodePacking() {
913
- if (this._scanning) return this.showToast({ message: i18next.t('text.previous_scan_is_executing') })
914
- this._scanning = true
915
922
  let response = await client.mutate({
916
923
  mutation: gql`
917
924
  mutation scanProductPacking($orderPackageItemId: String!, $productBarcode: String!, $serialNumber: String) {
@@ -1031,8 +1038,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
1031
1038
  }
1032
1039
 
1033
1040
  async commonPacking() {
1034
- if (this._scanning) return this.showToast({ message: i18next.t('text.previous_scan_is_executing') })
1035
- this._scanning = true
1036
1041
  return await client.mutate({
1037
1042
  mutation: gql`
1038
1043
  mutation packing($orderPackageItemId: String!, $releaseQty: Int!, $serialNumber: String) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.311",
3
+ "version": "4.3.312",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "428f26407a38c84e2d3580bafe983038e934e90e"
120
+ "gitHead": "4d1789d2e9cb98de62ce71bc716a5e4da196c615"
121
121
  }