@things-factory/operato-wms 4.3.77 → 4.3.79-alpha.1

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 (51) hide show
  1. package/client/pages/components/select-inventory-popup.js +7 -1
  2. package/client/pages/components/select-product-popup.js +10 -2
  3. package/client/pages/inventory/inventory-adjustment.js +259 -238
  4. package/client/pages/inventory/serial-number-list-popup.js +24 -7
  5. package/client/pages/inventory-check/create-cycle-count.js +2 -3
  6. package/client/pages/order/draft-release-good/draft-release-good-detail.js +7 -1
  7. package/client/pages/order/release-order/create-release-order.js +23 -0
  8. package/client/pages/order/release-order/release-extra-product-popup.js +4 -1
  9. package/client/pages/order/release-order/release-order-detail.js +7 -3
  10. package/client/pages/outbound/generate-worksheet-popup.js +21 -7
  11. package/client/pages/outbound/inventory-reassign-popup.js +6 -0
  12. package/client/pages/outbound/packing-product.js +94 -30
  13. package/client/pages/outbound/picking-product.js +11 -1
  14. package/client/util/index.js +1 -0
  15. package/client/util/page-settings.js +43 -0
  16. package/dist-server/graphql/resolvers/index.js +5 -4
  17. package/dist-server/graphql/resolvers/index.js.map +1 -1
  18. package/dist-server/graphql/resolvers/{extra → other}/add-release-good-products.js +7 -11
  19. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -0
  20. package/dist-server/graphql/resolvers/{extra → other}/index.js +3 -1
  21. package/dist-server/graphql/resolvers/other/index.js.map +1 -0
  22. package/dist-server/graphql/resolvers/other/page-settings.js +87 -0
  23. package/dist-server/graphql/resolvers/other/page-settings.js.map +1 -0
  24. package/dist-server/graphql/types/index.js +7 -2
  25. package/dist-server/graphql/types/index.js.map +1 -1
  26. package/dist-server/graphql/types/other/index.js +19 -0
  27. package/dist-server/graphql/types/other/index.js.map +1 -0
  28. package/dist-server/graphql/types/other/page-setting.js +36 -0
  29. package/dist-server/graphql/types/other/page-setting.js.map +1 -0
  30. package/helps/release-note.ko.md +6 -19
  31. package/helps/release-note.md +6 -19
  32. package/helps/release-note.ms.md +6 -19
  33. package/helps/release-note.zh.md +6 -19
  34. package/package.json +50 -50
  35. package/server/graphql/resolvers/index.ts +5 -4
  36. package/server/graphql/resolvers/{extra → other}/add-release-good-products.ts +8 -12
  37. package/server/graphql/resolvers/other/index.ts +10 -0
  38. package/server/graphql/resolvers/other/page-settings.ts +105 -0
  39. package/server/graphql/types/index.ts +8 -2
  40. package/server/graphql/types/other/index.ts +19 -0
  41. package/server/graphql/types/other/page-setting.ts +33 -0
  42. package/translations/en.json +11 -3
  43. package/translations/ko.json +9 -1
  44. package/translations/ms.json +9 -1
  45. package/translations/zh.json +9 -1
  46. package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +0 -1
  47. package/dist-server/graphql/resolvers/extra/index.js.map +0 -1
  48. package/dist-server/graphql/types/extra/index.js +0 -11
  49. package/dist-server/graphql/types/extra/index.js.map +0 -1
  50. package/server/graphql/resolvers/extra/index.ts +0 -5
  51. package/server/graphql/types/extra/index.ts +0 -7
@@ -214,9 +214,20 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
214
214
  }
215
215
  } else {
216
216
  this._selectedInventoryItem = record
217
- this.createInventoryItemChange(INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value)
218
217
 
219
- this.checkDuplicate === false ? this.data.total -= 1 : ''
218
+ let dt = this.data
219
+ dt.records[rowIndex].type =
220
+ record.type == INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value
221
+ ? ''
222
+ : INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value
223
+
224
+ this.data = { ...dt }
225
+
226
+ this.checkDuplicate === false
227
+ ? (this.data.total = dt.records.filter(
228
+ x => x.type != INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value
229
+ ).length)
230
+ : ''
220
231
  }
221
232
 
222
233
  this.clearView()
@@ -317,11 +328,10 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
317
328
  let existingInventoryItemChanges = JSON.parse(this.inventory.inventoryItemChanges)
318
329
 
319
330
  records.push(...existingInventoryItemChanges)
320
-
331
+
321
332
  total = records.length
322
333
  }
323
334
 
324
-
325
335
  this.data = {
326
336
  total,
327
337
  records
@@ -401,9 +411,14 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
401
411
  }
402
412
  }
403
413
 
404
- const duplicated = this.data.records.findIndex((res)=>res.transactionType == 'CHANGES' && res.type == 'REMOVED' && (res.serialNumber == inventoryItemChange.serialNumber))
414
+ const duplicated = this.data.records.findIndex(
415
+ res =>
416
+ res.transactionType == 'CHANGES' &&
417
+ res.type == 'REMOVED' &&
418
+ res.serialNumber == inventoryItemChange.serialNumber
419
+ )
405
420
 
406
- if(duplicated > 0){
421
+ if (duplicated > 0) {
407
422
  this.checkDuplicate = true
408
423
  throw new Error(i18next.t('text.duplicated_romoval_on_same_sn'))
409
424
  }
@@ -444,7 +459,9 @@ class SerialNumberListPopup extends localize(i18next)(LitElement) {
444
459
  detail: {
445
460
  inventoryItemChanges:
446
461
  this.data.records.filter(
447
- itm => itm.transactionType == INVENTORY_ITEM_CHANGE_TRANSACTION_TYPE.CHANGES.value
462
+ itm =>
463
+ itm.transactionType == INVENTORY_ITEM_CHANGE_TRANSACTION_TYPE.CHANGES.value ||
464
+ itm.type == INVENTORY_ITEM_CHANGE_TYPE.REMOVED.value
448
465
  ) || []
449
466
  }
450
467
  })
@@ -166,6 +166,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
166
166
  descriptionField: 'productName',
167
167
  select: [
168
168
  { name: 'productId', hidden: true },
169
+ { name: 'productDetailId', hidden: true },
169
170
  { name: 'remainUomValue', hidden: true },
170
171
  { name: 'uom', hidden: true },
171
172
  { name: 'batchId', header: i18next.t('field.batch_id') },
@@ -553,9 +554,7 @@ class CreateCycleCount extends localize(i18next)(PageView) {
553
554
  return {
554
555
  batchId: itm.batchId,
555
556
  batchIdRef: itm.batchIdRef,
556
- packingSize: itm.packingSize,
557
- packingType: itm.packingType,
558
- productId: itm.productId
557
+ productDetailId: itm.productDetailId
559
558
  }
560
559
  }) || []
561
560
 
@@ -543,7 +543,8 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
543
543
  let returnObj = {
544
544
  ...record,
545
545
  ...record.product,
546
- product: { ...record.product, id: record.product.id || record.product.productId },
546
+ product: { ...record.product, id: record.product?.id || record.product.productId },
547
+ productDetail: { id: record.productDetail?.id || record.product.productDetailId },
547
548
  name: record.name ? record.name : idx,
548
549
  releaseQty: record.releaseQty < 0 ? 0 : record.releaseQty,
549
550
  id: record.id
@@ -597,6 +598,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
597
598
  select: [
598
599
  { name: 'id', hidden: true },
599
600
  { name: 'productId', hidden: true },
601
+ { name: 'productDetailId', hidden: true },
600
602
  { name: 'remainUomValue', hidden: true },
601
603
  {
602
604
  name: 'groupType',
@@ -816,6 +818,9 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
816
818
  sku
817
819
  description
818
820
  }
821
+ productDetail {
822
+ id
823
+ }
819
824
  packingType
820
825
  packingSize
821
826
  uomValue
@@ -1042,6 +1047,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
1042
1047
  id: record.id ? record.id.toString() : null,
1043
1048
  name: record.name ? record.name.toString() : null,
1044
1049
  product: { id: record.product.id },
1050
+ productDetail: { id: record.productDetail.id },
1045
1051
  packingType: record.packingType,
1046
1052
  uomValue: record?.uomValue ? record.uomValue : 0,
1047
1053
  uom: record.uom,
@@ -1554,6 +1554,9 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1554
1554
  product: {
1555
1555
  id: record?.inventory?.productId,
1556
1556
  name: record?.inventory?.productName
1557
+ },
1558
+ productDetail: {
1559
+ id: record?.inventory?.productDetailId
1557
1560
  }
1558
1561
  }
1559
1562
  }
@@ -1786,6 +1789,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1786
1789
  bundleId
1787
1790
  bundleQty
1788
1791
  productId
1792
+ productDetailId
1789
1793
  productSku
1790
1794
  productName
1791
1795
  productDescription
@@ -2103,6 +2107,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2103
2107
  packingType: record?.inventory?.packingType,
2104
2108
  packingSize: record?.inventory?.packingSize,
2105
2109
  productId: record?.inventory?.productId,
2110
+ productDetailId: record?.inventory?.productDetailId,
2106
2111
  groupType: record?.inventory?.groupType,
2107
2112
  releaseQty: record.releaseQty || 0,
2108
2113
  releaseUomValue: record.releaseUomValue || 0
@@ -2277,6 +2282,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2277
2282
  bundleReleaseDetail = bundleReleaseDetail.records.map(item => {
2278
2283
  return {
2279
2284
  product: { id: item.productId, name: item.productName },
2285
+ productDetail: { id: item.productDetailId },
2280
2286
  batchId: item.batchId,
2281
2287
  packingType: item.packingType,
2282
2288
  packingSize: item.packingSize,
@@ -2313,11 +2319,17 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2313
2319
  id: record.inventory.productId,
2314
2320
  name: record.inventory.productName
2315
2321
  }
2322
+ newRecord.productDetail = {
2323
+ id: record.inventory.productDetailId
2324
+ }
2316
2325
  } else {
2317
2326
  newRecord.product = {
2318
2327
  id: record.inventory.productId || record.inventory.product.id,
2319
2328
  name: record.inventory.productName || record.inventory.product.name
2320
2329
  }
2330
+ newRecord.productDetail = {
2331
+ id: record.inventory.productDetailId || record.inventory.productDetail.id
2332
+ }
2321
2333
  newRecord.inventory = { id: record.id }
2322
2334
  }
2323
2335
 
@@ -2612,6 +2624,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2612
2624
  name
2613
2625
  description
2614
2626
  }
2627
+ productDetail {
2628
+ id
2629
+ name
2630
+ }
2615
2631
  }
2616
2632
  }
2617
2633
  }
@@ -2631,6 +2647,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2631
2647
  op.inventory = {
2632
2648
  batchId: op.batchId,
2633
2649
  productId: op.product.id,
2650
+ productDetailId: op.productDetail.id,
2634
2651
  product: op.product,
2635
2652
  productName: op.product.name,
2636
2653
  palletId: i18next.t('label.cross_docking'),
@@ -2715,6 +2732,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2715
2732
  batchId
2716
2733
  batchIdRef
2717
2734
  productId
2735
+ productDetailId
2718
2736
  productSKU
2719
2737
  productName
2720
2738
  remainQty
@@ -2731,6 +2749,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2731
2749
  batchId
2732
2750
  batchIdRef
2733
2751
  productId
2752
+ productDetailId
2734
2753
  productSKU
2735
2754
  productName
2736
2755
  remainQty
@@ -2745,6 +2764,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2745
2764
  name
2746
2765
  sku
2747
2766
  }
2767
+ productDetail {
2768
+ id
2769
+ name
2770
+ }
2748
2771
  }
2749
2772
  }
2750
2773
  `,
@@ -356,6 +356,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
356
356
  { name: 'palletId', header: i18next.t('field.lot_id') },
357
357
  { name: 'cartonId', header: i18next.t('field.carton_id') },
358
358
  { name: 'product', type: 'object', queryName: 'products' },
359
+ { name: 'productDetail', type: 'object', queryName: 'products', hidden: true },
359
360
  { name: 'batchId', header: i18next.t('field.batch_id') },
360
361
  {
361
362
  name: 'location',
@@ -846,6 +847,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
846
847
  } else {
847
848
  newRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
848
849
  newRecord.inventory = { id: record.id }
850
+ newRecord.productDetail = { id: record.inventory.productDetail.id }
849
851
  }
850
852
 
851
853
  return newRecord
@@ -865,13 +867,14 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
865
867
  status: ORDER_INVENTORY_STATUS.PENDING.value
866
868
  }
867
869
 
868
- if (record.isCrossDocking) newRecord.crossDocking = true
870
+ if (record.isCrossDocking) existRecord.crossDocking = true
869
871
 
870
872
  if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
871
873
  existRecord.product = { id: record.inventory.productId, name: record.inventory.productName }
872
874
  } else {
873
875
  existRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
874
876
  existRecord.inventory = { id: record.id }
877
+ existRecord.productDetail = { id: record.inventory.productDetail.id }
875
878
  }
876
879
 
877
880
  return existRecord
@@ -1266,6 +1266,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1266
1266
  name
1267
1267
  description
1268
1268
  }
1269
+ productDetail {
1270
+ id
1271
+ }
1269
1272
  productName
1270
1273
  packingType
1271
1274
  packingSize
@@ -1352,6 +1355,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1352
1355
  name: inventoryInfo.name,
1353
1356
  palletId: inventoryInfo.palletId,
1354
1357
  product: inventoryInfo.product,
1358
+ productDetail: inventoryInfo.productDetail,
1355
1359
  batchId: inventoryInfo.batchId,
1356
1360
  batchIdRef: inventoryInfo.batchIdRef,
1357
1361
  location: inventoryInfo.location,
@@ -1618,15 +1622,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1618
1622
  try {
1619
1623
  const response = await client.mutate({
1620
1624
  mutation: gql`
1621
- mutation generateReleaseGoodWorksheet($releaseGoodNo: String!) {
1622
- generateReleaseGoodWorksheet(releaseGoodNo: $releaseGoodNo) {
1625
+ mutation generateReleaseGoodWorksheet($releaseGoodNo: String!, $currentStatus: String) {
1626
+ generateReleaseGoodWorksheet(releaseGoodNo: $releaseGoodNo, currentStatus: $currentStatus) {
1623
1627
  pickingWorksheet {
1624
1628
  name
1625
1629
  }
1626
1630
  }
1627
1631
  }
1628
1632
  `,
1629
- variables: { releaseGoodNo: this._releaseOrderNo }
1633
+ variables: { releaseGoodNo: this._releaseOrderNo, currentStatus: this._status }
1630
1634
  })
1631
1635
 
1632
1636
  if (!response.errors) {
@@ -16,7 +16,8 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
16
16
  _partnerBizplaceIds: Array,
17
17
  _releaseGoods: Array,
18
18
  _batchLimit: String,
19
- _groupedReleaseGoods: Array
19
+ _groupedReleaseGoods: Array,
20
+ _processing: Boolean
20
21
  }
21
22
  }
22
23
 
@@ -141,6 +142,7 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
141
142
  }
142
143
  }}"
143
144
  label="${i18next.t('button.confirm')}"
145
+ ?disabled=${this._processing}
144
146
  ></mwc-button>
145
147
  </div>
146
148
  `
@@ -156,6 +158,7 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
156
158
  this._partnerBizplaceIds = []
157
159
  this._releaseGoods = []
158
160
  this._groupedReleaseGoods = []
161
+ this._processing = false
159
162
  }
160
163
 
161
164
  async firstUpdated() {
@@ -193,19 +196,25 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
193
196
  }
194
197
 
195
198
  async _generatePickingWorksheet() {
199
+ this._processing = true
196
200
  try {
197
- let releaseGoodNos = this.gristData.selected
198
- .filter(itm => itm.status === ORDER_STATUS.PENDING_WORKSHEET.value)
199
- .map(itm => itm.name)
201
+ let releaseGoods = this.gristData.selected.filter(itm => itm.status === ORDER_STATUS.PENDING_WORKSHEET.value)
202
+
203
+ releaseGoods = releaseGoods.map(ro => {
204
+ return {
205
+ name: ro.name,
206
+ status: ro.status
207
+ }
208
+ })
200
209
 
201
210
  const response = await client.mutate({
202
211
  mutation: gql`
203
- mutation generateMultipleReleaseGoodWorksheet($releaseGoodNos: [String!]) {
204
- generateMultipleReleaseGoodWorksheet(releaseGoodNos: $releaseGoodNos)
212
+ mutation generateMultipleReleaseGoodWorksheet($releaseGoods: [MultipleReleaseGoodWorksheet!]) {
213
+ generateMultipleReleaseGoodWorksheet(releaseGoods: $releaseGoods)
205
214
  }
206
215
  `,
207
216
  variables: {
208
- releaseGoodNos
217
+ releaseGoods
209
218
  }
210
219
  })
211
220
 
@@ -213,12 +222,15 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
213
222
  navigate('single_outbound_worksheets')
214
223
  this._showToast({ message: i18next.t('text.worksheet(s)_has_been_generated') })
215
224
  }
225
+ this._processing = false
216
226
  } catch (e) {
217
227
  this._showToast(e)
228
+ this._processing = false
218
229
  }
219
230
  }
220
231
 
221
232
  async _generateBatchPickingWorksheet() {
233
+ this._processing = true
222
234
  try {
223
235
  await this._validateWorksheets()
224
236
  const response = await client.mutate({
@@ -238,8 +250,10 @@ class GenerateWorksheetPopup extends localize(i18next)(LitElement) {
238
250
  navigate('merged_outbound_worksheets')
239
251
  this._showToast({ message: i18next.t('text.worksheet(s)_has_been_generated') })
240
252
  }
253
+ this._processing = false
241
254
  } catch (e) {
242
255
  this._showToast(e)
256
+ this._processing = false
243
257
  }
244
258
  }
245
259
 
@@ -502,6 +502,9 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
502
502
  description
503
503
  sku
504
504
  }
505
+ productDetail {
506
+ id
507
+ }
505
508
  releaseGood {
506
509
  id
507
510
  name
@@ -1025,6 +1028,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1025
1028
  $worksheetNo: String!
1026
1029
  $batchId: String!
1027
1030
  $productId: String!
1031
+ $productDetailId: String!
1028
1032
  $packingType: String!
1029
1033
  $packingSize: Float!
1030
1034
  $orderProductId: String!
@@ -1034,6 +1038,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1034
1038
  worksheetNo: $worksheetNo
1035
1039
  batchId: $batchId
1036
1040
  productId: $productId
1041
+ productDetailId: $productDetailId
1037
1042
  packingType: $packingType
1038
1043
  packingSize: $packingSize
1039
1044
  orderProductId: $orderProductId
@@ -1045,6 +1050,7 @@ class InventoryReassignPopup extends localize(i18next)(LitElement) {
1045
1050
  worksheetNo: this.worksheetNo,
1046
1051
  batchId: this._selectedOrderProduct?.batchId,
1047
1052
  productId: this._selectedOrderProduct?.product?.id,
1053
+ productDetailId: this._selectedOrderProduct?.productDetail?.id,
1048
1054
  packingType: this._selectedOrderProduct?.packingType,
1049
1055
  packingSize: this._selectedOrderProduct?.packingSize,
1050
1056
  orderProductId: this._selectedOrderProduct?.id,