@things-factory/operato-wms 4.0.30 → 4.0.34

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 (33) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +25 -14
  2. package/client/pages/bulk-operation/validate-gan-popup.js +5 -4
  3. package/client/pages/bulk-operation/validate-ro-popup.js +7 -39
  4. package/client/pages/components/popup-reusable-pallet.js +145 -0
  5. package/client/pages/components/worksheet-information-popup.js +4 -1
  6. package/client/pages/inbound/unload-product.js +119 -103
  7. package/client/pages/inventory/onhand-inventory.js +1 -0
  8. package/client/pages/order/arrival-notice/arrival-notice-detail.js +16 -0
  9. package/client/pages/order/release-order/batch-picking-popup.js +1 -1
  10. package/client/pages/order/release-order/create-release-order.js +1 -1
  11. package/client/pages/order/release-order/release-extra-product-popup.js +3 -0
  12. package/client/pages/order/release-order/release-order-detail.js +4 -4
  13. package/client/pages/order/return-order/create-return-order.js +41 -52
  14. package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +2 -2
  15. package/client/pages/order/transport-order/create-delivery-order.js +4 -2
  16. package/client/pages/outbound/picking-product.js +3 -2
  17. package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +5 -1
  18. package/client/pages/report/inbound-order-details-report.js +3 -5
  19. package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -3
  20. package/client/pages/vas/reverse-kitting/popup-combination-sets.js +3 -3
  21. package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +1 -1
  22. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -4
  23. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
  24. package/dist-server/graphql/types/reports/inbound-order-details-report.js +2 -1
  25. package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
  26. package/package.json +65 -65
  27. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -4
  28. package/server/graphql/types/reports/inbound-order-details-report.ts +2 -1
  29. package/translations/en.json +14 -1
  30. package/translations/ko.json +19 -7
  31. package/translations/ms.json +20 -8
  32. package/translations/zh.json +20 -8
  33. package/client/pages/components/popup-unloading.js +0 -610
@@ -2,17 +2,11 @@ import '@things-factory/biz-ui'
2
2
  import './validate-gan-popup'
3
3
  import './validate-ro-popup'
4
4
 
5
- import {
6
- css,
7
- html
8
- } from 'lit-element'
5
+ import { css, html } from 'lit-element'
9
6
  import XLSX from 'xlsx'
10
7
 
11
8
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
12
- import {
13
- i18next,
14
- localize
15
- } from '@things-factory/i18n-base'
9
+ import { i18next, localize } from '@things-factory/i18n-base'
16
10
  import { openPopup } from '@things-factory/layout-base'
17
11
  import { PageView } from '@things-factory/shell'
18
12
 
@@ -368,9 +362,9 @@ class BulkOperation extends localize(i18next)(PageView) {
368
362
  containerSize: String(raw.containerSize || ''),
369
363
  sku: String(raw.sku || ''),
370
364
  batchId: String(raw.batchId || ''),
371
- packingType: String(raw.packingType || ''),
372
- packingSize: Number(raw.packingSize || 0),
373
- uom: String(raw.uom || ''),
365
+ packingType: raw.packingType && raw.packingType != '' ? String(raw.packingType) : null,
366
+ packingSize: !isNaN(Number(raw.packingSize || 'x')) ? Number(raw.packingSize) : null,
367
+ uom: raw.uom && raw.uom != '' ? String(raw.uom) : null,
374
368
  packQty: parseInt(raw.packQty || 0),
375
369
  palletQty: parseInt(raw.palletQty || 0),
376
370
  unitPrice: Number(raw.unitPrice || 0),
@@ -399,10 +393,27 @@ class BulkOperation extends localize(i18next)(PageView) {
399
393
  let releaseDate = new Date(String(record.releaseDate || ''))
400
394
 
401
395
  return {
402
- ...record,
403
- packingSize: Number(record.packingSize),
396
+ refNo: String(record.refNo || ''),
397
+ refNo2: String(record.refNo2 || ''),
398
+ refNo3: String(record.refNo3 || ''),
399
+ releaseDate: this._getStdDateStr(releaseDate),
400
+ deliveryAddress1: String(record.deliveryAddress1 || ''),
401
+ deliveryAddress2: String(record.deliveryAddress2 || ''),
402
+ deliveryAddress3: String(record.deliveryAddress3 || ''),
403
+ deliveryAddress4: String(record.deliveryAddress4 || ''),
404
+ attentionTo: String(record.attentionTo || ''),
405
+ city: String(record.city || ''),
406
+ state: String(record.state || ''),
407
+ country: String(record.country || ''),
408
+ sku: String(record.sku || ''),
409
+ productId: String(record.productId || ''),
410
+ packingType: record.packingType && record.packingType != '' ? String(record.packingType) : null,
411
+ packingSize: !isNaN(Number(record.packingSize || 'x')) ? Number(record.packingSize) : null,
412
+ uom: record.uom && record.uom != '' ? String(record.uom) : null,
404
413
  releaseQty: Number(record.releaseQty),
405
- releaseDate: this._getStdDateStr(releaseDate)
414
+ postalCode: String(record.postalCode),
415
+ phone1: String(record.phone1),
416
+ exportOption: false
406
417
  }
407
418
  })}
408
419
  .bizplaceId=${this._roBizplaceId}
@@ -83,7 +83,8 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
83
83
  icon: 'close',
84
84
  handlers: {
85
85
  click: (columns, data, column, record, rowIndex) => {
86
- this.records = [...data.records.filter((_, idx) => idx !== rowIndex)]
86
+ data.records.splice(rowIndex, 1)
87
+ this.records = data.records
87
88
  }
88
89
  }
89
90
  },
@@ -205,8 +206,8 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
205
206
  },
206
207
  {
207
208
  type: 'string',
208
- name: 'remark',
209
- header: i18next.t('field.remark'),
209
+ name: 'errorMsg',
210
+ header: i18next.t('field.error_message'),
210
211
  width: 350
211
212
  }
212
213
  ]
@@ -284,7 +285,7 @@ class ValidateGanPopup extends localize(i18next)(LitElement) {
284
285
  palletQty
285
286
  unitPrice
286
287
  manufactureYear
287
- remark
288
+ errorMsg
288
289
  }
289
290
  }
290
291
  `,
@@ -12,15 +12,9 @@ import { isMobileDevice } from '@things-factory/utils'
12
12
  class ValidateRoPopup extends localize(i18next)(LitElement) {
13
13
  static get properties() {
14
14
  return {
15
- _oiConfig: Object,
16
15
  _roConfig: Object,
17
- _selectedRoIndex: Number,
18
- _selectedRoRecord: Object,
19
16
  bizplaceId: String,
20
- importHandler: Object,
21
- oiConfig: Object,
22
- records: Array,
23
- roConfig: Object
17
+ records: Array
24
18
  }
25
19
  }
26
20
 
@@ -89,7 +83,8 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
89
83
  icon: 'close',
90
84
  handlers: {
91
85
  click: (columns, data, column, record, rowIndex) => {
92
- this.records = [...data.records.filter((_, idx) => idx !== rowIndex)]
86
+ data.records.splice(rowIndex, 1)
87
+ this.records = data.records
93
88
  }
94
89
  }
95
90
  },
@@ -270,7 +265,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
270
265
 
271
266
  async firstUpdated() {
272
267
  this._roConfig = this._config
273
- await this._getAvailableItems(this.records)
268
+ await this._getAvailableItems(this.records, this.bizplaceId)
274
269
  }
275
270
 
276
271
  updated(changedProps) {
@@ -282,7 +277,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
282
277
  }
283
278
  }
284
279
 
285
- async _getAvailableItems(rawData) {
280
+ async _getAvailableItems(rawReleaseGoods, bizplaceId) {
286
281
  const response = await client.query({
287
282
  query: gql`
288
283
  query bulkReleaseGoodsAvailableItems($rawReleaseGoods: [NewReleaseGood!], $bizplaceId: String!) {
@@ -315,34 +310,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
315
310
  }
316
311
  }
317
312
  `,
318
- variables: {
319
- rawReleaseGoods: rawData.map(raw => {
320
- return {
321
- refNo: raw.refNo,
322
- refNo2: raw.refNo2,
323
- refNo3: raw.refNo3,
324
- releaseDate: String(raw.releaseDate),
325
- deliveryAddress1: raw.deliveryAddress1,
326
- deliveryAddress2: raw.deliveryAddress2,
327
- deliveryAddress3: raw.deliveryAddress3,
328
- deliveryAddress4: raw.deliveryAddress4,
329
- attentionTo: raw.attentionTo,
330
- city: raw.city,
331
- state: raw.state,
332
- country: raw.country,
333
- sku: raw.sku,
334
- productId: raw.productId,
335
- packingType: raw.packingType,
336
- packingSize: raw.packingSize,
337
- uom: raw.uom,
338
- releaseQty: raw.releaseQty,
339
- postalCode: String(raw.postalCode),
340
- phone1: String(raw.phone1),
341
- exportOption: false
342
- }
343
- }),
344
- bizplaceId: this.bizplaceId
345
- }
313
+ variables: { rawReleaseGoods, bizplaceId }
346
314
  })
347
315
 
348
316
  if (!response.errors) {
@@ -403,7 +371,7 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
403
371
  if (insufficientStockError) {
404
372
  // if system suddenly found that any item is insufficient,
405
373
  // display the available items again.
406
- await this._getAvailableItems(this.records)
374
+ await this._getAvailableItems(this.records, this.bizplaceId)
407
375
  this._showToast({ message: i18next.t('text.please_recheck_your_request_data') })
408
376
  }
409
377
  }
@@ -0,0 +1,145 @@
1
+ import { i18next, localize } from '@things-factory/i18n-base'
2
+ import { css, html, LitElement } from 'lit-element'
3
+ import { SingleColumnFormStyles } from '@things-factory/form-ui'
4
+ import { client } from '@things-factory/shell'
5
+ import { PALLET_STATUS } from '../constants'
6
+ import gql from 'graphql-tag'
7
+
8
+ class PopupReusablePallet extends localize(i18next)(LitElement) {
9
+ static get properties() {
10
+ return {
11
+ label: String,
12
+ value: String,
13
+ reusablePalletInput: String,
14
+ _reusablePallet: Object
15
+ }
16
+ }
17
+
18
+ static get styles() {
19
+ return [
20
+ SingleColumnFormStyles,
21
+ css`
22
+ :host {
23
+ display: flex;
24
+ flex-direction: column;
25
+ overflow-x: overlay;
26
+ background-color: var(--main-section-background-color);
27
+ }
28
+ .container {
29
+ display: flex;
30
+ flex-direction: column;
31
+ flex: 1;
32
+ }
33
+ .container > barcode-scannable-input {
34
+ flex: 1;
35
+ resize: none;
36
+ border-color: var(--primary-color);
37
+ padding: 5px;
38
+ margin: 10px;
39
+ outline: none;
40
+ }
41
+ .button-container {
42
+ padding: var(--button-container-padding);
43
+ margin: var(--button-container-margin);
44
+ text-align: var(--button-container-align);
45
+ background-color: var(--button-container-background);
46
+ height: var(--button-container-height);
47
+ }
48
+ `
49
+ ]
50
+ }
51
+
52
+ get reusablePalletInput() {
53
+ return this.shadowRoot
54
+ .querySelector('barcode-scanable-input[name=reusablePalletId]')
55
+ .shadowRoot.querySelector('input')
56
+ }
57
+
58
+ firstUpdated() {}
59
+
60
+ updated(changedProps) {}
61
+
62
+ render() {
63
+ return html`
64
+ <div class="container">
65
+ <form id="input-form" class="single-column-form">
66
+ <fieldset>
67
+ <label>${this.label}</label>
68
+ <barcode-scanable-input
69
+ name="reusablePalletId"
70
+ custom-input
71
+ without-enter
72
+ @keypress="${async e => {
73
+ if (e.keyCode !== 13) return
74
+ e.preventDefault()
75
+ await this._verifyInput()
76
+ }}"
77
+ ></barcode-scanable-input>
78
+ </fieldset>
79
+ </form>
80
+ </div>
81
+ <div class="button-container">
82
+ <mwc-button
83
+ raised
84
+ @click="${async () => await this._verifyInput()}"
85
+ label="${i18next.t('button.confirm')}"
86
+ ></mwc-button>
87
+ </div>
88
+ }
89
+ `
90
+ }
91
+
92
+ async _verifyInput() {
93
+ if (!this.reusablePalletInput.value) return this._showToast({ message: i18next.t('text.reusable_pallet_id_empty') })
94
+
95
+ if (!(await this._isReusablePallet())) return this._showToast({ message: i18next.t('text.not_a_reusable_pallet') })
96
+
97
+ this._showToast({
98
+ message: `${i18next.t('text.now_using_reusable_pallet')} ${this.reusablePalletInput.value}`
99
+ })
100
+ this.dispatchEvent(
101
+ new CustomEvent('submit', {
102
+ detail: { reusablePallet: this._reusablePallet }
103
+ })
104
+ )
105
+ history.back()
106
+ }
107
+
108
+ async _isReusablePallet() {
109
+ try {
110
+ const response = await client.query({
111
+ query: gql`
112
+ query palletByStatus($name: String!, $status: String!) {
113
+ palletByStatus(name: $name, status: $status) {
114
+ id
115
+ name
116
+ }
117
+ }
118
+ `,
119
+ variables: { name: this.reusablePalletInput.value, status: PALLET_STATUS.ACTIVE.value }
120
+ })
121
+
122
+ if (response.data.palletByStatus) {
123
+ this._reusablePallet = response.data.palletByStatus
124
+ return true
125
+ }
126
+
127
+ return false
128
+ } catch (e) {
129
+ this._showToast(e)
130
+ }
131
+ }
132
+
133
+ _showToast({ type, message }) {
134
+ document.dispatchEvent(
135
+ new CustomEvent('notify', {
136
+ detail: {
137
+ type,
138
+ message
139
+ }
140
+ })
141
+ )
142
+ }
143
+ }
144
+
145
+ window.customElements.define('popup-reusable-pallet', PopupReusablePallet)
@@ -66,6 +66,9 @@ class WorksheetInformationPopup extends connect(store)(localize(i18next)(LitElem
66
66
 
67
67
  <label>${i18next.t('label.started_at')}</label>
68
68
  <input name="startedAt" type="datetime-local" readonly />
69
+
70
+ <label>${i18next.t('label.plastic_pallet')}</label>
71
+ <input name="plasticPallet" readonly />
69
72
  </fieldset>
70
73
  </form>
71
74
  `
@@ -83,7 +86,7 @@ class WorksheetInformationPopup extends connect(store)(localize(i18next)(LitElem
83
86
  } else if (field.name === key && field.type === 'datetime-local') {
84
87
  const datetime = Number(data[key])
85
88
  const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
86
- field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
89
+ field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1).split('.')[0]
87
90
  } else if (field.name === key) {
88
91
  if (data[key] instanceof Object) {
89
92
  const objectData = data[key]