@things-factory/operato-wms 4.0.24 → 4.0.25

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 (43) hide show
  1. package/client/pages/adjustment/transfer-inventory.js +32 -6
  2. package/client/pages/bulk-operation/bulk-operation.js +189 -64
  3. package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
  4. package/client/pages/bulk-operation/validate-ro-popup.js +52 -22
  5. package/client/pages/components/popup-unloading.js +47 -34
  6. package/client/pages/components/select-product-popup.js +74 -27
  7. package/client/pages/components/worksheet-information-popup.js +100 -0
  8. package/client/pages/inbound/putaway-product.js +184 -231
  9. package/client/pages/inbound/undo-unload-popup.js +295 -0
  10. package/client/pages/inbound/unload-product.js +229 -567
  11. package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
  12. package/client/pages/inbound/worksheet-unloading.js +15 -11
  13. package/client/pages/inventory/inventory-adjustment.js +9 -10
  14. package/client/pages/master/product/product-list.js +1 -1
  15. package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
  16. package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
  17. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
  18. package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
  19. package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
  20. package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
  21. package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
  22. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
  23. package/client/pages/order/release-order/batch-picking-popup.js +19 -2
  24. package/client/pages/order/release-order/create-release-order.js +194 -89
  25. package/client/pages/order/release-order/release-order-detail.js +390 -107
  26. package/client/pages/order/return-order/create-return-order.js +3 -3
  27. package/client/pages/order/transport-order/create-delivery-order.js +1 -1
  28. package/client/pages/order/transport-order/delivery-order-list.js +1 -1
  29. package/client/pages/outbound/packing-product.js +111 -236
  30. package/client/pages/outbound/picking-product.js +287 -380
  31. package/client/pages/outbound/sorting-product.js +66 -63
  32. package/client/pages/outbound/worksheet-loading.js +7 -3
  33. package/client/pages/outbound/worksheet-packing.js +3 -3
  34. package/client/pages/outbound/worksheet-picking.js +22 -18
  35. package/client/pages/vas/print-product-label.js +17 -9
  36. package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
  37. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
  38. package/package.json +65 -65
  39. package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
  40. package/translations/en.json +31 -2
  41. package/translations/ko.json +32 -3
  42. package/translations/ms.json +32 -3
  43. package/translations/zh.json +32 -3
@@ -0,0 +1,129 @@
1
+ import '@things-factory/grist-ui'
2
+
3
+ import { css, html, LitElement } from 'lit-element'
4
+ import { connect } from 'pwa-helpers/connect-mixin'
5
+
6
+ import { i18next, localize } from '@things-factory/i18n-base'
7
+ import { store } from '@things-factory/shell'
8
+ import { isMobileDevice } from '@things-factory/utils'
9
+
10
+ class UnloadedInventoriesPopup extends connect(store)(localize(i18next)(LitElement)) {
11
+ static get properties() {
12
+ return {
13
+ config: Object,
14
+ data: Object,
15
+ unloadedInventories: Array
16
+ }
17
+ }
18
+
19
+ static get styles() {
20
+ return [
21
+ css`
22
+ data-grist {
23
+ overflow-y: hidden;
24
+ flex: 1;
25
+ }
26
+ .grist {
27
+ background-color: var(--main-section-background-color);
28
+ display: flex;
29
+ flex-direction: column;
30
+ flex: 1;
31
+ overflow-y: auto;
32
+ }
33
+ :host {
34
+ padding: 10px;
35
+ display: flex;
36
+ flex-direction: column;
37
+ overflow-x: overlay;
38
+ background-color: var(--main-section-background-color);
39
+ }
40
+ `
41
+ ]
42
+ }
43
+
44
+ get dataGrist() {
45
+ return this.shadowRoot.querySelector('data-grist')
46
+ }
47
+
48
+ render() {
49
+ return html`
50
+ <div class="grist">
51
+ <data-grist
52
+ id="grist"
53
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
54
+ .config=${this.config}
55
+ .data="${this.data}"
56
+ ></data-grist>
57
+ </div>
58
+ `
59
+ }
60
+
61
+ updated(changedProps) {
62
+ if (changedProps.has('unloadedInventories')) {
63
+ this.data = {
64
+ records: this.unloadedInventories
65
+ }
66
+ }
67
+ }
68
+
69
+ firstUpdated() {
70
+ this.config = {
71
+ rows: { appendable: false },
72
+ list: {
73
+ fields: ['palletId', 'cartonId', 'qty', 'expirationDate', 'reusablePallet']
74
+ },
75
+ pagination: { infinite: true },
76
+ columns: [
77
+ { type: 'gutter', gutterName: 'sequence' },
78
+ {
79
+ type: 'string',
80
+ name: 'palletId',
81
+ header: i18next.t('field.lot_id'),
82
+ label: true,
83
+ width: 120
84
+ },
85
+ {
86
+ type: 'string',
87
+ name: 'cartonId',
88
+ header: i18next.t('field.carton_id'),
89
+ label: true,
90
+ width: 120
91
+ },
92
+ {
93
+ type: 'integer',
94
+ name: 'qty',
95
+ header: i18next.t('field.actual_pack_qty'),
96
+ label: true,
97
+ width: 150
98
+ },
99
+ {
100
+ type: 'date',
101
+ name: 'expirationDate',
102
+ header: i18next.t('field.exp_date'),
103
+ label: true,
104
+ width: 120
105
+ },
106
+ {
107
+ type: 'object',
108
+ name: 'reusablePallet',
109
+ header: i18next.t('field.reusable_pallet'),
110
+ label: true,
111
+ width: 120
112
+ }
113
+ ]
114
+ }
115
+ }
116
+
117
+ _showToast({ type, message }) {
118
+ document.dispatchEvent(
119
+ new CustomEvent('notify', {
120
+ detail: {
121
+ type,
122
+ message
123
+ }
124
+ })
125
+ )
126
+ }
127
+ }
128
+
129
+ window.customElements.define('unloaded-inventories-popup', UnloadedInventoriesPopup)
@@ -161,6 +161,16 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
161
161
  <form class="multi-column-form">
162
162
  <fieldset>
163
163
  <legend>${i18next.t('title.unloading')}</legend>
164
+
165
+ <label>${i18next.t('label.options')}</label>
166
+ <div options-wrap>
167
+ <input name="crossDocking" type="checkbox" .checked="${this.crossDocking}" disabled />
168
+ <label>${i18next.t('label.cross_docking')}</label>
169
+
170
+ <input name="looseItem" type="checkbox" .checked="${this.looseItem}" disabled />
171
+ <label>${i18next.t('label.loose_item')}</label>
172
+ </div>
173
+
164
174
  <label>${i18next.t('label.arrival_notice')}</label>
165
175
  <input name="arrivalNotice" readonly />
166
176
 
@@ -192,12 +202,6 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
192
202
  `
193
203
  )}
194
204
  </select>
195
-
196
- <input name="crossDocking" type="checkbox" .checked="${this.crossDocking}" disabled />
197
- <label>${i18next.t('label.cross_docking')}</label>
198
-
199
- <input name="looseItem" type="checkbox" .checked="${this.looseItem}" disabled />
200
- <label>${i18next.t('label.loose_item')}</label>
201
205
  </fieldset>
202
206
  </form>
203
207
 
@@ -827,7 +831,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
827
831
 
828
832
  async _activateWorksheet() {
829
833
  try {
830
- this._checkPalletQty()
834
+ //this._checkPalletQty()
831
835
 
832
836
  let result = await CustomAlert({
833
837
  title: i18next.t('title.are_you_sure'),
@@ -909,10 +913,10 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
909
913
  }
910
914
  }
911
915
 
912
- _checkPalletQty() {
913
- if (!this.grist.dirtyData.records.every(record => record.palletQty && Number(record.palletQty) > 0))
914
- throw new Error(i18next.t('text.there_is_no_pallet_qty'))
915
- }
916
+ // _checkPalletQty() { //remove check pallet qty restriction
917
+ // if (!this.grist.dirtyData.records.every(record => record.palletQty && Number(record.palletQty) > 0))
918
+ // throw new Error(i18next.t('text.there_is_no_pallet_qty'))
919
+ // }
916
920
 
917
921
  _getUnloadingWorksheetDetails() {
918
922
  return (this.grist.dirtyData.records || []).map(worksheetDetail => {
@@ -571,7 +571,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
571
571
  const filters = await this.searchForm.getQueryFilters()
572
572
  const response = await client.query({
573
573
  query: gql`
574
- query inventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
574
+ query inventories($filters: [Filter!]!, $pagination: Pagination, $sortings: [Sorting!]!) {
575
575
  inventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
576
576
  items {
577
577
  id
@@ -788,7 +788,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
788
788
 
789
789
  const response = await client.mutate({
790
790
  mutation: gql`
791
- mutation submitInventoryChanges($patches: [InventoryPatch]!) {
791
+ mutation submitInventoryChanges($patches: [InventoryPatch!]!) {
792
792
  submitInventoryChanges(patches: $patches)
793
793
  }
794
794
  `,
@@ -848,13 +848,12 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
848
848
  data = await this.fetchInventoriesForExport()
849
849
  }
850
850
 
851
- let [product, bizplace] = await Promise.all([
851
+ let [product, bizplace, location] = await Promise.all([
852
852
  this.fetchProduct(bizplaceFilters),
853
- this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }])
853
+ this.fetchBizplaces([{ ...bizplaceFilters[0], name: 'bizplace' }]),
854
+ this.fetchLocation()
854
855
  ])
855
856
 
856
- let location = this.fetchLocation()
857
-
858
857
  headerSetting = headerSetting.map(column => {
859
858
  switch (column.key) {
860
859
  case 'bizplace.name':
@@ -865,7 +864,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
865
864
  return { ...itm, name: `(${itm.sku}) ${itm.name} - ${itm.description}` }
866
865
  })
867
866
  break
868
- case 'location':
867
+ case 'location.name':
869
868
  column.arrData = location
870
869
  break
871
870
  default:
@@ -911,7 +910,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
911
910
  async fetchBizplaces(bizplace = []) {
912
911
  const response = await client.query({
913
912
  query: gql`
914
- query bizplaces($filters: [Filter!]) {
913
+ query bizplaces($filters: [Filter!]!) {
915
914
  bizplaces(filters: $filters) {
916
915
  items {
917
916
  id
@@ -931,7 +930,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
931
930
  bizplace[0].name = 'bizplace'
932
931
  const response = await client.query({
933
932
  query: gql`
934
- query productsByBizplace($filters: [Filter!]) {
933
+ query productsByBizplace($filters: [Filter!]!) {
935
934
  productsByBizplace(filters: $filters) {
936
935
  items {
937
936
  id
@@ -953,7 +952,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
953
952
  async fetchLocation() {
954
953
  const response = await client.query({
955
954
  query: gql`
956
- query locations($filters: [Filter!]) {
955
+ query locations($filters: [Filter!]!) {
957
956
  locations(filters: $filters) {
958
957
  items {
959
958
  id
@@ -960,7 +960,7 @@ class ProductList extends localize(i18next)(PageView) {
960
960
  if (_.isEmpty(itm.uom) || '') {
961
961
  if (!errors.find(err => err.type == 'uom')) errors.push({ type: 'uom', value: 'UOM is required' })
962
962
  }
963
- if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue < 1) {
963
+ if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue <= 0) {
964
964
  if (!errors.find(err => err.type == 'uomValue'))
965
965
  errors.push({ type: 'uomValue', value: 'UOM Value is required' })
966
966
  }