@things-factory/operato-wms 4.3.513 → 4.3.515

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 (28) hide show
  1. package/client/pages/constants/order.js +9 -1
  2. package/client/pages/inventory-check/cycle-count-report.js +2 -0
  3. package/client/pages/inventory-check/cycle-count-review.js +9 -1
  4. package/client/pages/inventory-check/inspecting-product.js +11 -13
  5. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +4 -1
  6. package/client/pages/order/release-order/b2b/b2b-order-list.js +71 -10
  7. package/client/pages/order/release-order/release-order-detail.js +266 -81
  8. package/client/pages/order/vas-order/popup/proceed-edit-vas-popup.js +549 -0
  9. package/client/pages/order/vas-order/popup/select-vas-popup.js +5 -1
  10. package/client/pages/order/vas-order/popup/vas-changes-popup.js +370 -0
  11. package/client/pages/report/order-vas-report.js +28 -5
  12. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +1 -1
  13. package/dist-server/graphql/resolvers/reports/non-loaded-inventory-report.js +4 -2
  14. package/dist-server/graphql/resolvers/reports/non-loaded-inventory-report.js.map +1 -1
  15. package/dist-server/graphql/resolvers/reports/vas-report.js +40 -20
  16. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
  17. package/dist-server/graphql/types/reports/vas-report.js +1 -0
  18. package/dist-server/graphql/types/reports/vas-report.js.map +1 -1
  19. package/helps/release-note.md +4 -4
  20. package/package.json +5 -5
  21. package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +1 -1
  22. package/server/graphql/resolvers/reports/non-loaded-inventory-report.ts +5 -5
  23. package/server/graphql/resolvers/reports/vas-report.ts +44 -21
  24. package/server/graphql/types/reports/vas-report.ts +1 -0
  25. package/translations/en.json +25 -0
  26. package/translations/ko.json +25 -0
  27. package/translations/ms.json +25 -0
  28. package/translations/zh.json +25 -0
@@ -133,10 +133,18 @@ export const ORDER_INVENTORY_STATUS = {
133
133
 
134
134
  export const ORDER_VAS_STATUS = {
135
135
  PENDING: { name: 'vas_status_pending', value: 'PENDING' },
136
+ PENDING_RECEIVE: { name: 'vas_status_pending_receive', value: 'PENDING_RECEIVE' },
137
+ PENDING_APPROVE: { name: 'vas_status_pending_approve', value: 'PENDING_APPROVE'},
138
+ PENDING_CANCEL: { name: 'vas_status_pending_cancel', value: 'PENDING_CANCEL'},
136
139
  PROCESSING: { name: 'vas_status_processing', value: 'PROCESSING' },
137
140
  READY_TO_PROCESS: { name: 'vas_status_ready_to_process', value: 'READY_TO_PROCESS' },
138
141
  DONE: { name: 'vas_status_done', value: 'DONE' },
139
- TERMINATED: { name: 'vas_status_terminated', value: 'TERMINATED' }
142
+ TERMINATED: { name: 'vas_status_terminated', value: 'TERMINATED' },
143
+ REJECTED: { name: 'vas_status_rejected', value: 'REJECTED' },
144
+ CANCELLED: { name: 'vas_status_cancelled', value: 'CANCELLED' },
145
+ CHANGES: { name: 'vas_status_changes', value: 'CHANGES' },
146
+ NEW: { name: 'vas_status_new', value: 'NEW' },
147
+ REMOVED: { name: 'vas_status_removed', value: 'REMOVED' }
140
148
  }
141
149
 
142
150
  export const LOAD_TYPES = [
@@ -576,6 +576,8 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
576
576
  return
577
577
  }
578
578
 
579
+ this.config.columns = this.config.columns.filter(column => !column.name?.startsWith('count '))
580
+
579
581
  const countColumns = Object.keys(records[0]).filter(key => key.startsWith('count '))
580
582
  if (!countColumns.length) {
581
583
  console.error('No count columns found in exampleRecord')
@@ -311,6 +311,12 @@ class CycleCountReview extends localize(i18next)(PageView) {
311
311
  header: i18next.t('field.system_uom_value'),
312
312
  width: 100
313
313
  },
314
+ {
315
+ type: 'float',
316
+ name: 'originalUomValue',
317
+ header: i18next.t('field.original_uom_value'),
318
+ width: 100
319
+ },
314
320
  {
315
321
  type: 'float',
316
322
  name: 'inspectedUomValue',
@@ -509,6 +515,7 @@ class CycleCountReview extends localize(i18next)(PageView) {
509
515
  palletId
510
516
  packingType
511
517
  uom
518
+ uomValue
512
519
  product {
513
520
  id
514
521
  sku
@@ -567,7 +574,8 @@ class CycleCountReview extends localize(i18next)(PageView) {
567
574
  qty: inventoryItem?.qty,
568
575
  originalQty: targetItem?.originQty,
569
576
  inspectedQty: targetItem?.inspectedQty,
570
- uomValue: targetItem?.originUomValue,
577
+ uomValue: inventoryItem?.uomValue,
578
+ originalUomValue: targetItem?.originUomValue,
571
579
  inspectedUomValue: targetItem?.inspectedUomValue,
572
580
  uom: inventoryItem?.uom ? inventoryItem?.uom : targetItem.productDetail?.uom,
573
581
  originExpirationDate: targetItem?.systemExpiryDate,
@@ -40,7 +40,8 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
40
40
  _enableCartonLabel: Boolean,
41
41
  locationInfo: Array,
42
42
  bizplaceId: String,
43
- worksheetName: String
43
+ worksheetName: String,
44
+ _ccCompleted: Boolean
44
45
  }
45
46
  }
46
47
 
@@ -200,8 +201,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
200
201
  await this.fetchCycleCountWorksheet()
201
202
  }}"
202
203
  >
203
- <option value="">-- Select Zone --</option>
204
- <option value="none"></option>
204
+ <option value="none">-- Select Zone --</option>
205
205
  ${this.locationInfo?.zone?.map(itm => html` <option value=${itm}>${itm}</option> `)}
206
206
  </select>
207
207
 
@@ -218,8 +218,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
218
218
  await this.fetchCycleCountWorksheet()
219
219
  }}"
220
220
  >
221
- <option value="">-- Select Row --</option>
222
- <option value="none"></option>
221
+ <option value="none">-- Select Row --</option>
223
222
  ${this.locationInfo?.row.map(itm => html` <option value=${itm}>${itm}</option> `)}
224
223
  </select>
225
224
  <label style="color: #ffffff">${i18next.t('label.column')}</label>
@@ -235,8 +234,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
235
234
  await this.fetchCycleCountWorksheet()
236
235
  }}"
237
236
  >
238
- <option value="">-- Select Column --</option>
239
- <option value="none"></option>
237
+ <option value="none">-- Select Column --</option>
240
238
  ${this.locationInfo?.column?.map(itm => html` <option value=${itm}>${itm}</option> `)}
241
239
  </select>
242
240
 
@@ -253,8 +251,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
253
251
  await this.fetchCycleCountWorksheet()
254
252
  }}"
255
253
  >
256
- <option value="">-- Select Shelf --</option>
257
- <option value="none"></option>
254
+ <option value="none">-- Select Shelf --</option>
258
255
  ${this.locationInfo?.shelf?.map(itm => html`<option value=${itm}>${itm}</option>`)}
259
256
 
260
257
  </select>
@@ -556,6 +553,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
556
553
  this.totalPages = Math.ceil(this.totalItems / this.itemsPerPage)
557
554
  this.currentPage = Math.floor(this._arrayIndex / this.itemsPerPage) + 1
558
555
  this._incompleteInspection = true
556
+ this._ccCompleted = false
559
557
  }
560
558
 
561
559
  get context() {
@@ -691,6 +689,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
691
689
  description
692
690
  }
693
691
  partnerDomainId
692
+ ccCompleted
694
693
  }
695
694
  worksheetDetailInfos {
696
695
  name
@@ -767,12 +766,13 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
767
766
 
768
767
  if (!response.errors) {
769
768
  const worksheetData = response.data[worksheetQuery]
770
- const { worksheetInfo, worksheetDetailInfos } = worksheetData
769
+ const { worksheetInfo, worksheetDetailInfos, } = worksheetData
771
770
  const partnerDomainId = worksheetInfo.partnerDomainId
772
771
  this.worksheetName = worksheetInfo.name
773
772
  this.bizplaceName = worksheetInfo.bizplace.name
774
773
  this.bizplaceId = worksheetInfo.bizplace.id
775
774
  this.worksheetStatus = worksheetInfo.status
775
+ this._ccCompleted = worksheetInfo.ccCompleted
776
776
  let mappedLocationInfo = data => {
777
777
  const location = data.reduce(
778
778
  (tot, itm) => {
@@ -1032,9 +1032,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
1032
1032
 
1033
1033
  // Check if all cards have a status of 'NOT_TALLY' or 'DONE'
1034
1034
  if (this.data.records.length > 0 && this.data.records) {
1035
- const inventoryCompleted = this.data.records.every(record => ['NOT_TALLY', 'DONE'].includes(record.wsdStatus))
1036
-
1037
- if (inventoryCompleted) {
1035
+ if (this._ccCompleted) {
1038
1036
  actions.push({
1039
1037
  title: i18next.t('button.complete'),
1040
1038
  action: this.completeCycleCount.bind(this),
@@ -1055,6 +1055,9 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1055
1055
  name
1056
1056
  description
1057
1057
  }
1058
+ productDetail {
1059
+ id
1060
+ }
1058
1061
  remark
1059
1062
  unitPrice
1060
1063
  adjustedUnitPrice
@@ -1426,7 +1429,7 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1426
1429
  batchId: record.batchId,
1427
1430
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
1428
1431
  product: { id: record.product.id },
1429
- productDetail: { id: record.productDetailId },
1432
+ productDetail: { id: record?.productDetailId || record?.productDetail?.id },
1430
1433
  packingType: record.packingType,
1431
1434
  packingSize: record?.product?.packingSize ? record.product.packingSize : record.packingSize,
1432
1435
  uomValue: record?.uomValue ? record.uomValue : 0,
@@ -4,16 +4,35 @@ import '../batch-picking-popup'
4
4
  import '../../../outbound/generate-worksheet-popup'
5
5
 
6
6
  import gql from 'graphql-tag'
7
- import { css, html } from 'lit-element'
7
+ import {
8
+ css,
9
+ html
10
+ } from 'lit-element'
8
11
 
9
12
  import { getCodeByName } from '@things-factory/code-base'
10
- import { i18next, localize } from '@things-factory/i18n-base'
13
+ import {
14
+ i18next,
15
+ localize
16
+ } from '@things-factory/i18n-base'
11
17
  import { openPopup } from '@things-factory/layout-base'
12
- import { client, navigate, PageView } from '@things-factory/shell'
13
- import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
14
- import { isMobileDevice, sleep } from '@things-factory/utils'
15
-
16
- import { ORDER_STATUS } from '../../../constants'
18
+ import {
19
+ client,
20
+ navigate,
21
+ PageView
22
+ } from '@things-factory/shell'
23
+ import {
24
+ CommonButtonStyles,
25
+ ScrollbarStyles
26
+ } from '@things-factory/styles'
27
+ import {
28
+ isMobileDevice,
29
+ sleep
30
+ } from '@things-factory/utils'
31
+
32
+ import {
33
+ ORDER_STATUS,
34
+ ORDER_VAS_STATUS
35
+ } from '../../../constants'
17
36
 
18
37
  class B2bOrderList extends localize(i18next)(PageView) {
19
38
  static get styles() {
@@ -46,6 +65,7 @@ class B2bOrderList extends localize(i18next)(PageView) {
46
65
  _ownTransport: Boolean,
47
66
  _exportOption: Boolean,
48
67
  _routeId: Boolean,
68
+ vasStatus: String,
49
69
  isUserBelongsDomain: Boolean
50
70
  }
51
71
  }
@@ -106,7 +126,11 @@ class B2bOrderList extends localize(i18next)(PageView) {
106
126
 
107
127
  const _orderStatus = _orderStatusReq.status == 'fulfilled' ? _orderStatusReq.value : []
108
128
  const _bizplaces = _bizplacesReq.status == 'fulfilled' ? _bizplacesReq.value : []
109
- this._searchFields = [
129
+ const _excludedVasStatus = ['DONE', 'CHANGES', 'NEW', 'REMOVED']
130
+ const _orderVasStatus = Object.values(ORDER_VAS_STATUS)
131
+ .filter(status => !_excludedVasStatus.includes(status.value))
132
+
133
+ this._searchFields = [
110
134
  {
111
135
  label: i18next.t('field.order_info'),
112
136
  name: 'name',
@@ -148,6 +172,18 @@ class B2bOrderList extends localize(i18next)(PageView) {
148
172
  ],
149
173
  props: { searchOper: 'eq' }
150
174
  },
175
+ {
176
+ label: i18next.t('field.vas_status'),
177
+ name: 'vasStatus',
178
+ type: 'select',
179
+ options: [
180
+ { value: '' },
181
+ ..._orderVasStatus.map(status => {
182
+ return { name: i18next.t(`label.${status.name}`), value: status.value }
183
+ })
184
+ ],
185
+ props: { searchOper: 'eq' }
186
+ },
151
187
  {
152
188
  label: i18next.t('field.product_info'),
153
189
  name: 'sku',
@@ -215,6 +251,13 @@ class B2bOrderList extends localize(i18next)(PageView) {
215
251
  type: 'checkbox',
216
252
  props: { searchOper: 'eq' },
217
253
  attrs: ['indeterminate']
254
+ },
255
+ {
256
+ label: i18next.t('field.vas'),
257
+ name: 'hasVas',
258
+ type: 'checkbox',
259
+ props: { searchOper: 'eq' },
260
+ attrs: ['indeterminate']
218
261
  }
219
262
  ]
220
263
 
@@ -353,6 +396,14 @@ class B2bOrderList extends localize(i18next)(PageView) {
353
396
  imex: { header: i18next.t('field.gan'), key: 'arrivalNotice.name', width: 30, type: 'string' },
354
397
  width: 160
355
398
  },
399
+ {
400
+ type: 'string',
401
+ name: 'vasStatus',
402
+ header: i18next.t('field.vas_status'),
403
+ imex: { header: i18next.t('field.vas'), key: 'vas', width: 20, type: 'string'},
404
+ sortable: true,
405
+ width: 120
406
+ },
356
407
  {
357
408
  type: 'string',
358
409
  name: 'status',
@@ -437,7 +488,8 @@ class B2bOrderList extends localize(i18next)(PageView) {
437
488
  let toDt = new Date(filter.value)
438
489
  toDt.setHours(23, 59, 59)
439
490
  filter.value = toDt.toISOString()
440
- break
491
+ filter.name = 'createdAt'
492
+ break
441
493
  default:
442
494
  break
443
495
  }
@@ -475,6 +527,10 @@ class B2bOrderList extends localize(i18next)(PageView) {
475
527
  recall
476
528
  status
477
529
  createdAt
530
+ orderVass {
531
+ id
532
+ status
533
+ }
478
534
  creator {
479
535
  id
480
536
  name
@@ -513,7 +569,12 @@ class B2bOrderList extends localize(i18next)(PageView) {
513
569
  response.data.releaseGoodRequests.items.map(itm => {
514
570
  return {
515
571
  ...itm,
516
- routeId: itm.routeId ? true : false
572
+ routeId: itm.routeId ? true : false,
573
+ vasStatus: itm.orderVass?.length > 0
574
+ ? itm.orderVass.some(ov => ov.status === ORDER_VAS_STATUS.PENDING_APPROVE.value)
575
+ ? ORDER_VAS_STATUS.PENDING_APPROVE.value
576
+ : itm.orderVass[0].status
577
+ : null
517
578
  }
518
579
  }) || []
519
580
  }