@things-factory/operato-wms 3.6.37 → 3.6.41

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 (52) hide show
  1. package/client/pages/constants/order.js +1 -0
  2. package/client/pages/inbound/unload-product.js +0 -1
  3. package/client/pages/order/release-order/b2c/b2c-order-requests.js +35 -0
  4. package/client/pages/order/release-order/bulk-print-packing-list.js +278 -0
  5. package/client/pages/order/return-order/create-return-order.js +2 -4
  6. package/client/pages/outbound/inventory-assign-popup.js +9 -0
  7. package/client/pages/outbound/inventory-auto-assign-popup.js +9 -5
  8. package/client/pages/outbound/packing-product.js +16 -26
  9. package/client/pages/outbound/worksheet-batch-picking.js +26 -11
  10. package/client/pages/outbound/worksheet-picking.js +35 -10
  11. package/client/pages/vas/print-product-label.js +159 -17
  12. package/client/route.js +4 -0
  13. package/config.development.js +95 -0
  14. package/config.production.js +90 -0
  15. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +1 -1
  16. package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js +24 -0
  17. package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js.map +1 -0
  18. package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js +24 -0
  19. package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js.map +1 -0
  20. package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js +24 -0
  21. package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js.map +1 -0
  22. package/dist-server/graphql/resolvers/dashboard/index.js +9 -0
  23. package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -0
  24. package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js +24 -0
  25. package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js.map +1 -0
  26. package/dist-server/graphql/resolvers/index.js +10 -2
  27. package/dist-server/graphql/resolvers/index.js.map +1 -1
  28. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +2 -1
  29. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  30. package/dist-server/graphql/types/dashboard/index.js +12 -0
  31. package/dist-server/graphql/types/dashboard/index.js.map +1 -0
  32. package/dist-server/graphql/types/dashboard/order-status-counter.js +14 -0
  33. package/dist-server/graphql/types/dashboard/order-status-counter.js.map +1 -0
  34. package/dist-server/graphql/types/index.js +17 -3
  35. package/dist-server/graphql/types/index.js.map +1 -1
  36. package/package.json +39 -38
  37. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +1 -1
  38. package/server/graphql/resolvers/dashboard/arrival-notices-by-status.ts +25 -0
  39. package/server/graphql/resolvers/dashboard/collection-orders-by-status.ts +25 -0
  40. package/server/graphql/resolvers/dashboard/delivery-orders-by-status.ts +25 -0
  41. package/server/graphql/resolvers/dashboard/index.ts +11 -0
  42. package/server/graphql/resolvers/dashboard/release-goods-by-status.ts +25 -0
  43. package/server/graphql/resolvers/index.ts +10 -2
  44. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +2 -1
  45. package/server/graphql/types/dashboard/index.ts +9 -0
  46. package/server/graphql/types/dashboard/order-status-counter.ts +8 -0
  47. package/server/graphql/types/index.ts +17 -3
  48. package/things-factory.config.js +4 -0
  49. package/translations/en.json +5 -0
  50. package/translations/ko.json +5 -0
  51. package/translations/ms.json +5 -0
  52. package/translations/zh.json +7 -2
@@ -242,12 +242,14 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
242
242
  record.batchId,
243
243
  record.product.name,
244
244
  record.product.sku,
245
- record.packingType
245
+ record.packingType,
246
+ record.packingSize
246
247
  )
247
248
  this._selectedProduct = {
248
249
  batchId: record.batchId,
249
250
  product: record.product,
250
251
  packingType: record.packingType,
252
+ packingSize: record.packingSize,
251
253
  releaseQty: record.releaseQty,
252
254
  releaseUomValue: record.releaseUomValue,
253
255
  completed: record.completed
@@ -279,6 +281,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
279
281
  product: record.product,
280
282
  bizplaceId: record.bizplace.id,
281
283
  packingType: record.packingType,
284
+ packingSize: record.packingSize,
282
285
  releaseQty: record.releaseQty,
283
286
  releaseUomValue: record.releaseUomValue
284
287
  }
@@ -519,6 +522,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
519
522
  id
520
523
  }
521
524
  packingType
525
+ packingSize
522
526
  releaseQty
523
527
  releaseUomValue
524
528
  status
@@ -555,8 +559,10 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
555
559
  ordInv.status === ORDER_INVENTORY_STATUS.PENDING_SPLIT.value ||
556
560
  ordInv.status === ORDER_INVENTORY_STATUS.COMPLETE_SPLIT.value
557
561
  ) {
562
+ ordInv.productSku = ordInv.product.sku
558
563
  result.tempOrderInvs.push(ordInv)
559
564
  } else {
565
+ ordInv.productSku = ordInv.product.sku
560
566
  ordInv.releaseUomValueWithUom = Math.round(ordInv.releaseUomValue).toFixed(2) + ' ' + ordInv.inventory.uom
561
567
  let existingCompOrderInvsIndex = result.completedOrderInvs.findIndex(
562
568
  oinv => oinv.inventory.palletId == ordInv.inventory.palletId
@@ -638,11 +644,13 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
638
644
  this.productGristData = {
639
645
  records: orderBy(
640
646
  groupedOI.map(ordInv => {
641
- const { compQty, compUomValue } = completedOrderInvs.reduce(
647
+ const { compQty, compUomValue, unassignedQty, unassignedUomValue } = completedOrderInvs.reduce(
642
648
  (result, compOrdInv) => {
643
649
  if (this._checkSameOrderInv(ordInv, compOrdInv)) {
644
- result.compQty += compOrdInv.releaseQty
645
- result.compUomValue += compOrdInv.releaseUomValue
650
+ result.unassignedQty = compOrdInv.releaseQty - ordInv.releaseQty
651
+ result.unassignedUomValue = compOrdInv.releaseUomValue - ordInv.releaseUomValue
652
+ result.compQty = compOrdInv.releaseQty - result.unassignedQty
653
+ result.compUomValue = compOrdInv.releaseUomValue - result.unassignedUomValue
646
654
  }
647
655
 
648
656
  // need to round off the completed uomValue to bypass the validation
@@ -650,7 +658,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
650
658
 
651
659
  return result
652
660
  },
653
- { compQty: 0, compUomValue: 0 }
661
+ { compQty: 0, compUomValue: 0, unassignedQty: 0, unassignedUomValue: 0 }
654
662
  )
655
663
 
656
664
  return {
@@ -697,15 +705,15 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
697
705
  )
698
706
  }
699
707
 
700
- async fetchWorksheetDetails(worksheetNo, batchId, productName, productSku, packingType) {
708
+ async fetchWorksheetDetails(worksheetNo, batchId, productName, productSku, packingType, packingSize) {
701
709
  if (worksheetNo && batchId && productName && productSku && packingType) {
702
- await this.fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType)
710
+ await this.fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType, packingSize)
703
711
  } else {
704
712
  await this.fetchWholeWorksheetDetails()
705
713
  }
706
714
  }
707
715
 
708
- async fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType) {
716
+ async fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType, packingSize) {
709
717
  const response = await client.query({
710
718
  query: gql`
711
719
  query worksheetDetailsByProductGroup(
@@ -714,6 +722,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
714
722
  $productName: String!
715
723
  $productSku: String!
716
724
  $packingType: String!
725
+ $packingSize: Float!
717
726
  ) {
718
727
  worksheetDetailsByProductGroup(
719
728
  worksheetNo: $worksheetNo
@@ -721,6 +730,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
721
730
  productName: $productName
722
731
  productSku: $productSku
723
732
  packingType: $packingType
733
+ packingSize: $packingSize
724
734
  ) {
725
735
  items {
726
736
  id
@@ -758,7 +768,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
758
768
  }
759
769
  }
760
770
  `,
761
- variables: { worksheetNo, batchId, productName, productSku, packingType }
771
+ variables: { worksheetNo, batchId, productName, productSku, packingType, packingSize }
762
772
  })
763
773
 
764
774
  if (!response.errors) {
@@ -953,6 +963,7 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
953
963
  .bizplaceId="${this._selectedProduct.bizplaceId}"
954
964
  .worksheetType="${this._worksheetType}"
955
965
  .packingType="${this._selectedProduct.packingType}"
966
+ .packingSize="${this._selectedProduct.packingSize}"
956
967
  .releaseQty="${this._selectedProduct.releaseQty}"
957
968
  .releaseUomValue="${this._selectedProduct.releaseUomValue}"
958
969
  @completed="${async () => {
@@ -1005,7 +1016,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1005
1016
  // this._selectedProduct?.batchId,
1006
1017
  // this._selectedProduct?.product?.name,
1007
1018
  // this._selectedProduct?.product?.sku,
1008
- // this._selectedProduct?.packingType
1019
+ // this._selectedProduct?.packingType,
1020
+ // this._selectedProduct.packingSize
1009
1021
  // )
1010
1022
 
1011
1023
  this._spinner(false)
@@ -1062,12 +1074,14 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1062
1074
  $batchId: String!
1063
1075
  $productId: String!
1064
1076
  $packingType: String!
1077
+ $packingSize: Float!
1065
1078
  ) {
1066
1079
  undoPickingAssigment(
1067
1080
  worksheetNo: $worksheetNo
1068
1081
  batchId: $batchId
1069
1082
  productId: $productId
1070
1083
  packingType: $packingType
1084
+ packingSize: $packingSize
1071
1085
  )
1072
1086
  }
1073
1087
  `,
@@ -1075,7 +1089,8 @@ class WorksheetBatchPicking extends localize(i18next)(PageView) {
1075
1089
  worksheetNo: this._worksheetNo,
1076
1090
  batchId: this._selectedProduct.batchId,
1077
1091
  productId: this._selectedProduct.product.id,
1078
- packingType: this._selectedProduct.packingType
1092
+ packingType: this._selectedProduct.packingType,
1093
+ packingSize: this._selectedProduct.packingSize
1079
1094
  }
1080
1095
  })
1081
1096
 
@@ -319,19 +319,21 @@ class WorksheetPicking extends localize(i18next)(PageView) {
319
319
  },
320
320
  handlers: {
321
321
  click: async (columns, data, column, record, rowIndex) => {
322
- if (record.batchId && record.product?.name && record.packingType) {
322
+ if (record.batchId && record.product?.name && record.packingType && record.packingSize != undefined) {
323
323
  await this.fetchWorksheetDetails(
324
324
  this._worksheetNo,
325
325
  record.batchId,
326
326
  record.product.name,
327
327
  record.product.sku,
328
- record.packingType
328
+ record.packingType,
329
+ record.packingSize
329
330
  )
330
331
  this._selectedProduct = {
331
332
  batchId: record.batchId,
332
333
  batchIdRef: record.batchIdRef,
333
334
  product: record.product,
334
335
  packingType: record.packingType,
336
+ packingSize: record.packingSize,
335
337
  releaseQty: record.releaseQty,
336
338
  releaseUomValue: record.releaseUomValue,
337
339
  completed: record.completed
@@ -362,6 +364,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
362
364
  product: record.product,
363
365
  bizplaceId: record.bizplaceId,
364
366
  packingType: record.packingType,
367
+ packingSize: record.packingSize,
365
368
  releaseQty: record.releaseQty,
366
369
  releaseUomValue: record.releaseUomValue
367
370
  }
@@ -635,6 +638,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
635
638
  sku
636
639
  }
637
640
  packingType
641
+ packingSize
638
642
  releaseQty
639
643
  releaseUomValue
640
644
  inventory {
@@ -666,6 +670,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
666
670
  sku
667
671
  }
668
672
  packingType
673
+ packingSize
669
674
  releaseQty
670
675
  releaseUomValue
671
676
  status
@@ -802,15 +807,22 @@ class WorksheetPicking extends localize(i18next)(PageView) {
802
807
  return a.batchId === b.batchId && a.product?.sku === b.product?.sku && a.packingType === b.packingType
803
808
  }
804
809
 
805
- async fetchWorksheetDetails(worksheetNo, batchId, productName, productSku, packingType) {
810
+ async fetchWorksheetDetails(worksheetNo, batchId, productName, productSku, packingType, packingSize) {
806
811
  if (worksheetNo && batchId && productName && productSku && packingType) {
807
- await this.fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType)
812
+ await this.fetchWorksheetDetailsByProductGroup(
813
+ worksheetNo,
814
+ batchId,
815
+ productName,
816
+ productSku,
817
+ packingType,
818
+ packingSize
819
+ )
808
820
  } else {
809
821
  await this.fetchWholeWorksheetDetails()
810
822
  }
811
823
  }
812
824
 
813
- async fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType) {
825
+ async fetchWorksheetDetailsByProductGroup(worksheetNo, batchId, productName, productSku, packingType, packingSize) {
814
826
  const response = await client.query({
815
827
  query: gql`
816
828
  query worksheetDetailsByProductGroup(
@@ -819,6 +831,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
819
831
  $productName: String!
820
832
  $productSku: String!
821
833
  $packingType: String!
834
+ $packingSize: Float!
822
835
  ) {
823
836
  worksheetDetailsByProductGroup(
824
837
  worksheetNo: $worksheetNo
@@ -826,6 +839,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
826
839
  productName: $productName
827
840
  productSku: $productSku
828
841
  packingType: $packingType
842
+ packingSize: $packingSize
829
843
  ) {
830
844
  items {
831
845
  id
@@ -842,6 +856,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
842
856
  palletId
843
857
  cartonId
844
858
  packingType
859
+ packingSize
845
860
  uom
846
861
  product {
847
862
  sku
@@ -861,7 +876,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
861
876
  }
862
877
  }
863
878
  `,
864
- variables: { worksheetNo, batchId, productName, productSku, packingType }
879
+ variables: { worksheetNo, batchId, productName, productSku, packingType, packingSize }
865
880
  })
866
881
 
867
882
  if (!response.errors) {
@@ -908,6 +923,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
908
923
  description
909
924
  }
910
925
  packingType
926
+
911
927
  inventory {
912
928
  qty
913
929
  lockedQty
@@ -916,6 +932,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
916
932
  batchId
917
933
  batchIdRef
918
934
  packingType
935
+
919
936
  warehouse {
920
937
  name
921
938
  description
@@ -950,6 +967,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
950
967
  description
951
968
  }
952
969
  packingType
970
+
953
971
  qty
954
972
  uomValue
955
973
  otherTarget
@@ -1127,6 +1145,7 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1127
1145
  .worksheetType="${this.worksheetType}"
1128
1146
  .bizplaceId="${this._selectedProduct.bizplaceId}"
1129
1147
  .packingType="${this._selectedProduct.packingType}"
1148
+ .packingSize="${this._selectedProduct.packingSize}"
1130
1149
  .releaseQty="${this._selectedProduct.releaseQty}"
1131
1150
  .releaseUomValue="${this._selectedProduct.releaseUomValue}"
1132
1151
  @completed="${async () => {
@@ -1136,7 +1155,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1136
1155
  this._selectedProduct.batchId,
1137
1156
  this._selectedProduct.product.name,
1138
1157
  this._selectedProduct.product.sku,
1139
- this._selectedProduct.packingType
1158
+ this._selectedProduct.packingType,
1159
+ this._selectedProduct.packingSize
1140
1160
  )
1141
1161
 
1142
1162
  this._selectedProduct.completed = true
@@ -1170,7 +1190,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1170
1190
  this._selectedProduct?.batchId,
1171
1191
  this._selectedProduct?.product?.name,
1172
1192
  this._selectedProduct?.product?.sku,
1173
- this._selectedProduct?.packingType
1193
+ this._selectedProduct?.packingType,
1194
+ this._selectedProduct?.packingSize
1174
1195
  )
1175
1196
 
1176
1197
  this.updateContext()
@@ -1205,12 +1226,14 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1205
1226
  $batchId: String!
1206
1227
  $productId: String!
1207
1228
  $packingType: String!
1229
+ $packingSize: Float!
1208
1230
  ) {
1209
1231
  undoPickingAssigment(
1210
1232
  worksheetNo: $worksheetNo
1211
1233
  batchId: $batchId
1212
1234
  productId: $productId
1213
1235
  packingType: $packingType
1236
+ packingSize: $packingSize
1214
1237
  )
1215
1238
  }
1216
1239
  `,
@@ -1218,7 +1241,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1218
1241
  worksheetNo: this._worksheetNo,
1219
1242
  batchId: this._selectedProduct.batchId,
1220
1243
  productId: this._selectedProduct.product.id,
1221
- packingType: this._selectedProduct.packingType
1244
+ packingType: this._selectedProduct.packingType,
1245
+ packingSize: this._selectedProduct.packingSize
1222
1246
  }
1223
1247
  })
1224
1248
 
@@ -1228,7 +1252,8 @@ class WorksheetPicking extends localize(i18next)(PageView) {
1228
1252
  this._selectedProduct.batchId,
1229
1253
  this._selectedProduct.product.name,
1230
1254
  this._selectedProduct.product.sku,
1231
- this._selectedProduct.packingType
1255
+ this._selectedProduct.packingType,
1256
+ this._selectedProduct.packingSize
1232
1257
  )
1233
1258
 
1234
1259
  this._selectedProduct.completed = false
@@ -59,7 +59,13 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
59
59
  <fieldset>
60
60
  <legend>${i18next.t('title.search_area')}</legend>
61
61
  <label>${i18next.t('label.search_type')}</label>
62
- <select name="orderType" @change="${e => (this._searchingType = e.currentTarget.value)}">
62
+ <select
63
+ name="orderType"
64
+ @change="${e => {
65
+ this._searchingType = e.currentTarget.value
66
+ this.dataGrist.data.records = []
67
+ }}"
68
+ >
63
69
  ${Object.keys(SEARCH_TYPES).map(
64
70
  key => html`
65
71
  <option value="${SEARCH_TYPES[key].value}">${i18next.t(`label.${SEARCH_TYPES[key].name}`)}</option>
@@ -71,6 +77,12 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
71
77
  ? html`
72
78
  <label>${i18next.t('label.product_info')}</label>
73
79
  <input name="productInfo" value="" type="text" @keypress="${this.orderNoKeypressHandler.bind(this)}" />
80
+
81
+ <label>${i18next.t('label.batch_id')}</label>
82
+ <input name="batchId" value="" type="text" @keypress="${this.orderNoKeypressHandler.bind(this)}" />
83
+
84
+ <label>${i18next.t('label.lot_id')}</label>
85
+ <input name="lotId" value="" type="text" @keypress="${this.orderNoKeypressHandler.bind(this)}" />
74
86
  `
75
87
  : html`
76
88
  <label>${i18next.t('label.order_no')}</label>
@@ -124,8 +136,17 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
124
136
  }
125
137
 
126
138
  get searchInfo() {
127
- if (this._searchingType == 'INVENTORY') return this.shadowRoot.querySelector('input[name=productInfo]')
128
- else return this.shadowRoot.querySelector('barcode-scanable-input[name=orderNo]').shadowRoot.querySelector('input')
139
+ if (this._searchingType == 'INVENTORY') {
140
+ return {
141
+ productInfo: this.shadowRoot.querySelector('input[name=productInfo]').value,
142
+ batchId: this.shadowRoot.querySelector('input[name=batchId]').value,
143
+ lotId: this.shadowRoot.querySelector('input[name=lotId]').value
144
+ }
145
+ } else
146
+ return {
147
+ orderNo: this.shadowRoot.querySelector('barcode-scanable-input[name=orderNo]').shadowRoot.querySelector('input')
148
+ .value
149
+ }
129
150
  }
130
151
 
131
152
  get targetData() {
@@ -225,11 +246,19 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
225
246
  sortable: true,
226
247
  width: 100
227
248
  },
249
+ {
250
+ type: 'string',
251
+ name: 'location',
252
+ header: i18next.t('field.location'),
253
+ sortable: true,
254
+ width: 100
255
+ },
228
256
  {
229
257
  type: 'string',
230
258
  name: 'expirationDate',
231
259
  header: i18next.t('field.exp_date'),
232
260
  sortable: true,
261
+ record: { editable: true },
233
262
  width: 100
234
263
  },
235
264
  {
@@ -245,39 +274,144 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
245
274
 
246
275
  async fetchHandler({ page, limit, sorters = [] }) {
247
276
  const fetcherDetail = { page, limit, sorters }
248
- const searchInfo = this.searchInfo.value
249
277
  const searchType = this._searchingType
278
+ const searchInfo = this.searchInfo
250
279
 
251
- if (searchInfo == '') return
280
+ if (!searchInfo || Object.values(searchInfo).every(search => search === '')) return
252
281
 
253
282
  switch (searchType) {
254
283
  case 'GAN':
255
- return await this._fetchOrderInventories([
256
- {
257
- name: 'arrivalNoticeNo',
258
- operator: 'eq',
259
- value: searchInfo
260
- }
261
- ])
284
+ return await this._fetchArrivalNotice(searchInfo.orderNo)
262
285
 
263
286
  case 'RO':
264
287
  return await this._fetchOrderInventories([
265
288
  {
266
289
  name: 'releaseGoodNo',
267
290
  operator: 'eq',
268
- value: searchInfo
291
+ value: searchInfo.orderNo
269
292
  }
270
293
  ])
271
294
 
272
295
  case 'INVENTORY':
273
- const filters = [
274
- { name: 'product_info', operator: 'eq', value: searchInfo },
275
- { name: 'status', operator: 'notin', value: ['INTRANSIT', 'TERMINATED', 'DELETED'] }
276
- ]
296
+ const filters = [{ name: 'status', operator: 'notin', value: ['INTRANSIT', 'TERMINATED', 'DELETED'] }]
297
+
298
+ if (searchInfo.productInfo !== '')
299
+ filters.push({ name: 'product_info', operator: 'eq', value: searchInfo.productInfo })
300
+
301
+ if (searchInfo.batchId !== '')
302
+ filters.push({ name: 'batch_id', operator: 'i_like', value: `%${searchInfo.batchId}%` })
303
+
304
+ if (searchInfo.lotId !== '')
305
+ filters.push({ name: 'pallet_id', operator: 'i_like', value: `%${searchInfo.lotId}%` })
306
+
277
307
  return await this._fetchInventories(fetcherDetail, filters)
278
308
  }
279
309
  }
280
310
 
311
+ async _fetchArrivalNotice(name) {
312
+ try {
313
+ const response = await client.query({
314
+ query: gql`
315
+ query {
316
+ arrivalNotice(${gqlBuilder.buildArgs({
317
+ name
318
+ })}) {
319
+ orderInventories {
320
+ inventory {
321
+ batchId
322
+ palletId
323
+ expirationDate
324
+ location {
325
+ name
326
+ }
327
+ product {
328
+ name
329
+ sku
330
+ description
331
+ type
332
+ auxUnit1
333
+ auxValue1
334
+ auxUnit2
335
+ auxValue2
336
+ }
337
+ }
338
+ }
339
+ orderProducts {
340
+ batchId
341
+ product {
342
+ name
343
+ sku
344
+ description
345
+ type
346
+ auxUnit1
347
+ auxValue1
348
+ auxUnit2
349
+ auxValue2
350
+ }
351
+ }
352
+ }
353
+ }
354
+ `
355
+ })
356
+
357
+ if (!response.errors) {
358
+ const orderInventories = response.data.arrivalNotice.orderInventories
359
+ const orderProducts = response.data.arrivalNotice.orderProducts
360
+
361
+ if (orderInventories && orderInventories.length) {
362
+ return {
363
+ records: orderInventories.map(oi => {
364
+ const inventory = oi.inventory
365
+ const product = inventory.product
366
+ return {
367
+ batchId: inventory.batchId,
368
+ palletId: inventory.palletId,
369
+ location: inventory.location?.name || '',
370
+ expirationDate: inventory.expirationDate || '',
371
+ productName: product.name,
372
+ sku: product.sku,
373
+ description: product.description,
374
+ type: product.type,
375
+ auxUnit1: product.auxUnit1 || '',
376
+ auxValue1: product.auxValue1 || '',
377
+ auxUnit2: product.auxUnit2 || '',
378
+ auxValue2: product.auxValue2 || '',
379
+ productInfo: product.description ? `${product.name} (${product.description})` : `${product.name}`
380
+ }
381
+ })
382
+ }
383
+ } else {
384
+ return {
385
+ records: orderProducts.map(op => {
386
+ const product = op.product
387
+ return {
388
+ batchId: op.batchId,
389
+ palletId: '',
390
+ location: '',
391
+ expirationDate: '',
392
+ productName: product.name,
393
+ sku: product.sku,
394
+ description: product.description,
395
+ type: product.type,
396
+ auxUnit1: product.auxUnit1 || '',
397
+ auxValue1: product.auxValue1 || '',
398
+ auxUnit2: product.auxUnit2 || '',
399
+ auxValue2: product.auxValue2 || '',
400
+ productInfo: product.description ? `${product.name} (${product.description})` : `${product.name}`
401
+ }
402
+ })
403
+ }
404
+ }
405
+ } else
406
+ return {
407
+ records: [],
408
+ total: 0
409
+ }
410
+ } catch (e) {
411
+ this._showToast(e)
412
+ }
413
+ }
414
+
281
415
  async _fetchOrderInventories(filters) {
282
416
  try {
283
417
  const response = await client.query({
@@ -290,6 +424,9 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
290
424
  inventory {
291
425
  batchId
292
426
  palletId
427
+ location {
428
+ name
429
+ }
293
430
  expirationDate
294
431
  product {
295
432
  name
@@ -320,6 +457,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
320
457
  return {
321
458
  batchId: inventory.batchId,
322
459
  palletId: inventory.palletId,
460
+ location: inventory.location?.name || '',
323
461
  expirationDate: inventory.expirationDate || '',
324
462
  productName: inventory.product.name,
325
463
  sku: inventory.product.sku,
@@ -353,6 +491,9 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
353
491
  items {
354
492
  palletId
355
493
  batchId
494
+ location {
495
+ name
496
+ }
356
497
  product {
357
498
  name
358
499
  sku
@@ -385,6 +526,7 @@ class PrintProductLabel extends connect(store)(localize(i18next)(PageView)) {
385
526
  return {
386
527
  batchId: item.batchId,
387
528
  palletId: item.palletId,
529
+ location: item.location?.name || '',
388
530
  expirationDate: item.expirationDate || '',
389
531
  productName: item.product.name,
390
532
  sku: item.product.sku,
package/client/route.js CHANGED
@@ -208,6 +208,10 @@ export default function route(page) {
208
208
  import('./pages/order/return-order/return-order-assign-buffer-location')
209
209
  return page
210
210
 
211
+ case 'bulk_print_packing_list':
212
+ import('./pages/order/release-order/bulk-print-packing-list')
213
+ return page
214
+
211
215
  /**
212
216
  * GRN Menus Section
213
217
  */