@things-factory/operato-wms 4.0.26 → 4.0.30

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 (49) hide show
  1. package/client/fetch-setting-value.js +10 -2
  2. package/client/pages/bulk-operation/bulk-operation.js +33 -10
  3. package/client/pages/components/vas-templates/vas-pallet-add-popup.js +12 -11
  4. package/client/pages/components/vas-templates/vas-relabel.js +57 -34
  5. package/client/pages/components/vas-templates/vas-repack-relabel.js +56 -36
  6. package/client/pages/components/vas-templates/vas-repack.js +45 -31
  7. package/client/pages/components/vas-templates/vas-repalletizing.js +58 -39
  8. package/client/pages/components/vas-templates/vas-unpack.js +38 -24
  9. package/client/pages/master/location-list.js +1 -0
  10. package/client/pages/master/print-location-label.js +131 -146
  11. package/client/pages/order/arrival-notice/arrival-notice-detail.js +36 -44
  12. package/client/pages/order/arrival-notice/arrival-notice-list.js +2 -5
  13. package/client/pages/order/goods-received-note/received-note-detail.js +7 -6
  14. package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
  15. package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +1 -1
  16. package/client/pages/order/release-order/batch-picking-popup.js +3 -2
  17. package/client/pages/order/release-order/release-extra-product-popup.js +7 -5
  18. package/client/pages/order/release-order/release-order-detail.js +30 -13
  19. package/client/pages/order/transport-order/delivery-note-popup.js +2 -2
  20. package/client/pages/outbound/packing-product.js +6 -0
  21. package/client/pages/outbound/packing-worksheet-list.js +64 -4
  22. package/client/pages/outbound/picking-product.js +10 -5
  23. package/client/pages/outbound/worksheet-batch-picking.js +1 -1
  24. package/client/pages/outbound/worksheet-loading.js +16 -14
  25. package/client/pages/outbound/worksheet-packing.js +15 -13
  26. package/client/pages/outbound/worksheet-picking.js +2 -2
  27. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +8 -9
  28. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +26 -25
  29. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +10 -9
  30. package/client/pages/report/custom-elccl/elccl-inventory-pallet-detail-report.js +13 -8
  31. package/client/pages/report/custom-elccl/elccl-inventory-report.js +11 -10
  32. package/client/pages/report/inventory-pallet-report.js +13 -12
  33. package/client/pages/report/job-sheet-popup.js +9 -9
  34. package/client/pages/report/job-sheet-report.js +6 -6
  35. package/client/pages/system/location-sorting-rule.js +53 -46
  36. package/client/pages/vas/abstract-execute-vas.js +51 -35
  37. package/client/pages/vas/execute-pure-vas.js +63 -64
  38. package/client/pages/vas/execute-ref-vas.js +39 -41
  39. package/client/pages/vas/related-vas-list.js +7 -6
  40. package/client/pages/vas/target-inventory-assignment-popup.js +16 -14
  41. package/client/pages/vas/vas-pallet-label-popup.js +1 -1
  42. package/client/pages/vas/vas-worksheet-list.js +9 -8
  43. package/client/pages/vas/worksheet-ref-vas.js +7 -6
  44. package/client/pages/vas/worksheet-vas.js +16 -14
  45. package/package.json +65 -65
  46. package/translations/en.json +1 -0
  47. package/translations/ko.json +1 -0
  48. package/translations/ms.json +1 -0
  49. package/translations/zh.json +1 -0
@@ -3,7 +3,7 @@ import { SingleColumnFormStyles } from '@things-factory/form-ui'
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
5
  import { client, CustomAlert } from '@things-factory/shell'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
6
+ import { isMobileDevice } from '@things-factory/utils'
7
7
  import gql from 'graphql-tag'
8
8
  import { css, html } from 'lit-element'
9
9
  import { PALLET_TYPES, REUSABLE_PALLET } from '../../constants'
@@ -354,13 +354,13 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
354
354
  this.stdQtyInput.focus()
355
355
  throw new Error(i18next.t('text.invalid_quantity_input'))
356
356
  }
357
- if (stdQty > this.targetInfo.qty) {
358
- this.stdQtyInput.value = this.targetInfo.qty
357
+ if (stdQty > this.targetInfo[0].qty) {
358
+ this.stdQtyInput.value = this.targetInfo[0].qty
359
359
  this.stdQtyInput.focus()
360
360
  throw new Error(i18next.t('text.qty_exceed_limit'))
361
361
  }
362
362
 
363
- if (this.targetInfo.qty % stdQty) {
363
+ if (this.targetInfo[0].qty % stdQty) {
364
364
  this.stdQtyInput.value = 1
365
365
  this.stdQtyInput.focus()
366
366
  throw new Error(i18next.t('text.qty_cannot_be_divided_completely'))
@@ -369,7 +369,7 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
369
369
 
370
370
  adjustPalletQty() {
371
371
  const stdQty = Number(this.stdQtyInput.value)
372
- let maxPalletQtyByStd = this.targetInfo.qty / stdQty
372
+ let maxPalletQtyByStd = this.targetInfo[0].qty / stdQty
373
373
 
374
374
  if (maxPalletQtyByStd < 0) {
375
375
  this.stdQtyInput.value = ''
@@ -397,14 +397,15 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
397
397
 
398
398
  const response = await client.query({
399
399
  query: gql`
400
- query {
401
- locationByName(${gqlBuilder.buildArgs({
402
- name: locationName
403
- })}) {
400
+ query locationByName($name: String!) {
401
+ locationByName(name: $name) {
404
402
  id
405
403
  }
406
404
  }
407
- `
405
+ `,
406
+ variables: {
407
+ name: locationName
408
+ }
408
409
  })
409
410
 
410
411
  if (!response.errors) {
@@ -420,19 +421,21 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
420
421
  async fetchAvailablePalletQty() {
421
422
  const response = await client.query({
422
423
  query: gql`
423
- query {
424
- pallets(${gqlBuilder.buildArgs({
425
- filters: [
426
- {
427
- name: 'inventory',
428
- operator: 'is_null'
429
- }
430
- ]
431
- })}) {
424
+ query pallets($filters: [Filter!]) {
425
+ pallets(filters: $filters) {
432
426
  total
433
427
  }
434
428
  }
435
- `
429
+ `,
430
+ variables: {
431
+ filters: [
432
+ {
433
+ name: 'inventory',
434
+ operator: 'is_null',
435
+ value: ''
436
+ }
437
+ ]
438
+ }
436
439
  })
437
440
 
438
441
  if (!response.errors) {
@@ -443,17 +446,28 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
443
446
  async repallet() {
444
447
  try {
445
448
  this._checkRepalletizable()
446
- await client.query({
447
- query: gql`
448
- mutation {
449
- repalletizing(${gqlBuilder.buildArgs({
450
- worksheetDetailName: this.record.name,
451
- fromPalletId: this.fromPalletIdInput.value,
452
- toPalletId: this.toPalletIdInput.value,
453
- locationName: this.locationInput.value
454
- })})
449
+ await client.mutate({
450
+ mutation: gql`
451
+ mutation repalletizing(
452
+ $worksheetDetailName: String!
453
+ $fromPalletId: String!
454
+ $toPalletId: String!
455
+ $locationName: String!
456
+ ) {
457
+ repalletizing(
458
+ worksheetDetailName: $worksheetDetailName
459
+ fromPalletId: $fromPalletId
460
+ toPalletId: $toPalletId
461
+ locationName: $locationName
462
+ )
455
463
  }
456
- `
464
+ `,
465
+ variables: {
466
+ worksheetDetailName: this.record.name,
467
+ fromPalletId: this.fromPalletIdInput.value,
468
+ toPalletId: this.toPalletIdInput.value,
469
+ locationName: this.locationInput.value
470
+ }
457
471
  })
458
472
 
459
473
  this.dispatchEvent(
@@ -469,16 +483,21 @@ class VasRepalletizing extends localize(i18next)(VasTemplate) {
469
483
 
470
484
  async undoRepallet(worksheetDetailName, toPalletId) {
471
485
  try {
472
- await client.query({
473
- query: gql`
474
- mutation {
475
- undoRepalletizing(${gqlBuilder.buildArgs({
476
- worksheetDetailName,
477
- fromPalletId: this.fromPalletIdInput.value,
478
- toPalletId
479
- })})
486
+ await client.mutate({
487
+ mutation: gql`
488
+ mutation undoRepalletizing($worksheetDetailName: String!, $fromPalletId: String!, $toPalletId: String!) {
489
+ undoRepalletizing(
490
+ worksheetDetailName: $worksheetDetailName
491
+ fromPalletId: $fromPalletId
492
+ toPalletId: $toPalletId
493
+ )
480
494
  }
481
- `
495
+ `,
496
+ variables: {
497
+ worksheetDetailName,
498
+ fromPalletId: this.fromPalletIdInput.value,
499
+ toPalletId
500
+ }
482
501
  })
483
502
 
484
503
  this.dispatchEvent(
@@ -2,8 +2,7 @@ import '@things-factory/barcode-ui'
2
2
  import { SingleColumnFormStyles } from '@things-factory/form-ui'
3
3
  import '@things-factory/grist-ui'
4
4
  import { i18next, localize } from '@things-factory/i18n-base'
5
- import { client, CustomAlert } from '@things-factory/shell'
6
- import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
5
+ import { client } from '@things-factory/shell'
7
6
  import gql from 'graphql-tag'
8
7
  import { css, html } from 'lit-element'
9
8
  import { ORDER_TYPES } from '../../constants'
@@ -182,10 +181,8 @@ class VasUnpack extends localize(i18next)(VasTemplate) {
182
181
 
183
182
  const response = await client.query({
184
183
  query: gql`
185
- query {
186
- products(${gqlBuilder.buildArgs({
187
- filters
188
- })}) {
184
+ query products($filters: [Filter!]) {
185
+ products(filters: $filters) {
189
186
  items {
190
187
  id
191
188
  name
@@ -198,7 +195,10 @@ class VasUnpack extends localize(i18next)(VasTemplate) {
198
195
  total
199
196
  }
200
197
  }
201
- `
198
+ `,
199
+ variables: {
200
+ filters
201
+ }
202
202
  })
203
203
 
204
204
  if (response && !response.errors) {
@@ -211,10 +211,8 @@ class VasUnpack extends localize(i18next)(VasTemplate) {
211
211
 
212
212
  const response = await client.query({
213
213
  query: gql`
214
- query {
215
- products(${gqlBuilder.buildArgs({
216
- filters
217
- })}) {
214
+ query products($filters: [Filter!]) {
215
+ products(filters: $filters) {
218
216
  items {
219
217
  id
220
218
  name
@@ -227,7 +225,8 @@ class VasUnpack extends localize(i18next)(VasTemplate) {
227
225
  total
228
226
  }
229
227
  }
230
- `
228
+ `,
229
+ variables: { filters }
231
230
  })
232
231
 
233
232
  if (response && !response.errors) {
@@ -238,19 +237,34 @@ class VasUnpack extends localize(i18next)(VasTemplate) {
238
237
  async unpack() {
239
238
  try {
240
239
  this._checkUnpackable()
241
- await client.query({
242
- query: gql`
243
- mutation {
244
- unpacking(${gqlBuilder.buildArgs({
245
- worksheetDetailName: this.record.name,
246
- childProductId: this.childProductSelector.value,
247
- unpackQty: parseInt(this.unpackQtyInput.value || 0),
248
- unpackUomValue: parseFloat(this.unpackUomValueInput.value || 0),
249
- palletId: this.palletInput.value,
250
- locationName: this.locationInput.value
251
- })})
240
+ await client.mutate({
241
+ mutation: gql`
242
+ mutation unpacking(
243
+ $worksheetDetailName: String!
244
+ $childProductId: String!
245
+ $unpackQty: Int!
246
+ $unpackUomValue: Float!
247
+ $palletId: String
248
+ $locationName: String
249
+ ) {
250
+ unpacking(
251
+ worksheetDetailName: $worksheetDetailName
252
+ childProductId: $childProductId
253
+ unpackQty: $unpackQty
254
+ unpackUomValue: $unpackUomValue
255
+ palletId: $palletId
256
+ locationName: $locationName
257
+ )
252
258
  }
253
- `
259
+ `,
260
+ variables: {
261
+ worksheetDetailName: this.record.name,
262
+ childProductId: this.childProductSelector.value,
263
+ unpackQty: parseInt(this.unpackQtyInput.value || 0),
264
+ unpackUomValue: parseFloat(this.unpackUomValueInput.value || 0),
265
+ palletId: this.palletInput.value,
266
+ locationName: this.locationInput.value
267
+ }
254
268
  })
255
269
 
256
270
  this.dispatchEvent(
@@ -673,6 +673,7 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
673
673
 
674
674
  /* for location record mapping */
675
675
  searchParams.append('location', record.name)
676
+ searchParams.append('originalName', record.originalName)
676
677
  searchParams.append('label', record.indicator)
677
678
 
678
679
  try {
@@ -1,12 +1,14 @@
1
1
  import '@things-factory/form-ui'
2
- import { MultiColumnFormStyles } from '@things-factory/form-ui'
3
2
  import '@things-factory/grist-ui'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit-element'
6
+
7
+ import { MultiColumnFormStyles } from '@things-factory/form-ui'
4
8
  import { i18next, localize } from '@things-factory/i18n-base'
5
9
  import { client } from '@things-factory/shell'
6
10
  import { ScrollbarStyles } from '@things-factory/styles'
7
11
  import { isMobileDevice } from '@things-factory/utils'
8
- import gql from 'graphql-tag'
9
- import { css, html, LitElement } from 'lit-element'
10
12
 
11
13
  export class PrintLocationLabel extends localize(i18next)(LitElement) {
12
14
  static get properties() {
@@ -94,9 +96,7 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
94
96
  name="labelFormat"
95
97
  @change="${e => {
96
98
  this._fullLocationFormat = e.currentTarget.value === 'full_format' ? true : false
97
- if (this._labelIndicator.value != '') {
98
- this._getPrintPreview(this._labelIndicator.value)
99
- }
99
+ if (this._labelIndicator.value != '') this.dataGrist.fetch()
100
100
  }}"
101
101
  >
102
102
  <option value="full_format">A-01-01-01 (${i18next.t('text.full_format')})</option>
@@ -108,7 +108,7 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
108
108
  name="labelIndicator"
109
109
  @change="${e => {
110
110
  let indicator = e.currentTarget.value
111
- if (indicator !== '') this._getPrintPreview(indicator)
111
+ if (indicator !== '') this.dataGrist.fetch()
112
112
  }}"
113
113
  >
114
114
  <option value="">-- ${i18next.t('text.please_select_label_indicator')} --</option>
@@ -150,6 +150,12 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
150
150
  header: i18next.t('field.name'),
151
151
  width: 250
152
152
  },
153
+ {
154
+ type: 'string',
155
+ name: 'originalName',
156
+ header: i18next.t('field.original_name'),
157
+ width: 250
158
+ },
153
159
  {
154
160
  type: 'string',
155
161
  name: 'indicator',
@@ -158,11 +164,6 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
158
164
  }
159
165
  ]
160
166
  }
161
-
162
- if (this.selectedLocations && this.selectedLocations.length > 0) {
163
- this._records = []
164
- this._total = 0
165
- }
166
167
  }
167
168
 
168
169
  get _labelIndicator() {
@@ -173,173 +174,157 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
173
174
  return this.shadowRoot.querySelector('data-grist')
174
175
  }
175
176
 
176
- async fetchHandler() {
177
- return {
178
- records: this._records || [],
179
- total: this._total || 0
180
- }
181
- }
177
+ async fetchHandler({ page, limit, sorters = [{ name: 'name' }] }) {
178
+ if (this._labelIndicator.value == '') return
179
+ const fetcherDetail = { page, limit, sorters }
180
+ const indicator = this._labelIndicator.value || ''
182
181
 
183
- async _getPrintPreview(indicator) {
184
- let locations = []
185
- let filters = []
182
+ let filters = [
183
+ {
184
+ name: 'warehouse_id',
185
+ operator: 'eq',
186
+ value: this.warehouseId
187
+ }
188
+ ]
186
189
 
187
- if (this.selectedLocations && this.selectedLocations.length > 0) {
188
- locations = this.selectedLocations
190
+ let locations = [],
191
+ totalLocations = 0
192
+
193
+ if (this.selectedLocations && this.selectedLocations.length) {
194
+ filters.push({
195
+ name: 'name',
196
+ operator: 'in',
197
+ value: this.selectedLocations.map(location => location.name)
198
+ })
199
+ const { records, total } = await this._fetchLocations(filters, fetcherDetail)
200
+ locations = records
201
+ totalLocations = total
189
202
  } else {
190
- if (this.warehouseId) {
191
- if (this._fullLocationFormat) {
192
- filters = [
193
- {
194
- name: 'warehouse_id',
195
- operator: 'eq',
196
- value: this.warehouseId
197
- },
198
- {
199
- name: 'type',
200
- operator: 'noteq',
201
- value: 'BUFFER'
202
- }
203
- ]
204
- locations = await this._fetchLocations(filters)
205
- }
203
+ if (this._fullLocationFormat) {
204
+ filters.push({
205
+ name: 'type',
206
+ operator: 'noteq',
207
+ value: 'BUFFER'
208
+ })
209
+ const { records, total } = await this._fetchLocations(filters, fetcherDetail)
210
+ locations = records
211
+ totalLocations = total
212
+ } else {
206
213
  // if partial format:
207
- // prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice
208
- else {
209
- if (indicator === 'shelf') {
210
- this._showToast({
211
- level: 'error',
212
- message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
213
- })
214
- return
215
- } else {
216
- filters = [
217
- {
218
- name: 'warehouse_id',
219
- operator: 'eq',
220
- value: this.warehouseId
221
- }
222
- ]
223
- locations = await this._fetchLocationsByGroup(filters)
224
- }
214
+ // prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice{
215
+ if (indicator == 'shelf') {
216
+ this._showToast({
217
+ level: 'error',
218
+ message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
219
+ })
220
+ return
221
+ } else {
222
+ const { records, total } = await this._fetchLocationsByGroup(filters, fetcherDetail)
223
+ locations = records
224
+ totalLocations = total
225
225
  }
226
226
  }
227
227
  }
228
228
 
229
- locations = locations.map(location => {
230
- if (location.type === 'BUFFER') {
231
- return {
232
- ...location,
233
- indicator: location[indicator]
234
- }
235
- } else {
229
+ return {
230
+ total: totalLocations,
231
+ records: locations.map(location => {
236
232
  return {
237
233
  ...location,
238
- name: this._fullLocationFormat // check if full location format is true
239
- ? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
240
- : `${location.zone}-${location.row}-${location.column}`,
241
- indicator: location[indicator]
234
+ indicator: location[indicator],
235
+ originalName: location.name,
236
+ name:
237
+ location.type === 'BUFFER'
238
+ ? ''
239
+ : this._fullLocationFormat // check if full location format is true
240
+ ? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
241
+ : `${location.zone}-${location.row}-${location.column}`
242
242
  }
243
- }
244
- })
245
-
246
- this._records = locations
247
- this._total = locations.length
248
-
249
- this._config = {
250
- ...this._config,
251
- pagination: { pages: [20, 50, 100, 200] }
243
+ })
252
244
  }
253
-
254
- this.dataGrist.fetch()
255
245
  }
256
246
 
257
- async _fetchLocations(filters) {
258
- const sorters = [{ name: 'name', desc: false }]
259
-
260
- if (this.warehouseId) {
261
- try {
262
- this.dataGrist.showSpinner()
263
-
264
- const response = await client.query({
265
- query: gql`
266
- query locations($filters: [Filter!], $sortings: [Sorting!]) {
267
- locations(filters: $filters, sortings: $sortings) {
268
- items {
269
- name
270
- zone
271
- row
272
- column
273
- shelf
274
- }
275
- total
247
+ async _fetchLocations(filters, fetcherDetail) {
248
+ try {
249
+ const response = await client.query({
250
+ query: gql`
251
+ query locations($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
252
+ locations(filters: $filters, pagination: $pagination, sortings: $sortings) {
253
+ items {
254
+ name
255
+ zone
256
+ row
257
+ column
258
+ shelf
259
+ type
276
260
  }
261
+ total
277
262
  }
278
- `,
279
- variables: {
280
- filters,
281
- sortings: sorters
282
263
  }
283
- })
264
+ `,
265
+ variables: {
266
+ filters,
267
+ paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
268
+ sortings: fetcherDetail.sorters
269
+ }
270
+ })
284
271
 
285
- if (!response.errors) {
286
- return response.data.locations.items || []
272
+ if (!response.errors) {
273
+ return {
274
+ records: response.data.locations.items || [],
275
+ total: response.data.locations.total || 0
287
276
  }
288
- } catch (e) {
289
- this._showToast({
290
- level: 'error',
291
- message: e
292
- })
293
- } finally {
294
- this.dataGrist.hideSpinner()
295
277
  }
278
+ } catch (e) {
279
+ this._showToast({
280
+ level: 'error',
281
+ message: e
282
+ })
296
283
  }
297
284
  }
298
285
 
299
- async _fetchLocationsByGroup(filters) {
300
- const sorters = [{ name: 'name', desc: false }]
301
-
302
- if (this.warehouseId) {
303
- try {
304
- this.dataGrist.showSpinner()
305
-
306
- const response = await client.query({
307
- query: gql`
308
- query locationsByGroup($filters: [Filter!], $sortings: [Sorting!]) {
309
- locationsByGroup(filters: $filters, sortings: $sortings) {
310
- items {
311
- name
312
- zone
313
- row
314
- column
315
- }
316
- total
286
+ async _fetchLocationsByGroup(filters, fetcherDetail) {
287
+ try {
288
+ const response = await client.query({
289
+ query: gql`
290
+ query locationsByGroup($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
291
+ locationsByGroup(filters: $filters, pagination: $pagination, sortings: $sortings) {
292
+ items {
293
+ name
294
+ zone
295
+ row
296
+ column
297
+ type
317
298
  }
299
+ total
318
300
  }
319
- `,
320
- variables: {
321
- filters,
322
- sortings: sorters
323
301
  }
324
- })
302
+ `,
303
+ variables: {
304
+ filters,
305
+ paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
306
+ sortings: fetcherDetail.sorters
307
+ }
308
+ })
325
309
 
326
- if (!response.errors) {
327
- return response.data.locationsByGroup.items || []
310
+ if (!response.errors) {
311
+ return {
312
+ records: response.data.locationsByGroup.items || [],
313
+ total: response.data.locationsByGroup.total || 0
328
314
  }
329
- } catch (e) {
330
- this._showToast({
331
- level: 'error',
332
- message: e
333
- })
334
- } finally {
335
- this.dataGrist.hideSpinner()
336
315
  }
316
+ } catch (e) {
317
+ this._showToast({
318
+ level: 'error',
319
+ message: e
320
+ })
337
321
  }
338
322
  }
339
323
 
340
324
  _printLocations() {
341
- if (this._records && this._records.length > 0) {
342
- this.dispatchEvent(new CustomEvent(i18next.t('text.printing'), { detail: this._records }))
325
+ const records = this.dataGrist.data && this.dataGrist.data.records
326
+ if (records && records.length) {
327
+ this.dispatchEvent(new CustomEvent(i18next.t('text.printing'), { detail: records }))
343
328
  history.back()
344
329
  } else {
345
330
  this._showToast({