@things-factory/operato-wms 4.0.23 → 4.0.27
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.
- package/client/bootstrap.js +1 -1
- package/client/pages/adjustment/transfer-inventory.js +32 -6
- package/client/pages/billing/claim-chit/claim-chit-detail.js +32 -35
- package/client/pages/billing/claim-chit/claim-chit-list.js +17 -17
- package/client/pages/billing/claim-chit/create-claim-chit.js +39 -30
- package/client/pages/billing/transport-summary-report.js +21 -23
- package/client/pages/bulk-operation/bulk-operation.js +189 -64
- package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +44 -54
- package/client/pages/components/popup-unloading.js +47 -34
- package/client/pages/components/select-product-popup.js +74 -27
- package/client/pages/components/worksheet-information-popup.js +100 -0
- package/client/pages/inbound/expiry-date-popup.js +2 -2
- package/client/pages/inbound/inbound-reusable-pallet.js +21 -19
- package/client/pages/inbound/palletizing-pallets-popup.js +10 -9
- package/client/pages/inbound/putaway-product.js +196 -235
- package/client/pages/inbound/putaway-worksheet-generate-popup.js +4 -4
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +236 -646
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/vas-selector.js +9 -8
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/inventory-check/check-inventory-popup.js +20 -18
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +25 -15
- package/client/pages/inventory-check/inspecting-product.js +2 -2
- package/client/pages/inventory-check/inventory-check-list.js +30 -19
- package/client/pages/inventory-check/search-popup.js +15 -14
- package/client/pages/inventory-check/worksheet-cycle-count.js +17 -15
- package/client/pages/master/location-list.js +60 -52
- package/client/pages/master/pallet-list.js +34 -30
- package/client/pages/master/print-location-label.js +37 -36
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/master/warehouse-list.js +33 -29
- package/client/pages/master/worker-list.js +30 -30
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- package/client/pages/order/arrival-notice/assign-buffer-location.js +1 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
- package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
- package/client/pages/order/goods-received-note/customer-grn-list.js +9 -8
- package/client/pages/order/goods-received-note/customer-received-note.js +8 -7
- package/client/pages/order/goods-received-note/received-note-list.js +9 -8
- package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
- package/client/pages/order/release-order/batch-picking-popup.js +19 -2
- package/client/pages/order/release-order/create-release-order.js +194 -89
- package/client/pages/order/release-order/release-extra-product-popup.js +3 -7
- package/client/pages/order/release-order/release-order-detail.js +390 -107
- package/client/pages/order/return-order/check-return-order.js +15 -13
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/return-order/receive-return-order-requests.js +25 -22
- package/client/pages/order/return-order/rejected-return-order.js +8 -14
- package/client/pages/order/return-order/return-order-assign-buffer-location.js +16 -14
- package/client/pages/order/return-order/return-order-detail.js +35 -31
- package/client/pages/order/return-order/return-order-list.js +9 -8
- package/client/pages/order/return-order/return-order-requests.js +20 -18
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-list.js +9 -8
- package/client/pages/order/transfer-order/receive-transfer-order-request.js +67 -66
- package/client/pages/order/transfer-order/rejected-transfer-order.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-detail.js +7 -6
- package/client/pages/order/transfer-order/transfer-order-requests.js +20 -18
- package/client/pages/order/transport-order/contact-point-selector-popup.js +20 -20
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-note-popup.js +52 -46
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/order/transport-order/print-delivery-note.js +17 -16
- package/client/pages/order/transport-order/upload-delivery-note.js +21 -18
- package/client/pages/order/transport-order/view-delivery-note.js +19 -22
- package/client/pages/order/vas-order/create-vas-order.js +12 -11
- package/client/pages/order/vas-order/receive-vas-order.js +25 -22
- package/client/pages/order/vas-order/vas-order-detail.js +26 -23
- package/client/pages/order/vas-order/vas-order-list.js +9 -8
- package/client/pages/order/vas-order/vas-order-requests.js +11 -12
- package/client/pages/outbound/outbound-reusable-pallet.js +25 -33
- package/client/pages/outbound/packing-product.js +111 -236
- package/client/pages/outbound/picking-product.js +288 -380
- package/client/pages/outbound/single-outbound-worksheet.js +9 -8
- package/client/pages/outbound/sorting-product.js +66 -63
- package/client/pages/outbound/worksheet-loading.js +7 -3
- package/client/pages/outbound/worksheet-packing.js +3 -3
- package/client/pages/outbound/worksheet-picking.js +22 -18
- package/client/pages/report/job-sheet-list.js +9 -8
- package/client/pages/vas/print-product-label.js +17 -9
- package/client/route.js +16 -32
- package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
- package/things-factory.config.js +0 -16
- package/translations/en.json +34 -2
- package/translations/ko.json +34 -3
- package/translations/ms.json +34 -3
- package/translations/zh.json +34 -3
- package/client/pages/inbound/location-selector.js +0 -224
- package/client/pages/master/picking-bin-list.js +0 -354
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-detail.js +0 -315
- package/client/pages/order/retail-replenishment-order/retail-replenishment-order-requests.js +0 -307
- package/client/pages/order/vas-order/rejected-vas-order.js +0 -300
|
@@ -13,7 +13,7 @@ import { i18next, localize } from '@things-factory/i18n-base'
|
|
|
13
13
|
import { openPopup } from '@things-factory/layout-base'
|
|
14
14
|
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
15
15
|
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
16
|
-
import {
|
|
16
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
17
17
|
|
|
18
18
|
import { LOCATION_LABEL_SETTING_KEY, LOCATION_STATUS, LOCATION_TYPE } from '../constants'
|
|
19
19
|
|
|
@@ -340,32 +340,33 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
340
340
|
|
|
341
341
|
const response = await client.query({
|
|
342
342
|
query: gql`
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
pagination: { page, limit },
|
|
347
|
-
sortings: sorters
|
|
348
|
-
})}) {
|
|
349
|
-
items {
|
|
350
|
-
id
|
|
351
|
-
name
|
|
352
|
-
zone
|
|
353
|
-
row
|
|
354
|
-
type
|
|
355
|
-
column
|
|
356
|
-
shelf
|
|
357
|
-
status
|
|
358
|
-
updatedAt
|
|
359
|
-
updater{
|
|
343
|
+
query locations($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
344
|
+
locations(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
345
|
+
items {
|
|
360
346
|
id
|
|
361
347
|
name
|
|
362
|
-
|
|
348
|
+
zone
|
|
349
|
+
row
|
|
350
|
+
type
|
|
351
|
+
column
|
|
352
|
+
shelf
|
|
353
|
+
status
|
|
354
|
+
updatedAt
|
|
355
|
+
updater {
|
|
356
|
+
id
|
|
357
|
+
name
|
|
358
|
+
description
|
|
359
|
+
}
|
|
363
360
|
}
|
|
361
|
+
total
|
|
364
362
|
}
|
|
365
|
-
total
|
|
366
363
|
}
|
|
364
|
+
`,
|
|
365
|
+
variables: {
|
|
366
|
+
filters: [...filters, ...this.searchForm.queryFilters],
|
|
367
|
+
pagination: { page, limit },
|
|
368
|
+
sortings: sorters
|
|
367
369
|
}
|
|
368
|
-
`
|
|
369
370
|
})
|
|
370
371
|
|
|
371
372
|
if (!response.errors) {
|
|
@@ -398,16 +399,17 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
398
399
|
}
|
|
399
400
|
return patch
|
|
400
401
|
})
|
|
401
|
-
const response = await client.
|
|
402
|
-
|
|
403
|
-
mutation {
|
|
404
|
-
updateMultipleLocation(${
|
|
405
|
-
patches
|
|
406
|
-
})}) {
|
|
402
|
+
const response = await client.mutate({
|
|
403
|
+
mutation: gql`
|
|
404
|
+
mutation updateMultipleLocation($patches: [LocationPatch!]!) {
|
|
405
|
+
updateMultipleLocation(patches: $patches) {
|
|
407
406
|
name
|
|
408
407
|
}
|
|
409
408
|
}
|
|
410
|
-
|
|
409
|
+
`,
|
|
410
|
+
variables: {
|
|
411
|
+
patches
|
|
412
|
+
}
|
|
411
413
|
})
|
|
412
414
|
|
|
413
415
|
if (!response.errors) {
|
|
@@ -439,14 +441,15 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
439
441
|
|
|
440
442
|
const response = await client.query({
|
|
441
443
|
query: gql`
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
})}) {
|
|
446
|
-
name
|
|
447
|
-
}
|
|
444
|
+
mutation updateMultipleLocation($patches: [LocationPatch!]!) {
|
|
445
|
+
updateMultipleLocation(patches: $patches) {
|
|
446
|
+
name
|
|
448
447
|
}
|
|
449
|
-
|
|
448
|
+
}
|
|
449
|
+
`,
|
|
450
|
+
variables: {
|
|
451
|
+
patches
|
|
452
|
+
}
|
|
450
453
|
})
|
|
451
454
|
|
|
452
455
|
if (!response.errors) {
|
|
@@ -488,12 +491,15 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
488
491
|
if (record.id) ids.push(record.id)
|
|
489
492
|
})
|
|
490
493
|
if (ids && ids.length > 0) {
|
|
491
|
-
const response = await client.
|
|
492
|
-
|
|
493
|
-
mutation {
|
|
494
|
-
deleteLocations($
|
|
494
|
+
const response = await client.mutate({
|
|
495
|
+
mutation: gql`
|
|
496
|
+
mutation deleteLocations($ids: [String!]!) {
|
|
497
|
+
deleteLocations(ids: $ids)
|
|
495
498
|
}
|
|
496
|
-
|
|
499
|
+
`,
|
|
500
|
+
variables: {
|
|
501
|
+
ids
|
|
502
|
+
}
|
|
497
503
|
})
|
|
498
504
|
|
|
499
505
|
if (!response.errors) {
|
|
@@ -526,19 +532,20 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
526
532
|
|
|
527
533
|
const retrieve = await client.query({
|
|
528
534
|
query: gql`
|
|
529
|
-
query {
|
|
530
|
-
warehouses(${
|
|
531
|
-
filters: [...filters],
|
|
532
|
-
pagination: {},
|
|
533
|
-
sortings: []
|
|
534
|
-
})}) {
|
|
535
|
+
query warehouses($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
536
|
+
warehouses(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
535
537
|
items {
|
|
536
538
|
id
|
|
537
539
|
name
|
|
538
540
|
}
|
|
539
541
|
}
|
|
540
542
|
}
|
|
541
|
-
|
|
543
|
+
`,
|
|
544
|
+
variables: {
|
|
545
|
+
filters: [...filters],
|
|
546
|
+
pagination: {},
|
|
547
|
+
sortings: []
|
|
548
|
+
}
|
|
542
549
|
})
|
|
543
550
|
let name = retrieve.data.warehouses.items[0].name
|
|
544
551
|
|
|
@@ -551,12 +558,13 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
551
558
|
cancelButton: { text: i18next.t('button.cancel'), color: '#cfcfcf' },
|
|
552
559
|
callback: async result => {
|
|
553
560
|
if (result.value && name !== '') {
|
|
554
|
-
const response = await client.
|
|
555
|
-
|
|
556
|
-
mutation {
|
|
557
|
-
deleteAllLocations(
|
|
561
|
+
const response = await client.mutate({
|
|
562
|
+
mutation: gql`
|
|
563
|
+
mutation deleteAllLocations($warehouseId: String!) {
|
|
564
|
+
deleteAllLocations(warehouseId: $warehouseId)
|
|
558
565
|
}
|
|
559
|
-
|
|
566
|
+
`,
|
|
567
|
+
variables: { warehouseId: this._warehouseId }
|
|
560
568
|
})
|
|
561
569
|
if (!response.errors) this._clearTempLocation()
|
|
562
570
|
}
|
|
@@ -6,7 +6,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
6
6
|
import { css, html } from 'lit-element'
|
|
7
7
|
import { getCodeByName } from '@things-factory/code-base'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
11
|
import { openPopup } from '@things-factory/layout-base'
|
|
12
12
|
import { REUSABLE_PALLET_LABEL_SETTING_KEY } from '../constants'
|
|
@@ -231,28 +231,24 @@ class PalletList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
231
231
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
232
232
|
const response = await client.query({
|
|
233
233
|
query: gql`
|
|
234
|
-
query {
|
|
235
|
-
pallets(${
|
|
236
|
-
filters: [...this.searchForm.queryFilters],
|
|
237
|
-
pagination: { page, limit },
|
|
238
|
-
sortings: sorters
|
|
239
|
-
})}) {
|
|
234
|
+
query pallets($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
235
|
+
pallets(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
240
236
|
items {
|
|
241
237
|
id
|
|
242
|
-
name
|
|
243
|
-
owner{
|
|
238
|
+
name
|
|
239
|
+
owner {
|
|
244
240
|
id
|
|
245
241
|
name
|
|
246
242
|
description
|
|
247
243
|
}
|
|
248
|
-
holder{
|
|
244
|
+
holder {
|
|
249
245
|
id
|
|
250
246
|
name
|
|
251
247
|
description
|
|
252
248
|
}
|
|
253
249
|
status
|
|
254
250
|
updatedAt
|
|
255
|
-
updater{
|
|
251
|
+
updater {
|
|
256
252
|
id
|
|
257
253
|
name
|
|
258
254
|
description
|
|
@@ -261,7 +257,12 @@ class PalletList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
261
257
|
total
|
|
262
258
|
}
|
|
263
259
|
}
|
|
264
|
-
|
|
260
|
+
`,
|
|
261
|
+
variables: {
|
|
262
|
+
filters: [...this.searchForm.queryFilters],
|
|
263
|
+
pagination: { page, limit },
|
|
264
|
+
sortings: sorters
|
|
265
|
+
}
|
|
265
266
|
})
|
|
266
267
|
|
|
267
268
|
return {
|
|
@@ -274,14 +275,15 @@ class PalletList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
274
275
|
this.dataGrist.showSpinner()
|
|
275
276
|
const response = await client.query({
|
|
276
277
|
query: gql`
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
})}) {
|
|
281
|
-
name
|
|
282
|
-
}
|
|
278
|
+
mutation updateMultiplePallet($patches: [PalletPatch!]!) {
|
|
279
|
+
updateMultiplePallet(patches: $patches) {
|
|
280
|
+
name
|
|
283
281
|
}
|
|
284
|
-
|
|
282
|
+
}
|
|
283
|
+
`,
|
|
284
|
+
variables: {
|
|
285
|
+
patches
|
|
286
|
+
}
|
|
285
287
|
})
|
|
286
288
|
if (!response.errors) {
|
|
287
289
|
history.back()
|
|
@@ -301,16 +303,17 @@ class PalletList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
301
303
|
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
302
304
|
if (patches && patches.length) {
|
|
303
305
|
this.dataGrist.showSpinner()
|
|
304
|
-
const response = await client.
|
|
305
|
-
|
|
306
|
-
mutation {
|
|
307
|
-
updateMultiplePallet(${
|
|
308
|
-
patches
|
|
309
|
-
})}) {
|
|
306
|
+
const response = await client.mutate({
|
|
307
|
+
mutation: gql`
|
|
308
|
+
mutation updateMultiplePallet($patches: [PalletPatch!]!) {
|
|
309
|
+
updateMultiplePallet(patches: $patches) {
|
|
310
310
|
name
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
|
|
313
|
+
`,
|
|
314
|
+
variables: {
|
|
315
|
+
patches
|
|
316
|
+
}
|
|
314
317
|
})
|
|
315
318
|
|
|
316
319
|
if (!response.errors) {
|
|
@@ -341,10 +344,11 @@ class PalletList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
341
344
|
if (id && id.length > 0) {
|
|
342
345
|
const response = await client.query({
|
|
343
346
|
query: gql`
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
347
|
+
mutation deletePallets($id: [String!]!) {
|
|
348
|
+
deletePallets(ids: $id)
|
|
349
|
+
}
|
|
350
|
+
`,
|
|
351
|
+
variables: { id }
|
|
348
352
|
})
|
|
349
353
|
|
|
350
354
|
if (!response.errors) {
|
|
@@ -4,7 +4,7 @@ import '@things-factory/grist-ui'
|
|
|
4
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
5
|
import { client } from '@things-factory/shell'
|
|
6
6
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
9
|
import { css, html, LitElement } from 'lit-element'
|
|
10
10
|
|
|
@@ -91,27 +91,26 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
91
91
|
<fieldset>
|
|
92
92
|
<label>${i18next.t('label.label_format')}</label>
|
|
93
93
|
<select
|
|
94
|
-
name="labelFormat"
|
|
94
|
+
name="labelFormat"
|
|
95
95
|
@change="${e => {
|
|
96
|
-
this._fullLocationFormat =
|
|
97
|
-
e.currentTarget.value === 'full_format'
|
|
98
|
-
? true
|
|
99
|
-
: false
|
|
96
|
+
this._fullLocationFormat = e.currentTarget.value === 'full_format' ? true : false
|
|
100
97
|
if (this._labelIndicator.value != '') {
|
|
101
98
|
this._getPrintPreview(this._labelIndicator.value)
|
|
102
99
|
}
|
|
103
|
-
}}"
|
|
100
|
+
}}"
|
|
101
|
+
>
|
|
104
102
|
<option value="full_format">A-01-01-01 (${i18next.t('text.full_format')})</option>
|
|
105
103
|
<option value="partial_format">A-01-01 (${i18next.t('text.partial_format')})</option>
|
|
106
104
|
</select>
|
|
107
105
|
|
|
108
106
|
<label>${i18next.t('label.label_indicator')}</label>
|
|
109
|
-
<select
|
|
107
|
+
<select
|
|
108
|
+
name="labelIndicator"
|
|
110
109
|
@change="${e => {
|
|
111
110
|
let indicator = e.currentTarget.value
|
|
112
|
-
if (indicator !== '')
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
if (indicator !== '') this._getPrintPreview(indicator)
|
|
112
|
+
}}"
|
|
113
|
+
>
|
|
115
114
|
<option value="">-- ${i18next.t('text.please_select_label_indicator')} --</option>
|
|
116
115
|
<option value="zone">${i18next.t('label.zone')}</option>
|
|
117
116
|
<option value="row">${i18next.t('label.row')}</option>
|
|
@@ -203,7 +202,7 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
203
202
|
}
|
|
204
203
|
]
|
|
205
204
|
locations = await this._fetchLocations(filters)
|
|
206
|
-
}
|
|
205
|
+
}
|
|
207
206
|
// if partial format:
|
|
208
207
|
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice
|
|
209
208
|
else {
|
|
@@ -211,14 +210,16 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
211
210
|
this._showToast({
|
|
212
211
|
level: 'error',
|
|
213
212
|
message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
|
|
214
|
-
})
|
|
215
|
-
return
|
|
213
|
+
})
|
|
214
|
+
return
|
|
216
215
|
} else {
|
|
217
|
-
filters = [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
filters = [
|
|
217
|
+
{
|
|
218
|
+
name: 'warehouse_id',
|
|
219
|
+
operator: 'eq',
|
|
220
|
+
value: this.warehouseId
|
|
221
|
+
}
|
|
222
|
+
]
|
|
222
223
|
locations = await this._fetchLocationsByGroup(filters)
|
|
223
224
|
}
|
|
224
225
|
}
|
|
@@ -231,14 +232,12 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
231
232
|
...location,
|
|
232
233
|
indicator: location[indicator]
|
|
233
234
|
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
else {
|
|
235
|
+
} else {
|
|
237
236
|
return {
|
|
238
237
|
...location,
|
|
239
238
|
name: this._fullLocationFormat // check if full location format is true
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
|
|
240
|
+
: `${location.zone}-${location.row}-${location.column}`,
|
|
242
241
|
indicator: location[indicator]
|
|
243
242
|
}
|
|
244
243
|
}
|
|
@@ -264,11 +263,8 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
264
263
|
|
|
265
264
|
const response = await client.query({
|
|
266
265
|
query: gql`
|
|
267
|
-
query {
|
|
268
|
-
locations(${
|
|
269
|
-
filters,
|
|
270
|
-
sortings: sorters
|
|
271
|
-
})}) {
|
|
266
|
+
query locations($filters: [Filter!], $sortings: [Sorting!]) {
|
|
267
|
+
locations(filters: $filters, sortings: $sortings) {
|
|
272
268
|
items {
|
|
273
269
|
name
|
|
274
270
|
zone
|
|
@@ -279,7 +275,11 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
279
275
|
total
|
|
280
276
|
}
|
|
281
277
|
}
|
|
282
|
-
|
|
278
|
+
`,
|
|
279
|
+
variables: {
|
|
280
|
+
filters,
|
|
281
|
+
sortings: sorters
|
|
282
|
+
}
|
|
283
283
|
})
|
|
284
284
|
|
|
285
285
|
if (!response.errors) {
|
|
@@ -305,11 +305,8 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
305
305
|
|
|
306
306
|
const response = await client.query({
|
|
307
307
|
query: gql`
|
|
308
|
-
query {
|
|
309
|
-
locationsByGroup(${
|
|
310
|
-
filters,
|
|
311
|
-
sortings: sorters
|
|
312
|
-
})}) {
|
|
308
|
+
query locationsByGroup($filters: [Filter!], $sortings: [Sorting!]) {
|
|
309
|
+
locationsByGroup(filters: $filters, sortings: $sortings) {
|
|
313
310
|
items {
|
|
314
311
|
name
|
|
315
312
|
zone
|
|
@@ -319,7 +316,11 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
319
316
|
total
|
|
320
317
|
}
|
|
321
318
|
}
|
|
322
|
-
|
|
319
|
+
`,
|
|
320
|
+
variables: {
|
|
321
|
+
filters,
|
|
322
|
+
sortings: sorters
|
|
323
|
+
}
|
|
323
324
|
})
|
|
324
325
|
|
|
325
326
|
if (!response.errors) {
|
|
@@ -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
|
|
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
|
}
|
|
@@ -6,7 +6,7 @@ import '@things-factory/import-ui'
|
|
|
6
6
|
import { openPopup } from '@things-factory/layout-base'
|
|
7
7
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
11
|
import { css, html } from 'lit-element'
|
|
12
12
|
|
|
@@ -232,19 +232,15 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
232
232
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
233
233
|
const response = await client.query({
|
|
234
234
|
query: gql`
|
|
235
|
-
query {
|
|
236
|
-
warehouses(${
|
|
237
|
-
filters: this.searchForm.queryFilters,
|
|
238
|
-
pagination: { page, limit },
|
|
239
|
-
sortings: sorters
|
|
240
|
-
})}) {
|
|
235
|
+
query warehouses($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
236
|
+
warehouses(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
241
237
|
items {
|
|
242
238
|
id
|
|
243
239
|
name
|
|
244
240
|
type
|
|
245
241
|
description
|
|
246
242
|
updatedAt
|
|
247
|
-
updater{
|
|
243
|
+
updater {
|
|
248
244
|
id
|
|
249
245
|
name
|
|
250
246
|
description
|
|
@@ -253,7 +249,12 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
253
249
|
total
|
|
254
250
|
}
|
|
255
251
|
}
|
|
256
|
-
|
|
252
|
+
`,
|
|
253
|
+
variables: {
|
|
254
|
+
filters: this.searchForm.queryFilters,
|
|
255
|
+
pagination: { page, limit },
|
|
256
|
+
sortings: sorters
|
|
257
|
+
}
|
|
257
258
|
})
|
|
258
259
|
|
|
259
260
|
return {
|
|
@@ -265,14 +266,15 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
265
266
|
async importHandler(patches) {
|
|
266
267
|
const response = await client.query({
|
|
267
268
|
query: gql`
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})}) {
|
|
272
|
-
name
|
|
273
|
-
}
|
|
269
|
+
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
270
|
+
updateMultipleWarehouse(patches: $patches) {
|
|
271
|
+
name
|
|
274
272
|
}
|
|
275
|
-
|
|
273
|
+
}
|
|
274
|
+
`,
|
|
275
|
+
variables: {
|
|
276
|
+
patches
|
|
277
|
+
}
|
|
276
278
|
})
|
|
277
279
|
|
|
278
280
|
if (!response.errors) {
|
|
@@ -291,16 +293,17 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
291
293
|
async _saveWarehouse() {
|
|
292
294
|
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
293
295
|
if (patches && patches.length) {
|
|
294
|
-
const response = await client.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
})}) {
|
|
300
|
-
name
|
|
301
|
-
}
|
|
296
|
+
const response = await client.mutate({
|
|
297
|
+
mutation: gql`
|
|
298
|
+
mutation updateMultipleWarehouse($patches: [WarehousePatch!]!) {
|
|
299
|
+
updateMultipleWarehouse(patches: $patches) {
|
|
300
|
+
name
|
|
302
301
|
}
|
|
303
|
-
|
|
302
|
+
}
|
|
303
|
+
`,
|
|
304
|
+
variables: {
|
|
305
|
+
patches
|
|
306
|
+
}
|
|
304
307
|
})
|
|
305
308
|
|
|
306
309
|
if (!response.errors) {
|
|
@@ -329,10 +332,11 @@ class WarehouseList extends localize(i18next)(PageView) {
|
|
|
329
332
|
if (ids && ids.length > 0) {
|
|
330
333
|
const response = await client.query({
|
|
331
334
|
query: gql`
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
mutation deleteWarehouses($ids: [String!]!) {
|
|
336
|
+
deleteWarehouses(ids: $ids)
|
|
337
|
+
}
|
|
338
|
+
`,
|
|
339
|
+
variables: { ids }
|
|
336
340
|
})
|
|
337
341
|
|
|
338
342
|
if (!response.errors) {
|
|
@@ -6,7 +6,7 @@ import '@things-factory/import-ui'
|
|
|
6
6
|
import { openPopup } from '@things-factory/layout-base'
|
|
7
7
|
import { client, CustomAlert, PageView } from '@things-factory/shell'
|
|
8
8
|
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
9
|
-
import {
|
|
9
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
10
|
import gql from 'graphql-tag'
|
|
11
11
|
import { css, html } from 'lit-element'
|
|
12
12
|
|
|
@@ -212,19 +212,15 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
212
212
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
213
213
|
const response = await client.query({
|
|
214
214
|
query: gql`
|
|
215
|
-
query {
|
|
216
|
-
workers(${
|
|
217
|
-
filters: this.searchForm.queryFilters,
|
|
218
|
-
pagination: { page, limit },
|
|
219
|
-
sortings: sorters
|
|
220
|
-
})}) {
|
|
215
|
+
query workers($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
216
|
+
workers(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
221
217
|
items {
|
|
222
218
|
id
|
|
223
219
|
name
|
|
224
220
|
description
|
|
225
221
|
type
|
|
226
222
|
updatedAt
|
|
227
|
-
updater{
|
|
223
|
+
updater {
|
|
228
224
|
id
|
|
229
225
|
name
|
|
230
226
|
description
|
|
@@ -233,7 +229,12 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
233
229
|
total
|
|
234
230
|
}
|
|
235
231
|
}
|
|
236
|
-
|
|
232
|
+
`,
|
|
233
|
+
variables: {
|
|
234
|
+
filters: this.searchForm.queryFilters,
|
|
235
|
+
pagination: { page, limit },
|
|
236
|
+
sortings: sorters
|
|
237
|
+
}
|
|
237
238
|
})
|
|
238
239
|
|
|
239
240
|
return {
|
|
@@ -245,14 +246,13 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
245
246
|
async importHandler(patches) {
|
|
246
247
|
const response = await client.query({
|
|
247
248
|
query: gql`
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
})}) {
|
|
252
|
-
name
|
|
253
|
-
}
|
|
249
|
+
mutation updateMultipleWorker($patches: [WorkerPatch!]!) {
|
|
250
|
+
updateMultipleWorker(patches: $patches) {
|
|
251
|
+
name
|
|
254
252
|
}
|
|
255
|
-
|
|
253
|
+
}
|
|
254
|
+
`,
|
|
255
|
+
variables: { patches }
|
|
256
256
|
})
|
|
257
257
|
|
|
258
258
|
if (!response.errors) {
|
|
@@ -271,16 +271,15 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
271
271
|
async _saveWorker() {
|
|
272
272
|
let patches = this.dataGrist.exportPatchList({ flagName: 'cuFlag' })
|
|
273
273
|
if (patches && patches.length) {
|
|
274
|
-
const response = await client.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
})}) {
|
|
280
|
-
name
|
|
281
|
-
}
|
|
274
|
+
const response = await client.mutate({
|
|
275
|
+
mutation: gql`
|
|
276
|
+
mutation updateMultipleWorker($patches: [WorkerPatch!]!) {
|
|
277
|
+
updateMultipleWorker(patches: $patches) {
|
|
278
|
+
name
|
|
282
279
|
}
|
|
283
|
-
|
|
280
|
+
}
|
|
281
|
+
`,
|
|
282
|
+
variables: { patches }
|
|
284
283
|
})
|
|
285
284
|
|
|
286
285
|
if (!response.errors) {
|
|
@@ -308,12 +307,13 @@ class WorkerList extends localize(i18next)(PageView) {
|
|
|
308
307
|
if (result.value) {
|
|
309
308
|
const ids = this.dataGrist.selected.map(record => record.id)
|
|
310
309
|
if (ids && ids.length > 0) {
|
|
311
|
-
const response = await client.
|
|
312
|
-
|
|
313
|
-
mutation {
|
|
314
|
-
deleteWorkers($
|
|
310
|
+
const response = await client.mutate({
|
|
311
|
+
mutation: gql`
|
|
312
|
+
mutation deleteWorkers($ids: [String!]!) {
|
|
313
|
+
deleteWorkers(ids: $ids)
|
|
315
314
|
}
|
|
316
|
-
|
|
315
|
+
`,
|
|
316
|
+
variables: { ids }
|
|
317
317
|
})
|
|
318
318
|
|
|
319
319
|
if (!response.errors) {
|