@things-factory/operato-wms 4.0.29 → 4.0.33
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/fetch-setting-value.js +10 -2
- package/client/pages/bulk-operation/bulk-operation.js +44 -10
- package/client/pages/bulk-operation/validate-gan-popup.js +5 -4
- package/client/pages/bulk-operation/validate-ro-popup.js +7 -39
- package/client/pages/components/popup-reusable-pallet.js +145 -0
- package/client/pages/components/vas-templates/vas-pallet-add-popup.js +12 -11
- package/client/pages/components/vas-templates/vas-relabel.js +57 -34
- package/client/pages/components/vas-templates/vas-repack-relabel.js +56 -36
- package/client/pages/components/vas-templates/vas-repack.js +45 -31
- package/client/pages/components/vas-templates/vas-repalletizing.js +58 -39
- package/client/pages/components/vas-templates/vas-unpack.js +38 -24
- package/client/pages/components/worksheet-information-popup.js +4 -1
- package/client/pages/inbound/unload-product.js +119 -103
- package/client/pages/inventory/onhand-inventory.js +1 -0
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +52 -44
- package/client/pages/order/arrival-notice/arrival-notice-list.js +2 -5
- package/client/pages/order/release-order/b2b/b2b-order-list.js +1 -5
- package/client/pages/order/release-order/batch-picking-popup.js +4 -3
- package/client/pages/order/release-order/create-release-order.js +1 -1
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -5
- package/client/pages/order/release-order/release-order-detail.js +31 -14
- package/client/pages/order/return-order/create-return-order.js +41 -52
- package/client/pages/order/reverse-kitting-order/reverse-kitting-order-detail.js +2 -2
- package/client/pages/order/transport-order/create-delivery-order.js +4 -2
- package/client/pages/order/transport-order/delivery-note-popup.js +2 -2
- package/client/pages/outbound/packing-worksheet-list.js +64 -4
- package/client/pages/outbound/picking-product.js +12 -7
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +2 -2
- package/client/pages/report/custom-elccl/elccl-inventory-summary-report.js +5 -1
- package/client/pages/report/inbound-order-details-report.js +3 -5
- package/client/pages/vas/abstract-execute-vas.js +4 -1
- package/client/pages/vas/execute-pure-vas.js +3 -8
- package/client/pages/vas/reverse-kitting/execute-reverse-kitting.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-combination-sets.js +3 -3
- package/client/pages/vas/reverse-kitting/popup-reverse-kitting-template.js +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +2 -4
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +2 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +2 -4
- package/server/graphql/types/reports/inbound-order-details-report.ts +2 -1
- package/translations/en.json +15 -1
- package/translations/ko.json +20 -7
- package/translations/ms.json +21 -8
- package/translations/zh.json +21 -8
- package/client/pages/components/popup-unloading.js +0 -610
|
@@ -10,7 +10,7 @@ import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
|
10
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
11
|
import { openPopup } from '@things-factory/layout-base'
|
|
12
12
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
13
|
-
import {
|
|
13
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
14
14
|
|
|
15
15
|
import { PACKING_UNIT_QTY, PACKING_UNIT_UOM, PACKING_UNITS } from '../../constants'
|
|
16
16
|
import { VasTemplate } from './vas-template'
|
|
@@ -389,14 +389,15 @@ class VasRepackRelabel extends localize(i18next)(VasTemplate) {
|
|
|
389
389
|
|
|
390
390
|
const response = await client.query({
|
|
391
391
|
query: gql`
|
|
392
|
-
query {
|
|
393
|
-
locationByName(${
|
|
394
|
-
name: locationName
|
|
395
|
-
})}) {
|
|
392
|
+
query locationByName($name: String!) {
|
|
393
|
+
locationByName(name: $name) {
|
|
396
394
|
id
|
|
397
395
|
}
|
|
398
396
|
}
|
|
399
|
-
|
|
397
|
+
`,
|
|
398
|
+
variables: {
|
|
399
|
+
name: locationName
|
|
400
|
+
}
|
|
400
401
|
})
|
|
401
402
|
|
|
402
403
|
if (!response.errors) {
|
|
@@ -550,9 +551,9 @@ class VasRepackRelabel extends localize(i18next)(VasTemplate) {
|
|
|
550
551
|
category: 'LABEL',
|
|
551
552
|
refBy: `VAS-REPACK-RELABEL-${String(Date.now())}`
|
|
552
553
|
}
|
|
553
|
-
const response = await client.
|
|
554
|
-
|
|
555
|
-
mutation($attachment: NewAttachment!) {
|
|
554
|
+
const response = await client.mutate({
|
|
555
|
+
mutation: gql`
|
|
556
|
+
mutation ($attachment: NewAttachment!) {
|
|
556
557
|
createAttachment(attachment: $attachment) {
|
|
557
558
|
id
|
|
558
559
|
name
|
|
@@ -585,16 +586,17 @@ class VasRepackRelabel extends localize(i18next)(VasTemplate) {
|
|
|
585
586
|
async deleteNewLabel(record) {
|
|
586
587
|
try {
|
|
587
588
|
const operationGuide = JSON.parse(record.operationGuide)
|
|
588
|
-
const response = await client.
|
|
589
|
-
|
|
590
|
-
mutation {
|
|
591
|
-
deleteAttachment(${
|
|
592
|
-
id: operationGuide.data.newLabel.id
|
|
593
|
-
})}) {
|
|
589
|
+
const response = await client.mutate({
|
|
590
|
+
mutation: gql`
|
|
591
|
+
mutation deleteAttachment($id: String!) {
|
|
592
|
+
deleteAttachment(id: $id) {
|
|
594
593
|
name
|
|
595
594
|
}
|
|
596
595
|
}
|
|
597
|
-
|
|
596
|
+
`,
|
|
597
|
+
variables: {
|
|
598
|
+
id: operationGuide.data.newLabel.id
|
|
599
|
+
}
|
|
598
600
|
})
|
|
599
601
|
|
|
600
602
|
if (response.errors) throw response.errors[0]
|
|
@@ -606,18 +608,31 @@ class VasRepackRelabel extends localize(i18next)(VasTemplate) {
|
|
|
606
608
|
async repack() {
|
|
607
609
|
try {
|
|
608
610
|
this._checkRepackable()
|
|
609
|
-
await client.
|
|
610
|
-
|
|
611
|
-
mutation
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
611
|
+
await client.mutate({
|
|
612
|
+
mutation: gql`
|
|
613
|
+
mutation repackaging(
|
|
614
|
+
$worksheetDetailName: String!
|
|
615
|
+
$fromPalletId: String!
|
|
616
|
+
$toPalletId: String!
|
|
617
|
+
$locationName: String!
|
|
618
|
+
$packageQty: Int!
|
|
619
|
+
) {
|
|
620
|
+
repackaging(
|
|
621
|
+
worksheetDetailName: $worksheetDetailName
|
|
622
|
+
fromPalletId: $fromPalletId
|
|
623
|
+
toPalletId: $toPalletId
|
|
624
|
+
locationName: $locationName
|
|
625
|
+
packageQty: $packageQty
|
|
626
|
+
)
|
|
619
627
|
}
|
|
620
|
-
|
|
628
|
+
`,
|
|
629
|
+
variables: {
|
|
630
|
+
worksheetDetailName: this.record.name,
|
|
631
|
+
fromPalletId: this.fromPalletIdInput.value,
|
|
632
|
+
toPalletId: this.toPalletIdInput.value,
|
|
633
|
+
locationName: this.locationInput.value,
|
|
634
|
+
packageQty: parseInt(this.packageQtyInput.value)
|
|
635
|
+
}
|
|
621
636
|
})
|
|
622
637
|
|
|
623
638
|
this.dispatchEvent(
|
|
@@ -633,16 +648,21 @@ class VasRepackRelabel extends localize(i18next)(VasTemplate) {
|
|
|
633
648
|
|
|
634
649
|
async undoRepack(worksheetDetailName, toPalletId) {
|
|
635
650
|
try {
|
|
636
|
-
await client.
|
|
637
|
-
|
|
638
|
-
mutation {
|
|
639
|
-
undoRepackaging(
|
|
640
|
-
worksheetDetailName
|
|
641
|
-
fromPalletId:
|
|
642
|
-
toPalletId
|
|
643
|
-
|
|
651
|
+
await client.mutate({
|
|
652
|
+
mutation: gql`
|
|
653
|
+
mutation undoRepackaging($worksheetDetailName: String!, $fromPalletId: String!, $toPalletId: String!) {
|
|
654
|
+
undoRepackaging(
|
|
655
|
+
worksheetDetailName: $worksheetDetailName
|
|
656
|
+
fromPalletId: $fromPalletId
|
|
657
|
+
toPalletId: $toPalletId
|
|
658
|
+
)
|
|
644
659
|
}
|
|
645
|
-
|
|
660
|
+
`,
|
|
661
|
+
variables: {
|
|
662
|
+
worksheetDetailName,
|
|
663
|
+
fromPalletId: this.fromPalletIdInput.value,
|
|
664
|
+
toPalletId
|
|
665
|
+
}
|
|
646
666
|
})
|
|
647
667
|
this.dispatchEvent(
|
|
648
668
|
new CustomEvent('completed', {
|
|
@@ -7,7 +7,7 @@ import { css, html } from 'lit-element'
|
|
|
7
7
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
9
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
10
|
-
import {
|
|
10
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
11
11
|
|
|
12
12
|
import { PACKING_UNIT_QTY, PACKING_UNIT_UOM, PACKING_UNITS } from '../../constants'
|
|
13
13
|
import { VasTemplate } from './vas-template'
|
|
@@ -316,14 +316,13 @@ class VasRepack extends localize(i18next)(VasTemplate) {
|
|
|
316
316
|
|
|
317
317
|
const response = await client.query({
|
|
318
318
|
query: gql`
|
|
319
|
-
query {
|
|
320
|
-
locationByName(${
|
|
321
|
-
name: locationName
|
|
322
|
-
})}) {
|
|
319
|
+
query locationByName($name: String!) {
|
|
320
|
+
locationByName(name: $name) {
|
|
323
321
|
id
|
|
324
322
|
}
|
|
325
323
|
}
|
|
326
|
-
|
|
324
|
+
`,
|
|
325
|
+
variables: { name: locationName }
|
|
327
326
|
})
|
|
328
327
|
|
|
329
328
|
if (!response.errors) {
|
|
@@ -339,10 +338,8 @@ class VasRepack extends localize(i18next)(VasTemplate) {
|
|
|
339
338
|
async _fetchPackingTypes() {
|
|
340
339
|
const response = await client.query({
|
|
341
340
|
query: gql`
|
|
342
|
-
query {
|
|
343
|
-
commonCode(${
|
|
344
|
-
name: 'PACKING_TYPES'
|
|
345
|
-
})}) {
|
|
341
|
+
query commonCode($name: String!) {
|
|
342
|
+
commonCode(name: $name) {
|
|
346
343
|
details {
|
|
347
344
|
name
|
|
348
345
|
description
|
|
@@ -350,7 +347,10 @@ class VasRepack extends localize(i18next)(VasTemplate) {
|
|
|
350
347
|
}
|
|
351
348
|
}
|
|
352
349
|
}
|
|
353
|
-
|
|
350
|
+
`,
|
|
351
|
+
variables: {
|
|
352
|
+
name: 'PACKING_TYPES'
|
|
353
|
+
}
|
|
354
354
|
})
|
|
355
355
|
|
|
356
356
|
if (response && !response.errors) {
|
|
@@ -472,18 +472,31 @@ class VasRepack extends localize(i18next)(VasTemplate) {
|
|
|
472
472
|
async repack() {
|
|
473
473
|
try {
|
|
474
474
|
this._checkRepackable()
|
|
475
|
-
await client.
|
|
476
|
-
|
|
477
|
-
mutation
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
475
|
+
await client.mutate({
|
|
476
|
+
mutation: gql`
|
|
477
|
+
mutation repackaging(
|
|
478
|
+
$worksheetDetailName: String!
|
|
479
|
+
$fromPalletId: String!
|
|
480
|
+
$toPalletId: String!
|
|
481
|
+
$locationName: String!
|
|
482
|
+
$packageQty: Int!
|
|
483
|
+
) {
|
|
484
|
+
repackaging(
|
|
485
|
+
worksheetDetailName: $worksheetDetailName
|
|
486
|
+
fromPalletId: $fromPalletId
|
|
487
|
+
toPalletId: $toPalletId
|
|
488
|
+
locationName: $locationName
|
|
489
|
+
packageQty: $packageQty
|
|
490
|
+
)
|
|
485
491
|
}
|
|
486
|
-
|
|
492
|
+
`,
|
|
493
|
+
variables: {
|
|
494
|
+
worksheetDetailName: this.record.name,
|
|
495
|
+
fromPalletId: this.fromPalletIdInput.value,
|
|
496
|
+
toPalletId: this.toPalletIdInput.value,
|
|
497
|
+
locationName: this.locationInput.value,
|
|
498
|
+
packageQty: parseInt(this.packageQtyInput.value)
|
|
499
|
+
}
|
|
487
500
|
})
|
|
488
501
|
|
|
489
502
|
this.dispatchEvent(
|
|
@@ -499,16 +512,17 @@ class VasRepack extends localize(i18next)(VasTemplate) {
|
|
|
499
512
|
|
|
500
513
|
async undoRepack(worksheetDetailName, toPalletId) {
|
|
501
514
|
try {
|
|
502
|
-
await client.
|
|
503
|
-
|
|
504
|
-
mutation {
|
|
505
|
-
undoRepackaging($
|
|
506
|
-
worksheetDetailName,
|
|
507
|
-
fromPalletId: this.fromPalletIdInput.value,
|
|
508
|
-
toPalletId
|
|
509
|
-
})})
|
|
515
|
+
await client.mutate({
|
|
516
|
+
mutation: gql`
|
|
517
|
+
mutation undoRepackaging($worksheetDetailName: String!, $fromPalletId, String!, $toPalletId: String!){
|
|
518
|
+
undoRepackaging(worksheetDetailName: $worksheetDetailName, fromPalletId: $fromPalletId, toPalletId: $toPalletId)
|
|
510
519
|
}
|
|
511
|
-
|
|
520
|
+
`,
|
|
521
|
+
variables: {
|
|
522
|
+
worksheetDetailName,
|
|
523
|
+
fromPalletId: this.fromPalletIdInput.value,
|
|
524
|
+
toPalletId
|
|
525
|
+
}
|
|
512
526
|
})
|
|
513
527
|
this.dispatchEvent(
|
|
514
528
|
new CustomEvent('completed', {
|
|
@@ -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 {
|
|
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(${
|
|
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(${
|
|
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.
|
|
447
|
-
|
|
448
|
-
mutation
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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.
|
|
473
|
-
|
|
474
|
-
mutation {
|
|
475
|
-
undoRepalletizing(
|
|
476
|
-
worksheetDetailName
|
|
477
|
-
fromPalletId:
|
|
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
|
|
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(${
|
|
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(${
|
|
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.
|
|
242
|
-
|
|
243
|
-
mutation
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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(
|
|
@@ -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]
|