@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
@@ -16,4 +16,3 @@ export * from './worksheet'
16
16
  export * from './pallet'
17
17
  export * from './platform'
18
18
  export * from './group-type'
19
- export * from './tote'
@@ -6,4 +6,3 @@ export const PRODUCT_LABEL_SETTING_KEY = 'product-label'
6
6
  export const REUSABLE_PALLET_LABEL_SETTING_KEY = 'reusable-pallet-label'
7
7
  export const INTENALIZED_AWB_SETTING_KEY = 'internalized-awb-label'
8
8
  export const ROUTE_LABEL_SETTING_KEY = 'route-label'
9
- export const TOTE_LABEL_SETTING_KEY = 'tote-label'
@@ -372,7 +372,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
372
372
  this.productBarcodeInput.readOnly = false
373
373
  this.productBarcodeInput.value = ''
374
374
  }
375
- if (record.product?.isRequireSerialNumberScanningInbound) {
375
+ if (this.serialNumberInput) {
376
376
  this.serialNumberInput.value = ''
377
377
  }
378
378
  this.cartonInput.value = ''
@@ -1090,14 +1090,10 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1090
1090
  if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
1091
1091
  this._selectedOrderProduct = null
1092
1092
 
1093
- if (!this._selectedOrderProduct) {
1094
- if (foundOrderProducts?.length > 1) {
1095
- this.selectOrderProduct(foundOrderProducts)
1096
- } else if (foundOrderProducts?.length == 1) {
1097
- this._selectedOrderProduct = foundOrderProducts[0]
1098
- } else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
1099
- this._selectedOrderProduct = foundParentProducts[0]
1100
- }
1093
+ if (foundOrderProducts?.length > 1 && !this._selectedOrderProduct) {
1094
+ this.selectOrderProduct(foundOrderProducts)
1095
+ } else {
1096
+ this._selectedOrderProduct = foundParentProducts[0]
1101
1097
  }
1102
1098
  }
1103
1099
  } catch (e) {
@@ -8,7 +8,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
8
8
 
9
9
  import { getCodeByName } from '@things-factory/code-base'
10
10
  import { i18next, localize } from '@things-factory/i18n-base'
11
- import { client, PageView, store,gqlContext } from '@things-factory/shell'
11
+ import { client, PageView, store } from '@things-factory/shell'
12
12
  import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
13
13
  import { isMobileDevice } from '@things-factory/utils'
14
14
  import { openPopup } from '@things-factory/layout-base'
@@ -141,9 +141,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
141
141
  { column: 'expirationDate', name: 'Exp. Date' },
142
142
  { column: 'manufactureDate', name: 'Mfg. Date' },
143
143
  { column: 'unitCost', name: 'Unit Cost' },
144
- { column: 'inventoryItemChange', name: 'Inventory Item Changes' },
145
- { column: 'status', name: 'Status' },
146
-
144
+ { column: 'inventoryItemChange', name: 'Inventory Item Changes' }
147
145
  ]
148
146
 
149
147
  this.config = {
@@ -196,17 +194,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
196
194
  } else {
197
195
  this._compareColumn.map(item => {
198
196
  let currentVal = compareData[item.column]?.name || compareData[item.column] || '[N/A]'
199
- let updatedVal
200
-
201
- if (item.column == 'status' && record.transactionType == 'MISSING') {
202
- updatedVal = record.transactionType || '[N/A]'
203
- }else if(item.column == 'status'){
204
- updatedVal = '[N/A]'
205
- }
206
-
207
- if (item.column !== 'status') {
208
- updatedVal = record[item.column]?.name || record[item.column] || '[N/A]'
209
- }
197
+ let updatedVal = record[item.column]?.name || record[item.column] || '[N/A]'
210
198
 
211
199
  recordDiff.push({
212
200
  column: item.name,
@@ -416,7 +404,6 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
416
404
  batchIdRef
417
405
  packingType
418
406
  packingSize
419
- status
420
407
  bizplace {
421
408
  id
422
409
  name
@@ -445,7 +432,6 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
445
432
  packingType
446
433
  packingSize
447
434
  batchIdRef
448
- status
449
435
  bizplace {
450
436
  id
451
437
  name
@@ -562,8 +548,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
562
548
  if (patches && patches.length) {
563
549
  const response = await client.mutate({
564
550
  mutation: gql`
565
- mutation warehouseInventoryAdjustment($patches: [InventoryChangePatch!]!) {
566
- warehouseInventoryAdjustment(patches: $patches) {
551
+ mutation approveInventoryChanges($patches: [InventoryChangePatch!]!) {
552
+ approveInventoryChanges(patches: $patches) {
567
553
  items {
568
554
  id
569
555
  }
@@ -571,14 +557,13 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
571
557
  }
572
558
  }
573
559
  `,
574
- variables: { patches },
575
- context: gqlContext()
560
+ variables: { patches }
576
561
  })
577
562
  if (!response.errors) {
578
- this._lockedPallet = response.data.warehouseInventoryAdjustment.items
563
+ this._lockedPallet = response.data.approveInventoryChanges.items
579
564
  this._showToast({
580
565
  message:
581
- response.data.warehouseInventoryAdjustment.total > 0
566
+ response.data.approveInventoryChanges.total > 0
582
567
  ? 'Highlighted pallet could not be approved due to ongoing process.'
583
568
  : i18next.t('text.data_approved'),
584
569
  option: 7000
@@ -692,4 +677,4 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
692
677
  }
693
678
  }
694
679
 
695
- window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
680
+ window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
@@ -13,7 +13,7 @@ import { DirectPrinter } from '@things-factory/barcode-base'
13
13
  import { getCodeByName } from '@things-factory/code-base'
14
14
  import { i18next, localize } from '@things-factory/i18n-base'
15
15
  import { openPopup } from '@things-factory/layout-base'
16
- import { client, CustomAlert, PageView, store } from '@things-factory/shell'
16
+ import { client, PageView, store } from '@things-factory/shell'
17
17
  import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
18
18
  import { isMobileDevice } from '@things-factory/utils'
19
19
 
@@ -75,11 +75,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
75
75
  action: this.printCartonLabel.bind(this),
76
76
  ...CommonButtonStyles.label
77
77
  },
78
- {
79
- title: i18next.t('button.missing_stock'),
80
- action: this.missingStock.bind(this),
81
- ...CommonButtonStyles.save
82
- },
83
78
  {
84
79
  title: i18next.t('button.save'),
85
80
  action: this.saveInventories.bind(this),
@@ -728,15 +723,11 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
728
723
 
729
724
  switch (e.detail.column.name) {
730
725
  case 'uomValue':
731
- if (e.detail.after < 0 || e.detail.after.toString() == NaN.toString()) {
732
- item._data.records[e.detail.row].uomValue = 0
733
- this._showToast({ level: 'error', message: i18next.t('text.invalid_uom_value') })
734
- }
726
+ if (e.detail.after < 0) item._data.records[e.detail.row].uomValue = 0
735
727
  break
736
728
  case 'qty':
737
- if (e.detail.after < 0 || !Number.isInteger(e.detail.after)) {
738
- this._showToast({ level: 'error', message: i18next.t('text.invalid_qty') })
739
- }
729
+ if (e.detail.after < 0 || !Number.isInteger(e.detail.after))
730
+ item._data.records[e.detail.row].qty = e.detail.before
740
731
  break
741
732
  case 'unitCost':
742
733
  if (e.detail.after < 0) item._data.records[e.detail.row].unitCost = e.detail.before
@@ -770,46 +761,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
770
761
  }
771
762
  }
772
763
 
773
- async missingStock() {
774
- const selectOrderInventory = this.dataGrist.selected
775
-
776
- const patchesArr = [...selectOrderInventory]
777
-
778
- const patches = patchesArr.map(p => {
779
- return {
780
- palletId: p.palletId,
781
- transactionType: 'MISSING'
782
- }
783
- })
784
-
785
- const result = await CustomAlert({
786
- title: i18next.t('title.are_you_sure'),
787
- text: i18next.t('text.do_you_want_to_mark_it_as_missing'),
788
- confirmButton: { text: i18next.t('button.confirm') },
789
- cancelButton: { text: i18next.t('button.cancel') }
790
- })
791
-
792
- if (result.isConfirmed) {
793
- try {
794
- const response = await client.mutate({
795
- mutation: gql`
796
- mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
797
- submitInventoryChanges(patches: $patches)
798
- }
799
- `,
800
- variables: { patches }
801
- })
802
-
803
- if (!response.error) {
804
- this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
805
- this.updateContext()
806
- }
807
- } catch (error) {
808
- throw new Error(error)
809
- }
810
- }
811
- }
812
-
813
764
  async saveInventories() {
814
765
  try {
815
766
  var patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
@@ -842,34 +793,18 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
842
793
  })
843
794
 
844
795
  if (patches && patches.length) {
845
- const validateInventoryChanges = await client.query({
846
- query: gql`
847
- query validateOrderInventory($patches: [InventoryPatch!]!) {
848
- validateOrderInventory(patches: $patches)
796
+ const response = await client.mutate({
797
+ mutation: gql`
798
+ mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
799
+ submitInventoryChanges(patches: $patches)
849
800
  }
850
801
  `,
851
802
  variables: { patches }
852
803
  })
853
804
 
854
- if (validateInventoryChanges.data.validateOrderInventory) {
855
- const response = await client.mutate({
856
- mutation: gql`
857
- mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
858
- submitInventoryChanges(patches: $patches)
859
- }
860
- `,
861
- variables: { patches }
862
- })
863
-
864
- if (!response.errors) {
865
- this.dataGrist.fetch()
866
- this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
867
- }
868
- } else {
869
- this._showToast({
870
- type: 'error',
871
- message: `${i18next.t('text.complete_the_picking_process_before_adjust_the_batch_number')}`
872
- })
805
+ if (!response.errors) {
806
+ this.dataGrist.fetch()
807
+ this._showToast({ message: i18next.t('text.data_submitted_for_approval') })
873
808
  }
874
809
  }
875
810
  } catch (e) {
@@ -958,7 +893,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
958
893
  if (!response.errors) {
959
894
  history.back()
960
895
  this.dataGrist.fetch()
961
- this._showToast({ message: i18next.t('text.data_inventory_adjustment_has_been_submitted_for_approval') })
896
+ this._showToast({ message: i18next.t('text.data_submitted_for_approval') })
962
897
  }
963
898
  } catch (e) {
964
899
  this._showToast(e)
@@ -1392,11 +1327,10 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1392
1327
  }
1393
1328
  }
1394
1329
 
1395
- _showToast({ level, type, message }) {
1330
+ _showToast({ type, message }) {
1396
1331
  document.dispatchEvent(
1397
1332
  new CustomEvent('notify', {
1398
1333
  detail: {
1399
- level,
1400
1334
  type,
1401
1335
  message
1402
1336
  }
@@ -653,7 +653,7 @@ class ProductList extends localize(i18next)(PageView) {
653
653
 
654
654
  const response = await client.query({
655
655
  query: gql`
656
- query productsByBizplace($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
656
+ query productsByBizplace($filters: [Filter], $pagination: Pagination, $sortings: [Sorting]) {
657
657
  productsByBizplace(filters: $filters, pagination: $pagination, sortings: $sortings) {
658
658
  items {
659
659
  sku
@@ -1057,6 +1057,8 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1057
1057
  title: i18next.t('title.reject_arrival_notice')
1058
1058
  }
1059
1059
  )
1060
+
1061
+ popup.onclosed
1060
1062
  }
1061
1063
 
1062
1064
  async _receiveArrivalNotice() {
@@ -778,6 +778,8 @@ class ReceiveArrivalNotice extends localize(i18next)(PageView) {
778
778
  title: i18next.t('title.reject_arrival_notice')
779
779
  }
780
780
  )
781
+
782
+ popup.onclosed
781
783
  }
782
784
 
783
785
  _showToast({ type, message }) {
@@ -90,9 +90,6 @@ class CustomerReceivedNote extends localize(i18next)(PageView) {
90
90
  case 'seebuu-warehouse':
91
91
  this.shadowRoot.querySelector('#container').src = `/view_seebuu_grn/${this._grnNo}`
92
92
  break
93
- case 'freight-mark-warehouse':
94
- this.shadowRoot.querySelector('#container').src = `/view_fm_grn/${this._grnNo}/${timezoneOffSet}`
95
- break
96
93
  case 'kimeda-warehouse':
97
94
  this.shadowRoot.querySelector('#container').src = `/view_kimeda_grn/${this._grnNo}/${timezoneOffSet}`
98
95
  break
@@ -92,9 +92,6 @@ class ReceivedNoteDetail extends localize(i18next)(PageView) {
92
92
  case 'seebuu-warehouse':
93
93
  this.shadowRoot.querySelector('#container').src = `/view_seebuu_grn/${this._grnNo}`
94
94
  break
95
- case 'freight-mark-warehouse':
96
- this.shadowRoot.querySelector('#container').src = `/view_fm_grn/${this._grnNo}/${timezoneOffSet}`
97
- break
98
95
  case 'kimeda-warehouse':
99
96
  this.shadowRoot.querySelector('#container').src = `/view_kimeda_grn/${this._grnNo}/${timezoneOffSet}`
100
97
  break
@@ -3,20 +3,38 @@ import '@things-factory/grist-ui'
3
3
  import '../batch-picking-popup'
4
4
 
5
5
  import gql from 'graphql-tag'
6
- import { css, html } from 'lit-element'
6
+ import {
7
+ css,
8
+ html
9
+ } from 'lit-element'
7
10
  import { connect } from 'pwa-helpers/connect-mixin'
8
11
 
9
12
  import { GhostPrint } from '@operato/ghost-print'
10
13
  import { DirectPrinter } from '@things-factory/barcode-base'
11
14
  import { getCodeByName } from '@things-factory/code-base'
12
- import { i18next, localize } from '@things-factory/i18n-base'
15
+ import {
16
+ i18next,
17
+ localize
18
+ } from '@things-factory/i18n-base'
13
19
  import { openPopup } from '@things-factory/layout-base'
14
- import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
15
- import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
20
+ import {
21
+ client,
22
+ CustomAlert,
23
+ navigate,
24
+ PageView,
25
+ store
26
+ } from '@things-factory/shell'
27
+ import {
28
+ CommonButtonStyles,
29
+ ScrollbarStyles
30
+ } from '@things-factory/styles'
16
31
  import { isMobileDevice } from '@things-factory/utils'
17
32
 
18
33
  import { fetchSettingRule } from '../../../../fetch-setting-value'
19
- import { INTENALIZED_AWB_SETTING_KEY, ORDER_STATUS } from '../../../constants'
34
+ import {
35
+ INTENALIZED_AWB_SETTING_KEY,
36
+ ORDER_STATUS
37
+ } from '../../../constants'
20
38
 
21
39
  const HEADER_JSON = {
22
40
  'Content-Type': 'application/json',
@@ -242,13 +260,6 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
242
260
  name: 'sku',
243
261
  type: 'text',
244
262
  props: { searchOper: 'i_like' }
245
- },
246
- {
247
- label: i18next.t('field.order_remark'),
248
- name: 'orderRemark',
249
- type: 'checkbox',
250
- props: { searchOper: 'eq' },
251
- attrs: ['indeterminate']
252
263
  }
253
264
  ]
254
265
 
@@ -292,14 +303,6 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
292
303
  }
293
304
  }
294
305
  },
295
- {
296
- type: 'boolean',
297
- name: 'orderRemark',
298
- header: i18next.t('field.order_remark'),
299
- imex: { header: i18next.t('field.order_remark'), key: 'orderRemark', width: 20, type: 'string' },
300
- sortable: true,
301
- width: 100
302
- },
303
306
  {
304
307
  type: 'string',
305
308
  name: 'name',
@@ -362,6 +365,13 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
362
365
  sortable: true,
363
366
  width: 120
364
367
  },
368
+ // {
369
+ // type: 'string',
370
+ // name: 'marketplaceOrderStatus',
371
+ // header: i18next.t('field.marketplace_order_status'),
372
+ // sortable: true,
373
+ // width: 120
374
+ // },
365
375
  {
366
376
  type: 'string',
367
377
  name: 'status',
@@ -431,7 +441,6 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
431
441
  postalCode
432
442
  marketplaceOrderStatus
433
443
  transporter
434
- orderRemark
435
444
  bizplace {
436
445
  id
437
446
  name
@@ -168,9 +168,6 @@ class BulkPrintPackingList extends localize(i18next)(PageView) {
168
168
  rows="5"
169
169
  readonly
170
170
  ></textarea>
171
-
172
- <label>${i18next.t('label.order_remark')}</label>
173
- <textarea rows="5" readonly></textarea>
174
171
  </fieldset>
175
172
  </form>
176
173
 
@@ -268,7 +265,6 @@ class BulkPrintPackingList extends localize(i18next)(PageView) {
268
265
  attentionTo
269
266
  phone1
270
267
  deliveryAddress1
271
- remark
272
268
  bizplace {
273
269
  id
274
270
  name
@@ -828,6 +828,8 @@ class ReceiveReleaseOrderRequest extends connect(store)(localize(i18next)(PageVi
828
828
  title: i18next.t('title.reject_release_order')
829
829
  }
830
830
  )
831
+
832
+ popup.onclosed
831
833
  }
832
834
 
833
835
  async _generateSinglePickingWorksheet() {
@@ -55,7 +55,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
55
55
  _containerArrivalDate: Date,
56
56
  _containerLeavingDate: Date,
57
57
  _vasExpanded: Boolean,
58
- _beforeRemark: String,
59
58
  isUserBelongsDomain: Boolean
60
59
  }
61
60
  }
@@ -310,10 +309,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
310
309
  <label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.delivery_address')}</label>
311
310
  <textarea name="deliveryAddress1" ?hidden="${this.roType === 'b2b'}" rows="5" readonly></textarea>
312
311
 
313
- <label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.order_remark')}</label>
314
- <textarea name="remark" ?hidden="${this.roType === 'b2b'}" rows="5" ?readonly="${!this
315
- ?._editable}"></textarea>
316
-
317
312
  ${
318
313
  this._crossDocking
319
314
  ? html`
@@ -562,10 +557,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
562
557
  return this.shadowRoot.querySelector('input[name=warehouseTransport]')
563
558
  }
564
559
 
565
- get _remarkInput() {
566
- return this.shadowRoot.querySelector('textarea[name=remark]')
567
- }
568
-
569
560
  get _exportInput() {
570
561
  return this.shadowRoot.querySelector('input[name=exportOption]')
571
562
  }
@@ -758,6 +749,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
758
749
  type: 'object',
759
750
  name: 'vas',
760
751
  header: i18next.t('field.vas'),
752
+ record: { options: { queryName: 'vass' } },
761
753
  width: 250
762
754
  },
763
755
  {
@@ -798,7 +790,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
798
790
  attentionTo
799
791
  phone1
800
792
  deliveryAddress1
801
- remark
802
793
  bizplace {
803
794
  id
804
795
  name
@@ -943,7 +934,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
943
934
  this.partnerBizplaceId = releaseOrder.bizplace.id
944
935
  this._exportOption = releaseOrder.exportOption
945
936
 
946
- this._beforeRemark = releaseOrder?.remark
947
937
  this._courierOption = releaseOrder.courierOption
948
938
  this._packingOption = releaseOrder.packingOption
949
939
  this._crossDocking = releaseOrder?.crossDocking
@@ -974,9 +964,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
974
964
  this._attachments = releaseOrder && releaseOrder.attachment
975
965
  }
976
966
 
977
- const nonEditableStatus = ['DONE', 'PACKING']
978
-
979
- if (!nonEditableStatus.includes(releaseOrder.status) && this.isUserBelongsDomain) {
967
+ if (releaseOrder.status !== 'DONE' && this.isUserBelongsDomain) {
980
968
  this._editable = true
981
969
  } else {
982
970
  this._editable = false
@@ -1056,6 +1044,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1056
1044
  title: i18next.t('title.reject_release_order')
1057
1045
  }
1058
1046
  )
1047
+
1048
+ popup.onclosed
1059
1049
  }
1060
1050
 
1061
1051
  async _receiveReleaseOrder() {
@@ -1219,7 +1209,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1219
1209
  this._packingOption = false
1220
1210
  this._ownTransport = true
1221
1211
  this._downloadable = true
1222
- this._beforeRemark = null
1223
1212
  this._attachments = []
1224
1213
  this.inventoryData = { records: [] }
1225
1214
  this.vasData = { records: [] }
@@ -1227,6 +1216,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1227
1216
 
1228
1217
  async _deleteReleaseOrder() {
1229
1218
  try {
1219
+ let userIsOfficeAdmin = this._userRoles
1220
+ ? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
1221
+ : false
1222
+
1230
1223
  let result = await CustomAlert({
1231
1224
  title: i18next.t('title.are_you_sure'),
1232
1225
  text: i18next.t('text.you_wont_be_able_to_revert_this'),
@@ -1267,6 +1260,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1267
1260
  }
1268
1261
 
1269
1262
  async _submitCancellationReleaseOrder() {
1263
+ let userIsOfficeAdmin = this._userRoles
1264
+ ? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
1265
+ : false
1266
+
1270
1267
  try {
1271
1268
  const result = await CustomAlert({
1272
1269
  title: i18next.t('title.are_you_sure'),
@@ -1314,6 +1311,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1314
1311
  }
1315
1312
 
1316
1313
  async _confirmReleaseOrder() {
1314
+ let userIsOfficeAdmin = this._userRoles
1315
+ ? this._userRoles.find(x => x.name?.toLowerCase() === 'office admin')
1316
+ : false
1317
+
1317
1318
  let result = await CustomAlert({
1318
1319
  title: i18next.t('title.are_you_sure'),
1319
1320
  text: i18next.t('text.confirm_release_good'),
@@ -1359,7 +1360,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1359
1360
  try {
1360
1361
  const response = await client.query({
1361
1362
  query: gql`
1362
- query checkUserBelongsDomain {
1363
+ query {
1363
1364
  checkUserBelongsDomain
1364
1365
  }
1365
1366
  `
@@ -1430,31 +1431,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1430
1431
  this._validateTransport()
1431
1432
  this._validateForm()
1432
1433
 
1433
- let releaseOrder = this._getFormInfo()
1434
- delete releaseOrder.warehouseTransport
1435
- delete releaseOrder.bizplaceId
1436
- delete releaseOrder.bizplaceName
1437
- delete releaseOrder.status
1438
- delete releaseOrder.ganNo
1439
-
1440
- let afterRemarkValue
1441
- if (releaseOrder?.remark) {
1442
- afterRemarkValue = releaseOrder.remark = releaseOrder.remark.trimStart()
1443
- }
1444
-
1445
- if (this._beforeRemark !== afterRemarkValue) {
1446
- if (!afterRemarkValue) {
1447
- const remarkResult = await CustomAlert({
1448
- title: i18next.t('title.removing_order_remark'),
1449
- text: i18next.t('text.do_you_want_to_proceed'),
1450
- confirmButton: { text: i18next.t('button.proceed') },
1451
- cancelButton: { text: i18next.t('button.cancel') }
1452
- })
1453
-
1454
- if (!remarkResult.value) return
1455
- }
1456
- }
1457
-
1458
1434
  const result = await CustomAlert({
1459
1435
  title: i18next.t('title.are_you_sure'),
1460
1436
  text: i18next.t('text.update_release_order_details'),
@@ -1464,6 +1440,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1464
1440
 
1465
1441
  if (!result.value) return
1466
1442
 
1443
+ let releaseOrder = this._getFormInfo()
1444
+ delete releaseOrder.warehouseTransport
1445
+ delete releaseOrder.bizplaceId
1446
+ delete releaseOrder.bizplaceName
1447
+ delete releaseOrder.status
1448
+ delete releaseOrder.ganNo
1449
+
1467
1450
  let shippingOrder = this._exportOption ? this._serializeForm(this.shippingOrderForm) : null
1468
1451
 
1469
1452
  const response = await client.mutate({
@@ -1496,15 +1479,14 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1496
1479
  }
1497
1480
 
1498
1481
  _getFormInfo() {
1499
- let formData = this._serializeForm(this.releaseOrderForm)
1482
+ const formData = this._serializeForm(this.releaseOrderForm)
1500
1483
  delete formData.importedOrder
1501
-
1502
1484
  return formData
1503
1485
  }
1504
1486
 
1505
1487
  _serializeForm(form) {
1506
1488
  let obj = {}
1507
- Array.from(form.querySelectorAll('input, select, textarea')).forEach(field => {
1489
+ Array.from(form.querySelectorAll('input, select')).forEach(field => {
1508
1490
  if (!field.hasAttribute('hidden')) {
1509
1491
  obj[field.name] = field.type === 'checkbox' ? field.checked : field.value
1510
1492
  }
@@ -510,6 +510,8 @@ class ReceiveReturnOrderRequests extends connect(store)(localize(i18next)(PageVi
510
510
  title: i18next.t('title.reject_return_order')
511
511
  }
512
512
  )
513
+
514
+ popup.onclosed
513
515
  }
514
516
 
515
517
  _showToast({ type, message }) {
@@ -423,7 +423,7 @@ class ReceiveTransferOrderRequest extends localize(i18next)(PageView) {
423
423
  // }
424
424
  // )
425
425
 
426
- //
426
+ // popup.onclosed
427
427
  // }
428
428
 
429
429
  get _columns() {
@@ -227,6 +227,7 @@ class PrintDeliveryOrder extends localize(i18next)(PageView) {
227
227
  title: i18next.t('title.completed_delivery_order')
228
228
  }
229
229
  )
230
+ popup.onclosed
230
231
  }
231
232
 
232
233
  _editDeliveryNote() {