@things-factory/operato-wms 4.3.251 → 4.3.253
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.
|
@@ -109,7 +109,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
109
109
|
})
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if (this.releaseGoodNo && this.platform == 'operato' && this.completed) {
|
|
112
|
+
if (this.releaseGoodNo && this.source != 'POWRUP' && this.platform == 'operato' && this.completed) {
|
|
113
113
|
if (this.airwayBill) {
|
|
114
114
|
actions.push({
|
|
115
115
|
title: i18next.t('button.print_airway_bill'),
|
|
@@ -125,6 +125,22 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
125
125
|
})
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
if (this.releaseGoodNo && this.source == 'POWRUP' && this.platform == 'operato' && this.completed) {
|
|
129
|
+
if (this.airwayBill) {
|
|
130
|
+
actions.push({
|
|
131
|
+
title: i18next.t('button.print_airway_bill'),
|
|
132
|
+
action: this.printPowrupDocument.bind(this, 'awb'),
|
|
133
|
+
...CommonButtonStyles.label
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
actions.push({
|
|
138
|
+
title: i18next.t('button.print_invoice'),
|
|
139
|
+
action: this.printPowrupDocument.bind(this, 'invoice'),
|
|
140
|
+
...CommonButtonStyles.label
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
|
|
128
144
|
if (
|
|
129
145
|
this.releaseGoodNo &&
|
|
130
146
|
(this.orderInformation?.status === 'packed' ||
|
|
@@ -436,6 +452,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
436
452
|
shippingProvider
|
|
437
453
|
marketplaceStatus
|
|
438
454
|
trackingNo
|
|
455
|
+
source
|
|
439
456
|
marketplaceOrder {
|
|
440
457
|
id
|
|
441
458
|
name
|
|
@@ -533,6 +550,7 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
533
550
|
this.airwayBill = worksheetInfo.airwayBill
|
|
534
551
|
this.invoice = worksheetInfo.invoice
|
|
535
552
|
this.refNo = worksheetInfo.refNo
|
|
553
|
+
this.source = worksheetInfo.source
|
|
536
554
|
this.platform = worksheetInfo.platform
|
|
537
555
|
this.shippingProvider = worksheetInfo.shippingProvider
|
|
538
556
|
this.orderInformation = worksheetInfo.marketplaceOrder
|
|
@@ -686,6 +704,68 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
686
704
|
}
|
|
687
705
|
}
|
|
688
706
|
|
|
707
|
+
async printPowrupDocument(type) {
|
|
708
|
+
try {
|
|
709
|
+
if (this.releaseGoodId == undefined) {
|
|
710
|
+
throw new Error('Unable to find order id, please rescan your order.')
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
// get powrup document fetcher function
|
|
714
|
+
let fetchOrder = async id => {
|
|
715
|
+
const response = await client.mutate({
|
|
716
|
+
mutation: gql`
|
|
717
|
+
mutation fetchPowrupDocument($releaseGoodId: String!) {
|
|
718
|
+
fetchPowrupDocument(releaseGoodId: $releaseGoodId) {
|
|
719
|
+
airwayBill
|
|
720
|
+
invoice
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
`,
|
|
724
|
+
variables: { releaseGoodId: id }
|
|
725
|
+
})
|
|
726
|
+
if (!response.errors) {
|
|
727
|
+
this.invoice = document.invoice
|
|
728
|
+
this.airwayBill = document.airwayBill
|
|
729
|
+
|
|
730
|
+
return {
|
|
731
|
+
invoice: response.data.fetchPowrupDocument.invoice,
|
|
732
|
+
airwayBill: response.data.fetchPowrupDocument.airwayBill
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
let convertedPdfUrl = ''
|
|
738
|
+
if (type == 'invoice') {
|
|
739
|
+
let invoice = this.invoice
|
|
740
|
+
// fetch and set variable if invoice not found
|
|
741
|
+
if (!invoice || invoice.trim() == '') {
|
|
742
|
+
let document = await fetchOrder(this.releaseGoodId)
|
|
743
|
+
invoice = document.invoice
|
|
744
|
+
}
|
|
745
|
+
let url = new URL(window.location)
|
|
746
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${invoice}`
|
|
747
|
+
} else if (type == 'awb') {
|
|
748
|
+
let airwayBill = this.airwayBill
|
|
749
|
+
// fetch and set variable if awb not found
|
|
750
|
+
if (!airwayBill || airwayBill.trim() == '') {
|
|
751
|
+
let document = await fetchOrder(this.releaseGoodId)
|
|
752
|
+
airwayBill = document.airwayBill
|
|
753
|
+
}
|
|
754
|
+
if (airwayBill.includes('partner.shopeemobile.com')) {
|
|
755
|
+
convertedPdfUrl = `/pdf/merge?urls=${airwayBill}`
|
|
756
|
+
} else {
|
|
757
|
+
let url = new URL(window.location)
|
|
758
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${airwayBill}`
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// print PDF document
|
|
763
|
+
this.callPrintDialog(convertedPdfUrl)
|
|
764
|
+
} catch (error) {
|
|
765
|
+
this.showToast({ message: 'Waiting for AWB from marketplace. Please retry in a while.' })
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
689
769
|
async printInvoice() {
|
|
690
770
|
var orderDocInfo = await this.getOrderDocument(this.refNo, 'invoice')
|
|
691
771
|
|
|
@@ -1116,9 +1196,19 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1116
1196
|
await this.printAirwayBill()
|
|
1117
1197
|
}
|
|
1118
1198
|
|
|
1119
|
-
if (
|
|
1199
|
+
if (
|
|
1200
|
+
this.releaseGoodNo &&
|
|
1201
|
+
this.platform == 'operato' &&
|
|
1202
|
+
this.source != 'POWRUP' &&
|
|
1203
|
+
this.airwayBill &&
|
|
1204
|
+
this.completed
|
|
1205
|
+
) {
|
|
1120
1206
|
await this.printSellercraftDocument('awb')
|
|
1121
1207
|
}
|
|
1208
|
+
|
|
1209
|
+
if (this.releaseGoodNo && this.source == 'POWRUP' && this.airwayBill && this.completed) {
|
|
1210
|
+
await this.printPowrupDocument('awb')
|
|
1211
|
+
}
|
|
1122
1212
|
}
|
|
1123
1213
|
|
|
1124
1214
|
async openSerialNumberPopup() {
|
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.253",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -62,60 +62,60 @@
|
|
|
62
62
|
"@operato/scene-tab": "^0.1.8",
|
|
63
63
|
"@operato/scene-table": "^0.1.8",
|
|
64
64
|
"@operato/scene-wheel-sorter": "^0.1.8",
|
|
65
|
-
"@things-factory/apptool-ui": "^4.3.
|
|
66
|
-
"@things-factory/attachment-ui": "^4.3.
|
|
67
|
-
"@things-factory/auth-ui": "^4.3.
|
|
68
|
-
"@things-factory/barcode-ui": "^4.3.
|
|
69
|
-
"@things-factory/biz-ui": "^4.3.
|
|
70
|
-
"@things-factory/board-service": "^4.3.
|
|
71
|
-
"@things-factory/board-ui": "^4.3.
|
|
72
|
-
"@things-factory/code-ui": "^4.3.
|
|
73
|
-
"@things-factory/context-ui": "^4.3.
|
|
74
|
-
"@things-factory/export-ui": "^4.3.
|
|
75
|
-
"@things-factory/export-ui-csv": "^4.3.
|
|
76
|
-
"@things-factory/export-ui-excel": "^4.3.
|
|
77
|
-
"@things-factory/fav-base": "^4.3.
|
|
78
|
-
"@things-factory/form-ui": "^4.3.
|
|
79
|
-
"@things-factory/geography": "^4.3.
|
|
80
|
-
"@things-factory/grist-ui": "^4.3.
|
|
81
|
-
"@things-factory/help": "^4.3.
|
|
82
|
-
"@things-factory/i18n-base": "^4.3.
|
|
83
|
-
"@things-factory/id-rule-base": "^4.3.
|
|
84
|
-
"@things-factory/import-ui": "^4.3.
|
|
85
|
-
"@things-factory/import-ui-excel": "^4.3.
|
|
86
|
-
"@things-factory/menu-ui": "^4.3.
|
|
87
|
-
"@things-factory/more-ui": "^4.3.
|
|
88
|
-
"@things-factory/notification": "^4.3.
|
|
89
|
-
"@things-factory/pdf": "^4.3.
|
|
90
|
-
"@things-factory/print-proxy-service": "^4.3.
|
|
91
|
-
"@things-factory/print-ui": "^4.3.
|
|
92
|
-
"@things-factory/product-base": "^4.3.
|
|
93
|
-
"@things-factory/resource-ui": "^4.3.
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
95
|
-
"@things-factory/scene-data-transform": "^4.3.
|
|
96
|
-
"@things-factory/scene-excel": "^4.3.
|
|
97
|
-
"@things-factory/scene-firebase": "^4.3.
|
|
98
|
-
"@things-factory/scene-form": "^4.3.
|
|
99
|
-
"@things-factory/scene-google-map": "^4.3.
|
|
100
|
-
"@things-factory/scene-graphql": "^4.3.
|
|
101
|
-
"@things-factory/scene-label": "^4.3.
|
|
102
|
-
"@things-factory/scene-marker": "^4.3.
|
|
103
|
-
"@things-factory/scene-mqtt": "^4.3.
|
|
104
|
-
"@things-factory/scene-restful": "^4.3.
|
|
105
|
-
"@things-factory/scene-visualizer": "^4.3.
|
|
106
|
-
"@things-factory/setting-ui": "^4.3.
|
|
107
|
-
"@things-factory/system-ui": "^4.3.
|
|
108
|
-
"@things-factory/transport-base": "^4.3.
|
|
109
|
-
"@things-factory/tutorial-ui": "^4.3.
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
65
|
+
"@things-factory/apptool-ui": "^4.3.253",
|
|
66
|
+
"@things-factory/attachment-ui": "^4.3.253",
|
|
67
|
+
"@things-factory/auth-ui": "^4.3.253",
|
|
68
|
+
"@things-factory/barcode-ui": "^4.3.253",
|
|
69
|
+
"@things-factory/biz-ui": "^4.3.253",
|
|
70
|
+
"@things-factory/board-service": "^4.3.253",
|
|
71
|
+
"@things-factory/board-ui": "^4.3.253",
|
|
72
|
+
"@things-factory/code-ui": "^4.3.253",
|
|
73
|
+
"@things-factory/context-ui": "^4.3.253",
|
|
74
|
+
"@things-factory/export-ui": "^4.3.253",
|
|
75
|
+
"@things-factory/export-ui-csv": "^4.3.253",
|
|
76
|
+
"@things-factory/export-ui-excel": "^4.3.253",
|
|
77
|
+
"@things-factory/fav-base": "^4.3.253",
|
|
78
|
+
"@things-factory/form-ui": "^4.3.253",
|
|
79
|
+
"@things-factory/geography": "^4.3.253",
|
|
80
|
+
"@things-factory/grist-ui": "^4.3.253",
|
|
81
|
+
"@things-factory/help": "^4.3.253",
|
|
82
|
+
"@things-factory/i18n-base": "^4.3.253",
|
|
83
|
+
"@things-factory/id-rule-base": "^4.3.253",
|
|
84
|
+
"@things-factory/import-ui": "^4.3.253",
|
|
85
|
+
"@things-factory/import-ui-excel": "^4.3.253",
|
|
86
|
+
"@things-factory/menu-ui": "^4.3.253",
|
|
87
|
+
"@things-factory/more-ui": "^4.3.253",
|
|
88
|
+
"@things-factory/notification": "^4.3.253",
|
|
89
|
+
"@things-factory/pdf": "^4.3.253",
|
|
90
|
+
"@things-factory/print-proxy-service": "^4.3.253",
|
|
91
|
+
"@things-factory/print-ui": "^4.3.253",
|
|
92
|
+
"@things-factory/product-base": "^4.3.253",
|
|
93
|
+
"@things-factory/resource-ui": "^4.3.253",
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.253",
|
|
95
|
+
"@things-factory/scene-data-transform": "^4.3.253",
|
|
96
|
+
"@things-factory/scene-excel": "^4.3.253",
|
|
97
|
+
"@things-factory/scene-firebase": "^4.3.253",
|
|
98
|
+
"@things-factory/scene-form": "^4.3.253",
|
|
99
|
+
"@things-factory/scene-google-map": "^4.3.253",
|
|
100
|
+
"@things-factory/scene-graphql": "^4.3.253",
|
|
101
|
+
"@things-factory/scene-label": "^4.3.253",
|
|
102
|
+
"@things-factory/scene-marker": "^4.3.253",
|
|
103
|
+
"@things-factory/scene-mqtt": "^4.3.253",
|
|
104
|
+
"@things-factory/scene-restful": "^4.3.253",
|
|
105
|
+
"@things-factory/scene-visualizer": "^4.3.253",
|
|
106
|
+
"@things-factory/setting-ui": "^4.3.253",
|
|
107
|
+
"@things-factory/system-ui": "^4.3.253",
|
|
108
|
+
"@things-factory/transport-base": "^4.3.253",
|
|
109
|
+
"@things-factory/tutorial-ui": "^4.3.253",
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.253",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.253"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@things-factory/builder": "^4.3.
|
|
114
|
+
"@things-factory/builder": "^4.3.253",
|
|
115
115
|
"cypress": "^9.4.1",
|
|
116
116
|
"cypress-file-upload": "^5.0.8",
|
|
117
117
|
"cypress-localstorage-commands": "^1.6.1",
|
|
118
118
|
"eslint-plugin-cypress": "^2.12.1"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "d4bb8ac7f7f9bfe3bbe6007576881c0be36060a3"
|
|
121
121
|
}
|