@things-factory/operato-wms 4.3.428 → 4.3.429
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.
|
@@ -239,13 +239,13 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
239
239
|
gutterName: 'button',
|
|
240
240
|
icon: 'close',
|
|
241
241
|
handlers: {
|
|
242
|
-
click: (columns, data, column, record, rowIndex) => {
|
|
242
|
+
click: async (columns, data, column, record, rowIndex) => {
|
|
243
243
|
if (this.shippingData.records.length > 0 && record.name) {
|
|
244
244
|
const newData = data.records.filter((_, idx) => idx !== rowIndex)
|
|
245
|
-
this.shippingData = { ...this.shippingData, records: newData }
|
|
246
245
|
this._removePackages.push(record.name)
|
|
246
|
+
await this._updateManifestDetails()
|
|
247
|
+
this.shippingData = { ...this.shippingData, records: newData }
|
|
247
248
|
this.scannedNo -= 1
|
|
248
|
-
this._updateManifestDetails()
|
|
249
249
|
this.shippingGrist.dirtyData.records = newData
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -409,6 +409,8 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
409
409
|
return
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
+
const trackingNoAdded = await this._addTrackingNo()
|
|
413
|
+
|
|
412
414
|
manifestItems.push({
|
|
413
415
|
...orderPackage,
|
|
414
416
|
bizplaceName: orderPackage.bizplace.name,
|
|
@@ -416,10 +418,10 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
416
418
|
orderNo: orderPackage.releaseGood.refNo
|
|
417
419
|
})
|
|
418
420
|
this.shippingData = { records: manifestItems }
|
|
419
|
-
|
|
421
|
+
|
|
422
|
+
if (trackingNoAdded) {
|
|
420
423
|
this.scannedNo += 1
|
|
421
424
|
}
|
|
422
|
-
this._addTrackingNo()
|
|
423
425
|
|
|
424
426
|
this._playSound()
|
|
425
427
|
} else {
|
|
@@ -459,12 +461,16 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
459
461
|
if (!response.errors) {
|
|
460
462
|
this.trackingNoInput.value = ''
|
|
461
463
|
this._focusOnTrackingNoInput()
|
|
464
|
+
return true
|
|
462
465
|
} else {
|
|
463
466
|
let errorMessage = response.errors[0].message
|
|
467
|
+
|
|
464
468
|
if (errorMessage.includes('amp;')) {
|
|
465
469
|
response.errors[0].message = errorMessage.replace('amp;', '')
|
|
466
470
|
this._showToast({ message: response.errors[0].message })
|
|
467
471
|
}
|
|
472
|
+
if (errorMessage.includes('manifest has been dispatch')) this._playSound('error')
|
|
473
|
+
throw new Error(i18next.t('error.this_manifest_has_been_dispatch'))
|
|
468
474
|
}
|
|
469
475
|
}
|
|
470
476
|
|
|
@@ -548,7 +554,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
548
554
|
}
|
|
549
555
|
|
|
550
556
|
async _updateManifestDetails() {
|
|
551
|
-
if (
|
|
557
|
+
if (this._removePackages?.length == 0) {
|
|
552
558
|
return
|
|
553
559
|
}
|
|
554
560
|
|
|
@@ -579,11 +585,18 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
579
585
|
}
|
|
580
586
|
})
|
|
581
587
|
|
|
588
|
+
let errorMessage = response?.errors?.[0]?.message ? response.errors[0].message : ''
|
|
582
589
|
if (!response.errors) {
|
|
583
590
|
this._showToast({ message: i18next.t('text.tracking_no_deleted') })
|
|
584
591
|
}
|
|
592
|
+
|
|
593
|
+
if (errorMessage?.includes('manifest has been dispatch')) {
|
|
594
|
+
this._playSound('error')
|
|
595
|
+
throw new Error(i18next.t('error.this_manifest_has_been_dispatch'))
|
|
596
|
+
}
|
|
585
597
|
} catch (e) {
|
|
586
598
|
this._showToast(e)
|
|
599
|
+
throw e
|
|
587
600
|
}
|
|
588
601
|
}
|
|
589
602
|
|
|
@@ -658,19 +671,23 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
658
671
|
variables: { patches: records, manifestId: this.selectedManifest.id }
|
|
659
672
|
})
|
|
660
673
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
674
|
+
if (!response.errors) {
|
|
675
|
+
let updatedRecords = response.data.submitTrackingNos.map(itm => {
|
|
676
|
+
return {
|
|
677
|
+
...itm,
|
|
678
|
+
bizplaceName: itm.bizplace.name,
|
|
679
|
+
refNo: itm.releaseGood.refNo
|
|
680
|
+
}
|
|
681
|
+
})
|
|
682
|
+
|
|
683
|
+
this.shippingData = {
|
|
684
|
+
records: [...this.shippingData.records, ...updatedRecords]
|
|
666
685
|
}
|
|
667
|
-
})
|
|
668
686
|
|
|
669
|
-
|
|
670
|
-
|
|
687
|
+
this.scannedNo = this.shippingData.records.length
|
|
688
|
+
} else {
|
|
689
|
+
throw new Error(i18next.t('error.this_manifest_has_been_dispatch'))
|
|
671
690
|
}
|
|
672
|
-
|
|
673
|
-
this.scannedNo = this.shippingData.records.length
|
|
674
691
|
}
|
|
675
692
|
|
|
676
693
|
history.back()
|
|
@@ -681,6 +698,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
681
698
|
} catch (e) {
|
|
682
699
|
this._showToast(e)
|
|
683
700
|
history.back()
|
|
701
|
+
throw e
|
|
684
702
|
}
|
|
685
703
|
}
|
|
686
704
|
|
|
@@ -3,31 +3,17 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import './dispatcher-verification-popup'
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
|
-
import {
|
|
7
|
-
css,
|
|
8
|
-
html
|
|
9
|
-
} from 'lit-element'
|
|
6
|
+
import { css, html } from 'lit-element'
|
|
10
7
|
|
|
11
8
|
import { GhostPrint } from '@operato/ghost-print'
|
|
12
9
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
13
|
-
import {
|
|
14
|
-
i18next,
|
|
15
|
-
localize
|
|
16
|
-
} from '@things-factory/i18n-base'
|
|
10
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
17
11
|
import { openPopup } from '@things-factory/layout-base'
|
|
18
|
-
import {
|
|
19
|
-
client,
|
|
20
|
-
CustomAlert,
|
|
21
|
-
navigate,
|
|
22
|
-
PageView
|
|
23
|
-
} from '@things-factory/shell'
|
|
12
|
+
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
24
13
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
25
14
|
import { isMobileDevice } from '@things-factory/utils'
|
|
26
15
|
|
|
27
|
-
import {
|
|
28
|
-
MANIFEST_STATUS,
|
|
29
|
-
ORDER_STATUS
|
|
30
|
-
} from '../constants'
|
|
16
|
+
import { MANIFEST_STATUS, ORDER_STATUS } from '../constants'
|
|
31
17
|
|
|
32
18
|
class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
33
19
|
static get styles() {
|
|
@@ -97,6 +83,12 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
|
97
83
|
padding-bottom: 0px;
|
|
98
84
|
}
|
|
99
85
|
|
|
86
|
+
.refresh-btn {
|
|
87
|
+
font-size: 26px !important;
|
|
88
|
+
float: right !important;
|
|
89
|
+
margin-right: 10px !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
100
92
|
[hidden] {
|
|
101
93
|
display: none;
|
|
102
94
|
}
|
|
@@ -239,9 +231,13 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
|
239
231
|
<div class="grist">
|
|
240
232
|
<h2>
|
|
241
233
|
<mwc-icon>list_alt</mwc-icon>${i18next.t('title.manifest_items')}
|
|
242
|
-
${
|
|
234
|
+
${
|
|
235
|
+
this._showReset
|
|
236
|
+
? html`<mwc-icon class="refresh-btn" @click=${e => this.dataGrist.fetch()}>sync</mwc-icon>`
|
|
237
|
+
: ''
|
|
238
|
+
}
|
|
243
239
|
</h2>
|
|
244
|
-
|
|
240
|
+
|
|
245
241
|
<data-grist
|
|
246
242
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
247
243
|
.config=${this.shippingGristConfig}
|
|
@@ -493,6 +489,7 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
|
493
489
|
|
|
494
490
|
async _updateManifestDetails() {
|
|
495
491
|
if ((!this._selectedStatus || this._selectedStatus == this._status) && this._removePackages?.length == 0) {
|
|
492
|
+
this._showToast({ message: i18next.t('text.manifest_has_been_updated') })
|
|
496
493
|
return
|
|
497
494
|
}
|
|
498
495
|
const response = await client.mutate({
|
|
@@ -5,35 +5,20 @@ import './serial-number-popup'
|
|
|
5
5
|
import './order-remark-popup'
|
|
6
6
|
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
|
-
import {
|
|
9
|
-
css,
|
|
10
|
-
html
|
|
11
|
-
} from 'lit-element'
|
|
8
|
+
import { css, html } from 'lit-element'
|
|
12
9
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
13
10
|
|
|
14
11
|
import { GhostPrint } from '@operato/ghost-print'
|
|
15
12
|
import { sleep } from '@operato/utils'
|
|
16
13
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
17
|
-
import {
|
|
18
|
-
i18next,
|
|
19
|
-
localize
|
|
20
|
-
} from '@things-factory/i18n-base'
|
|
14
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
21
15
|
import { openPopup } from '@things-factory/layout-base'
|
|
22
|
-
import {
|
|
23
|
-
client,
|
|
24
|
-
CustomAlert,
|
|
25
|
-
PageView,
|
|
26
|
-
store
|
|
27
|
-
} from '@things-factory/shell'
|
|
16
|
+
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
28
17
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
29
18
|
import { isMobileDevice } from '@things-factory/utils'
|
|
30
19
|
|
|
31
20
|
import { fetchSettingRule } from '../../fetch-setting-value'
|
|
32
|
-
import {
|
|
33
|
-
ORDER_SOURCES,
|
|
34
|
-
PLATFORM,
|
|
35
|
-
WORKSHEET_STATUS
|
|
36
|
-
} from '../constants'
|
|
21
|
+
import { ORDER_SOURCES, PLATFORM, WORKSHEET_STATUS } from '../constants'
|
|
37
22
|
|
|
38
23
|
class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
39
24
|
static get properties() {
|
|
@@ -65,7 +50,8 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
65
50
|
_scanning: Boolean,
|
|
66
51
|
_isRequireSerialNumberScanningOutbound: Boolean,
|
|
67
52
|
_isBatchPicking: Boolean,
|
|
68
|
-
_isLmdOption: Boolean
|
|
53
|
+
_isLmdOption: Boolean,
|
|
54
|
+
_awbAttempts: Number
|
|
69
55
|
}
|
|
70
56
|
}
|
|
71
57
|
|
|
@@ -136,13 +122,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
136
122
|
}
|
|
137
123
|
|
|
138
124
|
if (this.releaseGoodNo && this.source == 'SELLERCRAFT' && this.platform == 'operato' && this.completed) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})
|
|
145
|
-
}
|
|
125
|
+
actions.push({
|
|
126
|
+
title: i18next.t('button.print_airway_bill'),
|
|
127
|
+
action: this.printSellercraftDocument.bind(this, 'awb'),
|
|
128
|
+
...CommonButtonStyles.label
|
|
129
|
+
})
|
|
146
130
|
|
|
147
131
|
actions.push({
|
|
148
132
|
title: i18next.t('button.print_invoice'),
|
|
@@ -155,13 +139,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
155
139
|
}
|
|
156
140
|
|
|
157
141
|
if (this.releaseGoodNo && this.source == 'POWRUP' && this.platform == 'operato' && this.completed) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
})
|
|
164
|
-
}
|
|
142
|
+
actions.push({
|
|
143
|
+
title: i18next.t('button.print_airway_bill'),
|
|
144
|
+
action: this.printPowrupDocument.bind(this, 'awb'),
|
|
145
|
+
...CommonButtonStyles.label
|
|
146
|
+
})
|
|
165
147
|
|
|
166
148
|
actions.push({
|
|
167
149
|
title: i18next.t('button.print_invoice'),
|
|
@@ -203,13 +185,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
203
185
|
this.platform == 'operato' &&
|
|
204
186
|
this.completed
|
|
205
187
|
) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
})
|
|
212
|
-
}
|
|
188
|
+
actions.push({
|
|
189
|
+
title: i18next.t('button.print_airway_bill'),
|
|
190
|
+
action: this.printB2cDocument.bind(this, 'awb'),
|
|
191
|
+
...CommonButtonStyles.label
|
|
192
|
+
})
|
|
213
193
|
|
|
214
194
|
if (this.invoice) {
|
|
215
195
|
actions.push({
|
|
@@ -376,6 +356,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
376
356
|
this._isRequireSerialNumberScanningOutbound = false
|
|
377
357
|
this._isBatchPicking = false
|
|
378
358
|
this._isLmdOption = false
|
|
359
|
+
this._awbAttempts = 0
|
|
379
360
|
}
|
|
380
361
|
|
|
381
362
|
updated(changedProps) {
|
|
@@ -705,6 +686,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
705
686
|
throw new Error('Unable to find order id, please rescan your order.')
|
|
706
687
|
}
|
|
707
688
|
|
|
689
|
+
// Increment the attempt count
|
|
690
|
+
if (type === 'awb') {
|
|
691
|
+
this._awbAttempts++
|
|
692
|
+
}
|
|
693
|
+
|
|
708
694
|
// get sellercraft document fetcher function
|
|
709
695
|
let fetchOrder = async id => {
|
|
710
696
|
const response = await client.mutate({
|
|
@@ -757,36 +743,65 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
757
743
|
// print PDF document
|
|
758
744
|
this.callPrintDialog(convertedPdfUrl)
|
|
759
745
|
} catch (error) {
|
|
760
|
-
this.
|
|
746
|
+
if (this._awbAttempts < 4) {
|
|
747
|
+
this.showToast({
|
|
748
|
+
message: 'Oops! The AWB is not ready yet. Please retry by clicking the Print Airway bill button.'
|
|
749
|
+
})
|
|
750
|
+
} else {
|
|
751
|
+
this.showToast({
|
|
752
|
+
message:
|
|
753
|
+
'It appears that we are unable to retrieve the AWB from the platform. Please reach out to support for assistance.'
|
|
754
|
+
})
|
|
755
|
+
}
|
|
761
756
|
}
|
|
762
757
|
}
|
|
763
758
|
|
|
764
759
|
async printB2cDocument(type) {
|
|
765
|
-
|
|
760
|
+
try {
|
|
761
|
+
let convertedPdfUrl = ''
|
|
766
762
|
|
|
767
|
-
|
|
768
|
-
|
|
763
|
+
// Increment the attempt count for AWB
|
|
764
|
+
if (type === 'awb') {
|
|
765
|
+
if (!this._awbAttempts) this._awbAttempts = 0
|
|
766
|
+
this._awbAttempts++
|
|
767
|
+
}
|
|
769
768
|
|
|
770
|
-
if (
|
|
771
|
-
let
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
769
|
+
if (type == 'invoice') {
|
|
770
|
+
let invoice = this.invoice
|
|
771
|
+
|
|
772
|
+
if (this.isValidHttpUrl(invoice)) {
|
|
773
|
+
let url = new URL(window.location)
|
|
774
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${invoice}`
|
|
775
|
+
} else {
|
|
776
|
+
convertedPdfUrl = `${location.origin}/attachment/${invoice}`
|
|
777
|
+
}
|
|
778
|
+
} else if (type == 'awb') {
|
|
779
|
+
let airwayBill = this.airwayBill
|
|
780
|
+
|
|
781
|
+
if (airwayBill.includes('partner.shopeemobile.com')) {
|
|
782
|
+
convertedPdfUrl = `/pdf/merge?urls=${airwayBill}`
|
|
783
|
+
} else if (this.isValidHttpUrl(airwayBill)) {
|
|
784
|
+
let url = new URL(window.location)
|
|
785
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${airwayBill}`
|
|
786
|
+
} else {
|
|
787
|
+
convertedPdfUrl = `${location.origin}/attachment/${airwayBill}`
|
|
788
|
+
}
|
|
775
789
|
}
|
|
776
|
-
} else if (type == 'awb') {
|
|
777
|
-
let airwayBill = this.airwayBill
|
|
778
790
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
791
|
+
this.callPrintDialog(convertedPdfUrl)
|
|
792
|
+
} catch (error) {
|
|
793
|
+
// Error handling based on AWB attempts
|
|
794
|
+
if (this._awbAttempts < 4) {
|
|
795
|
+
this.showToast({
|
|
796
|
+
message: 'Oops! The AWB is not ready yet. Please retry by clicking the Print Airway bill button.'
|
|
797
|
+
})
|
|
784
798
|
} else {
|
|
785
|
-
|
|
799
|
+
this.showToast({
|
|
800
|
+
message:
|
|
801
|
+
'It appears that we are unable to retrieve the AWB from the platform. Please reach out to support for assistance.'
|
|
802
|
+
})
|
|
786
803
|
}
|
|
787
804
|
}
|
|
788
|
-
|
|
789
|
-
this.callPrintDialog(convertedPdfUrl)
|
|
790
805
|
}
|
|
791
806
|
|
|
792
807
|
async printPowrupDocument(type) {
|
|
@@ -795,6 +810,11 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
795
810
|
throw new Error('Unable to find order id, please rescan your order.')
|
|
796
811
|
}
|
|
797
812
|
|
|
813
|
+
// Increment the attempt count
|
|
814
|
+
if (type === 'awb') {
|
|
815
|
+
this._awbAttempts++
|
|
816
|
+
}
|
|
817
|
+
|
|
798
818
|
// get powrup document fetcher function
|
|
799
819
|
let fetchOrder = async id => {
|
|
800
820
|
const response = await client.mutate({
|
|
@@ -847,7 +867,16 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
847
867
|
// print PDF document
|
|
848
868
|
this.callPrintDialog(convertedPdfUrl)
|
|
849
869
|
} catch (error) {
|
|
850
|
-
this.
|
|
870
|
+
if (this._awbAttempts < 4) {
|
|
871
|
+
this.showToast({
|
|
872
|
+
message: 'Oops! The AWB is not ready yet. Please retry by clicking the Print Airway bill button.'
|
|
873
|
+
})
|
|
874
|
+
} else {
|
|
875
|
+
this.showToast({
|
|
876
|
+
message:
|
|
877
|
+
'It appears that we are unable to retrieve the AWB from the platform. Please reach out to support for assistance.'
|
|
878
|
+
})
|
|
879
|
+
}
|
|
851
880
|
}
|
|
852
881
|
}
|
|
853
882
|
|
|
@@ -891,28 +920,46 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
891
920
|
}
|
|
892
921
|
|
|
893
922
|
async printAirwayBill() {
|
|
894
|
-
|
|
923
|
+
try {
|
|
924
|
+
// Initialize or increment the AWB attempts
|
|
925
|
+
if (!this._awbAttempts) this._awbAttempts = 0
|
|
926
|
+
this._awbAttempts++
|
|
895
927
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
orderDocUrls
|
|
928
|
+
var orderDocInfo = await this.getOrderDocument(this.refNo, 'shippingLabel')
|
|
929
|
+
|
|
930
|
+
if (orderDocInfo?.length === 0) {
|
|
931
|
+
throw new Error('Document not available')
|
|
932
|
+
} else {
|
|
933
|
+
let content
|
|
934
|
+
if (this.platform == 'shopee' && !orderDocInfo[0]?.isShopeeV2) {
|
|
935
|
+
const orderDocUrls = orderDocInfo.map(item => item.airwayBill)
|
|
936
|
+
for (var i = 0; i < orderDocUrls.length; i++) {
|
|
937
|
+
orderDocUrls[i] = 'urls=' + orderDocUrls[i]
|
|
938
|
+
}
|
|
939
|
+
let mergedURL = orderDocUrls.toString().replace(/,/g, '&')
|
|
940
|
+
content = `/pdf/merge?${mergedURL}`
|
|
904
941
|
}
|
|
905
|
-
|
|
906
|
-
content =
|
|
942
|
+
// else if (this.platform == 'lazada') {
|
|
943
|
+
// content = atob(orderDocInfo[0].file)
|
|
944
|
+
// }
|
|
945
|
+
else {
|
|
946
|
+
let url = new URL(window.location)
|
|
947
|
+
content = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
948
|
+
}
|
|
949
|
+
this.callPrintDialog(content)
|
|
907
950
|
}
|
|
908
|
-
|
|
909
|
-
//
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
951
|
+
} catch (error) {
|
|
952
|
+
// Error handling based on AWB attempts
|
|
953
|
+
if (this._awbAttempts < 4) {
|
|
954
|
+
this.showToast({
|
|
955
|
+
message: 'Oops! The AWB is not ready yet. Please retry by clicking the Print Airway bill button.'
|
|
956
|
+
})
|
|
957
|
+
} else {
|
|
958
|
+
this.showToast({
|
|
959
|
+
message:
|
|
960
|
+
'It appears that we are unable to retrieve the AWB from the platform. Please reach out to support for assistance.'
|
|
961
|
+
})
|
|
914
962
|
}
|
|
915
|
-
this.callPrintDialog(content)
|
|
916
963
|
}
|
|
917
964
|
}
|
|
918
965
|
|
|
@@ -1115,14 +1162,14 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1115
1162
|
let ids = data.id.split(',').map(id => id.trim())
|
|
1116
1163
|
let info = worksheetDetailInfos.find(wd => ids.includes(wd.id))
|
|
1117
1164
|
if (info) {
|
|
1118
|
-
if(info?.packedQty <= data.packedQty){
|
|
1165
|
+
if (info?.packedQty <= data.packedQty) {
|
|
1119
1166
|
let newPackQty = data?.packedQty + 1
|
|
1120
1167
|
return {
|
|
1121
1168
|
...data,
|
|
1122
1169
|
packingProgress: `${newPackQty} / ${data.releaseQty}`,
|
|
1123
|
-
packedQty
|
|
1124
|
-
status
|
|
1125
|
-
completed
|
|
1170
|
+
packedQty: newPackQty,
|
|
1171
|
+
status: newPackQty === data.releaseQty ? 'DONE' : 'PROCESSING',
|
|
1172
|
+
completed: newPackQty === data.releaseQty
|
|
1126
1173
|
}
|
|
1127
1174
|
} else {
|
|
1128
1175
|
}
|
|
@@ -1223,9 +1270,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1223
1270
|
if (foundOrderInventory) {
|
|
1224
1271
|
this._selectedOrderInventory = foundOrderInventory
|
|
1225
1272
|
|
|
1226
|
-
if (
|
|
1227
|
-
this._selectedOrderInventory?.packedQty === this._selectedOrderInventory?.releaseQty
|
|
1228
|
-
) {
|
|
1273
|
+
if (this._selectedOrderInventory?.packedQty === this._selectedOrderInventory?.releaseQty) {
|
|
1229
1274
|
this._selectedOrderInventory = null
|
|
1230
1275
|
throw new Error(i18next.t('text.scanned_product_status_is_done'))
|
|
1231
1276
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.429",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@things-factory/print-ui": "^4.3.381",
|
|
92
92
|
"@things-factory/product-base": "^4.3.425",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.425",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.429",
|
|
95
95
|
"@things-factory/scene-data-transform": "^4.3.381",
|
|
96
96
|
"@things-factory/scene-excel": "^4.3.381",
|
|
97
97
|
"@things-factory/scene-firebase": "^4.3.381",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@things-factory/transport-base": "^4.3.425",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.425",
|
|
110
110
|
"@things-factory/warehouse-base": "^4.3.425",
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.429"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@things-factory/builder": "^4.3.381",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "7ef71dcf92100a2e6ac9e472850b6d0a80aab268"
|
|
121
121
|
}
|