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