@things-factory/operato-wms 4.0.29 → 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.
- package/client/fetch-setting-value.js +10 -2
- package/client/pages/bulk-operation/bulk-operation.js +33 -10
- 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/order/arrival-notice/arrival-notice-detail.js +36 -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 +3 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +7 -5
- package/client/pages/order/release-order/release-order-detail.js +28 -11
- 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 +9 -5
- package/client/pages/outbound/worksheet-batch-picking.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +2 -2
- package/client/pages/vas/abstract-execute-vas.js +4 -1
- package/client/pages/vas/execute-pure-vas.js +3 -8
- package/package.json +52 -52
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { client } from '@things-factory/shell'
|
|
2
1
|
import gql from 'graphql-tag'
|
|
3
2
|
|
|
3
|
+
import { client } from '@things-factory/shell'
|
|
4
|
+
|
|
4
5
|
export async function fetchSettingRule(setting, partnerDomainId) {
|
|
5
6
|
const response = await client.query({
|
|
6
7
|
query: gql`
|
|
@@ -15,7 +16,14 @@ export async function fetchSettingRule(setting, partnerDomainId) {
|
|
|
15
16
|
|
|
16
17
|
if (!response.errors) {
|
|
17
18
|
if (response.data.setting?.value) {
|
|
18
|
-
|
|
19
|
+
switch (response.data.setting.value.toLowerCase().trim()) {
|
|
20
|
+
case 'true':
|
|
21
|
+
return true
|
|
22
|
+
case 'false':
|
|
23
|
+
return false
|
|
24
|
+
default:
|
|
25
|
+
return response.data.setting.value.trim()
|
|
26
|
+
}
|
|
19
27
|
}
|
|
20
28
|
|
|
21
29
|
return false
|
|
@@ -2,11 +2,17 @@ import '@things-factory/biz-ui'
|
|
|
2
2
|
import './validate-gan-popup'
|
|
3
3
|
import './validate-ro-popup'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
css,
|
|
7
|
+
html
|
|
8
|
+
} from 'lit-element'
|
|
6
9
|
import XLSX from 'xlsx'
|
|
7
10
|
|
|
8
11
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
9
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
i18next,
|
|
14
|
+
localize
|
|
15
|
+
} from '@things-factory/i18n-base'
|
|
10
16
|
import { openPopup } from '@things-factory/layout-base'
|
|
11
17
|
import { PageView } from '@things-factory/shell'
|
|
12
18
|
|
|
@@ -363,12 +369,12 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
363
369
|
sku: String(raw.sku || ''),
|
|
364
370
|
batchId: String(raw.batchId || ''),
|
|
365
371
|
packingType: String(raw.packingType || ''),
|
|
366
|
-
packingSize: raw.packingSize,
|
|
372
|
+
packingSize: Number(raw.packingSize || 0),
|
|
367
373
|
uom: String(raw.uom || ''),
|
|
368
374
|
packQty: parseInt(raw.packQty || 0),
|
|
369
375
|
palletQty: parseInt(raw.palletQty || 0),
|
|
370
376
|
unitPrice: Number(raw.unitPrice || 0),
|
|
371
|
-
manufactureYear:
|
|
377
|
+
manufactureYear: Math.round(Number(raw.manufactureYear || 0)),
|
|
372
378
|
etaDate: this._getStdDateStr(etaDate)
|
|
373
379
|
}
|
|
374
380
|
})}
|
|
@@ -386,12 +392,29 @@ class BulkOperation extends localize(i18next)(PageView) {
|
|
|
386
392
|
|
|
387
393
|
_validateReleaseOrder(records) {
|
|
388
394
|
/* validate excel that user uploaded */
|
|
389
|
-
openPopup(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
+
openPopup(
|
|
396
|
+
html`
|
|
397
|
+
<validate-ro-popup
|
|
398
|
+
.records=${records.map(record => {
|
|
399
|
+
let releaseDate = new Date(String(record.releaseDate || ''))
|
|
400
|
+
|
|
401
|
+
return {
|
|
402
|
+
...record,
|
|
403
|
+
packingSize: Number(record.packingSize),
|
|
404
|
+
releaseQty: Number(record.releaseQty),
|
|
405
|
+
releaseDate: this._getStdDateStr(releaseDate)
|
|
406
|
+
}
|
|
407
|
+
})}
|
|
408
|
+
.bizplaceId=${this._roBizplaceId}
|
|
409
|
+
></validate-ro-popup>
|
|
410
|
+
`,
|
|
411
|
+
{
|
|
412
|
+
backdrop: true,
|
|
413
|
+
escapable: false,
|
|
414
|
+
size: 'large',
|
|
415
|
+
title: i18next.t('title.bulk_release_orders')
|
|
416
|
+
}
|
|
417
|
+
)
|
|
395
418
|
}
|
|
396
419
|
|
|
397
420
|
_openBizplacesSelector(source) {
|
|
@@ -2,7 +2,6 @@ import { localize, i18next } from '@things-factory/i18n-base'
|
|
|
2
2
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
3
3
|
import { LitElement, html, css } from 'lit-element'
|
|
4
4
|
import { client } from '@things-factory/shell'
|
|
5
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
6
5
|
import gql from 'graphql-tag'
|
|
7
6
|
import '@things-factory/barcode-ui'
|
|
8
7
|
|
|
@@ -150,14 +149,15 @@ class VasPalletAddPopup extends localize(i18next)(LitElement) {
|
|
|
150
149
|
|
|
151
150
|
const response = await client.query({
|
|
152
151
|
query: gql`
|
|
153
|
-
query {
|
|
154
|
-
inventoryByPallet(${
|
|
155
|
-
palletId
|
|
156
|
-
})}) {
|
|
152
|
+
query inventoryByPallet($palletId: String!) {
|
|
153
|
+
inventoryByPallet(palletId: $palletId) {
|
|
157
154
|
id
|
|
158
155
|
}
|
|
159
156
|
}
|
|
160
|
-
|
|
157
|
+
`,
|
|
158
|
+
variables: {
|
|
159
|
+
palletId
|
|
160
|
+
}
|
|
161
161
|
})
|
|
162
162
|
|
|
163
163
|
if (!response.errors) {
|
|
@@ -177,14 +177,15 @@ class VasPalletAddPopup extends localize(i18next)(LitElement) {
|
|
|
177
177
|
|
|
178
178
|
const response = await client.query({
|
|
179
179
|
query: gql`
|
|
180
|
-
query {
|
|
181
|
-
locationByName(${
|
|
182
|
-
name: locationName
|
|
183
|
-
})}) {
|
|
180
|
+
query locationByName($name: String!) {
|
|
181
|
+
locationByName(name: $name) {
|
|
184
182
|
id
|
|
185
183
|
}
|
|
186
184
|
}
|
|
187
|
-
|
|
185
|
+
`,
|
|
186
|
+
variables: {
|
|
187
|
+
name: locationName
|
|
188
|
+
}
|
|
188
189
|
})
|
|
189
190
|
|
|
190
191
|
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 { openPopup } from '@things-factory/layout-base'
|
|
6
6
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
7
|
-
import {
|
|
7
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
9
|
import { css, html } from 'lit-element'
|
|
10
10
|
import { ORDER_TYPES, ORDER_VAS_STATUS, WORKSHEET_STATUS } from '../../constants'
|
|
@@ -351,7 +351,7 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
351
351
|
if (this.record.status === ORDER_VAS_STATUS.PENDING.value) return
|
|
352
352
|
const queryName = 'products'
|
|
353
353
|
const basicArgs = {
|
|
354
|
-
filters: [{ name: 'id', operator: 'noteq', value: this.targetInfo.target.productId }]
|
|
354
|
+
filters: [{ name: 'id', operator: 'noteq', value: this.targetInfo[0].target.productId }]
|
|
355
355
|
}
|
|
356
356
|
const confirmCallback = selected => {
|
|
357
357
|
this._selectedProduct = selected
|
|
@@ -396,15 +396,19 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
396
396
|
async _checkValidInventory() {
|
|
397
397
|
const response = await client.query({
|
|
398
398
|
query: gql`
|
|
399
|
-
query {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
unitUomValue: this.targetInfo.uomValue / this.targetInfo.qty
|
|
405
|
-
})})
|
|
399
|
+
query checkRelabelable($batchId: String!, $productId: String!, $packingType: String!, $unitUomValue: Float!){
|
|
400
|
+
checkRelabelable(batchId: $batchId, productId: $productId, packingType: $packingType, unitUomValue: $unitUomValue){
|
|
401
|
+
|
|
402
|
+
}
|
|
403
|
+
}
|
|
406
404
|
}
|
|
407
|
-
|
|
405
|
+
`,
|
|
406
|
+
variables: {
|
|
407
|
+
batchId: this._selectedBatchId || this.targetInfo.target.batchId,
|
|
408
|
+
productId: this._selectedProduct?.id || this.targetInfo.target.productId,
|
|
409
|
+
packingType: this.targetInfo.packingType,
|
|
410
|
+
unitUomValue: this.targetInfo.uomValue / this.targetInfo.qty
|
|
411
|
+
}
|
|
408
412
|
})
|
|
409
413
|
|
|
410
414
|
if (!response.errors) {
|
|
@@ -420,9 +424,9 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
420
424
|
category: 'LABEL',
|
|
421
425
|
refBy: `VAS-ORDER-RELABEL-${String(Date.now())}`
|
|
422
426
|
}
|
|
423
|
-
const response = await client.
|
|
424
|
-
|
|
425
|
-
mutation($attachment: NewAttachment!) {
|
|
427
|
+
const response = await client.mutate({
|
|
428
|
+
mutation: gql`
|
|
429
|
+
mutation ($attachment: NewAttachment!) {
|
|
426
430
|
createAttachment(attachment: $attachment) {
|
|
427
431
|
id
|
|
428
432
|
name
|
|
@@ -455,16 +459,18 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
455
459
|
async deleteNewLabel(record) {
|
|
456
460
|
try {
|
|
457
461
|
const operationGuide = JSON.parse(record.operationGuide)
|
|
458
|
-
const response = await client.
|
|
459
|
-
|
|
460
|
-
mutation {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
name
|
|
462
|
+
const response = await client.mutate({
|
|
463
|
+
mutation: gql`
|
|
464
|
+
mutation deleteAttachment($id: String!) {
|
|
465
|
+
deleteAttachment(id: $id){
|
|
466
|
+
name
|
|
467
|
+
}
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
|
-
|
|
470
|
+
`,
|
|
471
|
+
variables: {
|
|
472
|
+
id: operationGuide.data.newLabel.id
|
|
473
|
+
}
|
|
468
474
|
})
|
|
469
475
|
|
|
470
476
|
if (response.errors) throw response.errors[0]
|
|
@@ -485,12 +491,28 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
485
491
|
args.locationName = this.locationInput.value
|
|
486
492
|
}
|
|
487
493
|
|
|
488
|
-
await client.
|
|
489
|
-
|
|
490
|
-
mutation
|
|
491
|
-
|
|
494
|
+
await client.mutate({
|
|
495
|
+
mutation: gql`
|
|
496
|
+
mutation relabeling(
|
|
497
|
+
$worksheetDetailName: String!
|
|
498
|
+
$fromPalletId: String!
|
|
499
|
+
$toPalletId: String!
|
|
500
|
+
$locationName: String
|
|
501
|
+
) {
|
|
502
|
+
relabeling(
|
|
503
|
+
worksheetDetailName: $worksheetDetailName
|
|
504
|
+
fromPalletId: $fromPalletId
|
|
505
|
+
toPalletId: $toPalletId
|
|
506
|
+
locationName: $locationName
|
|
507
|
+
)
|
|
492
508
|
}
|
|
493
|
-
|
|
509
|
+
`,
|
|
510
|
+
variables: {
|
|
511
|
+
worksheetDetailName: this.record.name,
|
|
512
|
+
fromPalletId: this.fromPalletIdInput.value,
|
|
513
|
+
toPalletId: this.toPalletIdInput.value,
|
|
514
|
+
locationName: this.orderType === ORDER_TYPES.VAS_ORDER.value ? this.locationInput.value : ''
|
|
515
|
+
}
|
|
494
516
|
})
|
|
495
517
|
|
|
496
518
|
this.dispatchEvent(
|
|
@@ -506,15 +528,16 @@ class VasRelabel extends localize(i18next)(VasTemplate) {
|
|
|
506
528
|
|
|
507
529
|
async undoRelabel(worksheetDetailName, toPalletId) {
|
|
508
530
|
try {
|
|
509
|
-
await client.
|
|
510
|
-
|
|
511
|
-
mutation {
|
|
512
|
-
undoRelabeling($
|
|
513
|
-
worksheetDetailName,
|
|
514
|
-
toPalletId
|
|
515
|
-
})})
|
|
531
|
+
await client.mutate({
|
|
532
|
+
mutation: gql`
|
|
533
|
+
mutation undoRelabeling($worksheetDetailName: String!, $toPalletId: String!) {
|
|
534
|
+
undoRelabeling(worksheetDetailName: $worksheetDetailName, toPalletId: $toPalletId)
|
|
516
535
|
}
|
|
517
|
-
|
|
536
|
+
`,
|
|
537
|
+
variables: {
|
|
538
|
+
worksheetDetailName,
|
|
539
|
+
toPalletId
|
|
540
|
+
}
|
|
518
541
|
})
|
|
519
542
|
|
|
520
543
|
this.dispatchEvent(
|
|
@@ -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', {
|