@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
@@ -50,18 +50,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
50
50
  }
51
51
  }
52
52
 
53
- render() {
54
- return html`
55
- <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
53
+ get dataGrist() {
54
+ return this.shadowRoot.querySelector('data-grist')
55
+ }
56
56
 
57
- <data-grist
58
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
59
- .config=${this.config}
60
- .fetchHandler="${this.fetchHandler.bind(this)}"
61
- @record-change="${this._customerChange.bind(this)}"
62
- @field-change="${this._fieldChange.bind(this)}"
63
- ></data-grist>
64
- `
57
+ get searchForm() {
58
+ return this.shadowRoot.querySelector('search-form')
65
59
  }
66
60
 
67
61
  get context() {
@@ -70,17 +64,17 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
70
64
  actions: [
71
65
  {
72
66
  title: i18next.t('button.lot_label_print'),
73
- action: this._printLotLabel.bind(this),
67
+ action: this.printLotLabel.bind(this),
74
68
  ...CommonButtonStyles.label
75
69
  },
76
70
  {
77
71
  title: i18next.t('button.carton_label_print'),
78
- action: this._printCartonLabel.bind(this),
72
+ action: this.printCartonLabel.bind(this),
79
73
  ...CommonButtonStyles.label
80
74
  },
81
75
  {
82
76
  title: i18next.t('button.save'),
83
- action: this._saveInventories.bind(this),
77
+ action: this.saveInventories.bind(this),
84
78
  ...CommonButtonStyles.save
85
79
  }
86
80
  ],
@@ -90,23 +84,35 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
90
84
  },
91
85
  exportable: {
92
86
  name: i18next.t('title.inventory_adjustment'),
93
- data: this._exportableData.bind(this)
87
+ data: this.exportableData.bind(this)
94
88
  },
95
89
  importable: {
96
- handler: this._importableData.bind(this)
90
+ handler: this.importableData.bind(this)
97
91
  },
98
92
  help: 'operato-wms/inventory/inventory-adjustment'
99
93
  }
100
94
  }
101
95
 
96
+ render() {
97
+ return html`
98
+ <search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
99
+
100
+ <data-grist
101
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
102
+ .config=${this.config}
103
+ .fetchHandler="${this.fetchHandler.bind(this)}"
104
+ @record-change="${this.customerChange.bind(this)}"
105
+ @field-change="${this.fieldChange.bind(this)}"
106
+ ></data-grist>
107
+ `
108
+ }
109
+
102
110
  async pageInitialized() {
103
- let [locations, partners, _packingType, _uom] = await Promise.all([
104
- this.fetchLocation(),
111
+ let [partners, packingType, uom] = await Promise.all([
105
112
  this._fetchPartners(),
106
113
  getCodeByName('PACKING_TYPES'),
107
114
  getCodeByName('UOM')
108
115
  ])
109
- this.location = locations
110
116
 
111
117
  this._searchFields = [
112
118
  {
@@ -122,7 +128,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
122
128
  value: partner.id
123
129
  }
124
130
  })
125
- .sort(this._compareValues('name', 'asc'))
131
+ .sort(this.compareValues('name', 'asc'))
126
132
  ],
127
133
  handlers: {
128
134
  change: () => {
@@ -167,7 +173,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
167
173
  type: 'select',
168
174
  options: [
169
175
  { value: '' },
170
- ..._packingType.map(packingType => {
176
+ ...packingType.map(packingType => {
171
177
  return {
172
178
  name: packingType.name,
173
179
  value: packingType.name
@@ -200,7 +206,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
200
206
  ]
201
207
  },
202
208
  rows: {
203
- handlers: { click: this._setProductRefCondition.bind(this) },
209
+ handlers: { click: this.setProductRefCondition.bind(this) },
204
210
  selectable: { multiple: true }
205
211
  },
206
212
  columns: [
@@ -210,7 +216,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
210
216
  type: 'gutter',
211
217
  gutterName: 'button',
212
218
  icon: 'reorder',
213
- handlers: { click: this._showInventoryMovement.bind(this) }
219
+ handlers: { click: this.showInventoryMovement.bind(this) }
214
220
  },
215
221
  {
216
222
  type: 'string',
@@ -277,6 +283,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
277
283
  { name: 'productId', hidden: true },
278
284
  { name: 'sku', header: i18next.t('field.sku'), width: 150 },
279
285
  { name: 'name', header: i18next.t('field.name'), width: 250 },
286
+ { name: 'brand', header: i18next.t('field.brand'), width: 150 },
280
287
  { name: 'description', header: i18next.t('field.description'), width: 450 },
281
288
  { name: 'type', header: i18next.t('field.type'), width: 200 },
282
289
  { name: 'packingType', header: i18next.t('field.packing_type'), width: 200 },
@@ -295,6 +302,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
295
302
  sortable: true,
296
303
  width: 500
297
304
  },
305
+ {
306
+ type: 'string',
307
+ name: 'brand',
308
+ header: i18next.t('field.brand'),
309
+ width: 120
310
+ },
298
311
  {
299
312
  type: 'code',
300
313
  name: 'packingType',
@@ -305,7 +318,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
305
318
  key: 'packingType',
306
319
  width: 50,
307
320
  type: 'array',
308
- arrData: _packingType
321
+ arrData: packingType
309
322
  },
310
323
  width: 150
311
324
  },
@@ -369,7 +382,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
369
382
  name: 'uom',
370
383
  header: i18next.t('field.uom'),
371
384
  record: { editable: true, codeName: 'WEIGHT_UNITS' },
372
- imex: { header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'array', arrData: _uom },
385
+ imex: { header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'array', arrData: uom },
373
386
  sortable: true,
374
387
  width: 80
375
388
  },
@@ -397,7 +410,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
397
410
  key: 'location.name',
398
411
  width: 15,
399
412
  type: 'array',
400
- arrData: this.location
413
+ arrData: []
401
414
  },
402
415
  sortable: true,
403
416
  width: 120
@@ -428,7 +441,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
428
441
  sortable: true,
429
442
  width: 200,
430
443
  handlers: {
431
- click: this._openRemarkNote.bind(this)
444
+ click: this.openRemarkNote.bind(this)
432
445
  }
433
446
  },
434
447
  {
@@ -472,25 +485,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
472
485
  }
473
486
  }
474
487
 
475
- async pageUpdated(changes, lifecycle) {
476
- if (this.active) {
477
- this.dataGrist.fetch()
478
- }
479
- }
480
-
481
- get dataGrist() {
482
- return this.shadowRoot.querySelector('data-grist')
483
- }
484
-
485
- get searchForm() {
486
- return this.shadowRoot.querySelector('search-form')
487
- }
488
-
489
488
  async fetchHandler({ page, limit, sorters = [] }) {
490
489
  const filters = await this.searchForm.getQueryFilters()
491
490
  const response = await client.query({
492
491
  query: gql`
493
- query inventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
492
+ query inventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
494
493
  inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
495
494
  items {
496
495
  id
@@ -512,6 +511,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
512
511
  id
513
512
  name
514
513
  sku
514
+ brand
515
515
  auxUnit1
516
516
  auxValue1
517
517
  description
@@ -555,6 +555,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
555
555
  return {
556
556
  ...item,
557
557
  sku: item.product.sku,
558
+ brand: item.product.brand,
558
559
  lockedQty: item.qty - item.remainQty,
559
560
  remainingQty: item.remainQty
560
561
  }
@@ -570,7 +571,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
570
571
  const filters = await this.searchForm.getQueryFilters()
571
572
  const response = await client.query({
572
573
  query: gql`
573
- query inventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
574
+ query inventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
574
575
  inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
575
576
  items {
576
577
  id
@@ -594,6 +595,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
594
595
  product {
595
596
  id
596
597
  sku
598
+ brand
597
599
  name
598
600
  description
599
601
  }
@@ -650,7 +652,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
650
652
  }
651
653
  }
652
654
 
653
- _setProductRefCondition(columns, data, column, record, rowIndex) {
655
+ setProductRefCondition(columns, data, column, record, rowIndex) {
654
656
  this.config.columns.map(column => {
655
657
  if (column.name === 'product') {
656
658
  if (record && record.bizplace && record.bizplace.id) {
@@ -662,7 +664,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
662
664
  })
663
665
  }
664
666
 
665
- _customerChange(event) {
667
+ customerChange(event) {
666
668
  const record = event.detail
667
669
  const columnName = event.detail.column.name
668
670
 
@@ -671,13 +673,17 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
671
673
  }
672
674
  }
673
675
 
674
- _fieldChange(e) {
676
+ fieldChange(e) {
675
677
  switch (e.detail.column.name) {
676
678
  case 'uomValue':
677
679
  if (e.detail.after < 0) this.dataGrist._data.records[e.detail.row].uomValue = 0
678
680
  break
679
681
  case 'qty':
680
- if (e.detail.after < 0) this.dataGrist._data.records[e.detail.row].qty = 0
682
+ if (e.detail.after < 0 || !Number.isInteger(e.detail.after))
683
+ this.dataGrist._data.records[e.detail.row].qty = e.detail.before
684
+ break
685
+ case 'unitCost':
686
+ if (e.detail.after < 0) this.dataGrist._data.records[e.detail.row].unitCost = e.detail.before
681
687
  break
682
688
  case 'manufactureYear':
683
689
  if (
@@ -710,7 +716,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
710
716
  }
711
717
  }
712
718
 
713
- async _saveInventories() {
719
+ async saveInventories() {
714
720
  var patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
715
721
  patches = patches.map(row => {
716
722
  delete row.productUomValue
@@ -732,7 +738,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
732
738
  if (patches && patches.length) {
733
739
  const response = await client.mutate({
734
740
  mutation: gql`
735
- mutation submitInventoryChanges($patches: [InventoryPatch]!) {
741
+ mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
736
742
  submitInventoryChanges(patches: $patches)
737
743
  }
738
744
  `,
@@ -746,7 +752,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
746
752
  }
747
753
  }
748
754
 
749
- get _columns() {
755
+ get columns() {
750
756
  return this.config.columns
751
757
  }
752
758
 
@@ -776,7 +782,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
776
782
  }
777
783
  }
778
784
 
779
- _importableData(records) {
785
+ importableData(records) {
780
786
  setTimeout(() => {
781
787
  openPopup(
782
788
  html`
@@ -798,7 +804,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
798
804
  }, 500)
799
805
  }
800
806
 
801
- async _exportableData() {
807
+ async exportableData() {
802
808
  try {
803
809
  let data = []
804
810
 
@@ -827,6 +833,8 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
827
833
  this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }])
828
834
  ])
829
835
 
836
+ let location = this.fetchLocation()
837
+
830
838
  headerSetting = headerSetting.map(column => {
831
839
  switch (column.key) {
832
840
  case 'bizplace.name':
@@ -837,6 +845,9 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
837
845
  return { ...itm, name: `(${itm.sku}) ${itm.name} - ${itm.description}` }
838
846
  })
839
847
  break
848
+ case 'location':
849
+ column.arrData = location
850
+ break
840
851
  default:
841
852
  break
842
853
  }
@@ -851,7 +862,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
851
862
  item.product.name = `(${item.product.sku}) ${item.product.name} - ${item.product.description}`
852
863
  return {
853
864
  id: item.id,
854
- ...this._columns
865
+ ...this.columns
855
866
  .filter(column => column.type !== 'gutter' && column.imex !== undefined)
856
867
  .reduce((record, column) => {
857
868
  record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => {
@@ -896,29 +907,33 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
896
907
  }
897
908
 
898
909
  async fetchProduct(bizplace = []) {
899
- bizplace[0].name = 'bizplace'
900
- const response = await client.query({
901
- query: gql`
902
- query productsByBizplace($filters: [Filter]) {
903
- productsByBizplace(filters: $filters) {
904
- items {
905
- id
906
- sku
907
- name
908
- description
910
+ try {
911
+ bizplace[0].name = 'bizplace'
912
+ const response = await client.query({
913
+ query: gql`
914
+ query productsByBizplace($filters: [Filter!]) {
915
+ productsByBizplace(filters: $filters) {
916
+ items {
917
+ id
918
+ sku
919
+ name
920
+ description
921
+ }
909
922
  }
910
923
  }
911
- }
912
- `,
913
- variables: { filters: [...bizplace] }
914
- })
915
- return response.data.productsByBizplace.items
924
+ `,
925
+ variables: { filters: [...bizplace] }
926
+ })
927
+ return response.data.productsByBizplace.items
928
+ } catch (ex) {
929
+ throw ex
930
+ }
916
931
  }
917
932
 
918
933
  async fetchLocation() {
919
934
  const response = await client.query({
920
935
  query: gql`
921
- query locations($filters: [Filter]) {
936
+ query locations($filters: [Filter!]) {
922
937
  locations(filters: $filters) {
923
938
  items {
924
939
  id
@@ -949,7 +964,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
949
964
  }
950
965
  }
951
966
 
952
- _showInventoryMovement(columns, data, column, record, rowIndex) {
967
+ showInventoryMovement(columns, data, column, record, rowIndex) {
953
968
  openPopup(html` <inventory-history-by-pallet .palletId="${record.palletId}"></inventory-history-by-pallet> `, {
954
969
  backdrop: true,
955
970
  size: 'large',
@@ -957,7 +972,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
957
972
  })
958
973
  }
959
974
 
960
- _openRemarkNote(columns, data, column, record, rowIndex) {
975
+ openRemarkNote(columns, data, column, record, rowIndex) {
961
976
  openPopup(
962
977
  html`
963
978
  <popup-note
@@ -983,7 +998,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
983
998
  )
984
999
  }
985
1000
 
986
- async _printLotLabel() {
1001
+ async printLotLabel() {
987
1002
  const records = this.dataGrist.selected
988
1003
  var labelId = this._palletLabel && this._palletLabel.id
989
1004
 
@@ -994,7 +1009,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
994
1009
  })
995
1010
  } else {
996
1011
  for (var record of records) {
997
- let dateIn = this._getDateStr(record.createdAt)
1012
+ let dateIn = this.getDateStr(record.createdAt)
998
1013
  var searchParams = new URLSearchParams()
999
1014
 
1000
1015
  /* for pallet record mapping */
@@ -1039,7 +1054,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1039
1054
  }
1040
1055
  }
1041
1056
 
1042
- async _printCartonLabel() {
1057
+ async printCartonLabel() {
1043
1058
  const records = this.dataGrist.selected
1044
1059
  const labelId = this._cartonLabel && this._cartonLabel.id
1045
1060
 
@@ -1083,7 +1098,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1083
1098
  }
1084
1099
  }
1085
1100
 
1086
- _getDateStr(date) {
1101
+ getDateStr(date) {
1087
1102
  const newDate = new Date(parseInt(date))
1088
1103
 
1089
1104
  const month = String(newDate.getMonth() + 1).padStart(2, '0')
@@ -1094,7 +1109,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1094
1109
  return date
1095
1110
  }
1096
1111
 
1097
- _compareValues(key, order = 'asc') {
1112
+ compareValues(key, order = 'asc') {
1098
1113
  return function innerSort(a, b) {
1099
1114
  if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
1100
1115
  return 0
@@ -202,7 +202,7 @@ class InventoryByProductDetail extends localize(i18next)(LitElement) {
202
202
  const filters = await this.searchForm.getQueryFilters()
203
203
  const response = await client.query({
204
204
  query: gql`
205
- query inventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
205
+ query inventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
206
206
  inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
207
207
  items {
208
208
  packingType
@@ -193,6 +193,13 @@ class InventoryByProduct extends localize(i18next)(PageView) {
193
193
  header: i18next.t('field.name'),
194
194
  width: 200
195
195
  },
196
+ {
197
+ type: 'string',
198
+ name: 'brand',
199
+ imex: { header: i18next.t('field.brand'), key: 'brand', width: 30, type: 'string' },
200
+ header: i18next.t('field.brand'),
201
+ width: 100
202
+ },
196
203
  {
197
204
  type: 'string',
198
205
  name: 'description',
@@ -250,12 +257,13 @@ class InventoryByProduct extends localize(i18next)(PageView) {
250
257
  async fetchHandler({ page, limit, sorters = [] }) {
251
258
  const response = await client.query({
252
259
  query: gql`
253
- query inventoriesByProduct($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
260
+ query inventoriesByProduct($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
254
261
  inventoriesByProduct(filters: $filters, pagination: $pagination, sortings: $sortings) {
255
262
  items {
256
263
  product {
257
264
  id
258
265
  sku
266
+ brand
259
267
  name
260
268
  description
261
269
  type
@@ -101,6 +101,13 @@ class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
101
101
  sortable: true,
102
102
  width: 500
103
103
  },
104
+ {
105
+ type: 'string',
106
+ name: 'productBrand',
107
+ header: i18next.t('field.brand'),
108
+ sortable: true,
109
+ width: 150
110
+ },
104
111
  {
105
112
  type: 'string',
106
113
  name: 'batchId',
@@ -205,7 +212,7 @@ class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
205
212
  if (!this.palletId) return
206
213
  const response = await client.query({
207
214
  query: gql`
208
- query inventoryHistories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
215
+ query inventoryHistories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
209
216
  inventoryHistories(filters: $filters, pagination: $pagination, sortings: $sortings) {
210
217
  items {
211
218
  palletId
@@ -225,6 +232,7 @@ class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
225
232
  transactionType
226
233
  product {
227
234
  sku
235
+ brand
228
236
  name
229
237
  description
230
238
  }
@@ -262,6 +270,7 @@ class InventoryHistoryByPallet extends localize(i18next)(LitElement) {
262
270
  return {
263
271
  ...itm,
264
272
  productSku: itm.product.sku,
273
+ productBrand: itm.product.brand,
265
274
  uomValue: `${itm.uomValue} ${itm.uom}`,
266
275
  openingUomValue: `${itm.openingUomValue} ${itm.uom}`
267
276
  }
@@ -197,6 +197,7 @@ class InventoryHistory extends localize(i18next)(PageView) {
197
197
  fields: [
198
198
  'productSku',
199
199
  'product',
200
+ 'productBrand',
200
201
  'seq',
201
202
  'palletId',
202
203
  'cartonId',
@@ -226,6 +227,13 @@ class InventoryHistory extends localize(i18next)(PageView) {
226
227
  sortable: true,
227
228
  width: 200
228
229
  },
230
+ {
231
+ type: 'string',
232
+ name: 'productBrand',
233
+ header: i18next.t('field.brand'),
234
+ sortable: true,
235
+ width: 200
236
+ },
229
237
  {
230
238
  type: 'number',
231
239
  name: 'seq',
@@ -434,9 +442,9 @@ class InventoryHistory extends localize(i18next)(PageView) {
434
442
  query: gql`
435
443
  query bizplaceInventoryHistories(
436
444
  $inventoryHistory: InventoryHistoryPatch
437
- $filters: [Filter]
445
+ $filters: [Filter!]
438
446
  $pagination: Pagination
439
- $sortings: [Sorting]
447
+ $sortings: [Sorting!]
440
448
  ) {
441
449
  bizplaceInventoryHistories(
442
450
  inventoryHistory: $inventoryHistory
@@ -460,6 +468,7 @@ class InventoryHistory extends localize(i18next)(PageView) {
460
468
  product {
461
469
  id
462
470
  sku
471
+ brand
463
472
  name
464
473
  description
465
474
  }
@@ -502,6 +511,7 @@ class InventoryHistory extends localize(i18next)(PageView) {
502
511
  return {
503
512
  ...item,
504
513
  productSku: item.product.sku,
514
+ productBrand: item.product.brand,
505
515
  productName: item.product.name,
506
516
  locationName: item.location.name,
507
517
  updaterName: item?.updater?.name ? item.updater.name : ''
@@ -89,6 +89,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
89
89
  'initialInboundAt',
90
90
  'productSku',
91
91
  'productName',
92
+ 'productBrand',
92
93
  'packingType',
93
94
  'location',
94
95
  'remainQty',
@@ -151,6 +152,13 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
151
152
  sortable: true,
152
153
  width: 500
153
154
  },
155
+ {
156
+ type: 'string',
157
+ name: 'product_brand',
158
+ header: i18next.t('field.brand'),
159
+ sortable: true,
160
+ width: 150
161
+ },
154
162
  {
155
163
  type: 'code',
156
164
  name: 'packingType',
@@ -353,10 +361,9 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
353
361
  const expFilters = (await this.searchExpForm?.getQueryFilters()) || []
354
362
  const response = await client.query({
355
363
  query: gql`
356
- query onhandInventories($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
364
+ query onhandInventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
357
365
  onhandInventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
358
366
  items {
359
- id
360
367
  palletId
361
368
  cartonId
362
369
  batchId
@@ -373,6 +380,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
373
380
  id
374
381
  sku
375
382
  name
383
+ brand
376
384
  description
377
385
  }
378
386
  qty
@@ -423,7 +431,8 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
423
431
  ...item,
424
432
  product: {
425
433
  ...item.product,
426
- name: `${item.product.name} ${item.product.description}`
434
+ name: `${item.product.name} ${item.product.description}`,
435
+ productBrand: `${item.product.brand}`
427
436
  }
428
437
  },
429
438
  '_'
@@ -16,11 +16,6 @@ import { isMobileDevice } from '@things-factory/utils'
16
16
  import { fetchLocationSortingRule } from '../../fetch-location-sorting-rule'
17
17
  import { LOCATION_SORTING_RULE } from '../constants'
18
18
 
19
- // import { openPopup } from '@things-factory/layout-base'
20
- // import { fetchLocationSortingRule } from '../../fetch-location-sorting-rule'
21
- // import { INVENTORY_STATUS, LOCATION_SORTING_RULE } from '../constants'
22
- // import { fetchSettingRule } from '../../../fetch-setting-value'
23
-
24
19
  const _ = require('lodash')
25
20
 
26
21
  class CreateCycleCount extends localize(i18next)(PageView) {
@@ -166,7 +161,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
166
161
  basicArgs: {
167
162
  filters: [
168
163
  { name: 'bizplace_id', operator: 'eq', value: this._bizplaceId },
169
- { name: 'groupType', operator: 'noteq', value: 'BUNDLE' }
164
+ { name: 'hideBundle', operator: 'eq', value: true }
170
165
  ]
171
166
  },
172
167
  nameField: 'batchId',
@@ -187,6 +182,11 @@ class CreateCycleCount extends localize(i18next)(PageView) {
187
182
  header: i18next.t('field.product_info'),
188
183
  width: 280
189
184
  },
185
+ {
186
+ name: 'productBrand',
187
+ header: i18next.t('field.brand'),
188
+ width: 150
189
+ },
190
190
  { name: 'packingType', header: i18next.t('field.packing_type') },
191
191
  { name: 'packingSize', header: i18next.t('field.packing_size') },
192
192
  {
@@ -232,6 +232,12 @@ class CreateCycleCount extends localize(i18next)(PageView) {
232
232
  header: i18next.t('field.product'),
233
233
  width: 150
234
234
  },
235
+ {
236
+ type: 'string',
237
+ name: 'productBrand',
238
+ header: i18next.t('field.brand'),
239
+ width: 100
240
+ },
235
241
  {
236
242
  type: 'code',
237
243
  name: 'packingType',