@things-factory/operato-wms 4.3.640 → 4.3.642
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/adjustment/transfer-inventory.js +12 -7
- package/client/pages/bulk-operation/bulk-operation.js +23 -25
- package/client/pages/bulk-operation/validate-b2c-ro-popup.js +4 -14
- package/client/pages/bulk-operation/validate-gan-popup.js +11 -26
- package/client/pages/bulk-operation/validate-ro-popup.js +6 -16
- package/client/pages/components/list-view/product-list-view.js +1 -1
- package/client/pages/components/select-inventory-popup.js +5 -1
- package/client/pages/components/select-product-popup.js +9 -4
- package/client/pages/constants/replenishment-config.js +5 -5
- package/client/pages/inbound/putaway/putaway-product.js +70 -92
- package/client/pages/inbound/putaway/putaway-replenishment-same-product-popup.js +3 -10
- package/client/pages/inbound/putaway/putaway-same-carton-popup.js +1 -1
- package/client/pages/inbound/putaway/putaway-worksheet-generate-popup.js +1 -1
- package/client/pages/inbound/putaway/undo-putaway-popup.js +16 -19
- package/client/pages/inbound/putaway/worksheet-putaway-return.js +1 -1
- package/client/pages/inbound/putaway/worksheet-putaway.js +3 -3
- package/client/pages/inbound/undo-unload-popup.js +1 -1
- package/client/pages/inbound/unload-product.js +37 -33
- package/client/pages/inbound/unloaded-inventories-popup.js +1 -1
- package/client/pages/inbound/worksheet-unloading-return.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +2 -2
- package/client/pages/inventory/inventory-adjustment.js +20 -5
- package/client/pages/inventory/inventory-by-product.js +43 -43
- package/client/pages/inventory/onhand-inventory.js +2 -2
- package/client/pages/inventory-check/add-extra-inventory-popup.js +10 -2
- package/client/pages/inventory-check/cycle-count-recheck-popup.js +2 -2
- package/client/pages/inventory-check/cycle-count-report.js +14 -19
- package/client/pages/inventory-check/inspecting-product.js +14 -2
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +23 -27
- package/client/pages/order/arrival-notice/assign-buffer-location.js +2 -2
- package/client/pages/order/arrival-notice/check-arrived-notice.js +2 -2
- package/client/pages/order/arrival-notice/create-arrival-notice.js +42 -43
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +8 -8
- package/client/pages/order/arrival-notice/edit-product-popup.js +29 -27
- package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +3 -3
- package/client/pages/order/arrival-notice/receive-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/rejected-arrival-notice.js +1 -1
- package/client/pages/order/arrival-notice/view-product-changes-popup.js +3 -3
- package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -2
- package/client/pages/order/release-order/b2c/b2c-release-order-detail.js +92 -91
- package/client/pages/order/release-order/b2c/create-b2c-release-order.js +61 -56
- package/client/pages/order/release-order/create-release-order.js +65 -56
- package/client/pages/order/release-order/receive-release-order-request.js +1 -1
- package/client/pages/order/release-order/rejected-release-order.js +2 -2
- package/client/pages/order/release-order/release-extra-product-popup.js +11 -7
- package/client/pages/order/release-order/release-order-detail.js +158 -116
- package/client/pages/order/return-order/create-return-order.js +16 -3
- package/client/pages/order/return-order/return-order-inventory-popup.js +2 -1
- package/client/pages/outbound/inventory-assign-popup.js +2 -2
- package/client/pages/outbound/inventory-auto-assign-popup.js +1 -1
- package/client/pages/outbound/inventory-reassign-popup.js +6 -6
- package/client/pages/outbound/loading-product.js +3 -3
- package/client/pages/outbound/loading-v2/load-by-qty.js +2 -2
- package/client/pages/outbound/loading-v2/loading-execution-base.js +4 -4
- package/client/pages/outbound/packing-product.js +7 -26
- package/client/pages/outbound/picking-product.js +36 -16
- package/client/pages/outbound/picking-replacement-popup.js +4 -4
- package/client/pages/outbound/picking-v2/picking-execution-base.js +8 -4
- package/client/pages/outbound/sorting-product.js +5 -7
- package/client/pages/outbound/worksheet-batch-picking.js +30 -43
- package/client/pages/outbound/worksheet-loading.js +2 -2
- package/client/pages/outbound/worksheet-packing.js +1 -1
- package/client/pages/outbound/worksheet-picking.js +23 -19
- package/client/pages/outbound/worksheet-return.js +1 -1
- package/client/pages/outbound/worksheet-sorting.js +12 -23
- package/client/pages/outbound/worksheet-zone-picking.js +3 -3
- package/client/pages/replenishment/replenishment.js +1 -1
- package/client/pages/report/replenishment-report.js +5 -14
- package/client/pages/report/volume-summary-report.js +6 -6
- package/dist-server/graphql/resolvers/outbound/sort-item.js +1 -1
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js +2 -1
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +18 -7
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -1
- package/dist-server/graphql/types/outbound/index.js +1 -1
- package/dist-server/graphql/types/reports/cycle-count-report.js +1 -1
- package/dist-server/graphql/types/reports/inbound-order-details-report.js +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +2 -2
- package/dist-server/graphql/types/zone-worksheet/index.js +1 -1
- package/package.json +16 -16
- package/server/graphql/resolvers/outbound/sort-item.ts +1 -1
- package/server/graphql/resolvers/reports/cycle-count-report.ts +2 -1
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +20 -8
- package/server/graphql/types/outbound/index.ts +1 -1
- package/server/graphql/types/reports/cycle-count-report.ts +1 -1
- package/server/graphql/types/reports/inbound-order-details-report.ts +1 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +2 -2
- package/server/graphql/types/zone-worksheet/index.ts +1 -1
- package/translations/en.json +265 -259
- package/translations/ko.json +1 -0
- package/translations/ms.json +1580 -1463
- package/translations/zh.json +2354 -2150
|
@@ -9,33 +9,18 @@ import '@things-factory/import-ui'
|
|
|
9
9
|
import '../../../components/select-product-popup'
|
|
10
10
|
|
|
11
11
|
import gql from 'graphql-tag'
|
|
12
|
-
import {
|
|
13
|
-
css,
|
|
14
|
-
html
|
|
15
|
-
} from 'lit-element'
|
|
12
|
+
import { css, html } from 'lit-element'
|
|
16
13
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
17
14
|
|
|
18
15
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
19
|
-
import {
|
|
20
|
-
i18next,
|
|
21
|
-
localize
|
|
22
|
-
} from '@things-factory/i18n-base'
|
|
16
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
23
17
|
import { openPopup } from '@things-factory/layout-base'
|
|
24
|
-
import {
|
|
25
|
-
client,
|
|
26
|
-
CustomAlert,
|
|
27
|
-
navigate,
|
|
28
|
-
PageView,
|
|
29
|
-
store
|
|
30
|
-
} from '@things-factory/shell'
|
|
18
|
+
import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
|
|
31
19
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
32
20
|
import { isMobileDevice } from '@things-factory/utils'
|
|
33
21
|
|
|
34
22
|
import { fetchSettingRule } from '../../../../fetch-setting-value'
|
|
35
|
-
import {
|
|
36
|
-
ORDER_STATUS,
|
|
37
|
-
PICKING_STANDARD
|
|
38
|
-
} from '../../../constants'
|
|
23
|
+
import { ORDER_STATUS, PICKING_STANDARD } from '../../../constants'
|
|
39
24
|
|
|
40
25
|
class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
41
26
|
static get properties() {
|
|
@@ -253,7 +238,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
253
238
|
.header-with-checkbox {
|
|
254
239
|
display: flex;
|
|
255
240
|
align-self: flex-end;
|
|
256
|
-
align-items: center;
|
|
241
|
+
align-items: center;
|
|
257
242
|
grid-column: span 36 / auto !important;
|
|
258
243
|
text-align: left !important;
|
|
259
244
|
margin-top: 10px !important;
|
|
@@ -265,32 +250,32 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
265
250
|
margin-left: 1px;
|
|
266
251
|
}
|
|
267
252
|
|
|
268
|
-
.checkbox-wrapper{
|
|
253
|
+
.checkbox-wrapper {
|
|
269
254
|
margin-top: 10px;
|
|
270
255
|
}
|
|
271
256
|
|
|
272
257
|
.checkbox-wrapper::before {
|
|
273
|
-
content:
|
|
258
|
+
content: '('; /* Left bracket */
|
|
274
259
|
margin-left: 2em;
|
|
275
260
|
font-size: 0.9em; /* Adjust size as needed */
|
|
276
261
|
font-weight: 100 !important;
|
|
277
262
|
}
|
|
278
263
|
|
|
279
264
|
.checkbox-wrapper::after {
|
|
280
|
-
content:
|
|
265
|
+
content: ')'; /* Right bracket */
|
|
281
266
|
margin-left: 1em; /* Space between bracket and checkbox */
|
|
282
267
|
font-size: 0.9em; /* Adjust size as needed */
|
|
283
268
|
font-weight: 100 !important;
|
|
284
269
|
}
|
|
285
270
|
|
|
286
271
|
.checkbox-wrapper input[type='checkbox'] {
|
|
287
|
-
width: 10px;
|
|
272
|
+
width: 10px;
|
|
288
273
|
height: 10px;
|
|
289
274
|
}
|
|
290
275
|
|
|
291
276
|
#matchDeliveryAddress {
|
|
292
277
|
margin-top: 5px !important;
|
|
293
|
-
|
|
278
|
+
}
|
|
294
279
|
`
|
|
295
280
|
]
|
|
296
281
|
}
|
|
@@ -335,13 +320,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
335
320
|
/>
|
|
336
321
|
<label for="ownTransport">${i18next.t('label.lmd')}</label>
|
|
337
322
|
|
|
338
|
-
<input
|
|
339
|
-
|
|
340
|
-
name="codOption"
|
|
341
|
-
?checked="${this._isCod}"
|
|
342
|
-
?disabled="${true}"
|
|
343
|
-
/>
|
|
344
|
-
<label for="isCod">${i18next.t('label.cod')}</label>
|
|
323
|
+
<input type="checkbox" name="codOption" ?checked="${this._isCod}" ?disabled="${true}" />
|
|
324
|
+
<label for="isCod">${i18next.t('label.cod')}</label>
|
|
345
325
|
</div>
|
|
346
326
|
|
|
347
327
|
<label>${i18next.t('label.company')}</label>
|
|
@@ -370,7 +350,13 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
370
350
|
/>
|
|
371
351
|
|
|
372
352
|
<label ?hidden="${!this?._isCod}">${i18next.t('label.paid_amount')} </label>
|
|
373
|
-
<input
|
|
353
|
+
<input
|
|
354
|
+
name="paidAmount"
|
|
355
|
+
type="number"
|
|
356
|
+
?hidden="${!this?._isCod}"
|
|
357
|
+
?readonly="${!this?._editable}"
|
|
358
|
+
min="0"
|
|
359
|
+
/>
|
|
374
360
|
|
|
375
361
|
${this._crossDocking
|
|
376
362
|
? html`
|
|
@@ -430,22 +416,22 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
430
416
|
|
|
431
417
|
<!-- delivery -->
|
|
432
418
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
</div>
|
|
419
|
+
<div class="header-with-checkbox">
|
|
420
|
+
<label class="section-header">${i18next.t('label.delivery_address')}</label>
|
|
421
|
+
<div class="checkbox-wrapper">
|
|
422
|
+
<input
|
|
423
|
+
type="checkbox"
|
|
424
|
+
id="matchDeliveryAddress"
|
|
425
|
+
name="matchDeliveryAddressInput"
|
|
426
|
+
?checked="${this._disableBillingAddress}"
|
|
427
|
+
@change=${e => {
|
|
428
|
+
this._disableBillingAddress = e.currentTarget.checked
|
|
429
|
+
}}
|
|
430
|
+
/>
|
|
431
|
+
|
|
432
|
+
<label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
|
|
448
433
|
</div>
|
|
434
|
+
</div>
|
|
449
435
|
|
|
450
436
|
<label>${i18next.t('label.delivery_address_1')}</label>
|
|
451
437
|
<textarea name="deliveryAddress1" .value="${this._releaseOrder.deliveryAddress1}"></textarea>
|
|
@@ -509,25 +495,48 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
509
495
|
|
|
510
496
|
<!-- billing -->
|
|
511
497
|
|
|
512
|
-
<label ?hidden=${this._disableBillingAddress} class="section-header"
|
|
498
|
+
<label ?hidden=${this._disableBillingAddress} class="section-header"
|
|
499
|
+
>${i18next.t('label.billing_address')}</label
|
|
500
|
+
>
|
|
513
501
|
|
|
514
502
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_1')}</label>
|
|
515
|
-
<textarea
|
|
516
|
-
|
|
503
|
+
<textarea
|
|
504
|
+
?hidden=${this._disableBillingAddress}
|
|
505
|
+
name="billingAddress"
|
|
506
|
+
.value="${this._releaseOrder.billingAddress}"
|
|
507
|
+
></textarea>
|
|
508
|
+
|
|
517
509
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_2')}</label>
|
|
518
|
-
<textarea
|
|
510
|
+
<textarea
|
|
511
|
+
?hidden=${this._disableBillingAddress}
|
|
512
|
+
name="billingAddress2"
|
|
513
|
+
.value="${this._releaseOrder.billingAddress2}"
|
|
514
|
+
></textarea>
|
|
519
515
|
|
|
520
516
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_3')}</label>
|
|
521
|
-
<textarea
|
|
517
|
+
<textarea
|
|
518
|
+
?hidden=${this._disableBillingAddress}
|
|
519
|
+
name="billingAddress3"
|
|
520
|
+
.value="${this._releaseOrder.billingAddress3}"
|
|
521
|
+
></textarea>
|
|
522
522
|
|
|
523
523
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_4')}</label>
|
|
524
|
-
<textarea
|
|
524
|
+
<textarea
|
|
525
|
+
?hidden=${this._disableBillingAddress}
|
|
526
|
+
name="billingAddress4"
|
|
527
|
+
.value="${this._releaseOrder.billingAddress4}"
|
|
528
|
+
></textarea>
|
|
525
529
|
|
|
526
530
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_5')}</label>
|
|
527
|
-
<textarea
|
|
531
|
+
<textarea
|
|
532
|
+
?hidden=${this._disableBillingAddress}
|
|
533
|
+
name="billingAddress5"
|
|
534
|
+
.value="${this._releaseOrder.billingAddress5}"
|
|
535
|
+
></textarea>
|
|
528
536
|
|
|
529
537
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
|
|
530
|
-
<select
|
|
538
|
+
<select
|
|
539
|
+
?hidden=${this._disableBillingAddress}
|
|
531
540
|
name="billingCountry"
|
|
532
541
|
?disabled="${this._disableBillingAddress}"
|
|
533
542
|
@change=${e => {
|
|
@@ -578,11 +587,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
578
587
|
</select>`}
|
|
579
588
|
|
|
580
589
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.state')}</label>
|
|
581
|
-
<input
|
|
582
|
-
?hidden=${this._disableBillingAddress}
|
|
583
|
-
name="billingState"
|
|
584
|
-
.value="${this._releaseOrder.billingState}"
|
|
585
|
-
/>
|
|
590
|
+
<input ?hidden=${this._disableBillingAddress} name="billingState" .value="${this._releaseOrder.billingState}" />
|
|
586
591
|
|
|
587
592
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
|
|
588
593
|
<input ?hidden=${this._disableBillingAddress} name="billingCity" .value="${this._releaseOrder.billingCity}" />
|
|
@@ -669,7 +674,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
669
674
|
}
|
|
670
675
|
|
|
671
676
|
if (this.isUserBelongsDomain) {
|
|
672
|
-
if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking
|
|
677
|
+
if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking) {
|
|
673
678
|
actions.push(
|
|
674
679
|
{
|
|
675
680
|
title: i18next.t('button.reject'),
|
|
@@ -923,7 +928,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
923
928
|
return this.shadowRoot?.querySelector('input[name=attentionTo]')
|
|
924
929
|
}
|
|
925
930
|
|
|
926
|
-
get paidAmountInput
|
|
931
|
+
get paidAmountInput() {
|
|
927
932
|
return this.shadowRoot?.querySelector('input[name=paidAmount]')
|
|
928
933
|
}
|
|
929
934
|
|
|
@@ -950,7 +955,6 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
950
955
|
let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
|
|
951
956
|
|
|
952
957
|
this._enableTransportationServiceSetting = enableTransportationServiceSetting
|
|
953
|
-
|
|
954
958
|
|
|
955
959
|
this._clearPage()
|
|
956
960
|
|
|
@@ -1007,7 +1011,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1007
1011
|
width: 140
|
|
1008
1012
|
},
|
|
1009
1013
|
{
|
|
1010
|
-
type: '
|
|
1014
|
+
type: 'float',
|
|
1011
1015
|
name: 'releaseQty',
|
|
1012
1016
|
header: i18next.t('field.release_qty'),
|
|
1013
1017
|
width: 130
|
|
@@ -1135,11 +1139,11 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1135
1139
|
id
|
|
1136
1140
|
name
|
|
1137
1141
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1142
|
+
productBundle {
|
|
1143
|
+
name
|
|
1144
|
+
description
|
|
1145
|
+
sku
|
|
1146
|
+
}
|
|
1143
1147
|
uom
|
|
1144
1148
|
releaseQty
|
|
1145
1149
|
releaseUomValue
|
|
@@ -1200,12 +1204,15 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1200
1204
|
const shippingOrder = releaseOrder.shippingOrderInfo
|
|
1201
1205
|
const orderPackages = releaseOrder.orderPackages
|
|
1202
1206
|
const orderProducts = releaseOrder.orderProducts.map(op => {
|
|
1203
|
-
let roundedUomValue = parseFloat(op.releaseUomValue.toFixed(
|
|
1207
|
+
let roundedUomValue = parseFloat(op.releaseUomValue.toFixed(3))
|
|
1204
1208
|
return {
|
|
1205
1209
|
...op,
|
|
1206
|
-
productSKU: op?.product?.sku || op?.productBundle?.sku
|
|
1207
|
-
productName: op?.product?.name
|
|
1208
|
-
|
|
1210
|
+
productSKU: op?.product?.sku || op?.productBundle?.sku || '',
|
|
1211
|
+
productName: op?.product?.name
|
|
1212
|
+
? `${op?.product?.name} (${op?.product?.description})`
|
|
1213
|
+
: op?.productBundle?.name
|
|
1214
|
+
? `${op?.productBundle?.name} (${op?.productBundle?.description})`
|
|
1215
|
+
: '',
|
|
1209
1216
|
productBrand: op?.product?.brand || '',
|
|
1210
1217
|
roundedUomValue: `${roundedUomValue} ${op.uom}`,
|
|
1211
1218
|
releaseUomValueWithUom: op.releaseUomValue + ' ' + op.uom
|
|
@@ -1221,7 +1228,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1221
1228
|
this._manifestedAt = orderPackages.some(op => op.manifestedAt)
|
|
1222
1229
|
this._isInBatchPicking = releaseOrder.inventoryInfos.some(inventoryInfo => inventoryInfo.refWorksheetId)
|
|
1223
1230
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
1224
|
-
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(
|
|
1231
|
+
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(3))
|
|
1225
1232
|
return {
|
|
1226
1233
|
...inventoryInfo,
|
|
1227
1234
|
productSKU: inventoryInfo?.product?.sku || '',
|
|
@@ -1759,7 +1766,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1759
1766
|
this._validateForm()
|
|
1760
1767
|
|
|
1761
1768
|
let releaseOrder = this._getFormInfo()
|
|
1762
|
-
|
|
1769
|
+
|
|
1763
1770
|
delete releaseOrder.warehouseTransport
|
|
1764
1771
|
delete releaseOrder.bizplaceId
|
|
1765
1772
|
delete releaseOrder.bizplaceName
|
|
@@ -1793,8 +1800,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1793
1800
|
shippingOrderInfo.billingCountry = contactPointInfo.country
|
|
1794
1801
|
}
|
|
1795
1802
|
|
|
1796
|
-
let releaseOrderChanged = this._compareObjects(releaseOrder, oldResorder)
|
|
1797
|
-
let shippingOrderChanged = this._compareObjects(shippingOrderInfo, oldResorder)
|
|
1803
|
+
let releaseOrderChanged = this._compareObjects(releaseOrder, oldResorder)
|
|
1804
|
+
let shippingOrderChanged = this._compareObjects(shippingOrderInfo, oldResorder)
|
|
1798
1805
|
|
|
1799
1806
|
if (releaseOrderChanged == true || shippingOrderChanged == true) {
|
|
1800
1807
|
releaseOrderChanged = true
|
|
@@ -1857,7 +1864,6 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1857
1864
|
name: this._releaseOrderNo,
|
|
1858
1865
|
ownTransport: this._importCargo ? true : this._ownTransport,
|
|
1859
1866
|
paidAmount: parseFloat(this.paidAmountInput.value)
|
|
1860
|
-
|
|
1861
1867
|
},
|
|
1862
1868
|
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
1863
1869
|
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
|
|
@@ -1874,8 +1880,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1874
1880
|
}
|
|
1875
1881
|
|
|
1876
1882
|
_compareObjects(object1, object2) {
|
|
1877
|
-
let formChanged = false
|
|
1878
|
-
|
|
1883
|
+
let formChanged = false
|
|
1884
|
+
|
|
1879
1885
|
for (const key in object1) {
|
|
1880
1886
|
if (object1?.orderPackages?.length > 0) {
|
|
1881
1887
|
if (key == 'trackingNo' && object1[key] !== object2.orderPackages[0].trackingNo) {
|
|
@@ -1894,18 +1900,13 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
1894
1900
|
}
|
|
1895
1901
|
}
|
|
1896
1902
|
} else if (object1.hasOwnProperty(key) && object1[key] !== object2[key]) {
|
|
1897
|
-
if (
|
|
1898
|
-
!(
|
|
1899
|
-
(object1[key] == '' || object1[key] == null) &&
|
|
1900
|
-
(object2[key] == '' || object2[key] == null)
|
|
1901
|
-
)
|
|
1902
|
-
) {
|
|
1903
|
+
if (!((object1[key] == '' || object1[key] == null) && (object2[key] == '' || object2[key] == null))) {
|
|
1903
1904
|
formChanged = true
|
|
1904
1905
|
break
|
|
1905
1906
|
}
|
|
1906
1907
|
}
|
|
1907
1908
|
}
|
|
1908
|
-
|
|
1909
|
+
|
|
1909
1910
|
return formChanged
|
|
1910
1911
|
}
|
|
1911
1912
|
|
|
@@ -2000,7 +2001,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
2000
2001
|
|
|
2001
2002
|
switch (name) {
|
|
2002
2003
|
case 'postalCode':
|
|
2003
|
-
this._cityInput.value = stateName
|
|
2004
|
+
this._cityInput.value = stateName
|
|
2004
2005
|
this._stateInput.value = cityName.toUpperCase()
|
|
2005
2006
|
// may be deleted as the new field is hidden (previously only disable)
|
|
2006
2007
|
// if (this.matchDeliveryAddressInput.value === 'on') {
|
|
@@ -2068,7 +2069,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
2068
2069
|
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
2069
2070
|
}
|
|
2070
2071
|
|
|
2071
|
-
if (this._isCod) {
|
|
2072
|
+
if (this._isCod) {
|
|
2072
2073
|
if (!this._paidAmount.value) {
|
|
2073
2074
|
throw new Error(i18next.t('text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order'))
|
|
2074
2075
|
}
|
|
@@ -2246,4 +2247,4 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
|
|
|
2246
2247
|
}
|
|
2247
2248
|
}
|
|
2248
2249
|
|
|
2249
|
-
window.customElements.define('b2c-release-order-detail', B2CReleaseOrderDetail)
|
|
2250
|
+
window.customElements.define('b2c-release-order-detail', B2CReleaseOrderDetail)
|
|
@@ -6,38 +6,18 @@ import '../../../components/select-inventory-popup'
|
|
|
6
6
|
import '../../../components/select-product-popup'
|
|
7
7
|
|
|
8
8
|
import gql from 'graphql-tag'
|
|
9
|
-
import {
|
|
10
|
-
css,
|
|
11
|
-
html
|
|
12
|
-
} from 'lit-element'
|
|
9
|
+
import { css, html } from 'lit-element'
|
|
13
10
|
|
|
14
11
|
import { getCodeByName } from '@things-factory/code-base'
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
SingleColumnFormStyles
|
|
18
|
-
} from '@things-factory/form-ui'
|
|
19
|
-
import {
|
|
20
|
-
i18next,
|
|
21
|
-
localize
|
|
22
|
-
} from '@things-factory/i18n-base'
|
|
12
|
+
import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
13
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
23
14
|
import { openPopup } from '@things-factory/layout-base'
|
|
24
|
-
import {
|
|
25
|
-
client,
|
|
26
|
-
CustomAlert,
|
|
27
|
-
navigate,
|
|
28
|
-
PageView
|
|
29
|
-
} from '@things-factory/shell'
|
|
15
|
+
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
30
16
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
31
17
|
import { isMobileDevice } from '@things-factory/utils'
|
|
32
18
|
|
|
33
19
|
import { fetchSettingRule } from '../../../../fetch-setting-value'
|
|
34
|
-
import {
|
|
35
|
-
GROUP_TYPES,
|
|
36
|
-
ORDER_INVENTORY_STATUS,
|
|
37
|
-
ORDER_TYPES,
|
|
38
|
-
PICKING_STANDARD,
|
|
39
|
-
RO_TYPES
|
|
40
|
-
} from '../../../constants'
|
|
20
|
+
import { GROUP_TYPES, ORDER_INVENTORY_STATUS, ORDER_TYPES, PICKING_STANDARD, RO_TYPES } from '../../../constants'
|
|
41
21
|
|
|
42
22
|
class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
43
23
|
static get properties() {
|
|
@@ -264,7 +244,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
264
244
|
.header-with-checkbox {
|
|
265
245
|
display: flex;
|
|
266
246
|
align-self: flex-end;
|
|
267
|
-
align-items: center;
|
|
247
|
+
align-items: center;
|
|
268
248
|
grid-column: span 36 / auto !important;
|
|
269
249
|
text-align: left !important;
|
|
270
250
|
margin-top: 10px !important;
|
|
@@ -276,19 +256,19 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
276
256
|
margin-left: 1px;
|
|
277
257
|
}
|
|
278
258
|
|
|
279
|
-
.checkbox-wrapper{
|
|
259
|
+
.checkbox-wrapper {
|
|
280
260
|
margin-top: 10px;
|
|
281
261
|
}
|
|
282
262
|
|
|
283
263
|
.checkbox-wrapper::before {
|
|
284
|
-
content:
|
|
264
|
+
content: '('; /* Left bracket */
|
|
285
265
|
margin-left: 2em;
|
|
286
266
|
font-size: 0.9em; /* Adjust size as needed */
|
|
287
267
|
font-weight: 100 !important;
|
|
288
268
|
}
|
|
289
269
|
|
|
290
270
|
.checkbox-wrapper::after {
|
|
291
|
-
content:
|
|
271
|
+
content: ')'; /* Right bracket */
|
|
292
272
|
margin-left: 1em; /* Space between bracket and checkbox */
|
|
293
273
|
font-size: 0.9em; /* Adjust size as needed */
|
|
294
274
|
font-weight: 100 !important;
|
|
@@ -301,7 +281,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
301
281
|
|
|
302
282
|
#matchDeliveryAddress {
|
|
303
283
|
margin-top: 5px !important;
|
|
304
|
-
|
|
284
|
+
}
|
|
305
285
|
`
|
|
306
286
|
]
|
|
307
287
|
}
|
|
@@ -475,25 +455,27 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
475
455
|
<div class="checkbox-wrapper">
|
|
476
456
|
<input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInput"
|
|
477
457
|
@click=${e => {
|
|
478
|
-
|
|
458
|
+
e.currentTarget.checked
|
|
459
|
+
? (this._disableBillingAddress = true)
|
|
460
|
+
: (this._disableBillingAddress = false)
|
|
479
461
|
}} />
|
|
480
462
|
<label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
|
|
481
463
|
</div>
|
|
482
464
|
</div>
|
|
483
465
|
|
|
484
|
-
<label>${i18next.t(
|
|
466
|
+
<label>${i18next.t('label.delivery_address_1')}</label>
|
|
485
467
|
<textarea name="deliveryAddress1" required .value="${this._deliveryAddress1}"></textarea>
|
|
486
468
|
|
|
487
|
-
<label>${i18next.t(
|
|
469
|
+
<label>${i18next.t('label.delivery_address_2')}</label>
|
|
488
470
|
<textarea name="deliveryAddress2" required .value="${this._deliveryAddress2}"></textarea>
|
|
489
471
|
|
|
490
|
-
<label>${i18next.t(
|
|
472
|
+
<label>${i18next.t('label.delivery_address_3')}</label>
|
|
491
473
|
<textarea name="deliveryAddress3" required .value="${this._deliveryAddress3}"></textarea>
|
|
492
474
|
|
|
493
|
-
<label>${i18next.t(
|
|
475
|
+
<label>${i18next.t('label.delivery_address_4')}</label>
|
|
494
476
|
<textarea name="deliveryAddress4" required .value="${this._deliveryAddress4}"></textarea>
|
|
495
477
|
|
|
496
|
-
<label>${i18next.t(
|
|
478
|
+
<label>${i18next.t('label.delivery_address_5')}</label>
|
|
497
479
|
<textarea name="deliveryAddress5" required .value="${this._deliveryAddress5}"></textarea>
|
|
498
480
|
|
|
499
481
|
<label>${i18next.t('label.country')}</label>
|
|
@@ -539,22 +521,34 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
539
521
|
|
|
540
522
|
<!-- billing -->
|
|
541
523
|
|
|
542
|
-
<label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t(
|
|
524
|
+
<label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t(
|
|
525
|
+
'label.billing_address'
|
|
526
|
+
)}</label>
|
|
543
527
|
|
|
544
528
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_1')}</label>
|
|
545
|
-
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress" required .value="${
|
|
529
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress" required .value="${
|
|
530
|
+
this._billingAddress
|
|
531
|
+
}"></textarea>
|
|
546
532
|
|
|
547
533
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_2')}</label>
|
|
548
|
-
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" required .value="${
|
|
534
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" required .value="${
|
|
535
|
+
this._billingAddress2
|
|
536
|
+
}"></textarea>
|
|
549
537
|
|
|
550
538
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_3')}</label>
|
|
551
|
-
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" required .value="${
|
|
539
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" required .value="${
|
|
540
|
+
this._billingAddress3
|
|
541
|
+
}"></textarea>
|
|
552
542
|
|
|
553
543
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_4')}</label>
|
|
554
|
-
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" required .value="${
|
|
544
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" required .value="${
|
|
545
|
+
this._billingAddress4
|
|
546
|
+
}"></textarea>
|
|
555
547
|
|
|
556
548
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_5')}</label>
|
|
557
|
-
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" required .value="${
|
|
549
|
+
<textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" required .value="${
|
|
550
|
+
this._billingAddress5
|
|
551
|
+
}"></textarea>
|
|
558
552
|
|
|
559
553
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
|
|
560
554
|
<select ?hidden=${this._disableBillingAddress}
|
|
@@ -571,14 +565,16 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
571
565
|
${
|
|
572
566
|
this._switchBillingCountryInput
|
|
573
567
|
? html`
|
|
574
|
-
<input
|
|
568
|
+
<input
|
|
569
|
+
?hidden=${this._disableBillingAddress}
|
|
575
570
|
?disabled=${this._disableBillingAddress ? true : false}
|
|
576
571
|
name="billingPostalCode"
|
|
577
572
|
required
|
|
578
573
|
.value=""
|
|
579
574
|
/>
|
|
580
575
|
`
|
|
581
|
-
: html`<select
|
|
576
|
+
: html`<select
|
|
577
|
+
?hidden=${this._disableBillingAddress}
|
|
582
578
|
?disabled=${this._disableBillingAddress ? true : false}
|
|
583
579
|
name="billingPostalCode"
|
|
584
580
|
@change=${e => {
|
|
@@ -599,7 +595,9 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
599
595
|
.value="${this._billingState}" />
|
|
600
596
|
|
|
601
597
|
<label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
|
|
602
|
-
<input ?hidden=${this._disableBillingAddress} ?disabled=${
|
|
598
|
+
<input ?hidden=${this._disableBillingAddress} ?disabled=${
|
|
599
|
+
this._disableBillingAddress ? true : false
|
|
600
|
+
} name="billingCity" required
|
|
603
601
|
.value="${this._billingCity}" />
|
|
604
602
|
|
|
605
603
|
<!-- <label>${i18next.t('label.billing_address')}</label>
|
|
@@ -928,13 +926,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
928
926
|
width: 150
|
|
929
927
|
},
|
|
930
928
|
{
|
|
931
|
-
type: '
|
|
929
|
+
type: 'float',
|
|
932
930
|
name: 'remainQty',
|
|
933
931
|
header: i18next.t('field.available_qty'),
|
|
934
932
|
width: 120
|
|
935
933
|
},
|
|
936
934
|
{
|
|
937
|
-
type: '
|
|
935
|
+
type: 'float',
|
|
938
936
|
name: 'releaseQty',
|
|
939
937
|
header: i18next.t('field.assigned_qty'),
|
|
940
938
|
width: 120
|
|
@@ -977,7 +975,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
977
975
|
this._deliveryAddress2 = ''
|
|
978
976
|
this._deliveryAddress3 = ''
|
|
979
977
|
this._deliveryAddress4 = ''
|
|
980
|
-
this._deliveryAddress5 = ''
|
|
978
|
+
this._deliveryAddress5 = ''
|
|
981
979
|
this._billingAddress = ''
|
|
982
980
|
this._billingAddress2 = ''
|
|
983
981
|
this._billingAddress3 = ''
|
|
@@ -1104,13 +1102,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1104
1102
|
width: 100
|
|
1105
1103
|
},
|
|
1106
1104
|
{
|
|
1107
|
-
type: '
|
|
1105
|
+
type: 'float',
|
|
1108
1106
|
name: 'remainQty',
|
|
1109
1107
|
header: i18next.t('field.available_qty'),
|
|
1110
1108
|
width: 140
|
|
1111
1109
|
},
|
|
1112
1110
|
{
|
|
1113
|
-
type: '
|
|
1111
|
+
type: 'float',
|
|
1114
1112
|
name: 'releaseQty',
|
|
1115
1113
|
header: i18next.t('field.release_qty'),
|
|
1116
1114
|
imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 25, type: 'float' },
|
|
@@ -1175,7 +1173,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1175
1173
|
|
|
1176
1174
|
roundedUomValue = releaseQty * (e.detail.after.remainUomValue / e.detail.after.remainQty)
|
|
1177
1175
|
|
|
1178
|
-
roundedUomValue = parseFloat(roundedUomValue.toFixed(
|
|
1176
|
+
roundedUomValue = parseFloat(roundedUomValue.toFixed(3))
|
|
1179
1177
|
}
|
|
1180
1178
|
} else {
|
|
1181
1179
|
let packageUomValue = e.detail.record.remainUomValue / e.detail.record.remainQty
|
|
@@ -1186,13 +1184,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1186
1184
|
e.detail.record.remainQty > 0
|
|
1187
1185
|
) {
|
|
1188
1186
|
if (columnName === 'releaseQty') {
|
|
1189
|
-
releaseQty = e.detail.after || 0
|
|
1187
|
+
releaseQty = parseFloat((e.detail.after || 0).toFixed(3))
|
|
1190
1188
|
} else {
|
|
1191
1189
|
releaseQty = Math.round(e.detail.after / packageUomValue)
|
|
1192
1190
|
}
|
|
1193
1191
|
|
|
1194
1192
|
roundedUomValue = releaseQty * packageUomValue
|
|
1195
|
-
roundedUomValue = parseFloat(roundedUomValue.toFixed(
|
|
1193
|
+
roundedUomValue = parseFloat(roundedUomValue.toFixed(3))
|
|
1196
1194
|
this.releaseQty = releaseQty
|
|
1197
1195
|
this.releaseUomValue = roundedUomValue
|
|
1198
1196
|
}
|
|
@@ -1320,7 +1318,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1320
1318
|
}
|
|
1321
1319
|
}
|
|
1322
1320
|
this.releaseQty = totalReleaseQty
|
|
1323
|
-
this.releaseUomValue = Math.round(totalReleaseUomValue *
|
|
1321
|
+
this.releaseUomValue = Math.round(totalReleaseUomValue * 1000) / 1000
|
|
1324
1322
|
}
|
|
1325
1323
|
}
|
|
1326
1324
|
|
|
@@ -1745,7 +1743,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1745
1743
|
// )
|
|
1746
1744
|
// }
|
|
1747
1745
|
// }
|
|
1748
|
-
if (!this._disableBillingAddress && !this.billingAddressInput.value && !this.matchDeliveryAddressInput.checked
|
|
1746
|
+
if (!this._disableBillingAddress && !this.billingAddressInput.value && !this.matchDeliveryAddressInput.checked) {
|
|
1749
1747
|
throw new Error(i18next.t('text.billing_address_is_empty_please_fill_in_the_data_before_proceed_create_order'))
|
|
1750
1748
|
}
|
|
1751
1749
|
}
|
|
@@ -1783,6 +1781,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1783
1781
|
throw new Error(i18next.t('text.invalid_quantity_input'))
|
|
1784
1782
|
}
|
|
1785
1783
|
|
|
1784
|
+
if (inventories.some(record => record.isInventoryDecimal === false && record.releaseQty % 1 !== 0)) {
|
|
1785
|
+
const invalidRecord = inventories.find(
|
|
1786
|
+
record => record.isInventoryDecimal === false && record.releaseQty % 1 !== 0
|
|
1787
|
+
)
|
|
1788
|
+
throw new Error(i18next.t('text.decimal_quantities_not_allowed_for_sku', { sku: invalidRecord.productSKU }))
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1786
1791
|
if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PALLET.value) {
|
|
1787
1792
|
// duplication of pallet id
|
|
1788
1793
|
const palletIds = inventories.map(inv => inv.palletId)
|
|
@@ -2495,4 +2500,4 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2495
2500
|
)
|
|
2496
2501
|
}
|
|
2497
2502
|
}
|
|
2498
|
-
window.customElements.define('create-b2c-release-order', CreateB2CReleaseOrder)
|
|
2503
|
+
window.customElements.define('create-b2c-release-order', CreateB2CReleaseOrder)
|