@things-factory/operato-wms 3.8.2 → 3.8.6

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.
@@ -803,14 +803,18 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
803
803
  if (this._enableCartonLabel) {
804
804
  let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
805
805
  worksheetDetailNames.push(worksheetDetail[0].name)
806
- if (worksheetDetail[0].expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
807
- await this._expiryAlert()
808
- }
806
+ await this._checkExpiry(
807
+ worksheetDetail[0].expirationPeriod,
808
+ new Date(worksheetDetail[0].expirationDate),
809
+ locationDetails.type
810
+ )
809
811
  } else {
810
812
  worksheetDetailNames.push(this._selectedOrderProduct.name)
811
- if (this._selectedOrderProduct.expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
812
- await this._expiryAlert()
813
- }
813
+ await this._checkExpiry(
814
+ this._selectedOrderProduct.expirationPeriod,
815
+ new Date(this._selectedOrderProduct.expirationDate),
816
+ locationDetails.type
817
+ )
814
818
  }
815
819
 
816
820
  const response = await client.mutate({
@@ -874,16 +878,20 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
874
878
  const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
875
879
 
876
880
  if (this._enableCartonLabel) {
877
- worksheetDetailNames.push(worksheetDetail[0].name)
878
881
  let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
879
- if (worksheetDetail[0].expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
880
- await this._expiryAlert()
881
- }
882
+ worksheetDetailNames.push(worksheetDetail[0].name)
883
+ await this._checkExpiry(
884
+ worksheetDetail[0].expirationPeriod,
885
+ new Date(worksheetDetail[0].expirationDate),
886
+ locationDetails.type
887
+ )
882
888
  } else {
883
889
  worksheetDetailNames.push(this._selectedOrderProduct.name)
884
- if (this._selectedOrderProduct.expirationPeriod > 0 && locationDetails.type !== 'QUARANTINE') {
885
- await this._expiryAlert()
886
- }
890
+ await this._checkExpiry(
891
+ this._selectedOrderProduct.expirationPeriod,
892
+ new Date(this._selectedOrderProduct.expirationDate),
893
+ locationDetails.type
894
+ )
887
895
  }
888
896
 
889
897
  const response = await client.mutate({
@@ -945,8 +953,10 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
945
953
  await this._validatePutaway()
946
954
  if (!this.incompleteLocationName) {
947
955
  let worksheetDetailNames = []
948
- if (this._enableCartonLabel) worksheetDetailNames = this._getSelectedOrderProducts(this.cartonInput.value)
949
- else worksheetDetailNames.push(this._selectedOrderProduct.name)
956
+ if (this._enableCartonLabel) {
957
+ const selectedWorksheetDetailName = this._getSelectedOrderProducts(this.cartonInput.value)
958
+ worksheetDetailNames.push(selectedWorksheetDetailName[0].name)
959
+ } else worksheetDetailNames.push(this._selectedOrderProduct.name)
950
960
 
951
961
  const response = await client.mutate({
952
962
  mutation: gql`
@@ -1096,6 +1106,15 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
1096
1106
  }
1097
1107
  }
1098
1108
 
1109
+ async _checkExpiry(expirationPeriod, expiryDate, locationType) {
1110
+ let date = new Date()
1111
+ let acceptBefore = new Date(date.setDate(date.getDate() + expirationPeriod))
1112
+
1113
+ if (expirationPeriod > 0) {
1114
+ if (expiryDate < acceptBefore && locationType !== 'QUARANTINE') await this._expiryAlert()
1115
+ }
1116
+ }
1117
+
1099
1118
  _validateTransfer() {
1100
1119
  // 1. validate for order selection
1101
1120
  if (!this._selectedOrderProduct) throw new Error(i18next.t('text.target_is_not_selected'))
@@ -328,7 +328,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
328
328
  <input name="batchIdRef" readonly />
329
329
 
330
330
  <label>${i18next.t('label.packing_type')}</label>
331
- <input name="packingTypeSize" readonly />
331
+ <input name="packingType" readonly />
332
332
 
333
333
  <label>${i18next.t('label.total_pallet_qty')}</label>
334
334
  <input name="palletQty" type="number" readonly />
@@ -768,7 +768,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
768
768
 
769
769
  const response = await client.mutate({
770
770
  mutation: gql`
771
- mutation submitInventoryChanges($patches: [InventoryPatch]!) {
771
+ mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
772
772
  submitInventoryChanges(patches: $patches)
773
773
  }
774
774
  `,
@@ -960,7 +960,7 @@ class ProductList extends localize(i18next)(PageView) {
960
960
  if (_.isEmpty(itm.uom) || '') {
961
961
  if (!errors.find(err => err.type == 'uom')) errors.push({ type: 'uom', value: 'UOM is required' })
962
962
  }
963
- if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue < 1) {
963
+ if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue <= 0) {
964
964
  if (!errors.find(err => err.type == 'uomValue'))
965
965
  errors.push({ type: 'uomValue', value: 'UOM Value is required' })
966
966
  }
@@ -60,13 +60,13 @@ class B2bOrderRequests extends localize(i18next)(PageView) {
60
60
  get context() {
61
61
  return {
62
62
  title: i18next.t('title.release_order_requests'),
63
- // actions: [
64
- // {
65
- // title: i18next.t('button.batch_picking'),
66
- // action: this._openBatchPickingPopup.bind(this),
67
- // ...CommonButtonStyles.activate
68
- // }
69
- // ],
63
+ actions: [
64
+ {
65
+ title: i18next.t('button.batch_picking'),
66
+ action: this._openBatchPickingPopup.bind(this),
67
+ ...CommonButtonStyles.activate
68
+ }
69
+ ],
70
70
  exportable: {
71
71
  name: i18next.t('title.release_order_requests'),
72
72
  data: this._exportableData.bind(this)
@@ -65,12 +65,12 @@ class B2cOrderRequests extends localize(i18next)(PageView) {
65
65
  title: i18next.t('button.generate_packing_list'),
66
66
  action: this._generatePackingList.bind(this),
67
67
  ...CommonButtonStyles.label
68
+ },
69
+ {
70
+ title: i18next.t('button.batch_picking'),
71
+ action: this._openBatchPickingPopup.bind(this),
72
+ ...CommonButtonStyles.activate
68
73
  }
69
- // {
70
- // title: i18next.t('button.batch_picking'),
71
- // action: this._openBatchPickingPopup.bind(this),
72
- // ...CommonButtonStyles.activate
73
- // }
74
74
  ],
75
75
  exportable: {
76
76
  name: i18next.t('title.release_order_requests'),
@@ -209,6 +209,7 @@ class B2cOrderRequests extends localize(i18next)(PageView) {
209
209
  this.config = {
210
210
  rows: { selectable: { multiple: true }, appendable: false },
211
211
  list: { fields: ['name', 'bizplace', 'releaseDate', 'status', 'updatedAt'] },
212
+ pagination: { limit: 100, pages: [20, 50, 100, 200, 500] },
212
213
  columns: [
213
214
  { type: 'gutter', gutterName: 'sequence' },
214
215
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
@@ -7,7 +7,7 @@ import { isMobileDevice } from '@things-factory/utils'
7
7
  import { css, html, LitElement } from 'lit-element'
8
8
  import gql from 'graphql-tag'
9
9
  import { ScrollbarStyles } from '@things-factory/styles'
10
- import { ORDER_STATUS } from '../../constants'
10
+ import { ORDER_STATUS, RO_TYPES } from '../../constants'
11
11
  import '@things-factory/biz-ui'
12
12
 
13
13
  class BatchPickingPopup extends localize(i18next)(LitElement) {
@@ -146,6 +146,16 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
146
146
  name: 'releaseDate',
147
147
  type: 'date',
148
148
  props: { searchOper: 'lte' }
149
+ },
150
+ {
151
+ label: i18next.t('field.type'),
152
+ name: 'type',
153
+ type: 'select',
154
+ options: Object.keys(RO_TYPES).map(map => {
155
+ debugger
156
+ return { name: RO_TYPES[map].name, value: RO_TYPES[map].value }
157
+ }),
158
+ props: { searchOper: 'eq' }
149
159
  }
150
160
  ]
151
161
 
@@ -165,6 +175,12 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
165
175
  header: i18next.t('field.release_good_no'),
166
176
  width: 150
167
177
  },
178
+ {
179
+ type: 'string',
180
+ name: 'type',
181
+ header: i18next.t('field.type'),
182
+ width: 100
183
+ },
168
184
  {
169
185
  type: 'string',
170
186
  name: 'refNo',
@@ -288,6 +304,7 @@ class BatchPickingPopup extends localize(i18next)(LitElement) {
288
304
  name
289
305
  refNo
290
306
  releaseDate
307
+ type
291
308
  bizplace {
292
309
  id
293
310
  name
@@ -1396,7 +1396,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1396
1396
 
1397
1397
  async fetchInventoriesByBundle(productBundleId, bundleReleaseQty) {
1398
1398
  const page = 1
1399
- const limit = 200
1399
+ const limit = 99999
1400
1400
  const pagination = { page, limit }
1401
1401
  const filters = [
1402
1402
  {
@@ -1419,7 +1419,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1419
1419
 
1420
1420
  const response = await client.query({
1421
1421
  query: gql`
1422
- query inventoriesByBundle($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
1422
+ query inventoriesByBundle($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
1423
1423
  inventoriesByBundle(filters: $filters, pagination: $pagination, sortings: $sortings) {
1424
1424
  bundleGroup {
1425
1425
  batchId
@@ -352,10 +352,18 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
352
352
  if (e.keyCode === 13) {
353
353
  e.preventDefault()
354
354
  this._currentBinLocation = null
355
- if (this.releaseGoodNoInput.value) {
356
- this.releaseGoodNo = this.releaseGoodNoInput.value
357
- await this.fetchAll(this.releaseGoodNo)
358
- this.completeHandler()
355
+ if (this.refPickingType === PICKING_TYPES.PICKING.value) {
356
+ if (this.releaseGoodNoInput.value) {
357
+ this.releaseGoodNo = this.releaseGoodNoInput.value
358
+ await this.fetchAll(this.releaseGoodNo)
359
+ this.completeHandler()
360
+ }
361
+ } else {
362
+ if (this.taskNoInput.value) {
363
+ this.taskNo = this.taskNoInput.value
364
+ await this.fetchAll(this.taskNo)
365
+ this.completeHandler()
366
+ }
359
367
  }
360
368
  }
361
369
  }}"
@@ -571,7 +579,10 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
571
579
  if (this.serialInput) this.serialInput.value = ''
572
580
 
573
581
  this._selectedOrderInventory = record
574
- await this.fetchInventories(this.releaseGoodNo)
582
+
583
+ await this.fetchInventories(
584
+ this.refPickingType === PICKING_TYPES.PICKING.value ? this.releaseGoodNo : this.taskNo
585
+ )
575
586
  let updatedRecords = this._selectedOrderInventory
576
587
  if (updatedRecords.releaseQty === updatedRecords.pickedQty) {
577
588
  updatedRecords.status = 'DONE'
@@ -846,12 +857,14 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
846
857
  if (record.pickedQty == record.releaseQty) {
847
858
  if (this._isCartonLabel) {
848
859
  this.cartonInput.value = ''
849
- this._focusOnCartonNoInput()
860
+ this.productBarcodeInput.value = ''
861
+ // this._focusOnCartonNoInput()
850
862
  }
851
863
  this.inputForm.reset()
852
864
  } else {
853
- this._focusOnProductBarcodeInput()
865
+ // this._focusOnProductBarcodeInput()
854
866
  this.fillUpForm(this.inputForm, record)
867
+ this.focusOnInput()
855
868
  }
856
869
  }
857
870
  }
@@ -1048,21 +1061,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1048
1061
  openSerialNumberPopup() {
1049
1062
  openPopup(
1050
1063
  html`
1051
- <serial-number-popup
1052
- .orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"
1053
- @completed="${() => {
1054
- // if (this.refPickingType === PICKING_TYPES.PICKING.value) {
1055
- // this.fetchInventories(this.releaseGoodNoInput.value)
1056
- // this.fetchPalletsHandler(this.releaseGoodNoInput.value)
1057
- // } else {
1058
- // this.fetchInventories(this.taskNoInput.value)
1059
- // this.fetchPalletsHandler(this.taskNoInput.value)
1060
- // }
1061
- // // this._selectedTaskStatus = null
1062
- // this._selectedOrderInventory = null
1063
- // this._isReplacement = false
1064
- }}"
1065
- ></serial-number-popup>
1064
+ <serial-number-popup .orderInventory="${this?._selectedOrderInventory?.relatedOrderInv}"></serial-number-popup>
1066
1065
  `,
1067
1066
  {
1068
1067
  backdrop: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "3.8.2",
3
+ "version": "3.8.6",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -69,9 +69,9 @@
69
69
  "@things-factory/print-proxy-service": "^3.8.0",
70
70
  "@things-factory/print-service": "^3.8.0",
71
71
  "@things-factory/print-ui": "^3.8.0",
72
- "@things-factory/product-base": "^3.8.1",
72
+ "@things-factory/product-base": "^3.8.3",
73
73
  "@things-factory/resource-ui": "^3.8.0",
74
- "@things-factory/sales-ui": "^3.8.2",
74
+ "@things-factory/sales-ui": "^3.8.5",
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.8.0",
103
103
  "@things-factory/transport-base": "^3.8.0",
104
104
  "@things-factory/tutorial-ui": "^3.8.0",
105
- "@things-factory/warehouse-base": "^3.8.2",
106
- "@things-factory/worksheet-base": "^3.8.2"
105
+ "@things-factory/warehouse-base": "^3.8.5",
106
+ "@things-factory/worksheet-base": "^3.8.6"
107
107
  },
108
108
  "devDependencies": {
109
109
  "@things-factory/builder": "^3.7.5"
110
110
  },
111
- "gitHead": "d2f935bdad2321ef93780978e593157ef0c1eb52"
111
+ "gitHead": "e7722293298bd414b6ce78996a4e09df5f1e5ad8"
112
112
  }