@things-factory/operato-wms 4.3.504 → 4.3.506
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/pages/bulk-operation/validate-b2c-ro-popup.js +5 -1
- package/client/pages/manifest/create-loading-manifest.js +12 -21
- package/client/pages/manifest/existing-manifest-list.js +15 -20
- package/client/pages/manifest/generate-manifest-popup.js +9 -12
- package/client/pages/manifest/loading-manifest-detail.js +6 -1
- package/client/pages/manifest/loading-manifest-list.js +15 -17
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +10 -28
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +4 -1
- package/client/pages/outbound/picking-product.js +3 -3
- package/client/pages/outbound/worksheet-packing.js +5 -1
- package/client/pages/report/manifest-report.js +321 -325
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +7 -3
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -1
- package/package.json +5 -5
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +7 -3
- package/translations/en.json +1 -2
- package/translations/ko.json +1 -2
- package/translations/ms.json +1 -2
- package/translations/zh.json +1 -2
|
@@ -381,6 +381,10 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
|
|
|
381
381
|
variables: {
|
|
382
382
|
rawReleaseGoods: this.records.map(x => {
|
|
383
383
|
// list out all properties again to avoid additional props added by user in excel
|
|
384
|
+
|
|
385
|
+
//standardise phoneNumber format without symbols and space
|
|
386
|
+
let phone1Format = x.phone1 ? String(x.phone1).replace(/\D/g, '') : null
|
|
387
|
+
|
|
384
388
|
return {
|
|
385
389
|
refNo: x.refNo,
|
|
386
390
|
refNo2: x?.refNo2,
|
|
@@ -400,7 +404,7 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
|
|
|
400
404
|
city: x.city,
|
|
401
405
|
state: x.state,
|
|
402
406
|
country: x.country,
|
|
403
|
-
phone1:
|
|
407
|
+
phone1: phone1Format,
|
|
404
408
|
billingAddress: x.billingAddress,
|
|
405
409
|
billingCity: x.billingCity,
|
|
406
410
|
billingState: x.billingState,
|
|
@@ -5,28 +5,14 @@ import './select-manifest-popup'
|
|
|
5
5
|
import '@things-factory/import-ui/client/components/import-pop-up'
|
|
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
|
|
|
13
10
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
14
|
-
import {
|
|
15
|
-
i18next,
|
|
16
|
-
localize
|
|
17
|
-
} from '@things-factory/i18n-base'
|
|
11
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
18
12
|
import { openPopup } from '@things-factory/layout-base'
|
|
19
|
-
import {
|
|
20
|
-
client,
|
|
21
|
-
CustomAlert,
|
|
22
|
-
navigate,
|
|
23
|
-
PageView
|
|
24
|
-
} from '@things-factory/shell'
|
|
13
|
+
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
25
14
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
26
|
-
import {
|
|
27
|
-
isMobileDevice,
|
|
28
|
-
sleep
|
|
29
|
-
} from '@things-factory/utils'
|
|
15
|
+
import { isMobileDevice, sleep } from '@things-factory/utils'
|
|
30
16
|
|
|
31
17
|
import { ORDER_STATUS } from '../constants'
|
|
32
18
|
|
|
@@ -360,6 +346,7 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
360
346
|
if (orderPackage) {
|
|
361
347
|
let manifestItems = this.shippingData.records || []
|
|
362
348
|
|
|
349
|
+
// edit sini
|
|
363
350
|
if (manifestItems.some(itm => itm.trackingNo == orderPackage.trackingNo)) {
|
|
364
351
|
this._playSound('error')
|
|
365
352
|
let result = await CustomAlert({
|
|
@@ -375,7 +362,9 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
375
362
|
if (result.value) return
|
|
376
363
|
}
|
|
377
364
|
|
|
378
|
-
|
|
365
|
+
let orderPackageTransporter =
|
|
366
|
+
orderPackage.transporter?.toLowerCase() == 'ems' ? 'efmx' : orderPackage.transporter?.toLowerCase()
|
|
367
|
+
if (manifestTransport?.toLowerCase() !== orderPackageTransporter) {
|
|
379
368
|
this._popupSelectManifest(orderPackage)
|
|
380
369
|
return
|
|
381
370
|
}
|
|
@@ -415,7 +404,8 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
415
404
|
...orderPackage,
|
|
416
405
|
bizplaceName: orderPackage.bizplace.name,
|
|
417
406
|
refNo: orderPackage.releaseGood.refNo,
|
|
418
|
-
orderNo: orderPackage.releaseGood.refNo
|
|
407
|
+
orderNo: orderPackage.releaseGood.refNo,
|
|
408
|
+
transporter: orderPackage.transporter == 'EMS' ? 'EFMX' : orderPackage.transporter
|
|
419
409
|
})
|
|
420
410
|
this.shippingData = { records: manifestItems }
|
|
421
411
|
|
|
@@ -676,7 +666,8 @@ class CreateLoadingManifest extends localize(i18next)(PageView) {
|
|
|
676
666
|
return {
|
|
677
667
|
...itm,
|
|
678
668
|
bizplaceName: itm.bizplace.name,
|
|
679
|
-
refNo: itm.releaseGood.refNo
|
|
669
|
+
refNo: itm.releaseGood.refNo,
|
|
670
|
+
transporter: itm.transporter == 'EMS' ? 'EFMX' : itm.transporter
|
|
680
671
|
}
|
|
681
672
|
})
|
|
682
673
|
|
|
@@ -2,24 +2,11 @@ import '@things-factory/form-ui'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
|
-
import {
|
|
6
|
-
css,
|
|
7
|
-
html
|
|
8
|
-
} from 'lit-element'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
9
6
|
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from '@things-factory/i18n-base'
|
|
14
|
-
import {
|
|
15
|
-
client,
|
|
16
|
-
navigate,
|
|
17
|
-
PageView
|
|
18
|
-
} from '@things-factory/shell'
|
|
19
|
-
import {
|
|
20
|
-
CommonButtonStyles,
|
|
21
|
-
ScrollbarStyles
|
|
22
|
-
} from '@things-factory/styles'
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
+
import { client, navigate, PageView } from '@things-factory/shell'
|
|
9
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
23
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
24
11
|
|
|
25
12
|
class ExistingManifestList extends localize(i18next)(PageView) {
|
|
@@ -214,7 +201,9 @@ class ExistingManifestList extends localize(i18next)(PageView) {
|
|
|
214
201
|
})
|
|
215
202
|
|
|
216
203
|
if (!response.errors) {
|
|
217
|
-
let shippingProviders = response.data.manifests.items.map(itm =>
|
|
204
|
+
let shippingProviders = response.data.manifests.items.map(itm =>
|
|
205
|
+
itm.shippingProvider == 'EMS' ? 'EFMX' : itm.shippingProvider
|
|
206
|
+
)
|
|
218
207
|
shippingProviders = [...new Set(shippingProviders)]
|
|
219
208
|
|
|
220
209
|
if (this._shippingProviderList.length < shippingProviders.length) {
|
|
@@ -224,7 +213,7 @@ class ExistingManifestList extends localize(i18next)(PageView) {
|
|
|
224
213
|
...this._shippingProviderList.map(sp => {
|
|
225
214
|
return {
|
|
226
215
|
name: sp,
|
|
227
|
-
value: sp
|
|
216
|
+
value: sp == 'EFMX' ? 'EMS' : sp
|
|
228
217
|
}
|
|
229
218
|
})
|
|
230
219
|
]
|
|
@@ -232,7 +221,13 @@ class ExistingManifestList extends localize(i18next)(PageView) {
|
|
|
232
221
|
}
|
|
233
222
|
return {
|
|
234
223
|
total: response.data.manifests.total || 0,
|
|
235
|
-
records:
|
|
224
|
+
records:
|
|
225
|
+
response.data.manifests.items.map(itm => {
|
|
226
|
+
if (itm.shippingProvider == 'EMS') {
|
|
227
|
+
return { ...itm, shippingProvider: 'EFMX' }
|
|
228
|
+
}
|
|
229
|
+
return itm
|
|
230
|
+
}) || []
|
|
236
231
|
}
|
|
237
232
|
}
|
|
238
233
|
}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import '@things-factory/grist-ui'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
LitElement
|
|
8
|
-
} from 'lit-element'
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
i18next,
|
|
12
|
-
localize
|
|
13
|
-
} from '@things-factory/i18n-base'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
5
|
+
|
|
6
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
14
7
|
import { client } from '@things-factory/shell'
|
|
15
8
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
16
9
|
|
|
@@ -145,7 +138,7 @@ class GenerateManifestPopup extends localize(i18next)(LitElement) {
|
|
|
145
138
|
let manifestSelect = this.isManifestNew
|
|
146
139
|
|
|
147
140
|
let manifest = {
|
|
148
|
-
transporter: selectedCourier
|
|
141
|
+
transporter: selectedCourier == 'EFMX' ? 'EMS' : selectedCourier
|
|
149
142
|
}
|
|
150
143
|
|
|
151
144
|
const response = await client.mutate({
|
|
@@ -162,7 +155,11 @@ class GenerateManifestPopup extends localize(i18next)(LitElement) {
|
|
|
162
155
|
})
|
|
163
156
|
|
|
164
157
|
if (!response.errors) {
|
|
165
|
-
|
|
158
|
+
let generatedManifest = response.data.generateManifest
|
|
159
|
+
generatedManifest = {
|
|
160
|
+
...generatedManifest,
|
|
161
|
+
shippingProvider: generatedManifest.shippingProvider == 'EMS' ? 'EFMX' : generatedManifest.shippingProvider
|
|
162
|
+
}
|
|
166
163
|
this._showToast({ message: i18next.t('text.manifest_has_been_generated') })
|
|
167
164
|
this.dispatchEvent(
|
|
168
165
|
new CustomEvent('manifestGenerated', { detail: { generatedManifest }, bubbles: true, composed: true })
|
|
@@ -455,7 +455,12 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
|
455
455
|
variables: { name: this._manifestNo, sortings: sorters, filters: this.searchForm.queryFilters }
|
|
456
456
|
})
|
|
457
457
|
|
|
458
|
+
//const manifest = response.data.manifest
|
|
459
|
+
|
|
458
460
|
const manifest = response.data.manifest
|
|
461
|
+
if (manifest.shippingProvider === 'EMS') {
|
|
462
|
+
manifest.shippingProvider = 'EFMX'
|
|
463
|
+
}
|
|
459
464
|
|
|
460
465
|
if (!response.errors) {
|
|
461
466
|
let uniqueBizplaceNames = Array.from(new Set(manifest.trackingNos.map(item => item.bizplaceName)))
|
|
@@ -464,7 +469,7 @@ class LoadingManifestDetail extends localize(i18next)(PageView) {
|
|
|
464
469
|
this._fillupForm(this.manifestForm, { ...manifest, totalTrackingNo: manifest.trackingNos?.length })
|
|
465
470
|
this.shippingData = {
|
|
466
471
|
manifestId: manifest.id,
|
|
467
|
-
shippingProvider: manifest.shippingProvider,
|
|
472
|
+
shippingProvider: manifest.shippingProvider == 'EMS' ? 'EFMX' : manifest.shippingProvider,
|
|
468
473
|
records: manifest.trackingNos
|
|
469
474
|
}
|
|
470
475
|
this._removePackages = []
|
|
@@ -2,21 +2,11 @@ import '@things-factory/form-ui'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
|
-
import {
|
|
6
|
-
css,
|
|
7
|
-
html
|
|
8
|
-
} from 'lit-element'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
9
6
|
|
|
10
7
|
import { getCodeByName } from '@things-factory/code-base'
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
localize
|
|
14
|
-
} from '@things-factory/i18n-base'
|
|
15
|
-
import {
|
|
16
|
-
client,
|
|
17
|
-
navigate,
|
|
18
|
-
PageView
|
|
19
|
-
} from '@things-factory/shell'
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client, navigate, PageView } from '@things-factory/shell'
|
|
20
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
21
11
|
import { isMobileDevice } from '@things-factory/utils'
|
|
22
12
|
|
|
@@ -125,7 +115,7 @@ class LoadingManifestList extends localize(i18next)(PageView) {
|
|
|
125
115
|
...this._shippingProviderList.map(sp => {
|
|
126
116
|
return {
|
|
127
117
|
name: sp,
|
|
128
|
-
value: sp
|
|
118
|
+
value: sp == 'EFMX' ? 'EMS' : sp
|
|
129
119
|
}
|
|
130
120
|
})
|
|
131
121
|
],
|
|
@@ -301,7 +291,9 @@ class LoadingManifestList extends localize(i18next)(PageView) {
|
|
|
301
291
|
})
|
|
302
292
|
|
|
303
293
|
if (!response.errors) {
|
|
304
|
-
let shippingProviders = response.data.manifests.items.map(itm =>
|
|
294
|
+
let shippingProviders = response.data.manifests.items.map(itm =>
|
|
295
|
+
itm.shippingProvider == 'EMS' ? 'EFMX' : itm.shippingProvider
|
|
296
|
+
)
|
|
305
297
|
shippingProviders = [...new Set(shippingProviders)]
|
|
306
298
|
|
|
307
299
|
if (this._shippingProviderList.length < shippingProviders.length) {
|
|
@@ -311,7 +303,7 @@ class LoadingManifestList extends localize(i18next)(PageView) {
|
|
|
311
303
|
...this._shippingProviderList.map(sp => {
|
|
312
304
|
return {
|
|
313
305
|
name: sp,
|
|
314
|
-
value: sp
|
|
306
|
+
value: sp == 'EFMX' ? 'EMS' : sp
|
|
315
307
|
}
|
|
316
308
|
})
|
|
317
309
|
]
|
|
@@ -319,7 +311,13 @@ class LoadingManifestList extends localize(i18next)(PageView) {
|
|
|
319
311
|
}
|
|
320
312
|
return {
|
|
321
313
|
total: response.data.manifests.total || 0,
|
|
322
|
-
records:
|
|
314
|
+
records:
|
|
315
|
+
response.data.manifests.items.map(itm => {
|
|
316
|
+
if (itm.shippingProvider == 'EMS') {
|
|
317
|
+
return { ...itm, shippingProvider: 'EFMX' }
|
|
318
|
+
}
|
|
319
|
+
return itm
|
|
320
|
+
}) || []
|
|
323
321
|
}
|
|
324
322
|
}
|
|
325
323
|
}
|
|
@@ -5,40 +5,20 @@ import '../print-airway-bill-popup'
|
|
|
5
5
|
import '../../../outbound/generate-worksheet-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'
|
|
13
10
|
|
|
14
11
|
import { GhostPrint } from '@operato/ghost-print'
|
|
15
12
|
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
16
13
|
import { getCodeByName } from '@things-factory/code-base'
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
PageView,
|
|
26
|
-
store
|
|
27
|
-
} from '@things-factory/shell'
|
|
28
|
-
import {
|
|
29
|
-
CommonButtonStyles,
|
|
30
|
-
ScrollbarStyles
|
|
31
|
-
} from '@things-factory/styles'
|
|
32
|
-
import {
|
|
33
|
-
isMobileDevice,
|
|
34
|
-
sleep
|
|
35
|
-
} from '@things-factory/utils'
|
|
16
|
+
import { client, navigate, PageView, store } from '@things-factory/shell'
|
|
17
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
18
|
+
import { isMobileDevice, sleep } from '@things-factory/utils'
|
|
36
19
|
|
|
37
20
|
import { fetchSettingRule } from '../../../../fetch-setting-value'
|
|
38
|
-
import {
|
|
39
|
-
INTENALIZED_AWB_SETTING_KEY,
|
|
40
|
-
ORDER_STATUS
|
|
41
|
-
} from '../../../constants'
|
|
21
|
+
import { INTENALIZED_AWB_SETTING_KEY, ORDER_STATUS } from '../../../constants'
|
|
42
22
|
|
|
43
23
|
const HEADER_JSON = {
|
|
44
24
|
'Content-Type': 'application/json',
|
|
@@ -232,7 +212,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
232
212
|
..._shippingProviders.map(item => {
|
|
233
213
|
return {
|
|
234
214
|
name: item.transporter,
|
|
235
|
-
value: item.transporter
|
|
215
|
+
value: item.transporter == 'EFMX' ? 'EMS' : item.transporter
|
|
236
216
|
}
|
|
237
217
|
})
|
|
238
218
|
]
|
|
@@ -668,9 +648,11 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
668
648
|
return {
|
|
669
649
|
total: response.data.releaseGoodRequests.total || 0,
|
|
670
650
|
records: (response.data.releaseGoodRequests.items || []).map(item => {
|
|
651
|
+
let transporterData = item?.transporter == 'EMS' ? 'EFMX' : item.transporter
|
|
671
652
|
return {
|
|
672
653
|
...item,
|
|
673
|
-
bizplaceName: item.bizplace.name
|
|
654
|
+
bizplaceName: item.bizplace.name,
|
|
655
|
+
transporter: transporterData
|
|
674
656
|
}
|
|
675
657
|
})
|
|
676
658
|
}
|
|
@@ -1408,9 +1408,11 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1408
1408
|
let shippingOrderInfo = {}
|
|
1409
1409
|
|
|
1410
1410
|
let contactPointInfo = this._serializeForm(this.shippingInfoForm)
|
|
1411
|
+
let contactPointPhone = contactPointInfo.phone1 ? contactPointInfo.phone1.replace(/\D/g, '') : null
|
|
1411
1412
|
|
|
1412
1413
|
shippingOrderInfo = {
|
|
1413
|
-
...contactPointInfo
|
|
1414
|
+
...contactPointInfo,
|
|
1415
|
+
phone1: contactPointPhone
|
|
1414
1416
|
}
|
|
1415
1417
|
|
|
1416
1418
|
delete shippingOrderInfo['']
|
|
@@ -1456,6 +1458,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1456
1458
|
releaseGood.courierOption = true
|
|
1457
1459
|
releaseGood.packingOption = true
|
|
1458
1460
|
releaseGood.paidAmount = parseFloat(this._paidAmount.value)
|
|
1461
|
+
//releaseGood.phone1 =
|
|
1459
1462
|
|
|
1460
1463
|
delete releaseGood.bizplaceId
|
|
1461
1464
|
delete releaseGood.bizplaceName
|
|
@@ -974,7 +974,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
974
974
|
}
|
|
975
975
|
|
|
976
976
|
async pickCommonPicking() {
|
|
977
|
-
if (this._isExecuting) throw new Error(i18next.t('text.
|
|
977
|
+
if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
|
|
978
978
|
this._isExecuting = true
|
|
979
979
|
|
|
980
980
|
try {
|
|
@@ -1057,7 +1057,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
|
|
1059
1059
|
async productBarcodePicking() {
|
|
1060
|
-
if (this._isExecuting) throw new Error(i18next.t('text.
|
|
1060
|
+
if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
|
|
1061
1061
|
this._isExecuting = true
|
|
1062
1062
|
|
|
1063
1063
|
try {
|
|
@@ -1149,7 +1149,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
1151
|
async replenishmentPicking() {
|
|
1152
|
-
if (this._isExecuting) throw new Error(i18next.t('text.
|
|
1152
|
+
if (this._isExecuting) throw new Error(i18next.t('text.previous_scan_is_executing'))
|
|
1153
1153
|
this._isExecuting = true
|
|
1154
1154
|
|
|
1155
1155
|
try {
|
|
@@ -424,7 +424,11 @@ class WorksheetPacking extends localize(i18next)(PageView) {
|
|
|
424
424
|
refNo3: worksheet.releaseGood.refNo3,
|
|
425
425
|
ownCollection: worksheet.releaseGood.ownTransport,
|
|
426
426
|
releaseDate: worksheet.releaseGood.releaseDate,
|
|
427
|
-
shippingProvider: worksheet.releaseGood?.transporter
|
|
427
|
+
shippingProvider: worksheet.releaseGood?.transporter
|
|
428
|
+
? worksheet.releaseGood.transporter == 'EMS'
|
|
429
|
+
? 'EFMX'
|
|
430
|
+
: worksheet.releaseGood.transporter
|
|
431
|
+
: '',
|
|
428
432
|
trackingNo: worksheet.releaseGood?.trackingNo || '',
|
|
429
433
|
remark: worksheet.releaseGood.remark || ''
|
|
430
434
|
})
|
|
@@ -2,116 +2,106 @@ import '@things-factory/form-ui'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from '
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
i18next,
|
|
12
|
-
localize
|
|
13
|
-
} from '@things-factory/i18n-base'
|
|
14
|
-
import {
|
|
15
|
-
client,
|
|
16
|
-
gqlContext,
|
|
17
|
-
PageView
|
|
18
|
-
} from '@things-factory/shell'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
+
import { client, gqlContext, PageView } from '@things-factory/shell'
|
|
19
9
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
20
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
21
11
|
|
|
22
12
|
class ManifestReport extends localize(i18next)(PageView) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
13
|
+
static get styles() {
|
|
14
|
+
return [
|
|
15
|
+
ScrollbarStyles,
|
|
16
|
+
css`
|
|
17
|
+
:host {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
search-form {
|
|
24
|
+
overflow: visible;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
data-grist {
|
|
28
|
+
overflow-y: auto;
|
|
29
|
+
flex: 1;
|
|
30
|
+
}
|
|
31
|
+
`
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
_searchFields: Array,
|
|
38
|
+
config: Object,
|
|
39
|
+
data: Object,
|
|
40
|
+
_shippingProviderList: Array,
|
|
41
|
+
_partners: Object
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get context() {
|
|
46
|
+
return {
|
|
47
|
+
title: i18next.t('title.manifest_report'),
|
|
48
|
+
exportable: {
|
|
49
|
+
name: i18next.t('title.manifest_report'),
|
|
50
|
+
data: this._exportableData.bind(this)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
get _fromDateInput() {
|
|
56
|
+
return this.searchForm.shadowRoot.querySelector('input[name=fromDate]')
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get _toDateInput() {
|
|
60
|
+
return this.searchForm.shadowRoot.querySelector('input[name=toDate]')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get searchForm() {
|
|
64
|
+
return this.shadowRoot.querySelector('search-form')
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get dataGrist() {
|
|
68
|
+
return this.shadowRoot.querySelector('data-grist')
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
get _bizplaceSelector() {
|
|
82
72
|
return this.searchForm.shadowRoot.querySelector('select[name=bizplace]')
|
|
83
73
|
}
|
|
84
74
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
75
|
+
render() {
|
|
76
|
+
return html`
|
|
77
|
+
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
|
|
78
|
+
|
|
79
|
+
<data-grist
|
|
80
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
81
|
+
.config=${this.config}
|
|
82
|
+
.fetchHandler="${this.fetchHandler.bind(this)}"
|
|
83
|
+
></data-grist>
|
|
84
|
+
`
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
pageUpdated(changes, lifecycle) {
|
|
88
|
+
if (this.active) {
|
|
89
|
+
this.dataGrist.fetch()
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
constructor() {
|
|
94
|
+
super()
|
|
95
|
+
this._shippingProviderList = []
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async pageInitialized() {
|
|
99
|
+
const partners = await this._fetchPartners()
|
|
100
|
+
this._searchFields = [
|
|
101
|
+
{
|
|
102
|
+
label: i18next.t('field.company'),
|
|
103
|
+
name: 'bizplace',
|
|
104
|
+
type: 'select',
|
|
115
105
|
options:
|
|
116
106
|
partners?.length == 1
|
|
117
107
|
? [
|
|
@@ -131,155 +121,155 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
131
121
|
})
|
|
132
122
|
.sort(this._compareValues('name', 'asc'))
|
|
133
123
|
],
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
props: { searchOper: 'eq' }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: i18next.t('field.from_date'),
|
|
128
|
+
name: 'fromDate',
|
|
129
|
+
type: 'date',
|
|
130
|
+
props: {
|
|
141
131
|
searchOper: 'eq',
|
|
142
132
|
max: new Date().toISOString().split('T')[0]
|
|
143
133
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
134
|
+
value: (() => {
|
|
135
|
+
let date = new Date()
|
|
136
|
+
date.setMonth(date.getMonth() - 1)
|
|
137
|
+
return date.toISOString().split('T')[0]
|
|
138
|
+
})(),
|
|
139
|
+
handlers: { change: this._modifyDateRange.bind(this) }
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: i18next.t('field.to_date'),
|
|
143
|
+
name: 'toDate',
|
|
144
|
+
type: 'date',
|
|
145
|
+
props: {
|
|
146
|
+
searchOper: 'eq',
|
|
147
|
+
max: new Date().toISOString().split('T')[0],
|
|
148
|
+
min: (() => {
|
|
149
|
+
let date = new Date()
|
|
150
|
+
date.setMonth(date.getMonth() - 1)
|
|
151
|
+
return date.toISOString().split('T')[0]
|
|
152
|
+
})()
|
|
153
|
+
},
|
|
154
|
+
value: new Date().toISOString().split('T')[0]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: i18next.t('field.tracking_no'),
|
|
158
|
+
name: 'trackingNo',
|
|
159
|
+
type: 'text',
|
|
160
|
+
props: { searchOper: 'eq' }
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: i18next.t('field.ro_no'),
|
|
164
|
+
name: 'releaseGoodNo',
|
|
165
|
+
type: 'text',
|
|
166
|
+
props: { searchOper: 'eq' }
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: i18next.t('field.tracking_no'),
|
|
170
|
+
name: 'hasTrackingNo',
|
|
171
|
+
type: 'checkbox',
|
|
172
|
+
props: { searchOper: 'eq' },
|
|
173
|
+
attrs: ['indeterminate']
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
|
|
177
|
+
this.config = {
|
|
178
|
+
list: {
|
|
179
|
+
fields: [
|
|
180
|
+
'company',
|
|
181
|
+
'refNo',
|
|
182
|
+
'roNo',
|
|
183
|
+
'status',
|
|
184
|
+
'trackingNo',
|
|
185
|
+
'name',
|
|
186
|
+
'manifestedAt',
|
|
187
|
+
'manifestedBy',
|
|
188
|
+
'createdAt',
|
|
189
|
+
'transporter'
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
rows: { appendable: false, selectable: false },
|
|
193
|
+
columns: [
|
|
194
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
195
|
+
{
|
|
196
|
+
type: 'string',
|
|
197
|
+
name: 'bizplace',
|
|
198
|
+
header: i18next.t('field.company'),
|
|
199
|
+
label: true,
|
|
200
|
+
width: 130
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: 'string',
|
|
204
|
+
name: 'refNo',
|
|
205
|
+
header: i18next.t('field.ref_no'),
|
|
206
|
+
label: true,
|
|
207
|
+
width: 140
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'string',
|
|
211
|
+
name: 'roNo',
|
|
212
|
+
header: i18next.t('field.ro_no'),
|
|
213
|
+
label: true,
|
|
214
|
+
width: 150
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
type: 'string',
|
|
218
|
+
name: 'status',
|
|
219
|
+
header: i18next.t('field.status'),
|
|
220
|
+
label: true,
|
|
221
|
+
width: 120
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
type: 'string',
|
|
225
|
+
name: 'trackingNo',
|
|
226
|
+
header: i18next.t('field.tracking_no'),
|
|
227
|
+
label: true,
|
|
228
|
+
width: 120
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
type: 'string',
|
|
232
|
+
name: 'manifestNo',
|
|
233
|
+
header: i18next.t('field.manifest_no'),
|
|
234
|
+
label: true,
|
|
235
|
+
width: 140
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
type: 'datetime',
|
|
239
|
+
name: 'manifestedAt',
|
|
240
|
+
header: i18next.t('field.manifested_at'),
|
|
241
|
+
label: true,
|
|
242
|
+
width: 120
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
type: 'string',
|
|
246
|
+
name: 'manifestedBy',
|
|
247
|
+
header: i18next.t('field.manifested_by'),
|
|
248
|
+
label: true,
|
|
249
|
+
width: 130
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
type: 'datetime',
|
|
253
|
+
name: 'orderedAt',
|
|
254
|
+
header: i18next.t('field.created_at'),
|
|
255
|
+
label: true,
|
|
256
|
+
width: 120
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: 'string',
|
|
260
|
+
name: 'transporter',
|
|
261
|
+
header: i18next.t('field.transporter'),
|
|
262
|
+
label: true,
|
|
263
|
+
width: 120
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
}
|
|
278
268
|
|
|
279
269
|
async fetchHandler({ page, limit, sorters = [{ name: 'createdAt', desc: true }] }) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
270
|
+
try {
|
|
271
|
+
this._validate()
|
|
272
|
+
let filters = this.searchForm.queryFilters.map(filter => {
|
|
283
273
|
switch (filter.name) {
|
|
284
274
|
case 'fromDate':
|
|
285
275
|
let fromDt = new Date(filter.value)
|
|
@@ -297,39 +287,45 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
297
287
|
return filter
|
|
298
288
|
})
|
|
299
289
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
290
|
+
const response = await client.query({
|
|
291
|
+
query: gql`
|
|
292
|
+
query manifestReport($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
293
|
+
manifestReport(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
294
|
+
items {
|
|
295
|
+
bizplace
|
|
296
|
+
refNo
|
|
297
|
+
roNo
|
|
298
|
+
status
|
|
299
|
+
trackingNo
|
|
300
|
+
manifestNo
|
|
301
|
+
manifestedAt
|
|
302
|
+
manifestedBy
|
|
303
|
+
orderedAt
|
|
304
|
+
transporter
|
|
305
|
+
}
|
|
306
|
+
total
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
`,
|
|
310
|
+
variables: { filters, pagination: { page, limit }, sortings: sorters },
|
|
311
|
+
context: gqlContext()
|
|
312
|
+
})
|
|
313
|
+
|
|
314
|
+
if (!response.errors) {
|
|
315
|
+
return {
|
|
316
|
+
total: response.data.manifestReport.total || 0,
|
|
317
|
+
records: (response.data.manifestReport.items || []).map(item => {
|
|
318
|
+
let transporterData = item?.transporter == 'EMS' ? 'EFMX' : item.transporter
|
|
319
|
+
return {
|
|
320
|
+
...item,
|
|
321
|
+
transporter: transporterData
|
|
322
|
+
}
|
|
323
|
+
})
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
} catch (e) {
|
|
327
|
+
this._showToast(e)
|
|
328
|
+
}
|
|
333
329
|
}
|
|
334
330
|
|
|
335
331
|
async _fetchPartners() {
|
|
@@ -354,7 +350,7 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
354
350
|
}
|
|
355
351
|
}
|
|
356
352
|
|
|
357
|
-
|
|
353
|
+
_validate() {
|
|
358
354
|
if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
|
|
359
355
|
throw new Error(i18next.t('text.invalid_form_value'))
|
|
360
356
|
if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
|
|
@@ -362,7 +358,7 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
362
358
|
if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
|
|
363
359
|
}
|
|
364
360
|
|
|
365
|
-
|
|
361
|
+
_compareValues(key, order = 'asc') {
|
|
366
362
|
return function innerSort(a, b) {
|
|
367
363
|
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
368
364
|
return 0
|
|
@@ -381,7 +377,7 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
381
377
|
}
|
|
382
378
|
}
|
|
383
379
|
|
|
384
|
-
|
|
380
|
+
_modifyDateRange(e) {
|
|
385
381
|
const fromDate = e.currentTarget.value
|
|
386
382
|
if (fromDate == '') return
|
|
387
383
|
if (this._toDateInput.value < fromDate) this._toDateInput.value = fromDate
|
|
@@ -402,47 +398,47 @@ class ManifestReport extends localize(i18next)(PageView) {
|
|
|
402
398
|
this._toDateInput.max = max
|
|
403
399
|
}
|
|
404
400
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
401
|
+
async _exportableData() {
|
|
402
|
+
try {
|
|
403
|
+
var headerSetting = [
|
|
404
|
+
{ header: i18next.t('field.company'), key: 'bizplace', width: 40, type: 'string' },
|
|
405
|
+
{ header: i18next.t('field.ref_no'), key: 'refNo', width: 20, type: 'string' },
|
|
406
|
+
{ header: i18next.t('field.ro_no'), key: 'roNo', width: 30, type: 'string' },
|
|
407
|
+
{ header: i18next.t('field.status'), key: 'status', width: 15, type: 'string' },
|
|
408
|
+
{ header: i18next.t('field.tracking_no'), key: 'trackingNo', width: 15, type: 'string' },
|
|
409
|
+
{ header: i18next.t('field.manifest_no'), key: 'manifestNo', width: 20, type: 'string' },
|
|
410
|
+
{ header: i18next.t('field.manifested_at'), key: 'manifestedAt', width: 20, type: 'string' },
|
|
411
|
+
{ header: i18next.t('field.manifested_by'), key: 'manifestedBy', width: 20, type: 'string' },
|
|
412
|
+
{ header: i18next.t('field.created_at'), key: 'orderedAt', width: 20, type: 'string' },
|
|
413
|
+
{ header: i18next.t('field.transporter'), key: 'transporter', width: 20, type: 'string' }
|
|
414
|
+
]
|
|
415
|
+
|
|
416
|
+
var exportData = {
|
|
417
|
+
header: [...headerSetting],
|
|
418
|
+
data: (await this.fetchHandler({ page: 1, limit: 999999 })).records.map(itm => {
|
|
419
|
+
return {
|
|
420
|
+
...itm,
|
|
421
|
+
manifestedAt: itm.manifestedAt ? new Date(parseInt(itm.manifestedAt)).toLocaleString() : '',
|
|
422
|
+
orderedAt: itm.orderedAt ? new Date(parseInt(itm.orderedAt)).toLocaleString() : ''
|
|
423
|
+
}
|
|
424
|
+
})
|
|
425
|
+
}
|
|
426
|
+
return exportData
|
|
427
|
+
} catch (e) {
|
|
428
|
+
this._showToast(e)
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
_showToast({ type, message }) {
|
|
433
|
+
document.dispatchEvent(
|
|
434
|
+
new CustomEvent('notify', {
|
|
435
|
+
detail: {
|
|
436
|
+
type,
|
|
437
|
+
message
|
|
438
|
+
}
|
|
439
|
+
})
|
|
440
|
+
)
|
|
441
|
+
}
|
|
446
442
|
}
|
|
447
443
|
|
|
448
|
-
customElements.define('manifest-report', ManifestReport)
|
|
444
|
+
customElements.define('manifest-report', ManifestReport)
|
|
@@ -8,9 +8,13 @@ exports.shippingProviders = {
|
|
|
8
8
|
try {
|
|
9
9
|
const { domain } = context.state;
|
|
10
10
|
const items = await (0, typeorm_1.getRepository)(sales_base_1.ReleaseGood).query(`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
SELECT DISTINCT case when transporter = 'EMS' then 'EFMX' else transporter end from
|
|
12
|
+
(SELECT DISTINCT UPPER(transporter) as transporter FROM release_goods WHERE domain_id = '${domain.id}' AND transporter IS NOT null AND transporter != '' AND type = 'b2c'
|
|
13
|
+
UNION ALL
|
|
14
|
+
SELECT DISTINCT UPPER(transporter) as transporter FROM order_packages WHERE domain_id = '${domain.id}' AND transporter IS NOT null AND transporter != '')foo`);
|
|
15
|
+
return {
|
|
16
|
+
items: items
|
|
17
|
+
};
|
|
14
18
|
}
|
|
15
19
|
catch (error) {
|
|
16
20
|
throw error;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipping-providers.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/shipping-provider/shipping-providers.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,2DAAwD;AAI3C,QAAA,iBAAiB,GAAG;IAC/B,KAAK,CAAC,iBAAiB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC7D,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;YAEpD,MAAM,KAAK,GAAU,MAAM,IAAA,uBAAa,EAAC,wBAAW,CAAC,CAAC,KAAK,CAAC
|
|
1
|
+
{"version":3,"file":"shipping-providers.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/shipping-provider/shipping-providers.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,2DAAwD;AAI3C,QAAA,iBAAiB,GAAG;IAC/B,KAAK,CAAC,iBAAiB,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QAC7D,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;YAEpD,MAAM,KAAK,GAAU,MAAM,IAAA,uBAAa,EAAC,wBAAW,CAAC,CAAC,KAAK,CAAC;;mGAEiC,MAAM,CAAC,EAAE;;mGAET,MAAM,CAAC,EAAE,yDAAyD,CAAC,CAAA;YAEhK,OAAO;gBACL,KAAK,EAAE,KAAK;aACb,CAAA;SACF;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA"}
|
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.506",
|
|
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.434",
|
|
92
92
|
"@things-factory/product-base": "^4.3.495",
|
|
93
93
|
"@things-factory/resource-ui": "^4.3.452",
|
|
94
|
-
"@things-factory/sales-ui": "^4.3.
|
|
94
|
+
"@things-factory/sales-ui": "^4.3.505",
|
|
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",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"@things-factory/system-ui": "^4.3.434",
|
|
108
108
|
"@things-factory/transport-base": "^4.3.452",
|
|
109
109
|
"@things-factory/tutorial-ui": "^4.3.452",
|
|
110
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
111
|
-
"@things-factory/worksheet-base": "^4.3.
|
|
110
|
+
"@things-factory/warehouse-base": "^4.3.505",
|
|
111
|
+
"@things-factory/worksheet-base": "^4.3.506"
|
|
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": "4f086f3e380e27fc6425cd7b3a9d244bae3b623c"
|
|
121
121
|
}
|
|
@@ -9,10 +9,14 @@ export const shippingProviders = {
|
|
|
9
9
|
const { domain }: { domain: Domain } = context.state
|
|
10
10
|
|
|
11
11
|
const items: any[] = await getRepository(ReleaseGood).query(`
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
SELECT DISTINCT case when transporter = 'EMS' then 'EFMX' else transporter end from
|
|
13
|
+
(SELECT DISTINCT UPPER(transporter) as transporter FROM release_goods WHERE domain_id = '${domain.id}' AND transporter IS NOT null AND transporter != '' AND type = 'b2c'
|
|
14
|
+
UNION ALL
|
|
15
|
+
SELECT DISTINCT UPPER(transporter) as transporter FROM order_packages WHERE domain_id = '${domain.id}' AND transporter IS NOT null AND transporter != '')foo`)
|
|
14
16
|
|
|
15
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
items: items
|
|
19
|
+
}
|
|
16
20
|
} catch (error) {
|
|
17
21
|
throw error
|
|
18
22
|
}
|
package/translations/en.json
CHANGED
|
@@ -1598,8 +1598,7 @@
|
|
|
1598
1598
|
"text.please_wait_for_current_process_to_be_completed": "please wait for current process to be completed",
|
|
1599
1599
|
"text.please_wait": "please wait",
|
|
1600
1600
|
"text.preunload_has_completed": "preunload has been completed",
|
|
1601
|
-
"text.
|
|
1602
|
-
"text.previous_scan_is_executing": "previous scan is executing",
|
|
1601
|
+
"text.previous_scan_is_executing": "the previous scan is still processing. Please wait 3-5 seconds before starting the next scan",
|
|
1603
1602
|
"text.print_1_label_for_item_with_non_specified_print_qty": "print 1 label for item with non-specified print qty",
|
|
1604
1603
|
"text.print_qty_is_empty": "print qty is empty",
|
|
1605
1604
|
"text.printing": "printing",
|
package/translations/ko.json
CHANGED
|
@@ -1592,8 +1592,7 @@
|
|
|
1592
1592
|
"text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[ko] please select at least one order with status deactivated to proceed",
|
|
1593
1593
|
"text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ko] please select maximum 50 worksheets with status deactivated to proceed",
|
|
1594
1594
|
"text.preunload_has_completed": "임시하차가 완료 되었습니다",
|
|
1595
|
-
"text.
|
|
1596
|
-
"text.previous_scan_is_executing": "[ko] previous scan is executing",
|
|
1595
|
+
"text.previous_scan_is_executing": "[ko] the previous scan is still processing. Please wait 3-5 seconds before starting the next scan",
|
|
1597
1596
|
"text.print_1_label_for_item_with_non_specified_print_qty": "[ko]print 1 label for item with non-specified print qty",
|
|
1598
1597
|
"text.print_qty_is_empty": "인쇄수량이 없습니다",
|
|
1599
1598
|
"text.printing": "인쇄중",
|
package/translations/ms.json
CHANGED
|
@@ -1538,8 +1538,7 @@
|
|
|
1538
1538
|
"text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ms] please select maximum 50 worksheets with status deactivated to proceed",
|
|
1539
1539
|
"text.please_write_down_full_name_clearly": "sila pastikan nama anda tulis dengan jelas",
|
|
1540
1540
|
"text.preunload_has_completed": "preunload has been completed",
|
|
1541
|
-
"text.
|
|
1542
|
-
"text.previous_scan_is_executing": "[ms] previous scan is executing",
|
|
1541
|
+
"text.previous_scan_is_executing": "[ms] the previous scan is still processing. Please wait 3-5 seconds before starting the next scan",
|
|
1543
1542
|
"text.print_1_label_for_item_with_non_specified_print_qty": "[ms]print 1 label for item with non-specified print qty",
|
|
1544
1543
|
"text.print_qty_is_empty": "kuantiti untuk cetak adalah mssong",
|
|
1545
1544
|
"text.printing": "printing",
|
package/translations/zh.json
CHANGED
|
@@ -1504,8 +1504,7 @@
|
|
|
1504
1504
|
"text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[zh] please select at least one order with status deactivated to proceed",
|
|
1505
1505
|
"text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[zh] please select maximum 50 worksheets with status deactivated to proceed",
|
|
1506
1506
|
"text.preunload_has_completed": "preunload has been completed",
|
|
1507
|
-
"text.
|
|
1508
|
-
"text.previous_scan_is_executing": "[zh] previous scan is executing",
|
|
1507
|
+
"text.previous_scan_is_executing": "[zh] the previous scan is still processing. Please wait 3-5 seconds before starting the next scan",
|
|
1509
1508
|
"text.print_1_label_for_item_with_non_specified_print_qty": "[zh]print 1 label for item with non-specified print qty",
|
|
1510
1509
|
"text.print_qty_is_empty": "print qty is empty",
|
|
1511
1510
|
"text.printing": "printing",
|