@things-factory/operato-wms 4.3.0 → 4.4.0-alpha.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 (92) hide show
  1. package/client/pages/constants/index.js +0 -1
  2. package/client/pages/constants/setting.js +0 -1
  3. package/client/pages/inbound/unload-product.js +5 -9
  4. package/client/pages/inventory/inventory-adjustment-approval.js +9 -24
  5. package/client/pages/inventory/inventory-adjustment.js +13 -79
  6. package/client/pages/master/product/product-list.js +1 -1
  7. package/client/pages/order/arrival-notice/arrival-notice-detail.js +2 -0
  8. package/client/pages/order/arrival-notice/receive-arrival-notice.js +2 -0
  9. package/client/pages/order/goods-received-note/customer-received-note.js +0 -3
  10. package/client/pages/order/goods-received-note/received-note-detail.js +0 -3
  11. package/client/pages/order/release-order/b2c/b2c-order-requests.js +30 -21
  12. package/client/pages/order/release-order/bulk-print-packing-list.js +0 -4
  13. package/client/pages/order/release-order/receive-release-order-request.js +2 -0
  14. package/client/pages/order/release-order/release-order-detail.js +26 -44
  15. package/client/pages/order/return-order/receive-return-order-requests.js +2 -0
  16. package/client/pages/order/transfer-order/receive-transfer-order-request.js +1 -1
  17. package/client/pages/order/transport-order/print-delivery-note.js +1 -0
  18. package/client/pages/order/transport-order/view-delivery-note.js +1 -1
  19. package/client/pages/order/vas-order/receive-vas-order.js +2 -0
  20. package/client/pages/outbound/inventory-assign-popup.js +2 -7
  21. package/client/pages/outbound/inventory-auto-assign-popup.js +1 -2
  22. package/client/pages/outbound/loading-product.js +3 -35
  23. package/client/pages/outbound/packing-product.js +5 -38
  24. package/client/pages/outbound/packing-worksheet-list.js +0 -15
  25. package/client/pages/outbound/picking-product.js +10 -142
  26. package/client/pages/outbound/single-outbound-worksheet.js +22 -10
  27. package/client/pages/outbound/sorting-product.js +12 -72
  28. package/client/pages/outbound/worksheet-batch-picking.js +2 -9
  29. package/client/pages/outbound/worksheet-packing.js +2 -7
  30. package/client/pages/outbound/worksheet-picking.js +2 -9
  31. package/client/pages/report/inventory-summary-report.js +0 -8
  32. package/client/pages/report/outbound-order-details-report.js +0 -18
  33. package/client/pages/vas/print-product-label.js +6 -15
  34. package/client/route.js +0 -12
  35. package/dist-server/entities/index.js +1 -2
  36. package/dist-server/entities/index.js.map +1 -1
  37. package/dist-server/graphql/index.js +5 -1
  38. package/dist-server/graphql/index.js.map +1 -1
  39. package/dist-server/graphql/resolvers/board-setting/board-settings.js +1 -2
  40. package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
  41. package/dist-server/graphql/resolvers/index.js +7 -4
  42. package/dist-server/graphql/resolvers/index.js.map +1 -1
  43. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +1 -3
  44. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  45. package/dist-server/graphql/types/index.js +8 -5
  46. package/dist-server/graphql/types/index.js.map +1 -1
  47. package/dist-server/graphql/types/reports/outbound-order-details-report.js +0 -2
  48. package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
  49. package/dist-server/index.js +5 -2
  50. package/dist-server/index.js.map +1 -1
  51. package/dist-server/opa-app-setting-constants.js +1 -2
  52. package/dist-server/opa-app-setting-constants.js.map +1 -1
  53. package/dist-server/utils/index.js +5 -1
  54. package/dist-server/utils/index.js.map +1 -1
  55. package/helps/release-note.ko.md +8 -10
  56. package/helps/release-note.md +8 -10
  57. package/helps/release-note.ms.md +8 -10
  58. package/helps/release-note.zh.md +8 -10
  59. package/package.json +66 -66
  60. package/server/entities/index.ts +2 -2
  61. package/server/graphql/resolvers/board-setting/board-settings.ts +2 -4
  62. package/server/graphql/resolvers/index.ts +2 -3
  63. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +2 -6
  64. package/server/graphql/types/index.ts +4 -4
  65. package/server/graphql/types/reports/outbound-order-details-report.ts +0 -2
  66. package/server/index.ts +1 -2
  67. package/server/opa-app-setting-constants.ts +0 -1
  68. package/things-factory.config.js +0 -13
  69. package/translations/en.json +8 -48
  70. package/translations/ko.json +1 -35
  71. package/translations/ms.json +1 -35
  72. package/translations/zh.json +1 -35
  73. package/client/constants/index.js +0 -1
  74. package/client/constants/order.js +0 -14
  75. package/client/pages/constants/tote.js +0 -14
  76. package/client/pages/master/tote-list.js +0 -740
  77. package/client/pages/order/draft-release-good/draft-release-good-detail.js +0 -1163
  78. package/client/pages/order/draft-release-good/draft-release-good-list.js +0 -546
  79. package/client/pages/outbound/order-remark-popup.js +0 -112
  80. package/client/pages/outbound/tote-popup.js +0 -461
  81. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js +0 -168
  82. package/dist-server/entities/warehouse-bizplace-onhand-inventory.js.map +0 -1
  83. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +0 -6
  84. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +0 -1
  85. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +0 -58
  86. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +0 -1
  87. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +0 -9
  88. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +0 -1
  89. package/server/entities/warehouse-bizplace-onhand-inventory.ts +0 -141
  90. package/server/graphql/resolvers/warehouse-inventory-adjustment/index.ts +0 -5
  91. package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +0 -68
  92. package/server/graphql/types/warehouse-inventory-adjustment/index.ts +0 -5
@@ -226,7 +226,7 @@ class ViewDeliveryOrder extends localize(i18next)(PageView) {
226
226
  title: i18next.t('title.completed_delivery_order')
227
227
  }
228
228
  )
229
-
229
+ popup.onclosed
230
230
  }
231
231
 
232
232
  _editDeliveryNote() {
@@ -355,6 +355,8 @@ class ReceiveVasOrder extends localize(i18next)(PageView) {
355
355
  title: i18next.t('title.reject_vas_order')
356
356
  }
357
357
  )
358
+
359
+ popup.onclosed
358
360
  }
359
361
 
360
362
  _showToast({ type, message }) {
@@ -34,8 +34,7 @@ class InventoryAssignPopup extends localize(i18next)(LitElement) {
34
34
  _data: Object,
35
35
  data: Object,
36
36
  pickQty: Number,
37
- pickUomValue: Number,
38
- orderProductId: String
37
+ pickUomValue: Number
39
38
  }
40
39
  }
41
40
 
@@ -512,11 +511,7 @@ class InventoryAssignPopup extends localize(i18next)(LitElement) {
512
511
  product: { id: record.product.id },
513
512
  releaseQty: record.pickQty,
514
513
  releaseUomValue: record.pickUomValue,
515
- type: ORDER_TYPES.RELEASE_OF_GOODS.value,
516
- uom: record.uom
517
- },
518
- targetProduct: {
519
- id: this.orderProductId
514
+ type: ORDER_TYPES.RELEASE_OF_GOODS.value
520
515
  }
521
516
  }
522
517
  })
@@ -232,8 +232,7 @@ class InventoryAutoAssignPopup extends localize(i18next)(LitElement) {
232
232
  uom: item.uom,
233
233
  releaseQty: item.releaseQty,
234
234
  releaseUomValue: item.releaseUomValue,
235
- pickingStrategy: item.product.pickingStrategy,
236
- orderProductId: item.orderProduct.id
235
+ pickingStrategy: item.product.pickingStrategy
237
236
  }
238
237
  })
239
238
  }
@@ -337,12 +337,6 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
337
337
  columns: [
338
338
  { type: 'gutter', gutterName: 'sequence' },
339
339
  { type: 'gutter', gutterName: 'row-selector', multiple: true },
340
- {
341
- type: 'string',
342
- name: 'toteName',
343
- header: i18next.t('field.tote'),
344
- width: 140
345
- },
346
340
  {
347
341
  type: 'string',
348
342
  name: 'palletId',
@@ -526,7 +520,6 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
526
520
  }
527
521
  worksheetDetailInfos {
528
522
  name
529
- toteName
530
523
  palletId
531
524
  batchId
532
525
  batchIdRef
@@ -595,34 +588,9 @@ class LoadingProduct extends connect(store)(localize(i18next)(PageView)) {
595
588
  async _loading() {
596
589
  try {
597
590
  this._validateLoading()
598
- const toteList = this.pickedProductGrist.selected.filter(itm => itm.toteName)
599
-
600
- let loadedWorksheetDetails = []
601
-
602
- if (toteList[0]?.toteName) {
603
- loadedWorksheetDetails = this.pickedProductGrist.selected
604
- .map(record => {
605
- return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
606
- })
607
- .filter(itm => !itm.toteName)
608
-
609
- let toteRecords = this.pickedProductGrist.data.records
610
- .filter(record => {
611
- return toteList.some(list => {
612
- return list.toteName == record.toteName
613
- })
614
- })
615
- .map(itm => {
616
- return { name: itm.name, loadedQty: itm.loadedQty, toteName: itm.toteName }
617
- })
618
-
619
- loadedWorksheetDetails = loadedWorksheetDetails.concat(toteRecords)
620
- } else {
621
- loadedWorksheetDetails = this.pickedProductGrist.selected.map(record => {
622
- return { name: record.name, loadedQty: record.loadedQty, toteName: record.toteName }
623
- })
624
- }
625
-
591
+ const loadedWorksheetDetails = this.pickedProductGrist.selected.map(record => {
592
+ return { name: record.name, loadedQty: record.loadedQty }
593
+ })
626
594
  let truckNo = null
627
595
  if (!this._ownCollection) {
628
596
  truckNo = this.warehouseTruckInput.value
@@ -2,7 +2,6 @@ import '@things-factory/barcode-ui'
2
2
  import '@things-factory/grist-ui'
3
3
  import '../components/worksheet-information-popup'
4
4
  import './serial-number-popup'
5
- import './order-remark-popup'
6
5
 
7
6
  import gql from 'graphql-tag'
8
7
  import { css, html } from 'lit-element'
@@ -23,12 +22,10 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
23
22
  static get properties() {
24
23
  return {
25
24
  airwayBill: String,
26
- checkedRemarkAt: String,
27
25
  config: Object,
28
26
  data: Object,
29
27
  invoice: String,
30
28
  orderInformation: String,
31
- orderRemark: String,
32
29
  platform: String,
33
30
  releaseGoodNo: String,
34
31
  releaseGoodId: String,
@@ -77,11 +74,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
77
74
  }
78
75
 
79
76
  get completed() {
80
- if (this.orderRemark) {
81
- return this.data.records.every(record => record.completed) && Boolean(this.checkedRemarkAt)
82
- } else {
83
- return this.data.records.every(record => record.completed)
84
- }
77
+ return this.data.records.every(record => record.completed)
85
78
  }
86
79
 
87
80
  get context() {
@@ -143,11 +136,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
143
136
  })
144
137
  }
145
138
 
146
- if (this.orderRemark) {
139
+ if (this._selectedTaskStatus === 'EXECUTING') {
147
140
  actions.push({
148
- title: i18next.t('button.order_remark'),
149
- action: this._openOrderRemarkPopup.bind(this),
150
- ...CommonButtonStyles.inspect
141
+ title: i18next.t('button.pack'),
142
+ action: this.packing.bind(this),
143
+ ...CommonButtonStyles.submit
151
144
  })
152
145
  }
153
146
 
@@ -392,12 +385,9 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
392
385
  releaseGood {
393
386
  id
394
387
  name
395
- remark
396
- checkedRemarkAt
397
388
  }
398
389
  bizplaceName
399
390
  partnerDomainId
400
- checkedRemarkBy
401
391
  refNo
402
392
  refNo2
403
393
  refNo3
@@ -489,8 +479,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
489
479
  this.platform = worksheetInfo.platform
490
480
  this.shippingProvider = worksheetInfo.shippingProvider
491
481
  this.orderInformation = worksheetInfo.marketplaceOrder
492
- this.orderRemark = worksheetInfo.releaseGood?.remark
493
- this.checkedRemarkAt = worksheetInfo.releaseGood?.checkedRemarkAt
494
482
 
495
483
  this._isBatchPicking = worksheetDetailInfos[0].relatedOrderInv?.refWorksheetId ? true : false
496
484
 
@@ -843,27 +831,6 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
843
831
  }
844
832
  }
845
833
 
846
- _openOrderRemarkPopup() {
847
- openPopup(
848
- html`
849
- <order-remark-popup
850
- .orderRemark="${this.orderRemark}"
851
- .releaseGoodNo="${this.releaseGoodNo}"
852
- .checkedRemarkAt="${this.checkedRemarkAt}"
853
- @remark-checked="${async () => {
854
- await this._fetchInventories(this.releaseGoodNo)
855
- this._showToast({ message: i18next.t('text.order_remark_has_been_checked') })
856
- }}"
857
- ></order-remark-popup>
858
- `,
859
- {
860
- backdrop: true,
861
- size: 'medium',
862
- title: i18next.t('title.order_remark')
863
- }
864
- )
865
- }
866
-
867
834
  _openWorksheetInformation() {
868
835
  openPopup(
869
836
  html`
@@ -159,13 +159,6 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
159
159
  })()
160
160
  },
161
161
  value: new Date().toISOString().split('T')[0]
162
- },
163
- {
164
- label: i18next.t('field.order_remark'),
165
- name: 'orderRemark',
166
- type: 'checkbox',
167
- props: { searchOper: 'eq' },
168
- attrs: ['indeterminate']
169
162
  }
170
163
  ]
171
164
 
@@ -194,13 +187,6 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
194
187
  }
195
188
  }
196
189
  },
197
- {
198
- type: 'boolean',
199
- name: 'orderRemark',
200
- header: i18next.t('field.order_remark'),
201
- sortable: true,
202
- width: 100
203
- },
204
190
  {
205
191
  type: 'object',
206
192
  name: 'releaseGood',
@@ -310,7 +296,6 @@ class PackingWorksheetList extends localize(i18next)(PageView) {
310
296
  name
311
297
  description
312
298
  }
313
- orderRemark
314
299
  name
315
300
  type
316
301
  status
@@ -5,7 +5,6 @@ import './picking-replacement-popup'
5
5
  import './show-my-worksheet-list-popup'
6
6
  import '../components/worksheet-information-popup'
7
7
  import './serial-number-popup'
8
- import './tote-popup'
9
8
 
10
9
  import gql from 'graphql-tag'
11
10
  import { css, html } from 'lit-element'
@@ -50,8 +49,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
50
49
  refPickingType: String,
51
50
  releaseGoodNo: String,
52
51
  releaseGoodId: String,
53
- worksheetNo: String,
54
- toteNo: String
52
+ worksheetNo: String
55
53
  }
56
54
  }
57
55
 
@@ -94,12 +92,12 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
94
92
  }
95
93
 
96
94
  get completed() {
97
- return this.data.records.every(record => record?.completed)
95
+ return this.data.records.every(record => record.completed)
98
96
  }
99
97
 
100
98
  get context() {
101
99
  var actions = []
102
- if (this._hasBinPicking) {
100
+ if (this._hasBinPicking && this.refPickingType === PICKING_TYPES.PICKING.value || PICKING_TYPES.BATCH_PICKING.value) {
103
101
  actions.push({
104
102
  title: i18next.t('button.get_task'),
105
103
  action: this.getTask.bind(this),
@@ -121,14 +119,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
121
119
  })
122
120
  }
123
121
 
124
- if (this.refPickingType === PICKING_TYPES.PICKING.value && this.releaseGoodNo && this._enableToteScanning) {
125
- actions.push({
126
- title: i18next.t('button.tote'),
127
- action: this.openTotePopup.bind(this),
128
- ...CommonButtonStyles.activate
129
- })
130
- }
131
-
132
122
  if (this.releaseGoodNo) {
133
123
  actions.push({
134
124
  title: i18next.t('button.plastic_pallet'),
@@ -137,19 +127,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
137
127
  })
138
128
  }
139
129
 
140
- if (
141
- (this.releaseGoodId || this.taskNo) &&
142
- this._selectedOrderInventory.status !== 'MISSING' &&
143
- this._selectedOrderInventory.hasMissingInventoryChanges !== true &&
144
- this._selectedOrderInventory.status !== 'DONE'
145
- ) {
146
- actions.push({
147
- title: i18next.t('button.missing_stock'),
148
- action: this.missingStock.bind(this),
149
- ...CommonButtonStyles.submit
150
- })
151
- }
152
-
153
130
  if ((this.releaseGoodNo && this.completed) || (this.taskNo && this.completed)) {
154
131
  actions.push({
155
132
  title: i18next.t('button.complete'),
@@ -273,6 +250,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
273
250
  this.releaseGoodNo = ''
274
251
  this.releaseGoodId = ''
275
252
  this.taskNo = ''
253
+
276
254
  this._incompleteLocationName = false
277
255
  this._isCartonLabel = false
278
256
  /* A flag to indicate either PICKING process is executing */
@@ -348,7 +326,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
348
326
  ${this.scannable
349
327
  ? html`
350
328
  <fieldset>
351
- ${this._hasBinPicking && (!this.toteNo || this.tote !== '')
329
+ ${this._hasBinPicking
352
330
  ? html`
353
331
  <label>${i18next.t('label.bin_location')}</label>
354
332
  <barcode-scanable-input
@@ -610,7 +588,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
610
588
  async fetchInventories(pickingRefNo) {
611
589
  if (!pickingRefNo) return
612
590
 
613
- const data = this._selectedOrderInventory
614
591
  let response
615
592
  switch (this.refPickingType) {
616
593
  case PICKING_TYPES.PICKING.value:
@@ -636,7 +613,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
636
613
  trackingNo
637
614
  }
638
615
  worksheetDetailInfos {
639
- hasMissingInventoryChanges
640
616
  name
641
617
  palletId
642
618
  cartonId
@@ -708,31 +684,13 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
708
684
 
709
685
  if (
710
686
  this._selectedOrderInventory &&
711
- this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty &&
712
- !this._selectedOrderInventory.hasMissingInventoryChanges &&
713
- this._selectedOrderInventory.status !== 'MISSING'
687
+ this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
714
688
  ) {
715
689
  this.scannable = true
716
690
  } else {
717
691
  this.scannable = false
718
692
  }
719
693
 
720
- if (!this._isCartonLabel && data) {
721
- const findPalletId = worksheetDetailInfos.find(res => res.palletId == data.palletId)
722
-
723
- if (data && findPalletId.hasMissingInventoryChanges) {
724
- this.scannable = false
725
- }
726
- }
727
-
728
- if (this._isCartonLabel && data) {
729
- const findCartonId = worksheetDetailInfos.find(res => res.cartonId == data.cartonId)
730
-
731
- if (data && findCartonId.hasMissingInventoryChanges) {
732
- this.scannable = false
733
- }
734
- }
735
-
736
694
  if (this._selectedOrderInventory) {
737
695
  const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
738
696
  this._selectedOrderInventory = record
@@ -761,7 +719,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
761
719
  }
762
720
 
763
721
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
764
- this._enableToteScanning = await fetchSettingRule('enable-tote-scanning', worksheetInfo.partnerDomainId)
765
722
  }
766
723
  break
767
724
 
@@ -776,7 +733,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
776
733
  startedAt
777
734
  }
778
735
  worksheetDetailInfos {
779
- hasMissingInventoryChanges
780
736
  palletId
781
737
  cartonId
782
738
  batchId
@@ -835,31 +791,13 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
835
791
 
836
792
  if (
837
793
  this._selectedOrderInventory &&
838
- this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty &&
839
- !this._selectedOrderInventory.hasMissingInventoryChanges &&
840
- this._selectedOrderInventory.status !== 'MISSING'
794
+ this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
841
795
  ) {
842
796
  this.scannable = true
843
797
  } else {
844
798
  this.scannable = false
845
799
  }
846
800
 
847
- if (!this._isCartonLabel && data) {
848
- const findPalletId = worksheetDetailInfos.find(res => res.palletId == data.palletId)
849
-
850
- if (data && findPalletId.hasMissingInventoryChanges) {
851
- this.scannable = false
852
- }
853
- }
854
-
855
- if (this._isCartonLabel && data) {
856
- const findCartonId = worksheetDetailInfos.find(res => res.cartonId == data.cartonId)
857
-
858
- if (data && findCartonId.hasMissingInventoryChanges) {
859
- this.scannable = false
860
- }
861
- }
862
-
863
801
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
864
802
 
865
803
  if (this._selectedOrderInventory) {
@@ -894,7 +832,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
894
832
  formatWorksheetDetailInfos(wsdInfos) {
895
833
  return wsdInfos
896
834
  .map(record => {
897
- if (record.pickedQty == record.releaseQty || record.status == 'MISSING') {
835
+ if (record.pickedQty == record.releaseQty) {
898
836
  record.completed = true
899
837
  } else {
900
838
  record.completed = false
@@ -920,7 +858,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
920
858
 
921
859
  return record
922
860
  })
923
- .sort((a, b) => a.hasMissingInventoryChanges - b.hasMissingInventoryChanges)
924
861
  .sort((a, b) => a.completed - b.completed)
925
862
  }
926
863
 
@@ -971,7 +908,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
971
908
  this._incompleteLocationName = false
972
909
  this._isExecuting = false
973
910
  this._locationName = null
974
- this.toteNo = ''
975
911
  }
976
912
 
977
913
  fillUpForm(form, data) {
@@ -1121,28 +1057,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1121
1057
  )
1122
1058
  }
1123
1059
 
1124
- openTotePopup() {
1125
- openPopup(
1126
- html`
1127
- <tote-popup
1128
- .orderNo="${this.releaseGoodNo}"
1129
- .toteNo="${this.toteNo}"
1130
- .bizplace="${this._bizplaceName}"
1131
- @completed="${async e => {
1132
- this.toteNo = e.detail
1133
- }}"
1134
- ></tote-popup>
1135
- `,
1136
- {
1137
- closable: false,
1138
- backdrop: false,
1139
- escapable: false,
1140
- size: 'large',
1141
- title: i18next.t('title.tote_scanning')
1142
- }
1143
- )
1144
- }
1145
-
1146
1060
  _openWorksheetInformation() {
1147
1061
  openPopup(
1148
1062
  html`
@@ -1199,7 +1113,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1199
1113
  $releaseQty: Int!
1200
1114
  $binLocation: String
1201
1115
  $serialNumber: String
1202
- $toteNo: String
1203
1116
  ) {
1204
1117
  picking(
1205
1118
  worksheetDetailName: $worksheetDetailName
@@ -1209,7 +1122,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1209
1122
  releaseQty: $releaseQty
1210
1123
  binLocation: $binLocation
1211
1124
  serialNumber: $serialNumber
1212
- toteNo: $toteNo
1213
1125
  )
1214
1126
  }
1215
1127
  `,
@@ -1220,8 +1132,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1220
1132
  locationName: this._locationName ? this._locationName : this._selectedOrderInventory?.location.name,
1221
1133
  releaseQty: this._isRequireSerialNumberScanningOutbound ? 1 : parseInt(this.releaseQtyInput.value),
1222
1134
  binLocation: this._hasBinPicking ? this.binLocationInput.value : null,
1223
- serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
1224
- toteNo: this._enableToteScanning && this.toteNo !== '' ? this.toteNo : null
1135
+ serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null
1225
1136
  }
1226
1137
  })
1227
1138
 
@@ -1280,7 +1191,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1280
1191
  $cartonId: String!
1281
1192
  $binLocation: String
1282
1193
  $serialNumber: String
1283
- $toteNo: String
1284
1194
  ) {
1285
1195
  scanProductPicking(
1286
1196
  worksheetDetailName: $worksheetDetailName
@@ -1289,7 +1199,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1289
1199
  cartonId: $cartonId
1290
1200
  binLocation: $binLocation
1291
1201
  serialNumber: $serialNumber
1292
- toteNo: $toteNo
1293
1202
  )
1294
1203
  }
1295
1204
  `,
@@ -1299,8 +1208,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1299
1208
  productBarcode: this.productBarcodeInput.value.trim(),
1300
1209
  cartonId: this.cartonInput.value.trim(),
1301
1210
  serialNumber: this._isRequireSerialNumberScanningOutbound ? this.serialInput.value : null,
1302
- binLocation: this._hasBinPicking ? this.binLocationInput.value : null,
1303
- toteNo: this._enableToteScanning && this.toteNo !== '' ? this.toteNo : null
1211
+ binLocation: this._hasBinPicking ? this.binLocationInput.value : null
1304
1212
  }
1305
1213
  })
1306
1214
 
@@ -1637,45 +1545,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1637
1545
  }
1638
1546
  }
1639
1547
 
1640
- async missingStock() {
1641
- const selectOrderInventory = this._selectedOrderInventory
1642
-
1643
- const patchesArr = [selectOrderInventory]
1644
-
1645
- const patches = patchesArr.map(p => {
1646
- return {
1647
- palletId: p.palletId,
1648
- transactionType: 'MISSING'
1649
- }
1650
- })
1651
-
1652
- const result = await CustomAlert({
1653
- title: i18next.t('title.are_you_sure'),
1654
- text: i18next.t('text.do_you_want_to_mark_it_as_missing'),
1655
- confirmButton: { text: i18next.t('button.confirm') },
1656
- cancelButton: { text: i18next.t('button.cancel') }
1657
- })
1658
-
1659
- if (result.isConfirmed) {
1660
- try {
1661
- const response = await client.mutate({
1662
- mutation: gql`
1663
- mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
1664
- submitInventoryChanges(patches: $patches)
1665
- }
1666
- `,
1667
- variables: { patches }
1668
- })
1669
-
1670
- if (!response.error) {
1671
- await this.fetchInventories(this.releaseGoodNo)
1672
- }
1673
- } catch (error) {
1674
- throw new Error(error)
1675
- }
1676
- }
1677
- }
1678
-
1679
1548
  openPalletOutbound() {
1680
1549
  openPopup(
1681
1550
  html`
@@ -1781,7 +1650,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
1781
1650
  this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
1782
1651
 
1783
1652
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
1784
- this._enableToteScanning = await fetchSettingRule('enable-tote-scanning', worksheetInfo.partnerDomainId)
1785
1653
 
1786
1654
  if (this._selectedOrderInventory) {
1787
1655
  const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
@@ -66,7 +66,13 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
66
66
  }
67
67
 
68
68
  get context() {
69
- var actions = []
69
+ var actions = [
70
+ {
71
+ title: i18next.t('button.assign_picker'),
72
+ action: this._assignPicker.bind(this),
73
+ ...CommonButtonStyles.activate
74
+ }
75
+ ]
70
76
 
71
77
  if (this._routeLabelSetting) {
72
78
  actions.push({
@@ -76,12 +82,6 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
76
82
  })
77
83
  }
78
84
 
79
- actions.push({
80
- title: i18next.t('button.assign_picker'),
81
- action: this._assignPicker.bind(this),
82
- ...CommonButtonStyles.activate
83
- })
84
-
85
85
  return {
86
86
  title: i18next.t('title.outbound_worksheet'),
87
87
  actions,
@@ -192,7 +192,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
192
192
  },
193
193
  {
194
194
  label: i18next.t('field.cross_docking'),
195
- name: 'crossDocking',
195
+ name: 'crossDocking',
196
196
  type: 'checkbox',
197
197
  props: { searchOper: 'eq' },
198
198
  attrs: ['indeterminate']
@@ -438,8 +438,9 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
438
438
  if (!response.errors) {
439
439
  let domain = response.data.worksheets.items[0]?.domain
440
440
 
441
- if (domain) this._routeLabelSetting = await fetchSettingRule('enable-print-route-label', domain.id)
442
-
441
+ if (domain)
442
+ this._routeLabelSetting = await fetchSettingRule('enable-print-route-label', domain.id)
443
+
443
444
  this.updateContext()
444
445
  return {
445
446
  total: response.data.worksheets.total || 0,
@@ -630,6 +631,17 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
630
631
  return { header: headerSetting, data: data }
631
632
  }
632
633
 
634
+ _showToast({ type, message }) {
635
+ document.dispatchEvent(
636
+ new CustomEvent('notify', {
637
+ detail: {
638
+ type,
639
+ message
640
+ }
641
+ })
642
+ )
643
+ }
644
+
633
645
  navigatePickingRelatedPages(record) {
634
646
  if (this.assigneeId) {
635
647
  const searchParams = new URLSearchParams()