@things-factory/operato-wms 4.3.383 → 4.3.385

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.
@@ -141,7 +141,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
141
141
  _showVasSummary: Boolean,
142
142
 
143
143
  // Type
144
- _selectBy: String
144
+ _selectBy: String,
145
+
146
+ // Settings
147
+ _strictProductSelection: Boolean
145
148
  }
146
149
  }
147
150
 
@@ -1075,6 +1078,8 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1075
1078
  getCodeByName('PACKING_TYPES')
1076
1079
  ])
1077
1080
 
1081
+ this._strictProductSelection = await fetchSettingRule('strict-product-selection')
1082
+
1078
1083
  this.containerSizes = await getCodeByName('CONTAINER_SIZES')
1079
1084
 
1080
1085
  this.quickFindContent.currentTabKey = i18next.t('label.order')
@@ -2051,7 +2056,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2051
2056
  // changeRecord.vasQty = changeRecord.qty
2052
2057
  changeRecord.outputQty = initialRecord.outputQty ? initialRecord.outputQty : null
2053
2058
  //
2054
- } else if (changedColumn === 'outputQty') {
2059
+ } else if (changedColumn === 'outputQty' && !this._strictProductSelection) {
2055
2060
  if (changeRecord.outputQty <= 0 || isNaN(changeRecord.outputQty)) {
2056
2061
  throw new Error(i18next.t('text.invalid_quantity_input'))
2057
2062
  } else if (initialRecord.outputQty == null) {
@@ -12,14 +12,26 @@ import '../../order/vas-order/popup/vas-target-product-popup'
12
12
  import '../../order/vas-order/popup/select-vas-popup'
13
13
 
14
14
  import gql from 'graphql-tag'
15
- import { css, html } from 'lit-element'
15
+ import {
16
+ css,
17
+ html
18
+ } from 'lit-element'
16
19
  import { connect } from 'pwa-helpers/connect-mixin'
17
20
 
18
21
  import { getCodeByName } from '@things-factory/code-base'
19
22
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
20
- import { i18next, localize } from '@things-factory/i18n-base'
23
+ import {
24
+ i18next,
25
+ localize
26
+ } from '@things-factory/i18n-base'
21
27
  import { openPopup } from '@things-factory/layout-base'
22
- import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
28
+ import {
29
+ client,
30
+ CustomAlert,
31
+ navigate,
32
+ PageView,
33
+ store
34
+ } from '@things-factory/shell'
23
35
  import { CommonButtonStyles } from '@things-factory/styles'
24
36
  import { isMobileDevice } from '@things-factory/utils'
25
37
 
@@ -110,7 +122,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
110
122
  // Vas //
111
123
  vasGristConfig: Object,
112
124
  vasData: Object,
113
- deletedVas: Array
125
+ deletedVas: Array,
126
+
127
+ // Settings//
128
+ _strictProductSelection: Boolean
114
129
  }
115
130
  }
116
131
 
@@ -1065,6 +1080,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1065
1080
  await this.fetchCountry()
1066
1081
  this.containerSizes = await getCodeByName('CONTAINER_SIZES')
1067
1082
 
1083
+ this._strictProductSelection = await fetchSettingRule('strict-product-selection')
1084
+
1068
1085
  this.isUserBelongsDomain = await this._checkUserBelongsDomain()
1069
1086
  let [allowROAddProductSetting, userRoles] = [fetchSettingRule('allow-ro-add-product'), this.fetchUserRoleHandler()]
1070
1087
  let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
@@ -2140,7 +2157,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2140
2157
  .targetList="${targetList}"
2141
2158
  .vasList="${this.vasData.records}"
2142
2159
  .record="${record}"
2143
- .productSKU= "${record.productSKU}"
2160
+ .productSKU="${record.productSKU}"
2144
2161
  @selected="${selected => {
2145
2162
  let group = this.vasGrist.data.records[this.vasGrist.data.records.length - 1]?.group
2146
2163
  ? this.vasGrist.data.records[this.vasGrist.data.records.length - 1]?.group
@@ -2607,7 +2624,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2607
2624
  : null
2608
2625
  changeRecord.outputQty = initialRecord.outputQty ? initialRecord.outputQty : null
2609
2626
  //
2610
- } else if (changedColumn === 'outputQty') {
2627
+ } else if (changedColumn === 'outputQty' && !this._strictProductSelection) {
2611
2628
  if (changeRecord.outputQty <= 0 || isNaN(changeRecord.outputQty)) {
2612
2629
  throw new Error(i18next.t('text.invalid_quantity_input'))
2613
2630
  } else if (initialRecord.outputQty == null) {
@@ -2692,9 +2709,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2692
2709
  shippingOrderInfo.billingCountry = contactPointInfo.country
2693
2710
  }
2694
2711
 
2695
- let releaseOrderChanged = this._compareObjects(releaseOrder, oldResorder);
2696
- let shippingOrderChanged = this._compareObjects(shippingOrderInfo, oldResorder);
2697
- let exportDataChanged = this._compareExportObjects(exportData, oldResorder);
2712
+ let releaseOrderChanged = this._compareObjects(releaseOrder, oldResorder)
2713
+ let shippingOrderChanged = this._compareObjects(shippingOrderInfo, oldResorder)
2714
+ let exportDataChanged = this._compareExportObjects(exportData, oldResorder)
2698
2715
 
2699
2716
  if (releaseOrderChanged == true || shippingOrderChanged == true || exportDataChanged == true) {
2700
2717
  releaseOrderChanged = true
@@ -2772,8 +2789,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2772
2789
  }
2773
2790
 
2774
2791
  _compareObjects(object1, object2) {
2775
- let formChanged = false;
2776
-
2792
+ let formChanged = false
2793
+
2777
2794
  for (const key in object1) {
2778
2795
  if (object1?.orderPackages?.length > 0) {
2779
2796
  if (key == 'trackingNo' && object1[key] !== object2.orderPackages[0].trackingNo) {
@@ -2792,24 +2809,19 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2792
2809
  }
2793
2810
  }
2794
2811
  } else if (object1.hasOwnProperty(key) && object1[key] !== object2[key]) {
2795
- if (
2796
- !(
2797
- (object1[key] == '' || object1[key] == null) &&
2798
- (object2[key] == '' || object2[key] == null)
2799
- )
2800
- ) {
2812
+ if (!((object1[key] == '' || object1[key] == null) && (object2[key] == '' || object2[key] == null))) {
2801
2813
  formChanged = true
2802
2814
  break
2803
2815
  }
2804
2816
  }
2805
2817
  }
2806
-
2818
+
2807
2819
  return formChanged
2808
2820
  }
2809
2821
 
2810
2822
  _compareExportObjects(object1, object2) {
2811
- let formChanged = false;
2812
-
2823
+ let formChanged = false
2824
+
2813
2825
  for (const key in object1) {
2814
2826
  if (object1.hasOwnProperty(key) && object1[key] !== object2.shippingOrderInfo[key]) {
2815
2827
  if (
@@ -2823,7 +2835,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
2823
2835
  }
2824
2836
  }
2825
2837
  }
2826
-
2838
+
2827
2839
  return formChanged
2828
2840
  }
2829
2841
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.383",
3
+ "version": "4.3.385",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.381",
92
92
  "@things-factory/product-base": "^4.3.383",
93
93
  "@things-factory/resource-ui": "^4.3.381",
94
- "@things-factory/sales-ui": "^4.3.383",
94
+ "@things-factory/sales-ui": "^4.3.384",
95
95
  "@things-factory/scene-data-transform": "^4.3.381",
96
96
  "@things-factory/scene-excel": "^4.3.381",
97
97
  "@things-factory/scene-firebase": "^4.3.381",
@@ -107,8 +107,8 @@
107
107
  "@things-factory/system-ui": "^4.3.381",
108
108
  "@things-factory/transport-base": "^4.3.381",
109
109
  "@things-factory/tutorial-ui": "^4.3.381",
110
- "@things-factory/warehouse-base": "^4.3.383",
111
- "@things-factory/worksheet-base": "^4.3.383"
110
+ "@things-factory/warehouse-base": "^4.3.384",
111
+ "@things-factory/worksheet-base": "^4.3.384"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.381",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "03a2cb232a8d72e1e6aca1992107b3777fe5a3e0"
120
+ "gitHead": "2d9e6d3ebda9e7c4680d7ea22ae9ac5c6bf9f5b8"
121
121
  }