@things-factory/operato-wms 3.7.12 → 3.8.0

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.
Files changed (98) hide show
  1. package/client/pages/adjustment/transfer-inventory.js +364 -158
  2. package/client/pages/bulk-operation/bulk-operation.js +316 -0
  3. package/client/pages/bulk-operation/validate-ro-popup.js +445 -0
  4. package/client/pages/components/select-product-popup.js +10 -1
  5. package/client/pages/constants/inventory.js +1 -0
  6. package/client/pages/constants/location.js +33 -6
  7. package/client/pages/constants/worksheet.js +2 -2
  8. package/client/pages/inbound/inbound-worksheet.js +81 -15
  9. package/client/pages/inbound/putaway-product.js +60 -8
  10. package/client/pages/inbound/putaway-worksheet-generate-popup.js +29 -5
  11. package/client/pages/inbound/unload-product.js +80 -19
  12. package/client/pages/inbound/worksheet-putaway-return.js +22 -5
  13. package/client/pages/inbound/worksheet-putaway.js +21 -8
  14. package/client/pages/inbound/worksheet-unloading-return.js +22 -5
  15. package/client/pages/inbound/worksheet-unloading.js +8 -0
  16. package/client/pages/inventory/inventory-adjustment-approval.js +18 -8
  17. package/client/pages/inventory/inventory-adjustment.js +91 -76
  18. package/client/pages/inventory/inventory-by-product-detail.js +1 -1
  19. package/client/pages/inventory/inventory-by-product.js +9 -1
  20. package/client/pages/inventory/inventory-history-by-pallet.js +10 -1
  21. package/client/pages/inventory/inventory-history.js +12 -2
  22. package/client/pages/inventory/onhand-inventory.js +12 -3
  23. package/client/pages/inventory-check/create-cycle-count.js +12 -6
  24. package/client/pages/inventory-check/cycle-count-report.js +8 -0
  25. package/client/pages/inventory-check/worksheet-cycle-count.js +14 -0
  26. package/client/pages/master/location-list.js +58 -17
  27. package/client/pages/order/arrival-notice/arrival-notice-detail.js +134 -115
  28. package/client/pages/order/arrival-notice/arrival-notice-list.js +87 -6
  29. package/client/pages/order/arrival-notice/arrival-notice-requests.js +83 -6
  30. package/client/pages/order/arrival-notice/assign-buffer-location.js +8 -1
  31. package/client/pages/order/arrival-notice/check-arrived-notice.js +9 -1
  32. package/client/pages/order/arrival-notice/create-arrival-notice.js +30 -2
  33. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +290 -25
  34. package/client/pages/order/arrival-notice/edit-product-popup.js +36 -5
  35. package/client/pages/order/arrival-notice/receive-arrival-notice.js +8 -1
  36. package/client/pages/order/release-order/b2b/b2b-order-requests.js +7 -7
  37. package/client/pages/order/release-order/b2c/b2c-order-requests.js +65 -5
  38. package/client/pages/order/release-order/create-release-order.js +24 -1
  39. package/client/pages/order/release-order/receive-release-order-request.js +8 -0
  40. package/client/pages/order/release-order/release-extra-product-popup.js +12 -4
  41. package/client/pages/order/release-order/release-order-detail.js +9 -1
  42. package/client/pages/order/return-order/check-return-order.js +9 -1
  43. package/client/pages/order/return-order/create-return-order.js +14 -2
  44. package/client/pages/order/return-order/receive-return-order-requests.js +9 -1
  45. package/client/pages/order/return-order/return-order-detail.js +15 -6
  46. package/client/pages/order/return-order/return-order-inventory-popup.js +7 -0
  47. package/client/pages/order/transport-order/delivery-order-list.js +4 -1
  48. package/client/pages/outbound/inventory-assign-popup.js +11 -2
  49. package/client/pages/outbound/inventory-auto-assign-popup.js +9 -0
  50. package/client/pages/outbound/merged-outbound-worksheet.js +9 -5
  51. package/client/pages/outbound/picking-product.js +202 -162
  52. package/client/pages/outbound/picking-replacement-popup.js +2 -2
  53. package/client/pages/outbound/single-outbound-worksheet.js +47 -1
  54. package/client/pages/outbound/worksheet-loading.js +22 -5
  55. package/client/pages/outbound/worksheet-packing.js +8 -0
  56. package/client/pages/outbound/worksheet-picking.js +29 -5
  57. package/client/pages/outbound/worksheet-return.js +9 -1
  58. package/client/pages/outbound/worksheet-sorting.js +9 -1
  59. package/client/pages/report/custom-elccl/elccl-inventory-report.js +31 -30
  60. package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +23 -26
  61. package/client/pages/report/inventory-pallet-storage-report.js +11 -10
  62. package/client/pages/report/inventory-report.js +41 -43
  63. package/client/pages/report/inventory-summary-report.js +25 -28
  64. package/client/route.js +5 -0
  65. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +1 -1
  66. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  67. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +1 -1
  68. package/dist-server/graphql/resolvers/index.js +3 -1
  69. package/dist-server/graphql/resolvers/index.js.map +1 -1
  70. package/dist-server/graphql/resolvers/shipping-provider/index.js +6 -0
  71. package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -0
  72. package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +20 -0
  73. package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -0
  74. package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js +1 -1
  75. package/dist-server/graphql/types/index.js +5 -2
  76. package/dist-server/graphql/types/index.js.map +1 -1
  77. package/dist-server/graphql/types/shipping-provider/index.js +10 -0
  78. package/dist-server/graphql/types/shipping-provider/index.js.map +1 -0
  79. package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +13 -0
  80. package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +1 -0
  81. package/dist-server/graphql/types/shipping-provider/shipping-provider.js +13 -0
  82. package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +1 -0
  83. package/package.json +37 -37
  84. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +4 -2
  85. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +1 -1
  86. package/server/graphql/resolvers/index.ts +3 -1
  87. package/server/graphql/resolvers/shipping-provider/index.ts +5 -0
  88. package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +20 -0
  89. package/server/graphql/types/custom/elccl/elccl-inventory-report.ts +1 -1
  90. package/server/graphql/types/index.ts +5 -2
  91. package/server/graphql/types/shipping-provider/index.ts +8 -0
  92. package/server/graphql/types/shipping-provider/shipping-provider-list.ts +7 -0
  93. package/server/graphql/types/shipping-provider/shipping-provider.ts +7 -0
  94. package/things-factory.config.js +6 -0
  95. package/translations/en.json +27 -0
  96. package/translations/ko.json +84 -36
  97. package/translations/ms.json +85 -37
  98. package/translations/zh.json +98 -51
@@ -15,6 +15,7 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
15
15
  _worksheetNo: String,
16
16
  _worksheetStatus: String,
17
17
  _returnOrderNo: String,
18
+ _statusList: Array,
18
19
  config: Object,
19
20
  data: Object
20
21
  }
@@ -107,6 +108,13 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
107
108
  }
108
109
  }
109
110
 
111
+ constructor() {
112
+ super()
113
+ this._statusList = Object.keys(WORKSHEET_STATUS).map(key => {
114
+ return { value: WORKSHEET_STATUS[key].value, display: WORKSHEET_STATUS[key].name }
115
+ })
116
+ }
117
+
110
118
  render() {
111
119
  return html`
112
120
  <div class="form-container">
@@ -126,11 +134,12 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
126
134
  <input name="refNo" readonly />
127
135
 
128
136
  <label>${i18next.t('label.status')}</label>
129
- <select name="status" disabled>
130
- ${Object.keys(WORKSHEET_STATUS).map(
131
- key => html` <option value="${WORKSHEET_STATUS[key].value}">${WORKSHEET_STATUS[key].name}</option> `
132
- )}
133
- </select>
137
+ <input
138
+ name="status"
139
+ value="${this._statusList.find(x => x.value == this._worksheetStatus)?.display || ''}"
140
+ readonly
141
+ disabled
142
+ />
134
143
  </fieldset>
135
144
  </form>
136
145
 
@@ -192,6 +201,12 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
192
201
  header: i18next.t('field.product'),
193
202
  width: 350
194
203
  },
204
+ {
205
+ type: 'string',
206
+ name: 'brand',
207
+ header: i18next.t('field.brand'),
208
+ width: 120
209
+ },
195
210
  {
196
211
  type: 'string',
197
212
  name: 'packingType',
@@ -250,6 +265,7 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
250
265
  cartonId
251
266
  product {
252
267
  name
268
+ brand
253
269
  description
254
270
  }
255
271
  packingType
@@ -285,6 +301,7 @@ class WorksheetPutawayReturn extends localize(i18next)(PageView) {
285
301
  return {
286
302
  ...worksheetDetail.targetInventory.inventory,
287
303
  name: worksheetDetail.name,
304
+ brand: worksheetDetail.targetInventory.inventory.product.brand,
288
305
  description: worksheetDetail.description,
289
306
  status: worksheetDetail.status
290
307
  }
@@ -1,13 +1,16 @@
1
1
  import '@things-factory/barcode-ui'
2
- import { MultiColumnFormStyles } from '@things-factory/form-ui'
3
2
  import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html } from 'lit-element'
6
+
7
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
4
8
  import { getRenderer } from '@things-factory/grist-ui'
5
9
  import { i18next, localize } from '@things-factory/i18n-base'
6
10
  import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
7
11
  import { CommonButtonStyles } from '@things-factory/styles'
8
12
  import { isMobileDevice } from '@things-factory/utils'
9
- import gql from 'graphql-tag'
10
- import { css, html } from 'lit-element'
13
+
11
14
  import {
12
15
  VAS_BATCH_AND_PRODUCT_TYPE,
13
16
  VAS_BATCH_NO_TYPE,
@@ -231,6 +234,12 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
231
234
  header: i18next.t('field.product'),
232
235
  width: 300
233
236
  },
237
+ {
238
+ type: 'string',
239
+ name: 'productBrand',
240
+ header: i18next.t('field.brand'),
241
+ width: 150
242
+ },
234
243
  {
235
244
  type: 'string',
236
245
  name: 'packingType',
@@ -404,6 +413,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
404
413
  product {
405
414
  sku
406
415
  name
416
+ brand
407
417
  description
408
418
  }
409
419
  packingType
@@ -443,6 +453,7 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
443
453
  name: worksheetDetail.name,
444
454
  description: worksheetDetail.description,
445
455
  productSku: worksheetDetail.targetInventory.inventory.product.sku,
456
+ productBrand: worksheetDetail.targetInventory.inventory.product.brand,
446
457
  status: worksheetDetail.status
447
458
  }
448
459
  })
@@ -505,17 +516,19 @@ class WorksheetPutaway extends localize(i18next)(PageView) {
505
516
  !this.preConfig.columns.some(e => e.name === 'status') &&
506
517
  this._worksheetStatus !== WORKSHEET_STATUS.DEACTIVATED.value
507
518
  ) {
508
- this.preConfig.columns = [...this.preConfig.columns, currentLocationColumn, statusColumnConfig]
519
+ this.preConfig.columns = [
520
+ ...this.preConfig.columns,
521
+ currentLocationColumn,
522
+ statusColumnConfig,
523
+ batchIdRefColumnConfig
524
+ ]
509
525
  } else if (
510
526
  this.preConfig.columns.some(e => e.name === 'status') &&
511
527
  this._worksheetStatus === WORKSHEET_STATUS.DEACTIVATED.value
512
528
  ) {
513
529
  this.preConfig.columns.splice(this.preConfig.columns.map(e => e.name).indexOf('location'))
514
530
  this.preConfig.columns.splice(this.preConfig.columns.map(e => e.name).indexOf('status'))
515
- }
516
-
517
- if (this.data.records.some(e => e.batchIdRef)) {
518
- this.preConfig.columns = [...this.preConfig.columns, batchIdRefColumnConfig]
531
+ this.preConfig.columns.splice(this.preConfig.columns.map(e => e.name).indexOf('batchIdRef'))
519
532
  }
520
533
 
521
534
  this.config = { ...this.preConfig }
@@ -19,6 +19,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
19
19
  return {
20
20
  _worksheetNo: String,
21
21
  _worksheetStatus: String,
22
+ _statusList: Array,
22
23
  _returnOrderNo: String,
23
24
  _enableCartonLabel: Boolean,
24
25
  config: Object,
@@ -143,6 +144,13 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
143
144
  }
144
145
  }
145
146
 
147
+ constructor() {
148
+ super()
149
+ this._statusList = Object.keys(WORKSHEET_STATUS).map(key => {
150
+ return { value: WORKSHEET_STATUS[key].value, display: WORKSHEET_STATUS[key].name }
151
+ })
152
+ }
153
+
146
154
  render() {
147
155
  return html`
148
156
  <div class="form-container">
@@ -159,11 +167,12 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
159
167
  <input name="refNo" readonly />
160
168
 
161
169
  <label>${i18next.t('label.status')}</label>
162
- <select name="status" disabled>
163
- ${Object.keys(WORKSHEET_STATUS).map(
164
- key => html` <option value="${WORKSHEET_STATUS[key].value}">${WORKSHEET_STATUS[key].name}</option> `
165
- )}
166
- </select>
170
+ <input
171
+ name="status"
172
+ value="${this._statusList.find(x => x.value == this._worksheetStatus)?.display || ''}"
173
+ readonly
174
+ disabled
175
+ />
167
176
  </fieldset>
168
177
  </form>
169
178
 
@@ -230,6 +239,12 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
230
239
  header: i18next.t('field.product'),
231
240
  width: 350
232
241
  },
242
+ {
243
+ type: 'string',
244
+ name: 'brand',
245
+ header: i18next.t('field.brand'),
246
+ width: 150
247
+ },
233
248
  {
234
249
  type: 'string',
235
250
  name: 'packingType',
@@ -302,6 +317,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
302
317
  cartonId
303
318
  product {
304
319
  name
320
+ brand
305
321
  description
306
322
  }
307
323
  packingType
@@ -345,6 +361,7 @@ class WorksheetUnloadingReturn extends localize(i18next)(PageView) {
345
361
  id: worksheetDetail.id,
346
362
  name: worksheetDetail.name,
347
363
  description: worksheetDetail.description,
364
+ brand: worksheetDetail.targetInventory.inventory.product.brand,
348
365
  returnQty: worksheetDetail.targetInventory.returnQty,
349
366
  remark: worksheetDetail.targetInventory.remark,
350
367
  status: worksheetDetail.status,
@@ -287,6 +287,12 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
287
287
  header: i18next.t('field.product'),
288
288
  width: 300
289
289
  },
290
+ {
291
+ type: 'string',
292
+ name: 'productBrand',
293
+ header: i18next.t('field.brand'),
294
+ width: 150
295
+ },
290
296
  {
291
297
  type: 'string',
292
298
  name: 'packingType',
@@ -514,6 +520,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
514
520
  product {
515
521
  id
516
522
  sku
523
+ brand
517
524
  name
518
525
  type
519
526
  description
@@ -571,6 +578,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
571
578
  issue: worksheetDetail.issue,
572
579
  initialBatchId: worksheetDetail.targetProduct.batchId,
573
580
  productSku: worksheetDetail.targetProduct.product.sku,
581
+ productBrand: worksheetDetail.targetProduct.product.brand,
574
582
  hasBatchChanges:
575
583
  worksheetDetail.targetProduct &&
576
584
  worksheetDetail.targetProduct.batchId !== worksheetDetail.targetProduct.initialBatchId
@@ -353,7 +353,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
353
353
  const filters = await this.searchForm.getQueryFilters()
354
354
  const response = await client.query({
355
355
  query: gql`
356
- query inventoryChanges($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
356
+ query inventoryChanges($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
357
357
  inventoryChanges(filters: $filters, pagination: $pagination, sortings: $sortings) {
358
358
  items {
359
359
  id
@@ -464,11 +464,16 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
464
464
  total: response.data.inventoryChanges.total || 0,
465
465
  records:
466
466
  response.data.inventoryChanges.items.map(item => {
467
- let inventoryChangesExpDate = item?.expirationDate ? item?.expirationDate : null
467
+ let inventoryChangesExpDate = item?.expirationDate
468
+ ? this._convertUnixTimestampToDate(item?.expirationDate)
469
+ : null
468
470
  let lastInventoryChangesExpDate = item?.lastInventoryHistory?.expirationDate
469
- ? item?.lastInventoryHistory?.expirationDate
471
+ ? this._convertUnixTimestampToDate(item?.lastInventoryHistory?.expirationDate)
472
+ : null
473
+
474
+ let inventoryExpDate = item?.inventory?.expirationDate
475
+ ? this._convertUnixTimestampToDate(item?.inventory?.expirationDate)
470
476
  : null
471
- let inventoryExpDate = item?.inventory?.expirationDate ? item?.inventory?.expirationDate : null
472
477
 
473
478
  return {
474
479
  ...item,
@@ -518,7 +523,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
518
523
  if (patches && patches.length) {
519
524
  const response = await client.mutate({
520
525
  mutation: gql`
521
- mutation approveInventoryChanges($patches: [InventoryChangePatch]!) {
526
+ mutation approveInventoryChanges($patches: [InventoryChangePatch!]!) {
522
527
  approveInventoryChanges(patches: $patches) {
523
528
  items {
524
529
  id
@@ -552,7 +557,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
552
557
  if (patches && patches.length) {
553
558
  const response = await client.mutate({
554
559
  mutation: gql`
555
- mutation rejectInventoryChanges($patches: [InventoryChangePatch]!) {
560
+ mutation rejectInventoryChanges($patches: [InventoryChangePatch!]!) {
556
561
  rejectInventoryChanges(patches: $patches)
557
562
  }
558
563
  `,
@@ -573,7 +578,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
573
578
  async fetchProduct(bizplace = []) {
574
579
  const response = await client.query({
575
580
  query: gql`
576
- query productsByBizplace($filters: [Filter]) {
581
+ query productsByBizplace($filters: [Filter!]) {
577
582
  productsByBizplace(filters: $filters) {
578
583
  items {
579
584
  id
@@ -590,7 +595,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
590
595
  async fetchLocation() {
591
596
  const response = await client.query({
592
597
  query: gql`
593
- query locations($filters: [Filter]) {
598
+ query locations($filters: [Filter!]) {
594
599
  locations(filters: $filters) {
595
600
  items {
596
601
  id
@@ -604,6 +609,11 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
604
609
  return response.data.locations.items
605
610
  }
606
611
 
612
+ _convertUnixTimestampToDate(unixTimestampValue) {
613
+ let convertedUnix = new Date(unixTimestampValue)
614
+ return `${convertedUnix.getDate()}/${convertedUnix.getMonth() + 1}/${convertedUnix.getFullYear()}`
615
+ }
616
+
607
617
  _compareValues(key, order = 'asc') {
608
618
  return function innerSort(a, b) {
609
619
  if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {