@things-factory/operato-wms 4.3.59 → 4.3.62
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/components/select-inventory-popup.js +626 -0
- package/client/pages/inbound/select-product-batch.js +7 -1
- package/client/pages/inbound/unload-product.js +75 -25
- package/client/pages/inventory/inventory-adjustment.js +1 -1
- package/client/pages/inventory/inventory-by-product-detail.js +99 -92
- package/client/pages/inventory/inventory-by-product.js +170 -68
- package/client/pages/inventory-check/inspecting-product.js +1 -1
- package/client/pages/order/release-order/b2b/b2b-order-list.js +76 -80
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +93 -81
- package/client/pages/order/release-order/batch-picking-popup.js +11 -0
- package/client/pages/order/release-order/create-release-order.js +258 -252
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -3
- package/client/pages/order/release-order/release-order-detail.js +202 -63
- package/client/pages/order/transport-order/delivery-note-popup.js +12 -17
- package/client/pages/order/transport-order/upload-delivery-note.js +6 -4
- package/client/pages/order/transport-order/view-delivery-note.js +0 -1
- package/client/pages/outbound/generate-worksheet-popup.js +337 -0
- package/client/pages/outbound/inventory-reassign-popup.js +1097 -0
- package/client/pages/outbound/loading-product.js +2 -2
- package/client/pages/outbound/picking-product.js +174 -100
- package/client/pages/outbound/sorting-product.js +5 -5
- package/client/pages/outbound/worksheet-batch-picking.js +39 -5
- package/client/pages/outbound/worksheet-picking.js +45 -6
- package/client/pages/report/outbound-order-details-report.js +181 -49
- package/client/pages/report/release-inventory-report.js +503 -0
- package/client/route.js +5 -0
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +3 -3
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +54 -3
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/index.js +2 -1
- package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +63 -28
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js +180 -0
- package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -0
- package/dist-server/graphql/types/reports/index.js +6 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js +14 -1
- package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/types/reports/release-inventory-report-list.js +14 -0
- package/dist-server/graphql/types/reports/release-inventory-report-list.js.map +1 -0
- package/dist-server/graphql/types/reports/release-inventory-report.js +29 -0
- package/dist-server/graphql/types/reports/release-inventory-report.js.map +1 -0
- package/dist-server/utils/report-query-util.js +4 -2
- package/dist-server/utils/report-query-util.js.map +1 -1
- package/helps/release-note.ko.md +13 -7
- package/helps/release-note.md +13 -7
- package/helps/release-note.ms.md +13 -7
- package/helps/release-note.zh.md +13 -7
- package/package.json +10 -10
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +3 -3
- package/server/graphql/resolvers/extra/add-release-good-products.ts +66 -3
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +66 -29
- package/server/graphql/resolvers/reports/release-inventory-report.ts +202 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +14 -1
- package/server/graphql/types/reports/release-inventory-report-list.ts +8 -0
- package/server/graphql/types/reports/release-inventory-report.ts +23 -0
- package/server/utils/report-query-util.ts +4 -2
- package/things-factory.config.js +4 -0
- package/translations/en.json +73 -16
- package/translations/ko.json +157 -110
- package/translations/ms.json +65 -16
- package/translations/zh.json +79 -29
|
@@ -5,6 +5,7 @@ import '@things-factory/component-ui'
|
|
|
5
5
|
|
|
6
6
|
import '../../components/vas-templates'
|
|
7
7
|
import '../../order/vas-order/popup/vas-create-popup'
|
|
8
|
+
import '../../components/select-inventory-popup'
|
|
8
9
|
|
|
9
10
|
import gql from 'graphql-tag'
|
|
10
11
|
import { css, html } from 'lit-element'
|
|
@@ -103,6 +104,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
103
104
|
_switchDeliveryCountryInput: Boolean,
|
|
104
105
|
_switchBillingCountryInput: Boolean,
|
|
105
106
|
_allCountry: Array,
|
|
107
|
+
_containerClosureDate: Date,
|
|
108
|
+
_recallToggle: Boolean,
|
|
109
|
+
_savedStrategy: String,
|
|
110
|
+
|
|
111
|
+
// Export Form Field
|
|
112
|
+
containerSizes: Array,
|
|
106
113
|
|
|
107
114
|
// refractor
|
|
108
115
|
_contactPointInfo: Object,
|
|
@@ -110,7 +117,8 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
110
117
|
/* Tab Toggle*/
|
|
111
118
|
_showReleasedOrderInfo: Boolean,
|
|
112
119
|
_showShippingInfo: Boolean,
|
|
113
|
-
_disableBillingAddress: Boolean
|
|
120
|
+
_disableBillingAddress: Boolean,
|
|
121
|
+
_showExportInfo: Boolean
|
|
114
122
|
}
|
|
115
123
|
}
|
|
116
124
|
|
|
@@ -128,7 +136,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
128
136
|
flex: 1;
|
|
129
137
|
display: flex;
|
|
130
138
|
overflow-y: auto;
|
|
131
|
-
min-height: 50vh;
|
|
132
139
|
}
|
|
133
140
|
.picking-std-container {
|
|
134
141
|
margin-top: 0px;
|
|
@@ -208,6 +215,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
208
215
|
grid-auto-rows: minmax(24px, auto);
|
|
209
216
|
}
|
|
210
217
|
|
|
218
|
+
.label-remindContainerDeparture {
|
|
219
|
+
margin-left: 20px;
|
|
220
|
+
width: 50%;
|
|
221
|
+
}
|
|
222
|
+
|
|
211
223
|
.vas[collapsable] {
|
|
212
224
|
height: 40%;
|
|
213
225
|
}
|
|
@@ -292,12 +304,18 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
292
304
|
render() {
|
|
293
305
|
const RELEASE_ORDER_TABS = {
|
|
294
306
|
RELEASE_ORDER_INFO: i18next.t('label.order'),
|
|
295
|
-
SHIPPING_INFO: i18next.t('label.shipment')
|
|
307
|
+
SHIPPING_INFO: i18next.t('label.shipment'),
|
|
308
|
+
EXPORT_INFO: i18next.t('label.export')
|
|
296
309
|
}
|
|
297
310
|
|
|
298
311
|
const orderSet = {
|
|
299
312
|
[RELEASE_ORDER_TABS.RELEASE_ORDER_INFO]: {},
|
|
300
|
-
[RELEASE_ORDER_TABS.SHIPPING_INFO]: {}
|
|
313
|
+
[RELEASE_ORDER_TABS.SHIPPING_INFO]: {},
|
|
314
|
+
[RELEASE_ORDER_TABS.EXPORT_INFO]: {}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const disabledKey = {
|
|
318
|
+
export: this._exportOption
|
|
301
319
|
}
|
|
302
320
|
|
|
303
321
|
return html`
|
|
@@ -306,6 +324,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
306
324
|
id="order-items-list"
|
|
307
325
|
name="quickFindContent"
|
|
308
326
|
.data="${orderSet}"
|
|
327
|
+
.disabledKey="${disabledKey}"
|
|
309
328
|
@tabChanged="${e => {
|
|
310
329
|
this._tabChange(e.detail.currentTabKey)
|
|
311
330
|
}}"
|
|
@@ -386,6 +405,26 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
386
405
|
/>
|
|
387
406
|
<label for="exportOption" ?hidden="${!this._checkTransport}">${i18next.t('label.export')}</label>
|
|
388
407
|
|
|
408
|
+
|
|
409
|
+
<input
|
|
410
|
+
id="recall"
|
|
411
|
+
type="checkbox"
|
|
412
|
+
?hidden="${!this._checkTransport}"
|
|
413
|
+
@change="${async e => {
|
|
414
|
+
this._recallToggle = e.currentTarget.checked
|
|
415
|
+
|
|
416
|
+
if (e.currentTarget.checked) {
|
|
417
|
+
this.selectByPalletInput.checked = true
|
|
418
|
+
this.selectByProductInput.checked = false
|
|
419
|
+
this._pickingStd = PICKING_STANDARD.SELECT_BY_PALLET.value
|
|
420
|
+
}
|
|
421
|
+
await this.switchPickingType()
|
|
422
|
+
await this.fetchCountry()
|
|
423
|
+
}}"
|
|
424
|
+
name="recall"
|
|
425
|
+
/>
|
|
426
|
+
<label for="recall" ?hidden="${!this._checkTransport}">${i18next.t('label.recall')}</label>
|
|
427
|
+
|
|
389
428
|
<input
|
|
390
429
|
id="packingOption"
|
|
391
430
|
type="checkbox"
|
|
@@ -600,51 +639,70 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
600
639
|
|
|
601
640
|
</form>
|
|
602
641
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
this._exportOption
|
|
606
|
-
? html`
|
|
607
|
-
<div class="so-form-container">
|
|
608
|
-
<form name="shippingOrder" class="multi-column-form" autocomplete="off">
|
|
609
|
-
<fieldset>
|
|
610
|
-
<legend>${i18next.t('title.export_order')}</legend>
|
|
611
|
-
<label>${i18next.t('label.container_no')}</label>
|
|
612
|
-
<input name="containerNo" required .value="${this.containerNo}" />
|
|
613
|
-
|
|
614
|
-
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
615
|
-
<input
|
|
616
|
-
name="containerArrivalDate"
|
|
617
|
-
type="date"
|
|
618
|
-
min="${this._getStdDate()}"
|
|
619
|
-
.value="${this.containerArrivalDate}"
|
|
620
|
-
required
|
|
621
|
-
@change="${e => {
|
|
622
|
-
this._conLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
623
|
-
}}"
|
|
624
|
-
/>
|
|
642
|
+
<form name="exportInfo" ?hidden="${this._showExportInfo}" class="multi-column-form" autocomplete="off">
|
|
643
|
+
<legend>${i18next.t('title.export_information')}</legend>
|
|
625
644
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
/>
|
|
645
|
+
<label>${i18next.t('label.container_size')}</label>
|
|
646
|
+
<select name="containerSize" required>
|
|
647
|
+
<option value="">--${i18next.t('label.please_select_a_container_size')}--</option>
|
|
648
|
+
${(this.containerSizes || []).map(
|
|
649
|
+
containerSize =>
|
|
650
|
+
html`
|
|
651
|
+
<option value="${containerSize && containerSize.name}">${containerSize && containerSize.name}</option>
|
|
652
|
+
`
|
|
653
|
+
)}
|
|
654
|
+
</select>
|
|
637
655
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
</form>
|
|
642
|
-
</div>
|
|
643
|
-
`
|
|
644
|
-
: ''
|
|
645
|
-
}
|
|
656
|
+
<label>${i18next.t('label.container_no')}</label>
|
|
657
|
+
<input name="containerNo" required />
|
|
658
|
+
|
|
646
659
|
|
|
647
|
-
|
|
660
|
+
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
661
|
+
<input
|
|
662
|
+
name="containerArrivalDate"
|
|
663
|
+
type="date"
|
|
664
|
+
.value="${this._containerArrivalDate}"
|
|
665
|
+
@change="${e => {
|
|
666
|
+
this._containerClosureDateInput.setAttribute('min', e.currentTarget.value)
|
|
667
|
+
}}"
|
|
668
|
+
required
|
|
669
|
+
/>
|
|
670
|
+
|
|
671
|
+
<label>${i18next.t('label.container_departure_date')}</label>
|
|
672
|
+
<input
|
|
673
|
+
name="containerLeavingDate"
|
|
674
|
+
type="date"
|
|
675
|
+
.value="${this._containerArrivalDate}"
|
|
676
|
+
@change="${e => {
|
|
677
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
678
|
+
}}"
|
|
679
|
+
|
|
680
|
+
/>
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
<label>${i18next.t('label.container_closure_date')}</label>
|
|
684
|
+
<input
|
|
685
|
+
name="containerClosureDate"
|
|
686
|
+
type="date"
|
|
687
|
+
.value="${this._containerClosureDate}"
|
|
688
|
+
@change="${e => {
|
|
689
|
+
this._containerClosureDate = e.currentTarget.value
|
|
690
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
691
|
+
}}"
|
|
692
|
+
|
|
693
|
+
/>
|
|
694
|
+
|
|
695
|
+
<label>${i18next.t('label.ship_name')}</label>
|
|
696
|
+
<input name="shipName" />
|
|
697
|
+
|
|
698
|
+
<label>${i18next.t('label.export_remark')}</label>
|
|
699
|
+
<input name="exportRemark" />
|
|
700
|
+
|
|
701
|
+
</form>
|
|
702
|
+
|
|
703
|
+
<form class="picking-std-container multi-column-form" ?hidden="${
|
|
704
|
+
!this._showShippingInfo || !this._showExportInfo
|
|
705
|
+
}">
|
|
648
706
|
<fieldset>
|
|
649
707
|
<legend>${i18next.t('title.inventory_selection_strategy')}</legend>
|
|
650
708
|
<input
|
|
@@ -652,8 +710,27 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
652
710
|
name="picking-std"
|
|
653
711
|
type="radio"
|
|
654
712
|
value="${PICKING_STANDARD.SELECT_BY_PRODUCT.value}"
|
|
655
|
-
|
|
656
|
-
|
|
713
|
+
?disabled="${this._recallInput?.checked}"
|
|
714
|
+
@change="${async e => {
|
|
715
|
+
const value = e.currentTarget.value
|
|
716
|
+
|
|
717
|
+
if (this.inventoryGrist.dirtyData.records.length > 0) {
|
|
718
|
+
const result = await CustomAlert({
|
|
719
|
+
title: i18next.t('title.are_you_sure'),
|
|
720
|
+
text: i18next.t('text.do_you_wish_to_proceed_the_selected_products_will_be_removed'),
|
|
721
|
+
confirmButton: { text: i18next.t('button.proceed') },
|
|
722
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
723
|
+
})
|
|
724
|
+
|
|
725
|
+
if (!result.value) {
|
|
726
|
+
this._pickingStd = PICKING_STANDARD.SELECT_BY_PALLET.value
|
|
727
|
+
this.selectByPalletInput.checked = true
|
|
728
|
+
} else {
|
|
729
|
+
this._pickingStd = value
|
|
730
|
+
}
|
|
731
|
+
} else {
|
|
732
|
+
this._pickingStd = value
|
|
733
|
+
}
|
|
657
734
|
}}"
|
|
658
735
|
.checked="${this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value}"
|
|
659
736
|
checked
|
|
@@ -669,10 +746,28 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
669
746
|
name="picking-std"
|
|
670
747
|
type="radio"
|
|
671
748
|
value="${PICKING_STANDARD.SELECT_BY_PALLET.value}"
|
|
672
|
-
@change="${e => {
|
|
673
|
-
|
|
749
|
+
@change="${async e => {
|
|
750
|
+
const value = e.currentTarget.value
|
|
751
|
+
if (this.inventoryGrist.dirtyData.records.length > 0) {
|
|
752
|
+
const result = await CustomAlert({
|
|
753
|
+
title: i18next.t('title.are_you_sure'),
|
|
754
|
+
text: i18next.t('text.do_you_wish_to_proceed_the_selected_products_will_be_removed'),
|
|
755
|
+
confirmButton: { text: i18next.t('button.proceed') },
|
|
756
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
757
|
+
})
|
|
758
|
+
|
|
759
|
+
if (!result.value) {
|
|
760
|
+
this._pickingStd = PICKING_STANDARD.SELECT_BY_PRODUCT.value
|
|
761
|
+
this.selectByProductInput.checked = true
|
|
762
|
+
} else {
|
|
763
|
+
this._pickingStd = value
|
|
764
|
+
}
|
|
765
|
+
} else {
|
|
766
|
+
this._pickingStd = value
|
|
767
|
+
}
|
|
674
768
|
}}"
|
|
675
|
-
.checked="${this._pickingStd === PICKING_STANDARD.SELECT_BY_PALLET.value && !this._crossDocking
|
|
769
|
+
.checked="${(this._pickingStd === PICKING_STANDARD.SELECT_BY_PALLET.value && !this._crossDocking) ||
|
|
770
|
+
this._recallToggle}"
|
|
676
771
|
/>
|
|
677
772
|
<label for="pick-by-pallet">${i18next.t(PICKING_STANDARD.SELECT_BY_PALLET.name)}</label>
|
|
678
773
|
`
|
|
@@ -754,14 +849,22 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
754
849
|
return this.shadowRoot.querySelector('input[name=containerArrivalDate]')
|
|
755
850
|
}
|
|
756
851
|
|
|
852
|
+
get _containerClosureDateInput() {
|
|
853
|
+
return this.shadowRoot.querySelector('input[name=containerClosureDate]')
|
|
854
|
+
}
|
|
855
|
+
|
|
757
856
|
get _conLeavingDateInput() {
|
|
758
|
-
return this.shadowRoot.querySelector('input[name=
|
|
857
|
+
return this.shadowRoot.querySelector('input[name=containerClosureDate]')
|
|
759
858
|
}
|
|
760
859
|
|
|
761
860
|
get shippingOrderForm() {
|
|
762
861
|
return this.shadowRoot.querySelector('form[name=shippingOrder]')
|
|
763
862
|
}
|
|
764
863
|
|
|
864
|
+
get exportInfoForm() {
|
|
865
|
+
return this.shadowRoot.querySelector('form[name=exportInfo]')
|
|
866
|
+
}
|
|
867
|
+
|
|
765
868
|
get _ownTransportInput() {
|
|
766
869
|
return this.shadowRoot.querySelector('input[name=ownTransport]')
|
|
767
870
|
}
|
|
@@ -774,8 +877,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
774
877
|
return this.shadowRoot.querySelector('input[name=state]')
|
|
775
878
|
}
|
|
776
879
|
|
|
880
|
+
get _recallInput() {
|
|
881
|
+
return this.shadowRoot.querySelector('input[name=recall]')
|
|
882
|
+
}
|
|
883
|
+
|
|
777
884
|
get _cityBillingInput() {
|
|
778
|
-
return this.shadowRoot.querySelector('input[
|
|
885
|
+
return this.shadowRoot.querySelector('input[id=billingCity]')
|
|
779
886
|
}
|
|
780
887
|
|
|
781
888
|
get _stateBillingInput() {
|
|
@@ -818,6 +925,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
818
925
|
return this.shadowRoot.querySelector('input[name=bizplaceName]')
|
|
819
926
|
}
|
|
820
927
|
|
|
928
|
+
get selectByProductInput() {
|
|
929
|
+
return this.shadowRoot.querySelector('input[id=pick-by-prod]')
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
get selectByPalletInput() {
|
|
933
|
+
return this.shadowRoot.querySelector('input[id=pick-by-pallet]')
|
|
934
|
+
}
|
|
935
|
+
|
|
821
936
|
get matchDeliveryAddressInput() {
|
|
822
937
|
return this.shadowRoot?.querySelector('input[name=matchDeliveryAddressInput]')
|
|
823
938
|
}
|
|
@@ -893,6 +1008,8 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
893
1008
|
getCodeByName('PACKING_TYPES')
|
|
894
1009
|
])
|
|
895
1010
|
|
|
1011
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
1012
|
+
|
|
896
1013
|
this.quickFindContent.currentTabKey = i18next.t('label.order')
|
|
897
1014
|
this._disableBillingAddress = false
|
|
898
1015
|
this._enableTransportationServiceSetting = enableTransportationServiceSetting
|
|
@@ -1070,8 +1187,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1070
1187
|
this._switchDeliveryCountryInput = false
|
|
1071
1188
|
this._switchBillingCountryInput = false
|
|
1072
1189
|
this._disableBillingAddress = false
|
|
1190
|
+
this._showExportInfo = true
|
|
1073
1191
|
this._selectedDeliveryCountry = 'MALAYSIA'
|
|
1074
1192
|
this._selectedBillingCountry = 'MALAYSIA'
|
|
1193
|
+
this.containerSizes = []
|
|
1194
|
+
this._containerClosureDate = ''
|
|
1195
|
+
this._recallToggle = false
|
|
1075
1196
|
}
|
|
1076
1197
|
|
|
1077
1198
|
resetPage() {
|
|
@@ -1080,10 +1201,15 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1080
1201
|
this.bundleData = {}
|
|
1081
1202
|
this.matchDeliveryAddressInput.checked = false
|
|
1082
1203
|
this.quickFindContent.currentTabKey = i18next.t('label.order')
|
|
1204
|
+
|
|
1083
1205
|
this.initProperties()
|
|
1084
1206
|
this._clearGristConditions()
|
|
1085
1207
|
this._validateTransport()
|
|
1086
1208
|
this._getAllPostCode()
|
|
1209
|
+
|
|
1210
|
+
if (this._exportOptionInput.checked === true && this._recallInput.checked === false) {
|
|
1211
|
+
this._exportOption = true
|
|
1212
|
+
}
|
|
1087
1213
|
}
|
|
1088
1214
|
|
|
1089
1215
|
async switchPickingType() {
|
|
@@ -1092,7 +1218,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1092
1218
|
this.inventoryGristConfig = {
|
|
1093
1219
|
pagination: { infinite: true },
|
|
1094
1220
|
rows: {
|
|
1095
|
-
selectable: { multiple:
|
|
1221
|
+
selectable: { multiple: true },
|
|
1096
1222
|
classifier: (record, rowIndex) => {
|
|
1097
1223
|
return {
|
|
1098
1224
|
emphasized: record.isCrossDocking || record.isError
|
|
@@ -1131,76 +1257,18 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1131
1257
|
}
|
|
1132
1258
|
}
|
|
1133
1259
|
},
|
|
1260
|
+
|
|
1134
1261
|
{
|
|
1135
|
-
type: '
|
|
1136
|
-
name: '
|
|
1262
|
+
type: 'string',
|
|
1263
|
+
name: 'productName',
|
|
1137
1264
|
header: i18next.t('field.inventory_list'),
|
|
1138
|
-
imex: {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
type: 'array',
|
|
1143
|
-
arrData: []
|
|
1144
|
-
},
|
|
1145
|
-
record: {
|
|
1146
|
-
editable: !!this._bizplaceId,
|
|
1147
|
-
options: {
|
|
1148
|
-
queryName: 'inventoryProductGroup',
|
|
1149
|
-
basicArgs: {
|
|
1150
|
-
filters: [{ name: 'bizplace_id', operator: 'eq', value: this._bizplaceId }]
|
|
1151
|
-
},
|
|
1152
|
-
nameField: 'batchId',
|
|
1153
|
-
descriptionField: 'productName',
|
|
1154
|
-
select: [
|
|
1155
|
-
{ name: 'productId', hidden: true },
|
|
1156
|
-
{ name: 'remainUomValue', hidden: true },
|
|
1157
|
-
{ name: 'batchId', header: i18next.t('field.batch_id') },
|
|
1158
|
-
{ name: 'batchIdRef', header: i18next.t('field.batch_no_ref') },
|
|
1159
|
-
{
|
|
1160
|
-
name: 'productSKU',
|
|
1161
|
-
header: i18next.t('field.sku'),
|
|
1162
|
-
width: 150
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
name: 'productName',
|
|
1166
|
-
header: i18next.t('field.product_info'),
|
|
1167
|
-
width: 280
|
|
1168
|
-
},
|
|
1169
|
-
{ name: 'productBrand', header: i18next.t('field.brand') },
|
|
1170
|
-
{ name: 'packingType', header: i18next.t('field.packing_type') },
|
|
1171
|
-
{ name: 'packingSize', header: i18next.t('field.packing_size') },
|
|
1172
|
-
{ name: 'uom', header: i18next.t('field.uom') },
|
|
1173
|
-
{
|
|
1174
|
-
name: 'remainQty',
|
|
1175
|
-
header: i18next.t('field.remain_qty'),
|
|
1176
|
-
ignoreCondition: true
|
|
1177
|
-
},
|
|
1178
|
-
{
|
|
1179
|
-
name: 'remainUomValueWithUom',
|
|
1180
|
-
header: i18next.t('field.remain_uom_value'),
|
|
1181
|
-
ignoreCondition: true
|
|
1182
|
-
},
|
|
1183
|
-
{
|
|
1184
|
-
name: 'groupType',
|
|
1185
|
-
header: i18next.t('field.group_type'),
|
|
1186
|
-
ignoreCondition: true
|
|
1187
|
-
}
|
|
1188
|
-
],
|
|
1189
|
-
list: {
|
|
1190
|
-
fields: [
|
|
1191
|
-
'batchId',
|
|
1192
|
-
'batchIdRef',
|
|
1193
|
-
'productName',
|
|
1194
|
-
'productBrand',
|
|
1195
|
-
'packingType',
|
|
1196
|
-
'remainQty',
|
|
1197
|
-
'remainUomValue',
|
|
1198
|
-
'groupType'
|
|
1199
|
-
]
|
|
1200
|
-
}
|
|
1265
|
+
imex: { header: i18next.t('field.inventory_list'), key: 'productName', width: 50, type: 'string' },
|
|
1266
|
+
handlers: {
|
|
1267
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
1268
|
+
this._openBulkProductSelection('product')
|
|
1201
1269
|
}
|
|
1202
1270
|
},
|
|
1203
|
-
width:
|
|
1271
|
+
width: 350
|
|
1204
1272
|
},
|
|
1205
1273
|
{
|
|
1206
1274
|
type: 'string',
|
|
@@ -1273,6 +1341,9 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1273
1341
|
}
|
|
1274
1342
|
} else {
|
|
1275
1343
|
const locationSortingRules = await fetchLocationSortingRule(LOCATION_SORTING_RULE.CREATE_RELEASE_ORDER.value)
|
|
1344
|
+
|
|
1345
|
+
const recall = this._recallInput.checked
|
|
1346
|
+
|
|
1276
1347
|
this.inventoryGristConfig = {
|
|
1277
1348
|
pagination: { infinite: true },
|
|
1278
1349
|
rows: {
|
|
@@ -1300,68 +1371,16 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1300
1371
|
}
|
|
1301
1372
|
},
|
|
1302
1373
|
{
|
|
1303
|
-
type: '
|
|
1304
|
-
name: '
|
|
1374
|
+
type: 'string',
|
|
1375
|
+
name: 'productName',
|
|
1305
1376
|
header: i18next.t('field.inventory_list'),
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
basicArgs: {
|
|
1311
|
-
filters: [
|
|
1312
|
-
{ name: 'status', operator: 'eq', value: INVENTORY_STATUS.STORED.value },
|
|
1313
|
-
{ name: 'bizplace', operator: 'in', value: [this._bizplaceId] }
|
|
1314
|
-
],
|
|
1315
|
-
locationSortingRules
|
|
1316
|
-
},
|
|
1317
|
-
nameField: 'batchId',
|
|
1318
|
-
descriptionField: 'palletId',
|
|
1319
|
-
select: [
|
|
1320
|
-
{ name: 'id', hidden: true },
|
|
1321
|
-
{ name: 'name', hidden: true },
|
|
1322
|
-
{ name: 'remainUomValue', hidden: true },
|
|
1323
|
-
{ name: 'product', type: 'object', hidden: true },
|
|
1324
|
-
{ name: 'palletId', header: i18next.t('field.lot_id') },
|
|
1325
|
-
{ name: 'productSKU', header: i18next.t('field.sku') },
|
|
1326
|
-
{ name: 'productName', header: i18next.t('field.product_info') },
|
|
1327
|
-
{ name: 'productBrand', header: i18next.t('field.brand') },
|
|
1328
|
-
{ name: 'batchId', header: i18next.t('field.batch_id') },
|
|
1329
|
-
{
|
|
1330
|
-
name: 'location',
|
|
1331
|
-
type: 'object',
|
|
1332
|
-
queryName: 'locations',
|
|
1333
|
-
field: 'name'
|
|
1334
|
-
},
|
|
1335
|
-
{ name: 'packingType', header: i18next.t('field.packing_type') },
|
|
1336
|
-
{ name: 'packingSize', header: i18next.t('field.packing_size') },
|
|
1337
|
-
{ name: 'uom', header: i18next.t('field.uom') },
|
|
1338
|
-
{ name: 'remainQty', type: 'float', header: i18next.t('field.remain_qty') },
|
|
1339
|
-
{
|
|
1340
|
-
name: 'remainUomValueWithUom',
|
|
1341
|
-
type: 'string',
|
|
1342
|
-
header: i18next.t('field.total_uom_value')
|
|
1343
|
-
},
|
|
1344
|
-
{ name: 'batchIdRef', header: i18next.t('field.batch_no_ref') },
|
|
1345
|
-
{
|
|
1346
|
-
name: 'remark',
|
|
1347
|
-
type: 'string',
|
|
1348
|
-
header: i18next.t('field.remark')
|
|
1349
|
-
}
|
|
1350
|
-
],
|
|
1351
|
-
list: {
|
|
1352
|
-
fields: [
|
|
1353
|
-
'palletId',
|
|
1354
|
-
'productName',
|
|
1355
|
-
'productBrand',
|
|
1356
|
-
'batchId',
|
|
1357
|
-
'location',
|
|
1358
|
-
'remainUomValue',
|
|
1359
|
-
'batchIdRef'
|
|
1360
|
-
]
|
|
1361
|
-
}
|
|
1377
|
+
imex: { header: i18next.t('field.inventory_list'), key: 'productName', width: 50, type: 'string' },
|
|
1378
|
+
handlers: {
|
|
1379
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
1380
|
+
this._openBulkProductSelection('pallet')
|
|
1362
1381
|
}
|
|
1363
1382
|
},
|
|
1364
|
-
width:
|
|
1383
|
+
width: 350
|
|
1365
1384
|
},
|
|
1366
1385
|
{
|
|
1367
1386
|
type: 'string',
|
|
@@ -1382,7 +1401,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1382
1401
|
width: 100
|
|
1383
1402
|
},
|
|
1384
1403
|
{
|
|
1385
|
-
type: '
|
|
1404
|
+
type: 'string',
|
|
1386
1405
|
name: 'location',
|
|
1387
1406
|
header: i18next.t('field.location'),
|
|
1388
1407
|
width: 150
|
|
@@ -1439,72 +1458,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1439
1458
|
}
|
|
1440
1459
|
}
|
|
1441
1460
|
|
|
1442
|
-
// _openBulkProductSelection() {
|
|
1443
|
-
// if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
|
|
1444
|
-
// let filters = [
|
|
1445
|
-
// {
|
|
1446
|
-
// name: 'bizplace_id',
|
|
1447
|
-
// operator: 'eq',
|
|
1448
|
-
// value: this._bizplaceId
|
|
1449
|
-
// }
|
|
1450
|
-
// ]
|
|
1451
|
-
|
|
1452
|
-
// const response = await client.query({
|
|
1453
|
-
// query: gql`
|
|
1454
|
-
// query inventoryProductGroup($filters: [Filter]) {
|
|
1455
|
-
// inventoryProductGroup(filters: $filters) {
|
|
1456
|
-
// items {
|
|
1457
|
-
// productId
|
|
1458
|
-
// productSKU
|
|
1459
|
-
// productName
|
|
1460
|
-
// batchId
|
|
1461
|
-
// packingType
|
|
1462
|
-
// remainQty
|
|
1463
|
-
// remainWeight
|
|
1464
|
-
// remainUomValue
|
|
1465
|
-
// }
|
|
1466
|
-
// total
|
|
1467
|
-
// }
|
|
1468
|
-
// }
|
|
1469
|
-
// `,
|
|
1470
|
-
// variables: { filters }
|
|
1471
|
-
// })
|
|
1472
|
-
|
|
1473
|
-
// if (!response.errors) {
|
|
1474
|
-
// }
|
|
1475
|
-
// } else {
|
|
1476
|
-
// let filters = [
|
|
1477
|
-
// {
|
|
1478
|
-
// name: 'bizplace_id',
|
|
1479
|
-
// operator: 'eq',
|
|
1480
|
-
// value: this._bizplaceId
|
|
1481
|
-
// },
|
|
1482
|
-
// { name: 'status', operator: 'eq', value: INVENTORY_STATUS.STORED.value }
|
|
1483
|
-
// ]
|
|
1484
|
-
|
|
1485
|
-
// const response = await client.query({
|
|
1486
|
-
// query: gql`
|
|
1487
|
-
// query inventoryProductGroup($filters: [Filter]) {
|
|
1488
|
-
// inventoryProductGroup(filters: $filters) {
|
|
1489
|
-
// items {
|
|
1490
|
-
// productId
|
|
1491
|
-
// productSKU
|
|
1492
|
-
// productName
|
|
1493
|
-
// batchId
|
|
1494
|
-
// packingType
|
|
1495
|
-
// remainQty
|
|
1496
|
-
// remainWeight
|
|
1497
|
-
// remainUomValue
|
|
1498
|
-
// }
|
|
1499
|
-
// total
|
|
1500
|
-
// }
|
|
1501
|
-
// }
|
|
1502
|
-
// `,
|
|
1503
|
-
// variables: { filters }
|
|
1504
|
-
// })
|
|
1505
|
-
// }
|
|
1506
|
-
// }
|
|
1507
|
-
|
|
1508
1461
|
_getStdDate() {
|
|
1509
1462
|
let date = new Date()
|
|
1510
1463
|
date.setDate(date.getDate())
|
|
@@ -1937,13 +1890,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1937
1890
|
releaseGood.orderVass = this._getOrderVass()
|
|
1938
1891
|
releaseGood.ownTransport = this._ownTransport
|
|
1939
1892
|
releaseGood.type = RO_TYPES.B2B.value
|
|
1893
|
+
releaseGood.orderMethod = this._pickingStd
|
|
1940
1894
|
|
|
1941
1895
|
delete releaseGood.bizplaceId
|
|
1942
1896
|
delete releaseGood.bizplaceName
|
|
1943
1897
|
|
|
1944
1898
|
const response = await client.mutate({
|
|
1945
1899
|
mutation: gql`
|
|
1946
|
-
mutation
|
|
1900
|
+
mutation (
|
|
1947
1901
|
$releaseGood: NewReleaseGood
|
|
1948
1902
|
$shippingOrder: ShippingOrderPatch
|
|
1949
1903
|
$shippingOrderInfo: ShippingOrderInfoPatch
|
|
@@ -1965,7 +1919,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1965
1919
|
...releaseGood,
|
|
1966
1920
|
partnerBizplaceId: this._bizplaceId
|
|
1967
1921
|
},
|
|
1968
|
-
shippingOrder: this._exportOption ? this._serializeForm(this.
|
|
1922
|
+
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
1969
1923
|
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null,
|
|
1970
1924
|
attachments: this._document?.files ? this._document.files : undefined
|
|
1971
1925
|
},
|
|
@@ -1975,10 +1929,12 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
1975
1929
|
if (!response.errors) {
|
|
1976
1930
|
this.resetPage()
|
|
1977
1931
|
this._resetShippingInfoForm()
|
|
1932
|
+
this._resetExportInfoForm()
|
|
1978
1933
|
this._deliveryPostCode = []
|
|
1979
1934
|
this._billingPostCode = []
|
|
1980
1935
|
this._selectedPostCode = ''
|
|
1981
1936
|
this._selectedBillingPostCode = ''
|
|
1937
|
+
this._recallInput.checked = false
|
|
1982
1938
|
|
|
1983
1939
|
navigate(`release_order_detail/${response.data.generateReleaseGood.name}`)
|
|
1984
1940
|
this._showToast({ message: i18next.t('text.release_order_created') })
|
|
@@ -2060,6 +2016,10 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2060
2016
|
throw new Error(i18next.t('text.shipping_order_form_invalid'))
|
|
2061
2017
|
}
|
|
2062
2018
|
|
|
2019
|
+
if (this._exportOption && !this.exportInfoForm.checkValidity()) {
|
|
2020
|
+
throw new Error(i18next.t('text.export_form_is_invalid'))
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2063
2023
|
if (this._ownTransport && this._warehouseTransport) {
|
|
2064
2024
|
throw new Error(i18next.t('text.you_can_only_select_one_transport_type'))
|
|
2065
2025
|
} else if (!this._ownTransport && !this._warehouseTransport) {
|
|
@@ -2100,6 +2060,39 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2100
2060
|
if (!this.vasGrist.dirtyData.records.every(record => record.ready)) throw new Error('there_is_not_ready_vas')
|
|
2101
2061
|
}
|
|
2102
2062
|
|
|
2063
|
+
_openBulkProductSelection(type) {
|
|
2064
|
+
if (this._bizplaceId) {
|
|
2065
|
+
openPopup(
|
|
2066
|
+
html`
|
|
2067
|
+
<select-inventory-popup
|
|
2068
|
+
.bizplaceId="${this._bizplaceId}"
|
|
2069
|
+
.selectMultipleProducts="${true}"
|
|
2070
|
+
.switchTypePane="${type}"
|
|
2071
|
+
.inventoryData="${this.inventoryGrist.dirtyData.records}"
|
|
2072
|
+
.recall="${this._recallInput.checked}"
|
|
2073
|
+
@selected="${e => {
|
|
2074
|
+
let newRecords = []
|
|
2075
|
+
for (let i = 0; i < e.detail.multipleProducts.length; i++) {
|
|
2076
|
+
newRecords.push(e.detail.multipleProducts[i])
|
|
2077
|
+
}
|
|
2078
|
+
this.inventoryData = {
|
|
2079
|
+
...this.inventoryData,
|
|
2080
|
+
records: [...this.inventoryGrist.dirtyData.records, ...newRecords]
|
|
2081
|
+
}
|
|
2082
|
+
}}"
|
|
2083
|
+
></select-inventory-popup>
|
|
2084
|
+
`,
|
|
2085
|
+
{
|
|
2086
|
+
backdrop: true,
|
|
2087
|
+
size: 'large',
|
|
2088
|
+
title: i18next.t('title.select_item')
|
|
2089
|
+
}
|
|
2090
|
+
)
|
|
2091
|
+
} else {
|
|
2092
|
+
this._showToast({ message: i18next.t('text.company_selection_is_empty') })
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2103
2096
|
_updateInventoryGristConfig() {
|
|
2104
2097
|
if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
|
|
2105
2098
|
const _selectedInv = (this.inventoryGrist.dirtyData.records || [])
|
|
@@ -2322,8 +2315,8 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2322
2315
|
}
|
|
2323
2316
|
} else {
|
|
2324
2317
|
newRecord.product = {
|
|
2325
|
-
id: record.inventory.product.id,
|
|
2326
|
-
name: record.inventory.product.name
|
|
2318
|
+
id: record.inventory.productId || record.inventory.product.id,
|
|
2319
|
+
name: record.inventory.productName || record.inventory.product.name
|
|
2327
2320
|
}
|
|
2328
2321
|
newRecord.inventory = { id: record.id }
|
|
2329
2322
|
}
|
|
@@ -2902,13 +2895,21 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2902
2895
|
}
|
|
2903
2896
|
}
|
|
2904
2897
|
|
|
2905
|
-
_tabChange(key) {
|
|
2898
|
+
async _tabChange(key) {
|
|
2906
2899
|
if (key == 'order') {
|
|
2907
2900
|
this._showReleasedOrderInfo = false
|
|
2908
2901
|
this._showShippingInfo = true
|
|
2909
|
-
|
|
2902
|
+
this._showExportInfo = true
|
|
2903
|
+
} else if (key == 'shipment') {
|
|
2910
2904
|
this._showReleasedOrderInfo = true
|
|
2911
2905
|
this._showShippingInfo = false
|
|
2906
|
+
this._showExportInfo = true
|
|
2907
|
+
} else {
|
|
2908
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
2909
|
+
|
|
2910
|
+
this._showReleasedOrderInfo = true
|
|
2911
|
+
this._showShippingInfo = true
|
|
2912
|
+
this._showExportInfo = false
|
|
2912
2913
|
}
|
|
2913
2914
|
}
|
|
2914
2915
|
|
|
@@ -2935,6 +2936,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
|
|
|
2935
2936
|
this.shippingInfoForm.reset()
|
|
2936
2937
|
}
|
|
2937
2938
|
|
|
2939
|
+
_resetExportInfoForm() {
|
|
2940
|
+
this.exportInfoForm.reset()
|
|
2941
|
+
this._containerClosureDate = ''
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2938
2944
|
_fillupForm(form, data) {
|
|
2939
2945
|
if (form) {
|
|
2940
2946
|
form.reset()
|